From c4ae49b335bfc5e148e874e097f651e741f86618 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 30 Apr 2020 18:08:43 +0100 Subject: Add yargs integration for command line flags Add yargs integration for command line flags in preparation for adding a more. yargs doesn't appear to support the existing flags containing minus ('-') characters in the middle, i.e. --no-validation and --filtered-zones so these have been renamed to --no_validation and --included_zones respectively. --included_zones now takes a list without quotes or commas. This change also updates the README.md example to demonstrate the --included_zones flag. --- README.md | 2 +- index.js | 34 ++- package-lock.json | 859 ++++++++++++++++++++++++++++-------------------------- 3 files changed, 465 insertions(+), 430 deletions(-) diff --git a/README.md b/README.md index e36f1af..c085e70 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ node --max-old-space-size=8192 index.js **Run the script to generate timezones for only specified timezones.** ```shell -node --max-old-space-size=8192 index.js --filtered-zones "America/New_York,America/Chicago" +node --max-old-space-size=8192 index.js --included_zones America/New_York America/Chicago ``` ### What the script does diff --git a/index.js b/index.js index 56e8c02..e6f50f1 100644 --- a/index.js +++ b/index.js @@ -11,6 +11,7 @@ var asynclib = require('async') var jsts = require('jsts') var rimraf = require('rimraf') var overpass = require('query-overpass') +var yargs = require('yargs') const ProgressStats = require('./progressStats') @@ -18,13 +19,26 @@ var osmBoundarySources = require('./osmBoundarySources.json') var zoneCfg = require('./timezones.json') var expectedZoneOverlaps = require('./expectedZoneOverlaps.json') +const argv = yargs + .option('included_zones', { + description: 'Include specified zones', + type: 'array' + }) + .option('no_validation', { + description: 'Skip validation', + type: 'boolean' + }) + .help() + .strict() + .alias('help', 'h') + .argv + // allow building of only a specified zones -var filteredIndex = process.argv.indexOf('--filtered-zones') -let filteredZones = [] -if (filteredIndex > -1 && process.argv[filteredIndex + 1]) { - filteredZones = process.argv[filteredIndex + 1].split(',') +let includedZones = [] +if (argv.included_zones) { var newZoneCfg = {} - filteredZones.forEach((zoneName) => { + includedZones = argv.included_zones + includedZones.forEach((zoneName) => { newZoneCfg[zoneName] = zoneCfg[zoneName] }) zoneCfg = newZoneCfg @@ -573,8 +587,8 @@ let oceanZones = [ { tzid: 'Etc/GMT+12', left: -180, right: -172.5 } ] -if (filteredZones.length > 0) { - oceanZones = oceanZones.filter(oceanZone => filteredZones.indexOf(oceanZone) > -1) +if (includedZones.length > 0) { + oceanZones = oceanZones.filter(oceanZone => includedZones.indexOf(oceanZone) > -1) } var addOceans = function (callback) { @@ -677,7 +691,7 @@ const autoScript = { validateZones: ['createZones', function (results, cb) { overallProgress.beginTask('Validating timezone boundaries') loadDistZonesIntoMemory() - if (process.argv.indexOf('no-validation') > -1) { + if (argv.no_validation) { console.warn('WARNING: Skipping validation!') cb() } else { @@ -728,8 +742,8 @@ const autoScript = { oceanZones.forEach(oceanZone => { zoneNames.push(oceanZone.tzid) }) - if (filteredZones.length > 0) { - zoneNames = zoneNames.filter(zoneName => filteredZones.indexOf(zoneName) > -1) + if (includedZones.length > 0) { + zoneNames = zoneNames.filter(zoneName => includedZones.indexOf(zoneName) > -1) } fs.writeFile( 'dist/timezone-names.json', diff --git a/package-lock.json b/package-lock.json index 018b6b2..3c2b085 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,11 +17,18 @@ "resolved": "https://registry.npmjs.org/@mapbox/geojsonhint/-/geojsonhint-3.0.0.tgz", "integrity": "sha512-zHcyh1rDHYnEBd6NvOWoeHLuvazlDkIjvz9MJx4cKwcKTlfrqgxVnTv1QLnVJnsSU5neJnhQJcgscR/Zl4uYgw==", "requires": { - "concat-stream": "1.6.2", + "concat-stream": "^1.6.1", "jsonlint-lines": "1.7.1", "minimist": "1.2.0", - "vfile": "4.0.1", - "vfile-reporter": "5.1.2" + "vfile": "^4.0.0", + "vfile-reporter": "^5.1.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } } }, "@turf/bbox": { @@ -29,8 +36,8 @@ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-6.0.1.tgz", "integrity": "sha512-EGgaRLettBG25Iyx7VyUINsPpVj1x3nFQFiGS3ER8KCI1MximzNLsam3eXRabqQDjyAKyAE1bJ4EZEpGvspQxw==", "requires": { - "@turf/helpers": "6.1.4", - "@turf/meta": "6.0.2" + "@turf/helpers": "6.x", + "@turf/meta": "6.x" } }, "@turf/helpers": { @@ -43,16 +50,21 @@ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.0.2.tgz", "integrity": "sha512-VA7HJkx7qF1l3+GNGkDVn2oXy4+QoLP6LktXAaZKjuT1JI0YESat7quUkbCMy4zP9lAUuvS4YMslLyTtr919FA==", "requires": { - "@turf/helpers": "6.1.4" + "@turf/helpers": "6.x" } }, + "@types/unist": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", + "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==" + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" } }, "JSV": { @@ -77,10 +89,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "ajv-keywords": { @@ -112,7 +124,7 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-includes": { @@ -121,8 +133,8 @@ "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { - "define-properties": "1.1.3", - "es-abstract": "1.13.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "asn1": { @@ -130,7 +142,7 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "~2.1.0" } }, "assert-plus": { @@ -164,9 +176,9 @@ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" }, "dependencies": { "ansi-styles": { @@ -181,11 +193,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "strip-ansi": { @@ -194,7 +206,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "supports-color": { @@ -220,7 +232,7 @@ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "bops": { @@ -237,7 +249,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -252,7 +264,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -271,9 +283,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "requires": { - "ansi-styles": "1.0.0", - "has-color": "0.1.7", - "strip-ansi": "0.1.1" + "ansi-styles": "~1.0.0", + "has-color": "~0.1.0", + "strip-ansi": "~0.1.0" } }, "chardet": { @@ -294,7 +306,7 @@ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "restore-cursor": "2.0.0" + "restore-cursor": "^2.0.0" } }, "cli-width": { @@ -323,7 +335,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "concat-map": { @@ -336,10 +348,10 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "contains-path": { @@ -359,11 +371,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "1.0.5", - "path-key": "2.0.1", - "semver": "5.7.0", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "dashdash": { @@ -371,7 +383,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "debug": { @@ -380,7 +392,7 @@ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.1.2" + "ms": "^2.1.1" } }, "debug-log": { @@ -400,7 +412,7 @@ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "requires": { - "object-keys": "1.1.0" + "object-keys": "^1.0.12" } }, "deglob": { @@ -409,12 +421,12 @@ "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", "dev": true, "requires": { - "find-root": "1.1.0", - "glob": "7.1.3", - "ignore": "3.3.10", - "pkg-config": "1.1.1", - "run-parallel": "1.1.9", - "uniq": "1.0.1" + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" }, "dependencies": { "ignore": { @@ -436,7 +448,7 @@ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "2.0.2" + "esutils": "^2.0.2" } }, "dom-walk": { @@ -454,7 +466,7 @@ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.2.1.tgz", "integrity": "sha1-Wd+dzSJ+gIs2Wuc+H2aErD2Ub8I=", "requires": { - "domelementtype": "1.3.1" + "domelementtype": "1" } }, "domutils": { @@ -462,7 +474,7 @@ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.3.0.tgz", "integrity": "sha1-mtTVm1r2ymhMYv5tdo7xcOcN8ZI=", "requires": { - "domelementtype": "1.3.1" + "domelementtype": "1" } }, "ecc-jsbn": { @@ -470,8 +482,8 @@ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "requires": { - "jsbn": "0.1.1", - "safer-buffer": "2.1.2" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "error-ex": { @@ -480,7 +492,7 @@ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "is-arrayish": "0.2.1" + "is-arrayish": "^0.2.1" } }, "es-abstract": { @@ -488,12 +500,12 @@ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", "requires": { - "es-to-primitive": "1.2.0", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.4", - "is-regex": "1.0.4", - "object-keys": "1.1.0" + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" } }, "es-to-primitive": { @@ -501,9 +513,9 @@ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "requires": { - "is-callable": "1.1.4", - "is-date-object": "1.0.1", - "is-symbol": "1.0.2" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, "escape-string-regexp": { @@ -518,44 +530,44 @@ "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", "dev": true, "requires": { - "ajv": "6.6.2", - "babel-code-frame": "6.26.0", - "chalk": "2.4.2", - "cross-spawn": "6.0.5", - "debug": "3.2.6", - "doctrine": "2.1.0", - "eslint-scope": "4.0.3", - "eslint-utils": "1.4.2", - "eslint-visitor-keys": "1.0.0", - "espree": "4.1.0", - "esquery": "1.0.1", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.3", - "globals": "11.12.0", - "ignore": "4.0.6", - "imurmurhash": "0.1.4", - "inquirer": "5.2.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.13.1", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.15", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.3", - "regexpp": "2.0.1", - "require-uncached": "1.0.3", - "semver": "5.7.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.3", - "text-table": "0.2.0" + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" }, "dependencies": { "ansi-regex": { @@ -570,7 +582,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.3" + "color-convert": "^1.9.0" } }, "chalk": { @@ -579,9 +591,9 @@ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "strip-ansi": { @@ -590,7 +602,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -613,8 +625,8 @@ "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { - "debug": "2.6.9", - "resolve": "1.11.1" + "debug": "^2.6.9", + "resolve": "^1.5.0" }, "dependencies": { "debug": { @@ -640,8 +652,8 @@ "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", "dev": true, "requires": { - "debug": "2.6.9", - "pkg-dir": "2.0.0" + "debug": "^2.6.8", + "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { @@ -667,8 +679,8 @@ "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", "dev": true, "requires": { - "eslint-utils": "1.4.2", - "regexpp": "2.0.1" + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.1" } }, "eslint-plugin-import": { @@ -677,16 +689,16 @@ "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", "dev": true, "requires": { - "contains-path": "0.1.0", - "debug": "2.6.9", + "contains-path": "^0.1.0", + "debug": "^2.6.8", "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.4.0", - "has": "1.0.3", - "lodash": "4.17.15", - "minimatch": "3.0.4", - "read-pkg-up": "2.0.0", - "resolve": "1.11.1" + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" }, "dependencies": { "debug": { @@ -704,8 +716,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } }, "ms": { @@ -722,12 +734,12 @@ "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", "dev": true, "requires": { - "eslint-plugin-es": "1.4.0", - "eslint-utils": "1.4.2", - "ignore": "4.0.6", - "minimatch": "3.0.4", - "resolve": "1.11.1", - "semver": "5.7.0" + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" } }, "eslint-plugin-promise": { @@ -742,11 +754,11 @@ "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", "dev": true, "requires": { - "array-includes": "3.0.3", - "doctrine": "2.1.0", - "has": "1.0.3", - "jsx-ast-utils": "2.2.1", - "prop-types": "15.7.2" + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.2" } }, "eslint-plugin-standard": { @@ -761,8 +773,8 @@ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint-utils": { @@ -771,7 +783,7 @@ "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", "dev": true, "requires": { - "eslint-visitor-keys": "1.0.0" + "eslint-visitor-keys": "^1.0.0" } }, "eslint-visitor-keys": { @@ -786,9 +798,9 @@ "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", "dev": true, "requires": { - "acorn": "6.4.1", - "acorn-jsx": "5.0.1", - "eslint-visitor-keys": "1.0.0" + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" } }, "esprima": { @@ -803,7 +815,7 @@ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -812,7 +824,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -838,9 +850,9 @@ "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.24", - "tmp": "0.0.33" + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" } }, "extsprintf": { @@ -870,7 +882,7 @@ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5" + "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { @@ -879,8 +891,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.3.4", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "find-root": { @@ -895,7 +907,7 @@ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "locate-path": "2.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -904,10 +916,10 @@ "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", "dev": true, "requires": { - "circular-json": "0.3.3", - "graceful-fs": "4.2.0", - "rimraf": "2.6.3", - "write": "0.2.1" + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" }, "dependencies": { "rimraf": { @@ -916,7 +928,7 @@ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "7.1.3" + "glob": "^7.1.3" } } } @@ -926,7 +938,7 @@ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "requires": { - "is-callable": "1.1.4" + "is-callable": "^1.1.3" } }, "forever-agent": { @@ -939,9 +951,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.8", - "mime-types": "2.1.24" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, "fs.realpath": { @@ -973,8 +985,8 @@ "resolved": "https://registry.npmjs.org/geojson-numeric/-/geojson-numeric-0.2.0.tgz", "integrity": "sha1-q5quLqlyekg3B5rP8qqDyHLXLUo=", "requires": { - "concat-stream": "1.0.1", - "optimist": "0.3.7" + "concat-stream": "~1.0.1", + "optimist": "~0.3.5" }, "dependencies": { "concat-stream": { @@ -992,7 +1004,7 @@ "resolved": "https://registry.npmjs.org/geojson-rewind/-/geojson-rewind-0.1.0.tgz", "integrity": "sha1-VwIqBUsZZmDXVTVP5dJmhNkM0Bk=", "requires": { - "concat-stream": "1.2.1", + "concat-stream": "~1.2.1", "geojson-area": "0.1.0", "minimist": "0.0.5" }, @@ -1023,7 +1035,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" } }, "glob": { @@ -1031,12 +1043,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "global": { @@ -1044,8 +1056,8 @@ "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "requires": { - "min-document": "2.19.0", - "process": "0.5.2" + "min-document": "^2.19.0", + "process": "~0.5.1" } }, "globals": { @@ -1070,8 +1082,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "requires": { - "ajv": "6.6.2", - "har-schema": "2.0.0" + "ajv": "^6.5.5", + "har-schema": "^2.0.0" } }, "has": { @@ -1079,7 +1091,7 @@ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-ansi": { @@ -1088,7 +1100,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-color": { @@ -1117,10 +1129,10 @@ "resolved": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.5.1.tgz", "integrity": "sha1-b0L3ZX3RnBP31l3pEYQXOUoL5tA=", "requires": { - "domelementtype": "1.3.1", - "domhandler": "2.2.1", - "domutils": "1.3.0", - "readable-stream": "1.1.14" + "domelementtype": "1", + "domhandler": "2.2", + "domutils": "1.3", + "readable-stream": "1.1" }, "dependencies": { "isarray": { @@ -1133,10 +1145,10 @@ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "string_decoder": { @@ -1151,9 +1163,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.16.1" + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "iconv-lite": { @@ -1161,7 +1173,7 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore": { @@ -1186,8 +1198,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1201,19 +1213,19 @@ "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { - "ansi-escapes": "3.2.0", - "chalk": "2.4.2", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.15", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rxjs": "5.5.12", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" }, "dependencies": { "ansi-regex": { @@ -1228,7 +1240,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.3" + "color-convert": "^1.9.0" } }, "chalk": { @@ -1237,9 +1249,9 @@ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "strip-ansi": { @@ -1248,7 +1260,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -1295,7 +1307,7 @@ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "requires": { - "has": "1.0.3" + "has": "^1.0.1" } }, "is-resolvable": { @@ -1309,7 +1321,7 @@ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", "requires": { - "has-symbols": "1.0.0" + "has-symbols": "^1.0.0" } }, "is-typedarray": { @@ -1345,8 +1357,8 @@ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "argparse": "1.0.10", - "esprima": "4.0.1" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "jsbn": { @@ -1386,8 +1398,8 @@ "resolved": "https://registry.npmjs.org/jsonlint-lines/-/jsonlint-lines-1.7.1.tgz", "integrity": "sha1-UH3mgNP7jEvhZBzFfW9nnynxeP8=", "requires": { - "JSV": "4.0.2", - "nomnom": "1.8.1" + "JSV": ">= 4.0.x", + "nomnom": ">= 1.5.x" } }, "jsonparse": { @@ -1417,8 +1429,8 @@ "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", "dev": true, "requires": { - "array-includes": "3.0.3", - "object.assign": "4.1.0" + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" } }, "jszip": { @@ -1426,7 +1438,7 @@ "resolved": "https://registry.npmjs.org/jszip/-/jszip-2.6.1.tgz", "integrity": "sha1-uI86ey5noqBIFSmCx6N1bZxIKPA=", "requires": { - "pako": "1.0.10" + "pako": "~1.0.2" } }, "levn": { @@ -1435,8 +1447,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "lie": { @@ -1444,7 +1456,7 @@ "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", "requires": { - "immediate": "3.0.6" + "immediate": "~3.0.5" } }, "load-json-file": { @@ -1453,10 +1465,10 @@ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "graceful-fs": "4.2.0", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" } }, "locate-path": { @@ -1465,8 +1477,8 @@ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { @@ -1481,7 +1493,7 @@ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "js-tokens": "3.0.2" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "lru-cache": { @@ -1489,6 +1501,11 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" }, + "mgrs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz", + "integrity": "sha1-+5FYjnjJACVnI5XLQLJffNatGCk=" + }, "mime-db": { "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", @@ -1513,7 +1530,7 @@ "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "requires": { - "dom-walk": "0.1.1" + "dom-walk": "^0.1.0" } }, "minimatch": { @@ -1521,29 +1538,21 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "ms": { @@ -1575,8 +1584,8 @@ "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", "requires": { - "chalk": "0.4.0", - "underscore": "1.6.0" + "chalk": "~0.4.0", + "underscore": "~1.6.0" } }, "normalize-package-data": { @@ -1585,10 +1594,10 @@ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { - "hosted-git-info": "2.7.1", - "resolve": "1.11.1", - "semver": "5.7.0", - "validate-npm-package-license": "3.0.4" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "oauth-sign": { @@ -1613,10 +1622,10 @@ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { - "define-properties": "1.1.3", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "object-keys": "1.1.0" + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, "once": { @@ -1624,7 +1633,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -1633,7 +1642,7 @@ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "mimic-fn": "1.2.0" + "mimic-fn": "^1.0.0" } }, "optimist": { @@ -1641,7 +1650,7 @@ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", "requires": { - "wordwrap": "0.0.3" + "wordwrap": "~0.0.2" } }, "optionator": { @@ -1650,12 +1659,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" }, "dependencies": { "wordwrap": { @@ -1683,13 +1692,13 @@ "integrity": "sha1-8IT319XwOKQ4OzHANjR6E0sIGdM=", "requires": { "JSONStream": "0.8.0", - "concat-stream": "1.0.1", + "concat-stream": "~1.0.1", "geojson-numeric": "0.2.0", "geojson-rewind": "0.1.0", "htmlparser2": "3.5.1", - "optimist": "0.3.7", - "osm-polygon-features": "0.9.2", - "xmldom": "0.1.27" + "optimist": "~0.3.5", + "osm-polygon-features": "^0.9.1", + "xmldom": "~0.1.16" }, "dependencies": { "JSONStream": { @@ -1698,7 +1707,7 @@ "integrity": "sha1-78Ri1aW8lOwAf0siVxrNf28q4BM=", "requires": { "jsonparse": "0.0.5", - "through": "2.2.7" + "through": "~2.2.7" } }, "concat-stream": { @@ -1727,7 +1736,7 @@ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "requires": { - "p-try": "1.0.0" + "p-try": "^1.0.0" } }, "p-locate": { @@ -1736,7 +1745,7 @@ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "p-limit": "1.3.0" + "p-limit": "^1.1.0" } }, "p-try": { @@ -1755,8 +1764,8 @@ "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.2.tgz", "integrity": "sha512-/LypJhzFmyBIDYP9aDVgeyEb5sQfbfY5mnDq4hVhlQ69js87wXfmEI5V3xI6vvXasqebp0oCytYFLxsBVfCzSg==", "requires": { - "for-each": "0.3.3", - "string.prototype.trim": "1.1.2" + "for-each": "^0.3.3", + "string.prototype.trim": "^1.1.2" } }, "parse-json": { @@ -1765,7 +1774,7 @@ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { - "error-ex": "1.3.2" + "error-ex": "^1.2.0" } }, "parsedbf": { @@ -1773,8 +1782,8 @@ "resolved": "https://registry.npmjs.org/parsedbf/-/parsedbf-1.0.0.tgz", "integrity": "sha512-qm8G6BPAL8yesN4UP4cNq1rxI5g5OyQNwS/SiLvjVT87PZ+9sbRdIANqH8kPKWvIiDbFM2V3C0xUuh/jvUqRdQ==", "requires": { - "iconv-lite": "0.4.24", - "text-encoding-polyfill": "0.6.7" + "iconv-lite": "^0.4.15", + "text-encoding-polyfill": "^0.6.7" } }, "path-exists": { @@ -1812,7 +1821,7 @@ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { - "pify": "2.3.0" + "pify": "^2.0.0" } }, "performance-now": { @@ -1832,8 +1841,8 @@ "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "dependencies": { "load-json-file": { @@ -1842,10 +1851,10 @@ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "graceful-fs": "4.2.0", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } }, "parse-json": { @@ -1854,8 +1863,8 @@ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "1.3.2", - "json-parse-better-errors": "1.0.2" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "pify": { @@ -1872,9 +1881,9 @@ "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", "dev": true, "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" } }, "pkg-dir": { @@ -1883,7 +1892,7 @@ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "find-up": "2.1.0" + "find-up": "^2.1.0" } }, "pluralize": { @@ -1919,7 +1928,8 @@ "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.5.0.tgz", "integrity": "sha512-XZTRT7OPdLzgvtTqL8DG2cEj8lYdovztOwiwpwRSYayOty5Ipf3H68dh/fiL+HKDEyetmQSMhkkMGiJoyziz3w==", "requires": { - "wkt-parser": "1.2.3" + "mgrs": "1.0.0", + "wkt-parser": "^1.2.0" } }, "prop-types": { @@ -1928,9 +1938,9 @@ "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "dev": true, "requires": { - "loose-envify": "1.4.0", - "object-assign": "4.1.1", - "react-is": "16.8.6" + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" } }, "psl": { @@ -1953,13 +1963,13 @@ "resolved": "https://registry.npmjs.org/query-overpass/-/query-overpass-1.5.5.tgz", "integrity": "sha512-GiSzJ/lgi0JePaLI0q7TY43QjUOtpIF5kIbQC0DyOD0psBFEJeVjFZDPaWIgD7GctTvRrt0438Vqp1zUEPw6hA==", "requires": { - "JSONStream": "1.3.5", - "concat-stream": "2.0.0", - "minimist": "1.2.0", - "osmtogeojson": "2.2.12", - "request": "2.88.0", - "xhr": "2.5.0", - "xmldom": "0.1.27" + "JSONStream": "^1.3.5", + "concat-stream": "^2.0.0", + "minimist": "^1.2.0", + "osmtogeojson": "^2.2.12", + "request": "^2.88.0", + "xhr": "^2.4.0", + "xmldom": "^0.1.27" }, "dependencies": { "concat-stream": { @@ -1967,10 +1977,10 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", "requires": { - "buffer-from": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "3.6.0", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" } }, "readable-stream": { @@ -1978,9 +1988,9 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { - "inherits": "2.0.3", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } } } @@ -1997,9 +2007,9 @@ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.5.0", - "path-type": "2.0.0" + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" } }, "read-pkg-up": { @@ -2008,8 +2018,8 @@ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" } }, "readable-stream": { @@ -2017,13 +2027,13 @@ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "regexpp": { @@ -2037,31 +2047,36 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.8.0", - "caseless": "0.12.0", - "combined-stream": "1.0.8", - "extend": "3.0.2", - "forever-agent": "0.6.1", - "form-data": "2.3.3", - "har-validator": "5.1.3", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.24", - "oauth-sign": "0.9.0", - "performance-now": "2.1.0", - "qs": "6.5.2", - "safe-buffer": "5.1.2", - "tough-cookie": "2.4.3", - "tunnel-agent": "0.6.0", - "uuid": "3.3.2" + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" } }, "require-uncached": { @@ -2070,8 +2085,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "resolve": { @@ -2080,7 +2095,7 @@ "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", "dev": true, "requires": { - "path-parse": "1.0.6" + "path-parse": "^1.0.6" } }, "resolve-from": { @@ -2095,8 +2110,8 @@ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, "rimraf": { @@ -2104,7 +2119,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "requires": { - "glob": "7.1.3" + "glob": "^7.1.3" } }, "run-async": { @@ -2113,7 +2128,7 @@ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "is-promise": "2.1.0" + "is-promise": "^2.1.0" } }, "run-parallel": { @@ -2153,7 +2168,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -2167,11 +2182,11 @@ "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.4.3.tgz", "integrity": "sha512-NZM75+SLgPt9dK91Z92QK+fVd2OR6zswAmkTrkHRc4mnONbAWGo38I+AxCYsKgCNfqF5cZUi2KfO7r2TZ+tHdw==", "requires": { - "jszip": "2.6.1", - "lie": "3.3.0", - "lru-cache": "2.7.3", - "parsedbf": "1.0.0", - "proj4": "2.5.0" + "jszip": "^2.4.0", + "lie": "^3.0.1", + "lru-cache": "^2.7.0", + "parsedbf": "^1.0.0", + "proj4": "^2.1.4" } }, "signal-exit": { @@ -2186,7 +2201,7 @@ "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0" + "is-fullwidth-code-point": "^2.0.0" } }, "spdx-correct": { @@ -2195,8 +2210,8 @@ "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.4" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { @@ -2211,8 +2226,8 @@ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "spdx-exceptions": "2.2.0", - "spdx-license-ids": "3.0.4" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { @@ -2232,15 +2247,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "requires": { - "asn1": "0.2.4", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.2", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.2", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "safer-buffer": "2.1.2", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" } }, "standard": { @@ -2249,15 +2264,15 @@ "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", "dev": true, "requires": { - "eslint": "5.4.0", + "eslint": "~5.4.0", "eslint-config-standard": "12.0.0", "eslint-config-standard-jsx": "6.0.2", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.0.1", - "eslint-plugin-react": "7.11.1", - "eslint-plugin-standard": "4.0.0", - "standard-engine": "9.0.0" + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" } }, "standard-engine": { @@ -2266,10 +2281,10 @@ "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", "dev": true, "requires": { - "deglob": "2.1.1", - "get-stdin": "6.0.0", - "minimist": "1.2.0", - "pkg-conf": "2.1.0" + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" } }, "string-width": { @@ -2277,8 +2292,8 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { @@ -2291,7 +2306,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -2301,9 +2316,9 @@ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", "requires": { - "define-properties": "1.1.3", - "es-abstract": "1.13.0", - "function-bind": "1.1.1" + "define-properties": "^1.1.2", + "es-abstract": "^1.5.0", + "function-bind": "^1.0.2" } }, "string_decoder": { @@ -2311,7 +2326,7 @@ "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -2336,7 +2351,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } }, "symbol-observable": { @@ -2351,12 +2366,12 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.6.2", - "ajv-keywords": "3.4.0", - "chalk": "2.4.2", - "lodash": "4.17.15", + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", "slice-ansi": "1.0.0", - "string-width": "2.1.1" + "string-width": "^2.1.1" }, "dependencies": { "ansi-styles": { @@ -2365,7 +2380,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.3" + "color-convert": "^1.9.0" } }, "chalk": { @@ -2374,9 +2389,9 @@ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } } } @@ -2403,7 +2418,7 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "1.0.2" + "os-tmpdir": "~1.0.2" } }, "to-utf8": { @@ -2416,8 +2431,8 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "requires": { - "psl": "1.2.0", - "punycode": "1.4.1" + "psl": "^1.1.24", + "punycode": "^1.4.1" }, "dependencies": { "punycode": { @@ -2432,7 +2447,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -2446,7 +2461,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "typedarray": { @@ -2468,14 +2483,17 @@ "unist-util-stringify-position": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz", - "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==" + "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==", + "requires": { + "@types/unist": "^2.0.2" + } }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" } }, "util-deprecate": { @@ -2494,8 +2512,8 @@ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { - "spdx-correct": "3.1.0", - "spdx-expression-parse": "3.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "verror": { @@ -2503,9 +2521,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" } }, "vfile": { @@ -2513,9 +2531,11 @@ "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.0.1.tgz", "integrity": "sha512-lRHFCuC4SQBFr7Uq91oJDJxlnftoTLQ7eKIpMdubhYcVMho4781a8MWXLy3qZrZ0/STD1kRiKc0cQOHm4OkPeA==", "requires": { - "is-buffer": "2.0.3", - "unist-util-stringify-position": "2.0.1", - "vfile-message": "2.0.1" + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "replace-ext": "1.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" } }, "vfile-message": { @@ -2523,7 +2543,8 @@ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.1.tgz", "integrity": "sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==", "requires": { - "unist-util-stringify-position": "2.0.1" + "@types/unist": "^2.0.2", + "unist-util-stringify-position": "^2.0.0" } }, "vfile-reporter": { @@ -2531,12 +2552,12 @@ "resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-5.1.2.tgz", "integrity": "sha512-b15sTuss1wOPWVlyWOvu+n6wGJ/eTYngz3uqMLimQvxZ+Q5oFQGYZZP1o3dR9sk58G5+wej0UPCZSwQBX/mzrQ==", "requires": { - "repeat-string": "1.6.1", - "string-width": "2.1.1", - "supports-color": "5.5.0", - "unist-util-stringify-position": "2.0.1", - "vfile-sort": "2.2.1", - "vfile-statistics": "1.1.3" + "repeat-string": "^1.5.0", + "string-width": "^2.0.0", + "supports-color": "^5.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-sort": "^2.1.2", + "vfile-statistics": "^1.1.0" } }, "vfile-sort": { @@ -2560,7 +2581,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "wkt-parser": { @@ -2584,7 +2605,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" } }, "xhr": { @@ -2592,10 +2613,10 @@ "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", "requires": { - "global": "4.3.2", - "is-function": "1.0.1", - "parse-headers": "2.0.2", - "xtend": "4.0.1" + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" } }, "xmldom": { -- cgit v1.2.3 From 2b4b80af97de2c6126456f3fc1415a80cb9268d7 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 30 Apr 2020 18:20:56 +0100 Subject: Add a flag to exclude troublesome zones Tested with: $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York --- index.js | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index e6f50f1..6db6bd7 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,10 @@ const argv = yargs description: 'Include specified zones', type: 'array' }) + .option('excluded_zones', { + description: 'Exclude specified zones', + type: 'array' + }) .option('no_validation', { description: 'Skip validation', type: 'boolean' @@ -35,13 +39,26 @@ const argv = yargs // allow building of only a specified zones let includedZones = [] -if (argv.included_zones) { - var newZoneCfg = {} - includedZones = argv.included_zones - includedZones.forEach((zoneName) => { - newZoneCfg[zoneName] = zoneCfg[zoneName] - }) - zoneCfg = newZoneCfg +let excludedZones = [] +if (argv.included_zones || argv.excluded_zones) { + if (argv.included_zones) { + let newZoneCfg = {} + includedZones = argv.included_zones + includedZones.forEach((zoneName) => { + newZoneCfg[zoneName] = zoneCfg[zoneName] + }) + zoneCfg = newZoneCfg + } + if (argv.excluded_zones) { + let newZoneCfg = {} + excludedZones = argv.excluded_zones + Object.keys(zoneCfg).forEach((zoneName) => { + if (!excludedZones.includes(zoneName)) { + newZoneCfg[zoneName] = zoneCfg[zoneName] + } + }) + zoneCfg = newZoneCfg + } // filter out unneccessary downloads var newOsmBoundarySources = {} @@ -590,6 +607,9 @@ let oceanZones = [ if (includedZones.length > 0) { oceanZones = oceanZones.filter(oceanZone => includedZones.indexOf(oceanZone) > -1) } +if (excludedZones.length > 0) { + oceanZones = oceanZones.filter(oceanZone => excludedZones.indexOf(oceanZone) === -1) +} var addOceans = function (callback) { console.log('adding ocean boundaries') @@ -745,6 +765,9 @@ const autoScript = { if (includedZones.length > 0) { zoneNames = zoneNames.filter(zoneName => includedZones.indexOf(zoneName) > -1) } + if (excludedZones.length > 0) { + zoneNames = zoneNames.filter(zoneName => excludedZones.indexOf(zoneName) === -1) + } fs.writeFile( 'dist/timezone-names.json', JSON.stringify(zoneNames), -- cgit v1.2.3 From a4e7327bd2c082c6cdcb44b49f095705204b728e Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 30 Apr 2020 18:25:44 +0100 Subject: Add flags to control output directories Tested with: $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York \ --dist_dir ./dist2 \ --downloads_dir ./downloads2 --- index.js | 54 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/index.js b/index.js index 6db6bd7..771ad24 100644 --- a/index.js +++ b/index.js @@ -28,6 +28,16 @@ const argv = yargs description: 'Exclude specified zones', type: 'array' }) + .option('downloads_dir', { + description: 'Set the download location', + default: './downloads', + type: 'string' + }) + .option('dist_dir', { + description: 'Set the dist location', + default: './dist', + type: 'string' + }) .option('no_validation', { description: 'Skip validation', type: 'boolean' @@ -184,7 +194,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } else { query += 'relation' } - var boundaryFilename = './downloads/' + boundaryId + '.json' + var boundaryFilename = argv.downloads_dir + '/' + boundaryId + '.json' var debug = 'getting data for ' + boundaryId var queryKeys = Object.keys(cfg) @@ -292,7 +302,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } var getTzDistFilename = function (tzid) { - return './dist/' + tzid.replace(/\//g, '__') + '.json' + return argv.dist_dir + '/' + tzid.replace(/\//g, '__') + '.json' } /** @@ -307,7 +317,7 @@ var getTzDistFilename = function (tzid) { var getDataSource = function (source) { var geoJson if (source.source === 'overpass') { - geoJson = require('./downloads/' + source.id + '.json') + geoJson = require(argv.downloads_dir + '/' + source.id + '.json') } else if (source.source === 'manual-polygon') { geoJson = polygon(source.data).geometry } else if (source.source === 'manual-multipolygon') { @@ -647,8 +657,8 @@ var addOceans = function (callback) { } var combineAndWriteZones = function (callback) { - var stream = fs.createWriteStream('./dist/combined.json') - var streamWithOceans = fs.createWriteStream('./dist/combined-with-oceans.json') + var stream = fs.createWriteStream(argv.dist_dir + '/combined.json') + var streamWithOceans = fs.createWriteStream(argv.dist_dir + '/combined-with-oceans.json') var zones = Object.keys(zoneCfg) stream.write('{"type":"FeatureCollection","features":[') @@ -690,11 +700,11 @@ var combineAndWriteZones = function (callback) { const autoScript = { makeDownloadsDir: function (cb) { overallProgress.beginTask('Creating downloads dir') - safeMkdir('./downloads', cb) + safeMkdir(argv.downloads_dir, cb) }, makeDistDir: function (cb) { overallProgress.beginTask('Creating dist dir') - safeMkdir('./dist', cb) + safeMkdir(argv.dist_dir, cb) }, getOsmBoundaries: ['makeDownloadsDir', function (results, cb) { overallProgress.beginTask('Downloading osm boundaries') @@ -728,31 +738,43 @@ const autoScript = { }], zipGeoJson: ['mergeZones', function (results, cb) { overallProgress.beginTask('Zipping geojson') - exec('zip dist/timezones.geojson.zip dist/combined.json', cb) + let zipFile = argv.dist_dir + '/timezones.geojson.zip' + let jsonFile = argv.dist_dir + '/combined.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) }], zipGeoJsonWithOceans: ['mergeZones', function (results, cb) { overallProgress.beginTask('Zipping geojson with oceans') - exec('zip dist/timezones-with-oceans.geojson.zip dist/combined-with-oceans.json', cb) + let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) }], makeShapefile: ['mergeZones', function (results, cb) { overallProgress.beginTask('Converting from geojson to shapefile') - rimraf.sync('dist/combined-shapefile.*') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile.shp' + let jsonFile = argv.dist_dir + '/combined.json' exec( - 'ogr2ogr -f "ESRI Shapefile" dist/combined-shapefile.shp dist/combined.json', + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - exec('zip dist/timezones.shapefile.zip dist/combined-shapefile.*', cb) + let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) }], makeShapefileWithOceans: ['mergeZones', function (results, cb) { overallProgress.beginTask('Converting from geojson with oceans to shapefile') - rimraf.sync('dist/combined-shapefile-with-oceans.*') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' exec( - 'ogr2ogr -f "ESRI Shapefile" dist/combined-shapefile-with-oceans.shp dist/combined-with-oceans.json', + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - exec('zip dist/timezones-with-oceans.shapefile.zip dist/combined-shapefile-with-oceans.*', cb) + let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) }], @@ -769,7 +791,7 @@ const autoScript = { zoneNames = zoneNames.filter(zoneName => excludedZones.indexOf(zoneName) === -1) } fs.writeFile( - 'dist/timezone-names.json', + argv.dist_dir + '/timezone-names.json', JSON.stringify(zoneNames), cb ) -- cgit v1.2.3 From a83cc6d35635387e98bae2ae1ce27964d3a80fb0 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 30 Apr 2020 18:37:08 +0100 Subject: Add flags to turn off of the later steps Add flags to turn off of the later steps when not required. Tested with: $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York \ --dist_dir ./dist3 \ --downloads_dir ./downloads2 \ --skip_zip \ --skip_shapefile --- index.js | 92 ++++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 34 deletions(-) diff --git a/index.js b/index.js index 771ad24..bfcb001 100644 --- a/index.js +++ b/index.js @@ -42,6 +42,14 @@ const argv = yargs description: 'Skip validation', type: 'boolean' }) + .option('skip_zip', { + description: 'Skip zip creation', + type: 'boolean' + }) + .option('skip_shapefile', { + description: 'Skip shapefile creation', + type: 'boolean' + }) .help() .strict() .alias('help', 'h') @@ -737,46 +745,62 @@ const autoScript = { combineAndWriteZones(cb) }], zipGeoJson: ['mergeZones', function (results, cb) { - overallProgress.beginTask('Zipping geojson') - let zipFile = argv.dist_dir + '/timezones.geojson.zip' - let jsonFile = argv.dist_dir + '/combined.json' - exec('zip ' + zipFile + ' ' + jsonFile, cb) + if (argv.skip_zip) { + overallProgress.beginTask('Skipping zip') + } else { + overallProgress.beginTask('Zipping geojson') + let zipFile = argv.dist_dir + '/timezones.geojson.zip' + let jsonFile = argv.dist_dir + '/combined.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) + } }], zipGeoJsonWithOceans: ['mergeZones', function (results, cb) { - overallProgress.beginTask('Zipping geojson with oceans') - let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' - exec('zip ' + zipFile + ' ' + jsonFile, cb) + if (argv.skip_zip) { + overallProgress.beginTask('Skipping with oceans zip') + } else { + overallProgress.beginTask('Zipping geojson with oceans') + let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) + } }], makeShapefile: ['mergeZones', function (results, cb) { - overallProgress.beginTask('Converting from geojson to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' - rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile.shp' - let jsonFile = argv.dist_dir + '/combined.json' - exec( - 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, - function (err, stdout, stderr) { - if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' - exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) - } - ) + if (argv.skip_shapefile) { + overallProgress.beginTask('Skipping shapefile creation') + } else { + overallProgress.beginTask('Converting from geojson to shapefile') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile.shp' + let jsonFile = argv.dist_dir + '/combined.json' + exec( + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, + function (err, stdout, stderr) { + if (err) { return cb(err) } + let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) + } + ) + } }], makeShapefileWithOceans: ['mergeZones', function (results, cb) { - overallProgress.beginTask('Converting from geojson with oceans to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' - rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' - exec( - 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, - function (err, stdout, stderr) { - if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' - exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) - } - ) + if (argv.skip_shapefile) { + overallProgress.beginTask('Skipping with oceans shapefile creation') + } else { + overallProgress.beginTask('Converting from geojson with oceans to shapefile') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + exec( + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, + function (err, stdout, stderr) { + if (err) { return cb(err) } + let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) + } + ) + } }], makeListOfTimeZoneNames: function (cb) { overallProgress.beginTask('Writing timezone names to file') -- cgit v1.2.3 From 6128709e84cc8c8e7bcfe0193cab9f409d9afe43 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 29 Jul 2020 14:46:16 +0100 Subject: Changes to address review comments Updated README.md and index.js Tested by running: $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York \ --dist_dir ./dist3 \ --downloads_dir ./downloads2 \ --skip_zip \ --skip_shapefile $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York \ --dist_dir ./dist2 \ --downloads_dir ./downloads2 $ node --max-old-space-size=8192 index.js \ --included_zones America/New_York America/Chicago \ --excluded_zones America/New_York [No failures, assumed output is as it was before changes] --- README.md | 28 ++++++++++++++++++++++- index.js | 76 +++++++++++++++++++++++++++++++-------------------------------- 2 files changed, 65 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index c085e70..b582024 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,35 @@ node --max-old-space-size=8192 index.js node --max-old-space-size=8192 index.js --included_zones America/New_York America/Chicago ``` +**Run the script to generate timezones while excluding specified timezones.** + +```shell +node --max-old-space-size=8192 index.js --excluded_zones America/New_York America/Chicago +``` + +**Run the script with custom working / output directories.** + +timezone-boundary-builder downloads boundaries from OpenStreetMap and places them in the `./downloads` directory by default. It generates output files in the `./dist` directory by default. + +If you want to use different directories, you can do so with the `--downloads_dir` and `--dist_dir` flags. + +```shell +node --max-old-space-size=8192 index.js --downloads_dir ./downloads2 --dist_dir ./dist2 +``` + +**Other command line flags** + +Other command line flags: + + + `--help` - show some basic usage information + + `--no_validation` - do not validate the time zone boundaries + + `--skip_zip` - do not zip the generated geojson files + + `--skip_shapefile` - do not create the shapefile from the geojson file + + ### What the script does -There are three config files that describe the boundary building process. The `osmBoundarySources.json` file lists all of the needed boundaries to extract via queries to the Overpass API. The `timezones.json` file lists all of the timezones and various operations to perform to build the boundaries. The `expectedZoneOverlaps.json` file lists all timezones that are allowed to overlap each other and the acceptable bounds of a particular overlap. +There are three config files that describe the boundary building process. The `osmBoundarySources.json` file lists all of the needed boundaries to extract via queries to the Overpass API. The `timezones.json` file lists all of the timezones and various operations to perform to build the boundaries. The `expectedZoneOverlaps.json` file lists all timezones that are allowed to overlap each other and the acceptable bounds of a particular overlap. The `index.js` file downloads all of the required geometries, builds the specified geometries, validates that there aren't large areas of overlap (other than those that are expected), outputs one huge geojson file, and finally zips up the geojson file using the `zip` cli and also converts the geojson to a shapefile using the `ogr2ogr` cli. The script has only been verified to run with Node.js 10 on the MacOS platform. diff --git a/index.js b/index.js index bfcb001..3425eb5 100644 --- a/index.js +++ b/index.js @@ -747,60 +747,60 @@ const autoScript = { zipGeoJson: ['mergeZones', function (results, cb) { if (argv.skip_zip) { overallProgress.beginTask('Skipping zip') - } else { - overallProgress.beginTask('Zipping geojson') - let zipFile = argv.dist_dir + '/timezones.geojson.zip' - let jsonFile = argv.dist_dir + '/combined.json' - exec('zip ' + zipFile + ' ' + jsonFile, cb) + return cb() } + overallProgress.beginTask('Zipping geojson') + let zipFile = argv.dist_dir + '/timezones.geojson.zip' + let jsonFile = argv.dist_dir + '/combined.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) }], zipGeoJsonWithOceans: ['mergeZones', function (results, cb) { if (argv.skip_zip) { overallProgress.beginTask('Skipping with oceans zip') - } else { - overallProgress.beginTask('Zipping geojson with oceans') - let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' - exec('zip ' + zipFile + ' ' + jsonFile, cb) + return cb() } + overallProgress.beginTask('Zipping geojson with oceans') + let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + exec('zip ' + zipFile + ' ' + jsonFile, cb) }], makeShapefile: ['mergeZones', function (results, cb) { if (argv.skip_shapefile) { overallProgress.beginTask('Skipping shapefile creation') - } else { - overallProgress.beginTask('Converting from geojson to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' - rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile.shp' - let jsonFile = argv.dist_dir + '/combined.json' - exec( - 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, - function (err, stdout, stderr) { - if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' - exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) - } - ) + return cb() } + overallProgress.beginTask('Converting from geojson to shapefile') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile.shp' + let jsonFile = argv.dist_dir + '/combined.json' + exec( + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, + function (err, stdout, stderr) { + if (err) { return cb(err) } + let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) + } + ) }], makeShapefileWithOceans: ['mergeZones', function (results, cb) { if (argv.skip_shapefile) { overallProgress.beginTask('Skipping with oceans shapefile creation') - } else { - overallProgress.beginTask('Converting from geojson with oceans to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' - rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' - exec( - 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, - function (err, stdout, stderr) { - if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' - exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) - } - ) + return cb() } + overallProgress.beginTask('Converting from geojson with oceans to shapefile') + let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' + rimraf.sync(shapeFileGlob) + let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' + let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + exec( + 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, + function (err, stdout, stderr) { + if (err) { return cb(err) } + let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' + exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) + } + ) }], makeListOfTimeZoneNames: function (cb) { overallProgress.beginTask('Writing timezone names to file') -- cgit v1.2.3 From 9336ecd12108eacadbf838016667eb49806b6f38 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 29 Jul 2020 15:04:02 +0100 Subject: Add CHANGELOG.md entry to describe flags changes --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4812a8c..9c835ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## Pending + +### Other Changes + +* Switch command line flag processing to use the yargs library. Existing flags have changed: --no-validation and --filtered-zones have been renamed to --no_validation and --included_zones respectively. --included_zones now takes a list without quotes or commas. +* Addition of new flags: --excluded_zones, --dist_dir, --downloads_dir, --skip_zip, --skip_shapefile. See --help and README.md for details. + ## 2020a ### Zone Changes -- cgit v1.2.3 From 0180319074b89b5586dae16cad98cb76abfcde9f Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Fri, 14 Aug 2020 11:19:42 +0100 Subject: More fixes related to review feedback More fixes related to review feedback: 1) Added yargs to package.json, reran npm update (also updates package-lock.json) 2) Added global variables for downloads_dir / dist_dir, which holds the absolute path for argv.downloads_dir / argv.dist_dir after a call to path.resolve(). Switched the code to use them. 3) Fixed hardcoding of "dist/" and "download/" in the zipInputData step. Tested with: $ node --max-old-space-size=8192 index.js \ --downloads_dir=mydownloads \ --dist_dir=mydist \ --included_zones America/New_York America/Chicago --- index.js | 48 +++++---- package-lock.json | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++---- package.json | 5 +- 3 files changed, 301 insertions(+), 42 deletions(-) diff --git a/index.js b/index.js index 3425eb5..775ccb6 100644 --- a/index.js +++ b/index.js @@ -12,6 +12,7 @@ var jsts = require('jsts') var rimraf = require('rimraf') var overpass = require('query-overpass') var yargs = require('yargs') +var path = require('path') const ProgressStats = require('./progressStats') @@ -55,6 +56,10 @@ const argv = yargs .alias('help', 'h') .argv +// Resolve the arguments with paths so relative paths become absolute. +let downloads_dir = path.resolve(argv.downloads_dir) +let dist_dir = path.resolve(argv.dist_dir) + // allow building of only a specified zones let includedZones = [] let excludedZones = [] @@ -202,7 +207,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } else { query += 'relation' } - var boundaryFilename = argv.downloads_dir + '/' + boundaryId + '.json' + var boundaryFilename = downloads_dir + '/' + boundaryId + '.json' var debug = 'getting data for ' + boundaryId var queryKeys = Object.keys(cfg) @@ -310,7 +315,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } var getTzDistFilename = function (tzid) { - return argv.dist_dir + '/' + tzid.replace(/\//g, '__') + '.json' + return dist_dir + '/' + tzid.replace(/\//g, '__') + '.json' } /** @@ -325,7 +330,7 @@ var getTzDistFilename = function (tzid) { var getDataSource = function (source) { var geoJson if (source.source === 'overpass') { - geoJson = require(argv.downloads_dir + '/' + source.id + '.json') + geoJson = require(downloads_dir + '/' + source.id + '.json') } else if (source.source === 'manual-polygon') { geoJson = polygon(source.data).geometry } else if (source.source === 'manual-multipolygon') { @@ -665,8 +670,8 @@ var addOceans = function (callback) { } var combineAndWriteZones = function (callback) { - var stream = fs.createWriteStream(argv.dist_dir + '/combined.json') - var streamWithOceans = fs.createWriteStream(argv.dist_dir + '/combined-with-oceans.json') + var stream = fs.createWriteStream(dist_dir + '/combined.json') + var streamWithOceans = fs.createWriteStream(dist_dir + '/combined-with-oceans.json') var zones = Object.keys(zoneCfg) stream.write('{"type":"FeatureCollection","features":[') @@ -708,11 +713,11 @@ var combineAndWriteZones = function (callback) { const autoScript = { makeDownloadsDir: function (cb) { overallProgress.beginTask('Creating downloads dir') - safeMkdir(argv.downloads_dir, cb) + safeMkdir(downloads_dir, cb) }, makeDistDir: function (cb) { overallProgress.beginTask('Creating dist dir') - safeMkdir(argv.dist_dir, cb) + safeMkdir(dist_dir, cb) }, getOsmBoundaries: ['makeDownloadsDir', function (results, cb) { overallProgress.beginTask('Downloading osm boundaries') @@ -720,7 +725,8 @@ const autoScript = { }], zipInputData: ['makeDistDir', 'getOsmBoundaries', function (results, cb) { overallProgress.beginTask('Zipping up input data') - exec('zip dist/input-data.zip downloads/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb) + exec('zip ' + dist_dir + '/input-data.zip ' + downloads_dir + + '/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb) }], createZones: ['makeDistDir', 'getOsmBoundaries', function (results, cb) { overallProgress.beginTask('Creating timezone boundaries') @@ -750,8 +756,8 @@ const autoScript = { return cb() } overallProgress.beginTask('Zipping geojson') - let zipFile = argv.dist_dir + '/timezones.geojson.zip' - let jsonFile = argv.dist_dir + '/combined.json' + let zipFile = dist_dir + '/timezones.geojson.zip' + let jsonFile = dist_dir + '/combined.json' exec('zip ' + zipFile + ' ' + jsonFile, cb) }], zipGeoJsonWithOceans: ['mergeZones', function (results, cb) { @@ -760,8 +766,8 @@ const autoScript = { return cb() } overallProgress.beginTask('Zipping geojson with oceans') - let zipFile = argv.dist_dir + '/timezones-with-oceans.geojson.zip' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + let zipFile = dist_dir + '/timezones-with-oceans.geojson.zip' + let jsonFile = dist_dir + '/combined-with-oceans.json' exec('zip ' + zipFile + ' ' + jsonFile, cb) }], makeShapefile: ['mergeZones', function (results, cb) { @@ -770,15 +776,15 @@ const autoScript = { return cb() } overallProgress.beginTask('Converting from geojson to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile.*' + let shapeFileGlob = dist_dir + '/combined-shapefile.*' rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile.shp' - let jsonFile = argv.dist_dir + '/combined.json' + let shapeFile = dist_dir + '/combined-shapefile.shp' + let jsonFile = dist_dir + '/combined.json' exec( 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones.shapefile.zip' + let shapeFileZip = dist_dir + '/timezones.shapefile.zip' exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) @@ -789,15 +795,15 @@ const autoScript = { return cb() } overallProgress.beginTask('Converting from geojson with oceans to shapefile') - let shapeFileGlob = argv.dist_dir + '/combined-shapefile-with-oceans.*' + let shapeFileGlob = dist_dir + '/combined-shapefile-with-oceans.*' rimraf.sync(shapeFileGlob) - let shapeFile = argv.dist_dir + '/combined-shapefile-with-oceans.shp' - let jsonFile = argv.dist_dir + '/combined-with-oceans.json' + let shapeFile = dist_dir + '/combined-shapefile-with-oceans.shp' + let jsonFile = dist_dir + '/combined-with-oceans.json' exec( 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - let shapeFileZip = argv.dist_dir + '/timezones-with-oceans.shapefile.zip' + let shapeFileZip = dist_dir + '/timezones-with-oceans.shapefile.zip' exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) @@ -815,7 +821,7 @@ const autoScript = { zoneNames = zoneNames.filter(zoneName => excludedZones.indexOf(zoneName) === -1) } fs.writeFile( - argv.dist_dir + '/timezone-names.json', + dist_dir + '/timezone-names.json', JSON.stringify(zoneNames), cb ) diff --git a/package-lock.json b/package-lock.json index 3c2b085..ec54baa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,11 @@ "@turf/helpers": "6.x" } }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -273,6 +278,11 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -315,6 +325,46 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -401,6 +451,11 @@ "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", "dev": true }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -486,6 +541,11 @@ "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1024,6 +1084,11 @@ } } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", @@ -1419,9 +1484,9 @@ } }, "jsts": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.1.2.tgz", - "integrity": "sha512-9Mw/vKxnLHw5WX6c67Hvo4jxRkP3jDlVfRl3HK3P71EoSLFM7VkjZQh/2Utj7hf2IX6x/M7UYrkPjrmqlLMNQA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.5.0.tgz", + "integrity": "sha512-r7CPjky5ZnhST9vwtVsNxaA9ghnt74u2w19Uo4c5ZUTaNaatDV63wDyD9BA2bfgEDwbppB7kRUs5TYSImqScPg==" }, "jsx-ast-utils": { "version": "2.2.1", @@ -1482,9 +1547,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "loose-envify": { @@ -1755,9 +1820,9 @@ "dev": true }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parse-headers": { "version": "2.0.2", @@ -1924,12 +1989,12 @@ "dev": true }, "proj4": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.5.0.tgz", - "integrity": "sha512-XZTRT7OPdLzgvtTqL8DG2cEj8lYdovztOwiwpwRSYayOty5Ipf3H68dh/fiL+HKDEyetmQSMhkkMGiJoyziz3w==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.2.tgz", + "integrity": "sha512-Pn0+HZtXb4JzuN8RR0VM7yyseegiYHbXkF+2FOdGpzRojcZ1BTjWxOh7qfp2vH0EyLu8pvcrhLxidwzgyUy/Gw==", "requires": { "mgrs": "1.0.0", - "wkt-parser": "^1.2.0" + "wkt-parser": "^1.2.4" } }, "prop-types": { @@ -2079,6 +2144,16 @@ "uuid": "^3.3.2" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", @@ -2162,6 +2237,11 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2178,9 +2258,9 @@ "dev": true }, "shpjs": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.4.3.tgz", - "integrity": "sha512-NZM75+SLgPt9dK91Z92QK+fVd2OR6zswAmkTrkHRc4mnONbAWGo38I+AxCYsKgCNfqF5cZUi2KfO7r2TZ+tHdw==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.5.0.tgz", + "integrity": "sha512-v21xnhMuvIdU+lcm9rLBZcA/PSwYfv1nfeNcgh6KbGygRnCt0wvyLnm1NbAl0wN45gP+qT7fkM414ukXXReTXQ==", "requires": { "jszip": "^2.4.0", "lie": "^3.0.1", @@ -2584,16 +2664,83 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, "wkt-parser": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.3.tgz", - "integrity": "sha512-s7zrOedGuHbbzMaQOuf8HacuCYp3LmmrHjkkN//7UEAzsYz7xJ6J+j/84ZWZkQcrRqi3xXyuc4odPHj7PEB0bw==" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.4.tgz", + "integrity": "sha512-ZzKnc7ml/91fOPh5bANBL4vUlWPIYYv11waCtWTkl2TRN+LEmBg60Q1MA8gqV4hEp4MGfSj9JiHz91zw/gTDXg==" }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -2628,6 +2775,111 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/package.json b/package.json index 908b68f..dffc1e6 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,11 @@ "@turf/bbox": "^6.0.1", "@turf/helpers": "^6.1.4", "async": "^3.2.0", - "jsts": "^2.1.2", + "jsts": "^2.5.0", "query-overpass": "^1.5.5", "rimraf": "^2.7.1", - "shpjs": "^3.4.3" + "shpjs": "^3.5.0", + "yargs": "^15.4.1" }, "devDependencies": { "standard": "^12.0.1" -- cgit v1.2.3 From dce1d04d4ed53b1d0b05007141d4877627d0262d Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Wed, 14 Oct 2020 09:53:00 +0100 Subject: Fix lint errors and update package-lock.json This commit fixes lint errors and updates package-lock.json / package.json. package-lock.json / package were generated by reverting: git checkout 5ce291934eba5a2d114b756f33ff62f9ac0db632 -- \ package-lock.json package.json ... then running ... npm install yargs Note: timezone-boundary-builder ran without adding yargs explicitly because it is a transitive dependency of some other packages already used, but recording the dependency seems like good practice. "npm audit fix" was _not_ run. Tested with: $ node --max-old-space-size=8192 index.js \ --downloads_dir=mydownloads \ --dist_dir=mydist \ --included_zones America/New_York America/Chicago --- index.js | 48 ++++++------ package-lock.json | 228 ++++++++++++++++-------------------------------------- package.json | 6 +- 3 files changed, 92 insertions(+), 190 deletions(-) diff --git a/index.js b/index.js index 775ccb6..75bd6bd 100644 --- a/index.js +++ b/index.js @@ -57,8 +57,8 @@ const argv = yargs .argv // Resolve the arguments with paths so relative paths become absolute. -let downloads_dir = path.resolve(argv.downloads_dir) -let dist_dir = path.resolve(argv.dist_dir) +let downloadsDir = path.resolve(argv.downloads_dir) +let distDir = path.resolve(argv.dist_dir) // allow building of only a specified zones let includedZones = [] @@ -207,7 +207,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } else { query += 'relation' } - var boundaryFilename = downloads_dir + '/' + boundaryId + '.json' + var boundaryFilename = downloadsDir + '/' + boundaryId + '.json' var debug = 'getting data for ' + boundaryId var queryKeys = Object.keys(cfg) @@ -315,7 +315,7 @@ var downloadOsmBoundary = function (boundaryId, boundaryCallback) { } var getTzDistFilename = function (tzid) { - return dist_dir + '/' + tzid.replace(/\//g, '__') + '.json' + return distDir + '/' + tzid.replace(/\//g, '__') + '.json' } /** @@ -330,7 +330,7 @@ var getTzDistFilename = function (tzid) { var getDataSource = function (source) { var geoJson if (source.source === 'overpass') { - geoJson = require(downloads_dir + '/' + source.id + '.json') + geoJson = require(downloadsDir + '/' + source.id + '.json') } else if (source.source === 'manual-polygon') { geoJson = polygon(source.data).geometry } else if (source.source === 'manual-multipolygon') { @@ -670,8 +670,8 @@ var addOceans = function (callback) { } var combineAndWriteZones = function (callback) { - var stream = fs.createWriteStream(dist_dir + '/combined.json') - var streamWithOceans = fs.createWriteStream(dist_dir + '/combined-with-oceans.json') + var stream = fs.createWriteStream(distDir + '/combined.json') + var streamWithOceans = fs.createWriteStream(distDir + '/combined-with-oceans.json') var zones = Object.keys(zoneCfg) stream.write('{"type":"FeatureCollection","features":[') @@ -713,11 +713,11 @@ var combineAndWriteZones = function (callback) { const autoScript = { makeDownloadsDir: function (cb) { overallProgress.beginTask('Creating downloads dir') - safeMkdir(downloads_dir, cb) + safeMkdir(downloadsDir, cb) }, makeDistDir: function (cb) { overallProgress.beginTask('Creating dist dir') - safeMkdir(dist_dir, cb) + safeMkdir(distDir, cb) }, getOsmBoundaries: ['makeDownloadsDir', function (results, cb) { overallProgress.beginTask('Downloading osm boundaries') @@ -725,8 +725,8 @@ const autoScript = { }], zipInputData: ['makeDistDir', 'getOsmBoundaries', function (results, cb) { overallProgress.beginTask('Zipping up input data') - exec('zip ' + dist_dir + '/input-data.zip ' + downloads_dir - + '/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb) + exec('zip ' + distDir + '/input-data.zip ' + downloadsDir + + '/* timezones.json osmBoundarySources.json expectedZoneOverlaps.json', cb) }], createZones: ['makeDistDir', 'getOsmBoundaries', function (results, cb) { overallProgress.beginTask('Creating timezone boundaries') @@ -756,8 +756,8 @@ const autoScript = { return cb() } overallProgress.beginTask('Zipping geojson') - let zipFile = dist_dir + '/timezones.geojson.zip' - let jsonFile = dist_dir + '/combined.json' + let zipFile = distDir + '/timezones.geojson.zip' + let jsonFile = distDir + '/combined.json' exec('zip ' + zipFile + ' ' + jsonFile, cb) }], zipGeoJsonWithOceans: ['mergeZones', function (results, cb) { @@ -766,8 +766,8 @@ const autoScript = { return cb() } overallProgress.beginTask('Zipping geojson with oceans') - let zipFile = dist_dir + '/timezones-with-oceans.geojson.zip' - let jsonFile = dist_dir + '/combined-with-oceans.json' + let zipFile = distDir + '/timezones-with-oceans.geojson.zip' + let jsonFile = distDir + '/combined-with-oceans.json' exec('zip ' + zipFile + ' ' + jsonFile, cb) }], makeShapefile: ['mergeZones', function (results, cb) { @@ -776,15 +776,15 @@ const autoScript = { return cb() } overallProgress.beginTask('Converting from geojson to shapefile') - let shapeFileGlob = dist_dir + '/combined-shapefile.*' + let shapeFileGlob = distDir + '/combined-shapefile.*' rimraf.sync(shapeFileGlob) - let shapeFile = dist_dir + '/combined-shapefile.shp' - let jsonFile = dist_dir + '/combined.json' + let shapeFile = distDir + '/combined-shapefile.shp' + let jsonFile = distDir + '/combined.json' exec( 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - let shapeFileZip = dist_dir + '/timezones.shapefile.zip' + let shapeFileZip = distDir + '/timezones.shapefile.zip' exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) @@ -795,15 +795,15 @@ const autoScript = { return cb() } overallProgress.beginTask('Converting from geojson with oceans to shapefile') - let shapeFileGlob = dist_dir + '/combined-shapefile-with-oceans.*' + let shapeFileGlob = distDir + '/combined-shapefile-with-oceans.*' rimraf.sync(shapeFileGlob) - let shapeFile = dist_dir + '/combined-shapefile-with-oceans.shp' - let jsonFile = dist_dir + '/combined-with-oceans.json' + let shapeFile = distDir + '/combined-shapefile-with-oceans.shp' + let jsonFile = distDir + '/combined-with-oceans.json' exec( 'ogr2ogr -f "ESRI Shapefile" ' + shapeFile + ' ' + jsonFile, function (err, stdout, stderr) { if (err) { return cb(err) } - let shapeFileZip = dist_dir + '/timezones-with-oceans.shapefile.zip' + let shapeFileZip = distDir + '/timezones-with-oceans.shapefile.zip' exec('zip ' + shapeFileZip + ' ' + shapeFileGlob, cb) } ) @@ -821,7 +821,7 @@ const autoScript = { zoneNames = zoneNames.filter(zoneName => excludedZones.indexOf(zoneName) === -1) } fs.writeFile( - dist_dir + '/timezone-names.json', + distDir + '/timezone-names.json', JSON.stringify(zoneNames), cb ) diff --git a/package-lock.json b/package-lock.json index ec54baa..871d1f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,13 +22,6 @@ "minimist": "1.2.0", "vfile": "^4.0.0", "vfile-reporter": "^5.1.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } } }, "@turf/bbox": { @@ -53,16 +46,6 @@ "@turf/helpers": "6.x" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "@types/unist": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", - "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==" - }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -278,11 +261,6 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -326,13 +304,13 @@ "dev": true }, "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.1.tgz", + "integrity": "sha512-rcvHOWyGyid6I1WjT/3NatKj2kDt9OdSHSXpyLXaMWFbKpGACNW8pRhhdPUq9MWUOdwn8Rz9AVETjF4105rZZQ==", "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrap-ansi": "^7.0.0" }, "dependencies": { "ansi-regex": { @@ -451,11 +429,6 @@ "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", "dev": true }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -578,6 +551,11 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1484,9 +1462,9 @@ } }, "jsts": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.5.0.tgz", - "integrity": "sha512-r7CPjky5ZnhST9vwtVsNxaA9ghnt74u2w19Uo4c5ZUTaNaatDV63wDyD9BA2bfgEDwbppB7kRUs5TYSImqScPg==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/jsts/-/jsts-2.1.2.tgz", + "integrity": "sha512-9Mw/vKxnLHw5WX6c67Hvo4jxRkP3jDlVfRl3HK3P71EoSLFM7VkjZQh/2Utj7hf2IX6x/M7UYrkPjrmqlLMNQA==" }, "jsx-ast-utils": { "version": "2.2.1", @@ -1547,9 +1525,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "loose-envify": { @@ -1566,11 +1544,6 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" }, - "mgrs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz", - "integrity": "sha1-+5FYjnjJACVnI5XLQLJffNatGCk=" - }, "mime-db": { "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", @@ -1607,17 +1580,25 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { - "minimist": "^1.2.5" + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } } }, "ms": { @@ -1820,9 +1801,9 @@ "dev": true }, "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" }, "parse-headers": { "version": "2.0.2", @@ -1989,12 +1970,11 @@ "dev": true }, "proj4": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.6.2.tgz", - "integrity": "sha512-Pn0+HZtXb4JzuN8RR0VM7yyseegiYHbXkF+2FOdGpzRojcZ1BTjWxOh7qfp2vH0EyLu8pvcrhLxidwzgyUy/Gw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.5.0.tgz", + "integrity": "sha512-XZTRT7OPdLzgvtTqL8DG2cEj8lYdovztOwiwpwRSYayOty5Ipf3H68dh/fiL+HKDEyetmQSMhkkMGiJoyziz3w==", "requires": { - "mgrs": "1.0.0", - "wkt-parser": "^1.2.4" + "wkt-parser": "^1.2.0" } }, "prop-types": { @@ -2112,11 +2092,6 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=" - }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -2149,11 +2124,6 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", @@ -2237,11 +2207,6 @@ "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -2258,9 +2223,9 @@ "dev": true }, "shpjs": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.5.0.tgz", - "integrity": "sha512-v21xnhMuvIdU+lcm9rLBZcA/PSwYfv1nfeNcgh6KbGygRnCt0wvyLnm1NbAl0wN45gP+qT7fkM414ukXXReTXQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.4.3.tgz", + "integrity": "sha512-NZM75+SLgPt9dK91Z92QK+fVd2OR6zswAmkTrkHRc4mnONbAWGo38I+AxCYsKgCNfqF5cZUi2KfO7r2TZ+tHdw==", "requires": { "jszip": "^2.4.0", "lie": "^3.0.1", @@ -2563,10 +2528,7 @@ "unist-util-stringify-position": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.1.tgz", - "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==", - "requires": { - "@types/unist": "^2.0.2" - } + "integrity": "sha512-Zqlf6+FRI39Bah8Q6ZnNGrEHUhwJOkHde2MHVk96lLyftfJJckaPslKgzhVcviXj8KcE9UJM9F+a4JEiBUTYgA==" }, "uri-js": { "version": "4.2.2", @@ -2611,9 +2573,7 @@ "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.0.1.tgz", "integrity": "sha512-lRHFCuC4SQBFr7Uq91oJDJxlnftoTLQ7eKIpMdubhYcVMho4781a8MWXLy3qZrZ0/STD1kRiKc0cQOHm4OkPeA==", "requires": { - "@types/unist": "^2.0.0", "is-buffer": "^2.0.0", - "replace-ext": "1.0.0", "unist-util-stringify-position": "^2.0.0", "vfile-message": "^2.0.0" } @@ -2623,7 +2583,6 @@ "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.1.tgz", "integrity": "sha512-KtasSV+uVU7RWhUn4Lw+wW1Zl/nW8JWx7JCPps10Y9JRRIDeDXf8wfBLoOSsJLyo27DqMyAi54C6Jf/d6Kr2Bw==", "requires": { - "@types/unist": "^2.0.2", "unist-util-stringify-position": "^2.0.0" } }, @@ -2664,15 +2623,10 @@ "isexe": "^2.0.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, "wkt-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.4.tgz", - "integrity": "sha512-ZzKnc7ml/91fOPh5bANBL4vUlWPIYYv11waCtWTkl2TRN+LEmBg60Q1MA8gqV4hEp4MGfSj9JiHz91zw/gTDXg==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.2.3.tgz", + "integrity": "sha512-s7zrOedGuHbbzMaQOuf8HacuCYp3LmmrHjkkN//7UEAzsYz7xJ6J+j/84ZWZkQcrRqi3xXyuc4odPHj7PEB0bw==" }, "wordwrap": { "version": "0.0.3", @@ -2680,9 +2634,9 @@ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" }, "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -2695,11 +2649,10 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -2777,26 +2730,22 @@ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.2.tgz", + "integrity": "sha512-CkwaeZw6dQgqgPGeTWKMXCRmMcBgETFlTml1+ZOO+q7kGst8NREJ+eWwFNPVUQ4QGdAaklbqCZHH6Zuep1RjiA==" }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.0.3.tgz", + "integrity": "sha512-6+nLw8xa9uK1BOEOykaiYAJVh6/CjxWXK/q9b5FpRgNslt8s22F2xMBqVIKgCRjNgGvGPBy8Vog7WN7yh4amtA==", + "requires": { + "cliui": "^7.0.0", + "escalade": "^3.0.2", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "y18n": "^5.0.1", + "yargs-parser": "^20.0.0" }, "dependencies": { "ansi-regex": { @@ -2804,54 +2753,11 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -2873,13 +2779,9 @@ } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-yYsjuSkjbLMBp16eaOt7/siKTjNVjMm3SoJnIg3sEh/JsvqVVDyjRKmaJV4cl+lNIgq6QEco2i3gDebJl7/vLA==" } } } diff --git a/package.json b/package.json index dffc1e6..dba323b 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ "@turf/bbox": "^6.0.1", "@turf/helpers": "^6.1.4", "async": "^3.2.0", - "jsts": "^2.5.0", + "jsts": "^2.1.2", "query-overpass": "^1.5.5", "rimraf": "^2.7.1", - "shpjs": "^3.5.0", - "yargs": "^15.4.1" + "shpjs": "^3.4.3", + "yargs": "^16.0.3" }, "devDependencies": { "standard": "^12.0.1" -- cgit v1.2.3