From 8ea80b617ad2b936404e3a98f1e1aaf0300715e1 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Mon, 22 Jun 2020 17:15:03 +0800 Subject: [PATCH 01/16] npm update --- package-lock.json | 1398 ++++++++++++++++++++++++++++++--------------- package.json | 8 +- 2 files changed, 936 insertions(+), 470 deletions(-) diff --git a/package-lock.json b/package-lock.json index ebeba6a..9d9de21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -310,8 +310,7 @@ "@types/node": { "version": "12.12.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.6.tgz", - "integrity": "sha1-pHJAwQ2GqaV7sMYz8LLgrqnOklM=", - "dev": true + "integrity": "sha1-pHJAwQ2GqaV7sMYz8LLgrqnOklM=" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -319,10 +318,19 @@ "integrity": "sha1-5IbQ2XOW15vu3QpuM/RTT/a0lz4=", "dev": true }, + "@types/yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha1-MgjB8I06TZkmGrZPkjArwV4RHKA=", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "requires": { "jsonparse": "^1.2.0", @@ -382,7 +390,7 @@ "agent-base": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha1-gWXwHENgCbzK0LHRIvBe13Dvxu4=", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -391,7 +399,7 @@ "agentkeepalive": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha1-oROSTdP6JKC8O3gQjEUMKr7gD2c=", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", "dev": true, "requires": { "humanize-ms": "^1.2.1" @@ -477,9 +485,9 @@ } }, "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha1-V9NbhoboUeLMBMQD8cACA5dqGBM=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, "ansi-escapes": { @@ -591,9 +599,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "micromatch": { @@ -651,7 +659,7 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true }, "archiver-utils": { @@ -910,6 +918,77 @@ } } }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } + } + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -1084,8 +1163,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "resolved": "", "dev": true } } @@ -1109,6 +1187,44 @@ "file-uri-to-path": "1.0.0" } }, + "bl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", + "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "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" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "bluebird": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", @@ -1224,13 +1340,13 @@ "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, "bson": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.9.tgz", - "integrity": "sha1-EjGfgyOxJUc5t8a++NPomuBaL1c=" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", + "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" }, "buffer": { "version": "4.9.1", @@ -1301,9 +1417,9 @@ "integrity": "sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=" }, "cacache": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", - "integrity": "sha1-vpmruk4b9d9GHNWiwQcfxDJXM5A=", + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", "dev": true, "requires": { "bluebird": "^3.5.5", @@ -1326,7 +1442,7 @@ "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { "yallist": "^3.0.2" @@ -1335,13 +1451,13 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -1598,9 +1714,9 @@ } }, "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha1-Qtg31SOWiNVfMDADpQgjD6ZycUI=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "ci-info": { @@ -1904,64 +2020,64 @@ } }, "concurrently": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-4.1.2.tgz", - "integrity": "sha1-Gmg7K1xB6e0yTJACufbkxuHzttc=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.2.0.tgz", + "integrity": "sha512-XxcDbQ4/43d6CxR7+iV8IZXhur4KbmEJk1CetVMUqCy34z9l0DkszbY+/9wvmSnToTej0SYomc2WSRH+L0zVJw==", "dev": true, "requires": { "chalk": "^2.4.2", - "date-fns": "^1.30.1", + "date-fns": "^2.0.1", "lodash": "^4.17.15", "read-pkg": "^4.0.1", "rxjs": "^6.5.2", "spawn-command": "^0.0.2-1", - "supports-color": "^4.5.0", - "tree-kill": "^1.2.1", - "yargs": "^12.0.5" + "supports-color": "^6.1.0", + "tree-kill": "^1.2.2", + "yargs": "^13.3.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, + "date-fns": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz", + "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw==", + "dev": true + }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" } }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha1-c5P1r6Weyf9fZ6J2INEcIm4+7AI=", + "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==", "dev": true }, "is-fullwidth-code-point": { @@ -1970,40 +2086,20 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha1-bvXS32DlL4LrIopMNz6NHzlyU88=", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha1-qAKm7hfyTBBIOrmTVxnO9O0Wvxo=", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -2042,32 +2138,39 @@ "pify": "^3.0.0" } }, + "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==", + "dev": true + }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } }, "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } }, "which-module": { @@ -2076,30 +2179,45 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "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==", + "dev": true + }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha1-BfWZe2CWR7ZPZrgeO0sQo2jnrRM=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha1-h5oIZZc7yp9rq1y987HGfsfTvPQ=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -2137,11 +2255,11 @@ "dev": true }, "connect-mongo": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-2.0.3.tgz", - "integrity": "sha1-22yr4eOt1azJ75xIZoECdnWljuU=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-3.2.0.tgz", + "integrity": "sha512-0Mx88079Z20CG909wCFlR3UxhMYGg6Ibn1hkIje1hwsqOLWtL9HJV+XD0DAjUvQScK6WqY/FA8tSVQM9rR64Rw==", "requires": { - "mongodb": "^2.0.36" + "mongodb": "^3.1.0" } }, "constantinople": { @@ -2202,7 +2320,7 @@ "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { "aproba": "^1.1.1", @@ -2519,9 +2637,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -2559,6 +2677,11 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -2621,9 +2744,9 @@ } }, "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, "dir-glob": { @@ -2653,7 +2776,7 @@ "integrity": "sha1-i9F7rB5D3qzYHZrazQ8eJMaQEA8=", "requires": { "exiftool.exe": "10.53", - "exiftool.pl": "10.53", + "exiftool.pl": "^10.53.0", "platform-dependent-modules": "0.0.14" } }, @@ -2693,7 +2816,7 @@ "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "dev": true, "requires": { "end-of-stream": "^1.0.0", @@ -2744,7 +2867,7 @@ "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -2796,6 +2919,92 @@ "string.prototype.trimright": "^2.1.0" } }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } + } + }, "es-to-primitive": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", @@ -2823,7 +3032,7 @@ "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha1-TrIVlMlyvEBVPSduUQU5FD21Pgo=", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true } } @@ -3587,29 +3796,28 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "resolved": "", "dev": true } } }, "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", "requires": { - "ms": "2.0.0" + "pump": "^3.0.0" } } } @@ -3671,9 +3879,9 @@ } }, "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "requires": { "pend": "~1.2.0" } @@ -3765,7 +3973,7 @@ "flat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha1-CQvsiwXjnLowl0fx1YjwTbr5jbI=", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", "dev": true, "requires": { "is-buffer": "~2.0.3" @@ -3774,7 +3982,7 @@ "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha1-PlcvI8hBGlz9lVfISeNmXgspBiM=", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", "dev": true } } @@ -3810,7 +4018,7 @@ "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -3820,13 +4028,13 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -3841,7 +4049,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -3909,7 +4117,7 @@ "fs-minipass": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha1-zP+FcIQef+QmVpPaiJNsVa7X98c=", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "dev": true, "requires": { "minipass": "^2.6.0" @@ -3998,13 +4206,6 @@ "concat-map": "0.0.1" } }, - "chownr": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", - "dev": true, - "optional": true - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -4064,16 +4265,6 @@ "dev": true, "optional": true }, - "fs-minipass": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4192,42 +4383,14 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, "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, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "^1.2.5" } }, "ms": { @@ -4387,9 +4550,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.0", - "resolved": "https://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==", "dev": true, "optional": true } @@ -4503,19 +4666,19 @@ "optional": true }, "tar": { - "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -4543,9 +4706,9 @@ "optional": true }, "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true, "optional": true } @@ -4565,7 +4728,7 @@ "genfun": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha1-ndlxCgaQClxKW/V6yl2k5S/nZTc=", + "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", "dev": true }, "get-caller-file": { @@ -4712,7 +4875,7 @@ "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, "handlebars": { @@ -4832,7 +4995,7 @@ "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, "hosted-git-info": { @@ -4860,7 +5023,7 @@ "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha1-5IIb7vWyFCogJr1zkm/lN2McVAU=", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", "dev": true, "requires": { "agent-base": "4", @@ -4870,7 +5033,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -4881,7 +5044,7 @@ "https-proxy-agent": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha1-TuenN6vZJniik9mzShr00NCMeHs=", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -4891,7 +5054,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -4900,7 +5063,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } @@ -5042,7 +5205,7 @@ "ignore-walk": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha1-AX4kRxhL/q3nwjjkrv3R6PlbHjc=", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "dev": true, "requires": { "minimatch": "^3.0.4" @@ -5092,7 +5255,7 @@ "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "dev": true }, "inflight": { @@ -5303,6 +5466,12 @@ "kind-of": "^3.0.2" } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5449,6 +5618,12 @@ } } }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, "is-npm": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", @@ -5528,6 +5703,12 @@ "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=", "dev": true }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -5580,6 +5761,22 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, "jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -6331,9 +6528,9 @@ } }, "make-fetch-happen": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.1.tgz", - "integrity": "sha1-+sZUAKtfepwAGGKj6bD0F/CEAXU=", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", + "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", "dev": true, "requires": { "agentkeepalive": "^3.4.1", @@ -6352,13 +6549,13 @@ "http-cache-semantics": { "version": "3.8.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", - "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { "yallist": "^3.0.2" @@ -6367,7 +6564,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -6377,15 +6574,6 @@ "resolved": "https://registry.npmjs.org/makepromise/-/makepromise-1.0.0.tgz", "integrity": "sha1-vGu2o+Bv1wbfUcKSO2k2+r1wqn8=" }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha1-fVg6cwZDTAVf5HSw9FB45uG0uSo=", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -6406,25 +6594,6 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha1-Rhr0l7xK4JYIzbLmDu+2m/90QXg=", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", - "dev": true - } - } - }, "memory-pager": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", @@ -6501,14 +6670,14 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://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==" }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha1-5xN2Ln0+Mv7YAxFc+T4EvKn8yaY=", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -6518,7 +6687,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -6526,7 +6695,7 @@ "minizlib": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha1-IpDeloGKNMKVUcio0wEha9Zahh0=", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "dev": true, "requires": { "minipass": "^2.9.0" @@ -6535,7 +6704,7 @@ "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "dev": true, "requires": { "concat-stream": "^1.5.0", @@ -6572,67 +6741,94 @@ } }, "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==", "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=" - } + "minimist": "^1.2.5" } }, "mocha": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", - "integrity": "sha1-XYmH4olAyviVen12ZLkQ3Fsv6iA=", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz", + "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==", "dev": true, "requires": { - "ansi-colors": "3.2.3", + "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", + "chokidar": "3.3.1", "debug": "3.2.6", - "diff": "3.5.0", + "diff": "4.0.2", "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", + "find-up": "4.1.0", + "glob": "7.1.6", "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", - "log-symbols": "2.2.0", + "log-symbols": "3.0.0", "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", + "ms": "2.1.2", "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", + "promise.allsettled": "1.0.2", + "serialize-javascript": "3.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", "wide-align": "1.1.3", - "yargs": "13.3.0", - "yargs-parser": "13.1.1", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", "yargs-unparser": "1.6.0" }, "dependencies": { "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "chokidar": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz", + "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.3.0" + } + }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { "string-width": "^3.1.0", @@ -6643,39 +6839,48 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { "ms": "^2.1.1" } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "requires": { - "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" + "binary-extensions": "^2.0.0" } }, "is-fullwidth-code-point": { @@ -6685,55 +6890,60 @@ "dev": true }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "chalk": "^2.0.1" + "p-locate": "^4.1.0" } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, + "readdirp": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", + "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.7" + } + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -6744,19 +6954,34 @@ "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" } }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha1-ds/nQs8fQbubHCmtAwaMBbTA5Ao=", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" } }, "which-module": { @@ -6768,7 +6993,7 @@ "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -6779,13 +7004,13 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha1-TGV6VeB+Xyz5R/ijZlZ8BKDe3IM=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -6797,13 +7022,49 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha1-0mBYUyqgbTZf4JH2ofwGsvfl7KA=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -6826,22 +7087,16 @@ } }, "mongodb": { - "version": "2.2.36", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.36.tgz", - "integrity": "sha1-HFc2gLKEn7D0esu6PcX6Io3pdfU=", - "requires": { - "es6-promise": "3.2.1", - "mongodb-core": "2.1.20", - "readable-stream": "2.2.7" - } - }, - "mongodb-core": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.20.tgz", - "integrity": "sha1-/s6N12tZ7n1/LTE7ZTIsFgSS2PE=", - "requires": { - "bson": "~1.0.4", - "require_optional": "~1.0.0" + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz", + "integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==", + "requires": { + "bl": "^2.2.0", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" } }, "mongoose": { @@ -7001,9 +7256,9 @@ }, "dependencies": { "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -7130,16 +7385,6 @@ } } }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha1-+pMCdfW/Xa4YjWGSsktMi7rD12o=", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, "node-exiftool": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/node-exiftool/-/node-exiftool-2.3.0.tgz", @@ -7151,9 +7396,9 @@ } }, "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha1-cljJBGGC3KNFtCCO2pGNrzNpf/c=", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", + "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", "dev": true, "requires": { "encoding": "^0.1.11", @@ -7276,10 +7521,13 @@ "integrity": "sha1-RTNUCH5sqWlXvY9br3U/WYIUISk=" }, "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha1-57qarc75YrthJI+RchzZMrP+a90=", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } }, "npm-check-updates": { "version": "3.2.1", @@ -7527,10 +7775,16 @@ } } }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", + "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -7540,19 +7794,20 @@ } }, "npm-packlist": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.6.tgz", - "integrity": "sha1-U7o+0R+FIwefFFc3bdN57k6kL/Q=", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "dev": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npm-pick-manifest": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", - "integrity": "sha1-9Nnl/UviFT5fTl+be+jcQZqZq7c=", + "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -7561,9 +7816,9 @@ } }, "npm-registry-fetch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz", - "integrity": "sha1-KxQ0+TzL5rY4X45F9F25PhaSHXo=", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.4.tgz", + "integrity": "sha512-6jb34hX/iYNQebqWUHtU8YF6Cjb1H6ouTFPClYsyiW6lpFkljTpdeftm53rRojtja1rKAvKNIIiTS5Sjpw4wsA==", "dev": true, "requires": { "JSONStream": "^1.3.4", @@ -7578,22 +7833,22 @@ "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { "yallist": "^3.0.2" } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk=", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -8055,7 +8310,7 @@ "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { "os-homedir": "^1.0.0", @@ -8067,24 +8322,12 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", "integrity": "sha1-0HjRWjr0CSIMiG8dmgyi5EGrJsw=" }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha1-kYzrrqJIpiz3/6uOO8qMX4gvxC4=", - "dev": true - }, "p-limit": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", @@ -8188,9 +8431,9 @@ } }, "pacote": { - "version": "9.5.9", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.9.tgz", - "integrity": "sha1-+joIYpyTkLK5l2nFWyzBN+GiTfM=", + "version": "9.5.12", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.5.12.tgz", + "integrity": "sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ==", "dev": true, "requires": { "bluebird": "^3.5.3", @@ -8207,6 +8450,7 @@ "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "normalize-package-data": "^2.4.0", + "npm-normalize-package-bin": "^1.0.0", "npm-package-arg": "^6.1.0", "npm-packlist": "^1.1.12", "npm-pick-manifest": "^3.0.0", @@ -8227,7 +8471,7 @@ "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha1-HaJ+ZxAnGUdpXa9oSOhH8B2EuSA=", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { "yallist": "^3.0.2" @@ -8236,7 +8480,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -8257,7 +8501,7 @@ "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw=", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", "dev": true, "requires": { "cyclist": "^1.0.1", @@ -8479,6 +8723,78 @@ "retry": "^0.10.0" } }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } + } + }, "prompts": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.2.1.tgz", @@ -8503,7 +8819,7 @@ "protoduck": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha1-A8NlnKGAB7aaUP2Cp+vMUWJhFR8=", + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", "dev": true, "requires": { "genfun": "^5.0.0" @@ -8655,7 +8971,7 @@ "pumpify": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { "duplexify": "^3.6.0", @@ -8666,7 +8982,7 @@ "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -8904,9 +9220,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "micromatch": { @@ -9392,6 +9708,12 @@ } } }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==", + "dev": true + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -9610,7 +9932,7 @@ "smart-buffer": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha1-kWBcJdkWUvRmHqacz0XxszHKIbo=", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, "snapdragon": { @@ -9715,8 +10037,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "resolved": "", "dev": true } } @@ -9733,7 +10054,7 @@ "socks": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha1-ARKfCl1TTSuJdxLtis6rfuZdeOM=", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { "ip": "1.1.5", @@ -9743,7 +10064,7 @@ "socks-proxy-agent": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha1-PImR8xRbJ5nnDhG9X7yLGWMRY4Y=", + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "dev": true, "requires": { "agent-base": "~4.2.1", @@ -9753,7 +10074,7 @@ "agent-base": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha1-2J5ZmfeXh1Z0wH2H8mD8Qeg+jKk=", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -9866,7 +10187,7 @@ "ssri": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -9906,7 +10227,7 @@ "stream-each": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -9914,9 +10235,9 @@ } }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "streamsearch": { @@ -10043,6 +10364,75 @@ } } }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } + } + }, "string.prototype.trimleft": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", @@ -10061,6 +10451,75 @@ "function-bind": "^1.1.1" } }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + } + } + }, "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", @@ -10302,7 +10761,7 @@ "tar": { "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha1-Q7NkvFKIjVVSmGN7ENYHkCVKtSU=", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "requires": { "chownr": "^1.1.1", @@ -10317,7 +10776,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } @@ -10385,7 +10844,7 @@ "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { "readable-stream": "~2.3.6", @@ -10395,13 +10854,13 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -10416,7 +10875,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -10498,9 +10957,9 @@ } }, "tree-kill": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", - "integrity": "sha1-U5jzdOLykrncx7LnHjClw7tsdDo=", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, "triple-beam": { @@ -10631,7 +11090,7 @@ "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { "unique-slug": "^2.0.0" @@ -10640,7 +11099,7 @@ "unique-slug": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha1-uqvOkQg/xk6UWw861hPiZPfNTmw=", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -10856,7 +11315,7 @@ "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { "string-width": "^1.0.2 || 2" @@ -11015,6 +11474,12 @@ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -11196,7 +11661,7 @@ "yargs-unparser": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha1-7yXCx2n/a9CeSw+dfGBfsnhG6p8=", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, "requires": { "flat": "^4.1.0", @@ -11207,19 +11672,19 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { "string-width": "^3.1.0", @@ -11230,7 +11695,7 @@ "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -11239,7 +11704,7 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "is-fullwidth-code-point": { @@ -11251,7 +11716,7 @@ "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -11261,7 +11726,7 @@ "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -11276,13 +11741,13 @@ "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -11293,7 +11758,7 @@ "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -11308,7 +11773,7 @@ "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -11319,13 +11784,13 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha1-TGV6VeB+Xyz5R/ijZlZ8BKDe3IM=", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -11337,13 +11802,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha1-0mBYUyqgbTZf4JH2ofwGsvfl7KA=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -11353,11 +11818,12 @@ } }, "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "requires": { - "fd-slicer": "~1.0.1" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, "zip-stream": { diff --git a/package.json b/package.json index 93da474..87a78b6 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "body-parser": "^1.19.0", "compression": "^1.7.4", "config": "^3.1.0", - "connect-mongo": "^2.0.3", + "connect-mongo": "^3.2.0", "cookie-parser": "^1.4.4", "cors": "^2.8.5", "cron": "^1.7.1", @@ -48,7 +48,7 @@ "express-easy-zip": "^1.1.4", "express-session": "^1.16.1", "extend": ">=3.0.2", - "extract-zip": "^1.6.7", + "extract-zip": "^2.0.1", "gm": "^1.23.1", "got": "^9.6.0", "iconv-lite": "^0.5.0", @@ -79,11 +79,11 @@ "devDependencies": { "@tbif/eslint-config-base": "github:TaiBIF/eslint-base", "camera-trap-credentials": "github:TaiBIF/camera-trap-credentials#3f1d61d7d4ffc3f1299716369015c857c2a6d940", - "concurrently": "^4.1.0", + "concurrently": "^5.2.0", "eslint-plugin-mocha": "^5.3.0", "husky": "^3.0.3", "lint-staged": "^9.2.1", - "mocha": "^6.1.4", + "mocha": "^8.0.1", "mongoose-profiler": "^0.1.0", "nodemon": "^1.19.1", "npm-check-updates": "^3.1.10", From 7b205c0bf180e98dd902d1daf486094fd7d9c472 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Mon, 29 Jun 2020 01:14:46 +0800 Subject: [PATCH 02/16] add production docker --- docker-compose.yml | 5 +- package-lock.json | 729 ++++------------------------- package.json | 2 +- production.yml | 47 ++ scripts/api/development/Dockerfile | 21 +- scripts/api/production/Dockerfile | 11 +- 6 files changed, 157 insertions(+), 658 deletions(-) create mode 100644 production.yml diff --git a/docker-compose.yml b/docker-compose.yml index b6fee41..da1812a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: ports: - "6379:6379" volumes: - - ~/redis_data:/data + - ../ct-volumes/redis_data:/data restart: always networks: - backend @@ -18,7 +18,8 @@ services: ports: - "27017:27017" volumes: - - ~/mongo_data:/data/db + - ../ct-volumes/mongo_data:/data/db + - ../ct-volumes/bucket:/bucket networks: - backend server: diff --git a/package-lock.json b/package-lock.json index 9d9de21..282a2c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -340,7 +340,7 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, "accepts": { @@ -466,7 +466,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -519,7 +519,7 @@ "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { "micromatch": "^3.1.4", @@ -529,7 +529,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -607,7 +607,7 @@ "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -703,7 +703,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "arr-union": { @@ -1023,7 +1023,7 @@ "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, "async-limiter": { @@ -1111,7 +1111,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -1135,7 +1135,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -1144,7 +1144,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -1153,7 +1153,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -1162,8 +1162,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -1176,7 +1177,7 @@ "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, "bindings": { @@ -1268,7 +1269,7 @@ "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha1-VcbDmouljZxhrSLNh3Uy3rZlogs=", + "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", "dev": true, "requires": { "ansi-align": "^2.0.0", @@ -1301,7 +1302,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -1465,7 +1466,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -1553,7 +1554,7 @@ "capture-stack-trace": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha1-psC74fOPOqC5Ijjstv9Cw0TUE10=", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", "dev": true }, "catchment": { @@ -1609,7 +1610,7 @@ "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -1629,7 +1630,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -1698,7 +1699,7 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, "to-regex-range": { @@ -1734,7 +1735,7 @@ "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -2237,7 +2238,7 @@ "configstore": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha1-xvJd767vJt8S3TNBSwAf6BpUP48=", + "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", "dev": true, "requires": { "dot-prop": "^4.1.0", @@ -2600,7 +2601,7 @@ "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { "is-descriptor": "^1.0.2", @@ -2610,7 +2611,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -2619,7 +2620,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -2628,7 +2629,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -3544,7 +3545,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -3692,7 +3693,7 @@ "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -3734,7 +3735,7 @@ "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { "array-unique": "^0.3.2", @@ -3768,7 +3769,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -3777,7 +3778,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -3786,7 +3787,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -3795,8 +3796,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -4146,572 +4148,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha1-P17WZYPM1vQAtaANtvfoYTY+OI8=", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, "optional": true, "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true, - "optional": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mkdirp": { - "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, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", - "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", - "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "optional": true, - "requires": { - "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" - } - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "optional": true - } + "bindings": "^1.5.0", + "nan": "^2.12.1" } }, "function-bind": { @@ -5499,7 +4943,7 @@ "is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw=", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", "dev": true, "requires": { "ci-info": "^1.5.0" @@ -5508,7 +4952,7 @@ "ci-info": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true } } @@ -5530,7 +4974,7 @@ "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", @@ -5541,7 +4985,7 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true } } @@ -5666,7 +5110,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -5700,7 +5144,7 @@ "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, "is-set": { @@ -5736,7 +5180,7 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true }, "is-yarn-global": { @@ -6722,7 +6166,7 @@ "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -6732,7 +6176,7 @@ "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -7239,7 +6683,7 @@ "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -7455,7 +6899,7 @@ "nodemon": { "version": "1.19.4", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", - "integrity": "sha1-VttcYHQI4P34kg0rREgZrxquCXE=", + "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==", "dev": true, "requires": { "chokidar": "^2.1.8", @@ -7473,7 +6917,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -7482,7 +6926,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } @@ -8840,9 +8284,9 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "pstree.remy": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.7.tgz", - "integrity": "sha1-x2ljooBH7WFULcNhqibuVaf6FfM=", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "dev": true }, "pug": { @@ -9139,7 +8583,7 @@ "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -9150,7 +8594,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -9228,7 +8672,7 @@ "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -9304,7 +8748,7 @@ "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { "extend-shallow": "^3.0.2", @@ -9414,7 +8858,7 @@ "registry-auth-token": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha1-10RoFUM/XV7WQxzV3KIQSPZrOX4=", + "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", "dev": true, "requires": { "rc": "^1.1.6", @@ -9438,7 +8882,7 @@ "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", "dev": true }, "repeat-string": { @@ -9537,7 +8981,7 @@ "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, "retry": { @@ -9738,7 +9182,7 @@ "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -9938,7 +9382,7 @@ "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { "base": "^0.11.1", @@ -9954,7 +9398,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -9989,7 +9433,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "^1.0.0", @@ -10009,7 +9453,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -10018,7 +9462,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -10027,7 +9471,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -10036,8 +9480,9 @@ } }, "kind-of": { - "version": "6.0.2", - "resolved": "", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -10045,7 +9490,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -10164,7 +9609,7 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -10919,7 +10364,7 @@ "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { "define-property": "^2.0.2", @@ -10950,7 +10395,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "dev": true, "requires": { "nopt": "~1.0.10" @@ -11050,9 +10495,9 @@ } }, "undefsafe": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.2.tgz", - "integrity": "sha1-Il9rngM3Zj4Njnz9aG/Cg2zKznY=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", + "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", "dev": true, "requires": { "debug": "^2.2.0" @@ -11061,7 +10506,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" @@ -11078,7 +10523,7 @@ "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -11168,13 +10613,13 @@ "upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, "update-notifier": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha1-0HRFk+E/Fh5AassdlAi3LK0Ir/Y=", + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { "boxen": "^1.2.1", @@ -11231,7 +10676,7 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, "util-deprecate": { diff --git a/package.json b/package.json index 87a78b6..2971abd 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "lint-staged": "^9.2.1", "mocha": "^8.0.1", "mongoose-profiler": "^0.1.0", - "nodemon": "^1.19.1", + "nodemon": "^1.19.4", "npm-check-updates": "^3.1.10", "supertest": "^4.0.2" } diff --git a/production.yml b/production.yml new file mode 100644 index 0000000..f14333a --- /dev/null +++ b/production.yml @@ -0,0 +1,47 @@ +version: '3' +services: + redis: + image: redis:5 + command: redis-server --appendonly yes + ports: + - "6379:6379" + volumes: + - ../ct-volumes/redis_data:/data + restart: always + networks: + - backend + mongo: + image: mongo:latest + restart: always + expose: + - 27017 + ports: + - "27017:27017" + volumes: + - ../ct-volumes/mongo_data:/data/db + - ../ct-volumes/bucket:/bucket + networks: + - backend + server: + build: + context: . + dockerfile: scripts/api/production/Dockerfile + restart: always + environment: + - REDIS_HOST=redis + - MONGO_HOST=mongo + - MONGO_PORT=27017 + volumes: + - /camera-trap-api/node_modules + - .:/camera-trap-api + ports: + - 3000:3000 + depends_on: + - redis + - mongo + networks: + - backend + +networks: + backend: + diff --git a/scripts/api/development/Dockerfile b/scripts/api/development/Dockerfile index 335e7d5..bb97be4 100644 --- a/scripts/api/development/Dockerfile +++ b/scripts/api/development/Dockerfile @@ -1,13 +1,15 @@ -FROM phusion/baseimage:0.11 -LABEL creator="rwu823@gmail.com" -LABEL maintainer1="cjk.halodule@gmail.com" -LABEL maintainer2="dcahsu@gmail.com" -LABEL maintainer3="kelp404@phate.org" +#LABEL creator="rwu823@gmail.com" +#LABEL maintainer1="cjk.halodule@gmail.com" +#LABEL maintainer2="dcahsu@gmail.com" +#LABEL maintainer3="kelp404@phate.org" + +FROM phusion/baseimage:18.04-1.0.0 WORKDIR /camera-trap-api -RUN apt-get update && apt-get upgrade -y && apt-get -y install curl sudo git graphicsmagick imagemagick make g++ -RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - -RUN apt-get -y install nodejs +RUN apt-get update && apt-get upgrade -y && apt-get -y install curl git sudo make g++ graphicsmagick imagemagick + +RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - +RUN sudo apt-get install -y nodejs COPY package.json package-lock.json ./ COPY node_modules/camera-trap-credentials ./node_modules/camera-trap-credentials @@ -22,4 +24,5 @@ EXPOSE 3000 ENV NODE_ENV="docker" -CMD ["npm", "start"] +#CMD ["npm", "src/web-starter"] +CMD ["npm", "run", "start"] diff --git a/scripts/api/production/Dockerfile b/scripts/api/production/Dockerfile index 8385d8d..cea268e 100644 --- a/scripts/api/production/Dockerfile +++ b/scripts/api/production/Dockerfile @@ -1,9 +1,11 @@ -FROM phusion/baseimage:0.11 +FROM phusion/baseimage:18.04-1.0.0 +#FROM phusion/baseimage:0.11 WORKDIR /camera-trap-api -RUN apt-get update && apt-get upgrade -y && apt-get -y install curl sudo git graphicsmagick imagemagick make g++ -RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - -RUN apt-get -y install nodejs +RUN apt-get update && apt-get upgrade -y && apt-get -y install curl git sudo make g++ graphicsmagick imagemagick + +RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - +RUN sudo apt-get install -y nodejs COPY package.json package-lock.json ./ COPY node_modules/camera-trap-credentials ./node_modules/camera-trap-credentials @@ -19,3 +21,4 @@ EXPOSE 3000 ENV NODE_ENV="production" CMD ["node", "--max-old-space-size=8192", "src/web-starter"] +#CMD ["npm", "run", "start"] \ No newline at end of file From ad6b7ff83bee2125fe5c561926906d5296942728 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Tue, 30 Jun 2020 16:57:33 +0800 Subject: [PATCH 03/16] try mongo-express --- docker-compose.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index da1812a..10cad82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,5 @@ version: '3' + services: redis: image: redis:5 @@ -11,17 +12,45 @@ services: networks: - backend mongo: - image: mongo:latest + image: mongo restart: always + # environment: + # MONGO_INITDB_ROOT_USERNAME: root + # MONGO_INITDB_ROOT_PASSWORD: example + volumes: + - ../ct-volumes/mongo_data:/data/db + - ../ct-volumes/bucket:/bucket expose: - 27017 ports: - "27017:27017" - volumes: - - ../ct-volumes/mongo_data:/data/db - - ../ct-volumes/bucket:/bucket networks: - backend +# mongo-express: +# image: mongo-express +# restart: always +# ports: +# - 8081:8081 +# environment: +# ME_CONFIG_MONGODB_ADMINUSERNAME: root +# ME_CONFIG_MONGODB_ADMINPASSWORD: example +# networks: +# - backend +# mongo: +# image: mongo:latest +# restart: always +# expose: +# - 27017 +# ports: +# - "27017:27017" +# volumes: +# - ../ct-volumes/mongo_data:/data/db +# - ../ct-volumes/bucket:/bucket +# environment: +# MONGO_INITDB_ROOT_USERNAME: root +# MONGO_INITDB_ROOT_PASSWORD: example +# networks: +# - backend server: build: context: . From e16945f43668a519ce96b8aefcb73b8fcfba4722 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Tue, 30 Jun 2020 16:58:34 +0800 Subject: [PATCH 04/16] [SCHEMA] add startWorkingDate, endWorkingDate in Annotation --- src/models/data/annotation-model.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/models/data/annotation-model.js b/src/models/data/annotation-model.js index c2af673..0698de1 100644 --- a/src/models/data/annotation-model.js +++ b/src/models/data/annotation-model.js @@ -149,6 +149,20 @@ const schema = utils.generateSchema( }, }, ], + startWorkingDate: { + // 相機工作時間-開始 + type: Date, + index: { + name: 'Time', + }, + }, + endWorkingDate: { + // 相機工作時間-結束 + type: Date, + index: { + name: 'Time', + }, + }, }, { collection: 'Annotations', @@ -262,6 +276,8 @@ schema.method('dump', function() { value: field.value.selectId || field.value.text || field.value.time, })), tags: this.tags, + startWorkingDate: this.startWorkingDate, + endWorkingDate: this.endWorkingDate, }; }); From 15982512ffa9723d42bacf02e41dc53df521a3fe Mon Sep 17 00:00:00 2001 From: MooGoo Date: Fri, 3 Jul 2020 11:40:27 +0800 Subject: [PATCH 05/16] add workingRange in annotation form --- docker-compose.yml | 4 ++- production.yml | 3 ++ src/forms/file/file-form.js | 1 + .../file-handler/uploadAnnotationByZip.js | 4 +-- .../file-handler/uploadAnnotationCsv.js | 13 ++++++- .../file-handler/uploadAnnotationImage.js | 14 ++++++-- .../file-handler/uploadAnnotationVideo.js | 19 +++++++++- src/handlers/file-handler/uploadFile.js | 35 ++++++++++++++++--- src/models/data/project-model.js | 2 +- src/models/dto/media-worker-data.js | 1 + src/tasks/media-worker/extractFileByPath.js | 8 +++-- 11 files changed, 90 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 10cad82..8d887f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,6 +55,8 @@ services: build: context: . dockerfile: scripts/api/development/Dockerfile + container_name: ct-api-local-container + image: ct-api-local-image restart: always environment: - REDIS_HOST=redis @@ -63,6 +65,7 @@ services: volumes: - /camera-trap-api/node_modules - .:/camera-trap-api + - ../ct-volumes/tmp:/tmp ports: - 3000:3000 depends_on: @@ -70,7 +73,6 @@ services: - mongo networks: - backend - networks: backend: diff --git a/production.yml b/production.yml index f14333a..0880557 100644 --- a/production.yml +++ b/production.yml @@ -1,4 +1,5 @@ version: '3' + services: redis: image: redis:5 @@ -26,6 +27,8 @@ services: build: context: . dockerfile: scripts/api/production/Dockerfile + container_name: ct-api-production-container + image: ct-api-production-image restart: always environment: - REDIS_HOST=redis diff --git a/src/forms/file/file-form.js b/src/forms/file/file-form.js index 3ea4baf..2cf4e20 100644 --- a/src/forms/file/file-form.js +++ b/src/forms/file/file-form.js @@ -10,6 +10,7 @@ FileForm.define({ cameraLocation: new forms.fields.StringField({ validators: [forms.validators.id()], }), + workingRange: new forms.fields.StringField(), lastModified: new forms.fields.DateField(), }); module.exports = FileForm; diff --git a/src/handlers/file-handler/uploadAnnotationByZip.js b/src/handlers/file-handler/uploadAnnotationByZip.js index 6c3260d..0efd80b 100644 --- a/src/handlers/file-handler/uploadAnnotationByZip.js +++ b/src/handlers/file-handler/uploadAnnotationByZip.js @@ -43,7 +43,7 @@ const fetchCameraLocation = async (cameraLocationId, user) => { return cameraLocation; }; -module.exports = async (user, file, cameraLocationId) => { +module.exports = async (user, file, cameraLocationId, workingRange) => { const type = FileType.annotationZIP; const cameraLocation = await fetchCameraLocation(cameraLocationId, user); const { project } = cameraLocation; @@ -65,7 +65,6 @@ module.exports = async (user, file, cameraLocationId) => { }); await uploadSession.save(); - fileObject .saveWithContent(file.path) .then(() => { @@ -78,6 +77,7 @@ module.exports = async (user, file, cameraLocationId) => { fileId: fileObject._id, uploadSessionId: uploadSession._id, cameraLocationId, + workingRange, }), ); job.save(); diff --git a/src/handlers/file-handler/uploadAnnotationCsv.js b/src/handlers/file-handler/uploadAnnotationCsv.js index f2307ce..3f6392c 100644 --- a/src/handlers/file-handler/uploadAnnotationCsv.js +++ b/src/handlers/file-handler/uploadAnnotationCsv.js @@ -73,7 +73,7 @@ const rawDataToObject = (csvArray, dataFields) => { return rawData; }; -module.exports = async (user, file, cameraLocationId) => { +module.exports = async (user, file, cameraLocationId, workingRange) => { logger.info('Start import csv'); const type = FileType.annotationCSV; const csvObject = csvParse(await fetchCsvFileContent(file.path), { @@ -130,6 +130,15 @@ module.exports = async (user, file, cameraLocationId) => { const csvContentRows = rawDataToObject(csvObject, dataFields); if (annotationIndex < 0) { + const startWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[0] + : undefined; + const endWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[1] + : undefined; + const annotations = csvContentRows.map(data => { // 組 fields const fields = dataFields.map(({ _id, options }) => { @@ -174,6 +183,8 @@ module.exports = async (user, file, cameraLocationId) => { failures: annotationSpecies ? [] : ['new-species'], fields, rawData: data.origin, + startWorkingDate, + endWorkingDate, }); }); diff --git a/src/handlers/file-handler/uploadAnnotationImage.js b/src/handlers/file-handler/uploadAnnotationImage.js index 95e9a45..fc2cd3f 100644 --- a/src/handlers/file-handler/uploadAnnotationImage.js +++ b/src/handlers/file-handler/uploadAnnotationImage.js @@ -46,7 +46,7 @@ const fetchCameraLocation = async (cameraLocationId, user) => { return cameraLocation; }; -module.exports = async (user, file, cameraLocationId) => { +module.exports = async (user, file, cameraLocationId, workingRange) => { const type = FileType.annotationImage; const cameraLocation = await fetchCameraLocation(cameraLocationId, user); @@ -83,6 +83,14 @@ module.exports = async (user, file, cameraLocationId) => { throw new errors.Http400(`無法取得圖片 Exif 時間`); } + const startWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[0] + : undefined; + const endWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[1] + : undefined; const annotation = new AnnotationModel({ project, state: AnnotationState.active, @@ -92,9 +100,11 @@ module.exports = async (user, file, cameraLocationId) => { file: fileObject, filename, time: fileDateTime, + startWorkingDate, + endWorkingDate, }); - await annotation.save(); + uploadSession.state = UploadSessionState.success; await uploadSession.save(); diff --git a/src/handlers/file-handler/uploadAnnotationVideo.js b/src/handlers/file-handler/uploadAnnotationVideo.js index 4772202..4c27f17 100644 --- a/src/handlers/file-handler/uploadAnnotationVideo.js +++ b/src/handlers/file-handler/uploadAnnotationVideo.js @@ -46,7 +46,13 @@ const fetchCameraLocation = async (cameraLocationId, user) => { return cameraLocation; }; -module.exports = async (user, file, lastModified, cameraLocationId) => { +module.exports = async ( + user, + file, + lastModified, + cameraLocationId, + workingRange, +) => { const type = FileType.annotationVideo; const cameraLocation = await fetchCameraLocation(cameraLocationId, user); @@ -81,6 +87,15 @@ module.exports = async (user, file, lastModified, cameraLocationId) => { fs.unlinkSync(file.path); uploadSession.file = fileObject._id; + console.log('ueueueueu'); + const startWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[0] + : undefined; + const endWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[1] + : undefined; const annotation = new AnnotationModel({ project, @@ -91,6 +106,8 @@ module.exports = async (user, file, lastModified, cameraLocationId) => { file: fileObject, filename, time: fileDateTime, + startWorkingDate, + endWorkingDate, }); uploadSession.state = UploadSessionState.success; diff --git a/src/handlers/file-handler/uploadFile.js b/src/handlers/file-handler/uploadFile.js index 8635b45..4becd4e 100644 --- a/src/handlers/file-handler/uploadFile.js +++ b/src/handlers/file-handler/uploadFile.js @@ -75,25 +75,52 @@ module.exports = async (req, res) => { } if (form.type === FileType.annotationImage) { - res.json(await uploadAnnotationImage(user, file, form.cameraLocation)); + res.json( + await uploadAnnotationImage( + user, + file, + form.cameraLocation, + form.workingRange, + ), + ); return; } if (form.type === FileType.annotationVideo) { const { lastModified, cameraLocation } = form; res.json( - await uploadAnnotationVideo(user, file, lastModified, cameraLocation), + await uploadAnnotationVideo( + user, + file, + lastModified, + cameraLocation, + form.workingRange, + ), ); return; } if (form.type === FileType.annotationZIP) { - res.json(await uploadAnnotationByZip(user, file, form.cameraLocation)); + res.json( + await uploadAnnotationByZip( + user, + file, + form.cameraLocation, + form.workingRange, + ), + ); return; } if (form.type === FileType.annotationCSV) { - res.json(await uploadAnnotationCsv(user, file, form.cameraLocation)); + res.json( + await uploadAnnotationCsv( + user, + file, + form.cameraLocation, + form.workingRange, + ), + ); return; } diff --git a/src/models/data/project-model.js b/src/models/data/project-model.js index ff19548..62f357c 100644 --- a/src/models/data/project-model.js +++ b/src/models/data/project-model.js @@ -190,7 +190,7 @@ schema.method('canAccessBy', function(currentUser) { */ // HACK 計畫如果公開就不用檢查 - if (moment(this.publishTime) <= moment(Date())) { + if (moment(this.publishTime) <= moment(Date.now())) { return true; } if (!currentUser || !currentUser._id || !currentUser.permission) { diff --git a/src/models/dto/media-worker-data.js b/src/models/dto/media-worker-data.js index b4a2b89..8397820 100644 --- a/src/models/dto/media-worker-data.js +++ b/src/models/dto/media-worker-data.js @@ -6,5 +6,6 @@ module.exports = class MediaWorkerData { this.fileId = args.fileId; this.uploadSessionId = args.uploadSessionId; this.cameraLocationId = args.cameraLocationId; + this.workingRange = args.workingRange; } }; diff --git a/src/tasks/media-worker/extractFileByPath.js b/src/tasks/media-worker/extractFileByPath.js index e17c0b9..396dee7 100644 --- a/src/tasks/media-worker/extractFileByPath.js +++ b/src/tasks/media-worker/extractFileByPath.js @@ -2,14 +2,16 @@ const path = require('path'); const extract = require('extract-zip'); -module.exports = (filename, dirname) => - new Promise((resolve, reject) => { +module.exports = (filename, dirname) => { + console.log('extract', filename, dirname); + return new Promise((resolve, reject) => { extract( filename, { dir: dirname, onEntry: (entry, zipfile) => { zipfile.once('end', () => { + console.log('aoeu----', entry.fileName); fs.utimesSync( path.join(dirname, entry.fileName), entry.getLastModDate(), @@ -22,7 +24,9 @@ module.exports = (filename, dirname) => if (error) { return reject(error); } + console.log(''); resolve(); }, ); }); +}; From 94642e6a5348ce8896dfe193f4120c3ae5f05e0e Mon Sep 17 00:00:00 2001 From: MooGoo Date: Fri, 3 Jul 2020 14:28:24 +0800 Subject: [PATCH 06/16] add startWworkingDate, endWorkingDate in zipfile upload --- src/tasks/media-worker/extractFileByPath.js | 47 +++++++++---------- src/tasks/media-worker/handleZipFile.js | 23 +++++++++ .../saveAllFileObjectWithAnnotationCsv.js | 11 ++++- .../media-worker/saveAllFileObjectWithCsv.js | 12 ++++- 4 files changed, 65 insertions(+), 28 deletions(-) diff --git a/src/tasks/media-worker/extractFileByPath.js b/src/tasks/media-worker/extractFileByPath.js index 396dee7..175d25f 100644 --- a/src/tasks/media-worker/extractFileByPath.js +++ b/src/tasks/media-worker/extractFileByPath.js @@ -2,31 +2,26 @@ const path = require('path'); const extract = require('extract-zip'); -module.exports = (filename, dirname) => { - console.log('extract', filename, dirname); - return new Promise((resolve, reject) => { - extract( - filename, - { - dir: dirname, - onEntry: (entry, zipfile) => { - zipfile.once('end', () => { - console.log('aoeu----', entry.fileName); - fs.utimesSync( - path.join(dirname, entry.fileName), - entry.getLastModDate(), - entry.getLastModDate(), - ); - }); - }, +module.exports = async (filename, dirname) => { + const fileList = []; + await extract( + filename, + { + dir: dirname, + onEntry: (entry, zipfile) => { + zipfile.once('end', () => { + fileList.push(path.join(dirname, entry.fileName)); + fs.utimesSync( + path.join(dirname, entry.fileName), + entry.getLastModDate(), + entry.getLastModDate(), + ); + }); }, - error => { - if (error) { - return reject(error); - } - console.log(''); - resolve(); - }, - ); - }); + }, + error => { + console.log(error); + }, + ); + return fileList; }; diff --git a/src/tasks/media-worker/handleZipFile.js b/src/tasks/media-worker/handleZipFile.js index de9afdc..2a06c3b 100644 --- a/src/tasks/media-worker/handleZipFile.js +++ b/src/tasks/media-worker/handleZipFile.js @@ -56,6 +56,8 @@ const saveAllFileObjectWithNewAnnotaions = ( project, cameraLocation, uploadSession, + startWorkingDate, + endWorkingDate, ) => Promise.resolve(files).map( file => { @@ -68,6 +70,8 @@ const saveAllFileObjectWithNewAnnotaions = ( file, filename: file.originalFilename, time: file.exif.dateTime, + startWorkingDate, + endWorkingDate, }); return annotation.save(); }, @@ -122,15 +126,28 @@ module.exports = async (workerData, uploadSession, user, tempDir, tempFile) => { ); const startExtractZipTime = moment(); + // const extractedFiles = await extractFileByPath(tempFile.name, tempDir.name); await extractFileByPath(tempFile.name, tempDir.name); logger.info( `zip worker job. extract file ${moment().to(startExtractZipTime, true)}`, ); + // console.log(extractedFiles); const filesPath = fetchFiles(tempDir.name); const csvFiles = filesPath.filter(elm => elm.match(/.*\.(csv)/i)); const hasCsvFile = csvFiles.length > 0; + const startWorkingDate = + workerData.workingRange !== undefined && + workerData.workingRange.split(',').length === 2 + ? workerData.workingRange.split(',')[0] + : undefined; + const endWorkingDate = + workerData.workingRange !== undefined && + workerData.workingRange.split(',').length === 2 + ? workerData.workingRange.split(',')[1] + : undefined; + if (!hasCsvFile) { logger.info(`zip worker job. save with Files`); const dirname = tempDir.name; @@ -148,6 +165,8 @@ module.exports = async (workerData, uploadSession, user, tempDir, tempFile) => { project, cameraLocation, uploadSession, + startWorkingDate, + endWorkingDate, ); return; } @@ -203,6 +222,8 @@ module.exports = async (workerData, uploadSession, user, tempDir, tempFile) => { fileObjects, user, project.dataFields, + startWorkingDate, + endWorkingDate, ); } else { await saveAllFileObjectWithCsv( @@ -211,6 +232,8 @@ module.exports = async (workerData, uploadSession, user, tempDir, tempFile) => { project, user, cameraLocation, + startWorkingDate, + endWorkingDate, ); } }; diff --git a/src/tasks/media-worker/saveAllFileObjectWithAnnotationCsv.js b/src/tasks/media-worker/saveAllFileObjectWithAnnotationCsv.js index 39db724..9f4d3db 100644 --- a/src/tasks/media-worker/saveAllFileObjectWithAnnotationCsv.js +++ b/src/tasks/media-worker/saveAllFileObjectWithAnnotationCsv.js @@ -43,7 +43,14 @@ const rawDataToObject = (csvArray, dataFields) => { return keyBy(rawData, 'annotationId'); }; -module.exports = async (csvArray, files, user, dataFields) => { +module.exports = async ( + csvArray, + files, + user, + dataFields, + startWorkingDate, + endWorkingDate, +) => { const csvContentRowsWithAnnotationId = rawDataToObject(csvArray, dataFields); const annotationIds = Object.keys(csvContentRowsWithAnnotationId); const species = await SpeciesModel.where(); @@ -96,6 +103,8 @@ module.exports = async (csvArray, files, user, dataFields) => { annotation.failures = annotation.species === null ? ['new-species'] : []; annotation.fields = fields; annotation.rawData = data.origin; + annotation.startWorkingDate = startWorkingDate; + annotation.endWorkingDate = endWorkingDate; annotation.saveAndAddRevision(user); return annotation; }, diff --git a/src/tasks/media-worker/saveAllFileObjectWithCsv.js b/src/tasks/media-worker/saveAllFileObjectWithCsv.js index 215aca4..cd7653b 100644 --- a/src/tasks/media-worker/saveAllFileObjectWithCsv.js +++ b/src/tasks/media-worker/saveAllFileObjectWithCsv.js @@ -44,7 +44,15 @@ const rawDataToObject = (csvArray, dataFields) => { return rawData; }; -module.exports = async (csvArray, files, project, user, cameraLocation) => { +module.exports = async ( + csvArray, + files, + project, + user, + cameraLocation, + startWorkingDate, + endWorkingDate, +) => { const { dataFields } = project; const species = await SpeciesModel.where(); const csvContentRows = rawDataToObject(csvArray, dataFields); @@ -98,6 +106,8 @@ module.exports = async (csvArray, files, project, user, cameraLocation) => { annotation.failures = annotation.species === null ? ['new-species'] : []; annotation.fields = fields; annotation.rawData = data.origin; + annotation.startWorkingDate = startWorkingDate; + annotation.endWorkingDate = endWorkingDate; annotation.saveAndAddRevision(user); return annotation; }, From 89d8ad94d89d1bd31d25785ab723c09743d5b527 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Mon, 6 Jul 2020 04:01:35 +0800 Subject: [PATCH 07/16] try nov deploy --- production.yml | 23 +++++++++++++++++++---- scripts/api/development/Dockerfile | 2 +- scripts/api/production/Dockerfile | 7 ++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/production.yml b/production.yml index 0880557..56efd87 100644 --- a/production.yml +++ b/production.yml @@ -4,8 +4,8 @@ services: redis: image: redis:5 command: redis-server --appendonly yes - ports: - - "6379:6379" + #ports: + # - "6379:6379" volumes: - ../ct-volumes/redis_data:/data restart: always @@ -38,13 +38,28 @@ services: - /camera-trap-api/node_modules - .:/camera-trap-api ports: - - 3000:3000 + - 80:3000 depends_on: - redis - mongo networks: - backend - + links: + - mongo:mongo + nginx: + image: nginx:alpine + restart: always + ports: + # - 80:80 + - 8888:8888 + volumes: + - ./scripts/nginx:/etc/nginx/conf.d + - ../ct-volumes/dist:/usr/share/nginx/dist + - ../ct-volumes/logs/nginx:/var/log/nginx + networks: + - backend + links: + - server:server networks: backend: diff --git a/scripts/api/development/Dockerfile b/scripts/api/development/Dockerfile index bb97be4..6742d05 100644 --- a/scripts/api/development/Dockerfile +++ b/scripts/api/development/Dockerfile @@ -14,7 +14,7 @@ RUN sudo apt-get install -y nodejs COPY package.json package-lock.json ./ COPY node_modules/camera-trap-credentials ./node_modules/camera-trap-credentials -RUN npm i && \ +RUN npm i -D && \ rm -rf ~/.npm package-lock.json COPY src ./src diff --git a/scripts/api/production/Dockerfile b/scripts/api/production/Dockerfile index cea268e..66b5287 100644 --- a/scripts/api/production/Dockerfile +++ b/scripts/api/production/Dockerfile @@ -18,7 +18,8 @@ COPY config ./config EXPOSE 3000 -ENV NODE_ENV="production" +ENV NODE_ENV="production-nov" -CMD ["node", "--max-old-space-size=8192", "src/web-starter"] -#CMD ["npm", "run", "start"] \ No newline at end of file +#CMD ["node", "--max-old-space-size=8192", "src/web-starter"] +#CMD ["npm", "run", "start"] +CMD ["node", "src/web-starter"] From 7c51b207461c6068af5953a05ffd129a85244da1 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Mon, 6 Jul 2020 04:28:40 +0800 Subject: [PATCH 08/16] add docker nginx conf --- scripts/nginx/api.conf.bak | 11 +++++++++++ scripts/nginx/bak | 33 +++++++++++++++++++++++++++++++++ scripts/nginx/vueapp.conf | 19 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 scripts/nginx/api.conf.bak create mode 100644 scripts/nginx/bak create mode 100644 scripts/nginx/vueapp.conf diff --git a/scripts/nginx/api.conf.bak b/scripts/nginx/api.conf.bak new file mode 100644 index 0000000..d4034a8 --- /dev/null +++ b/scripts/nginx/api.conf.bak @@ -0,0 +1,11 @@ +upstream apiserver { + server server:3000; +} + +server { + listen 80; + server_name api-nov.camera-trap.tw; + location / { + proxy_pass http://apiserver; + } +} \ No newline at end of file diff --git a/scripts/nginx/bak b/scripts/nginx/bak new file mode 100644 index 0000000..72de584 --- /dev/null +++ b/scripts/nginx/bak @@ -0,0 +1,33 @@ +upstream apiserver { + server server:3000; +} + +server { + listen 80; + server_name api-nov.camera-trap.tw; + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $http_host; + proxy_http_version 1.1; + proxy_set_header Connection ""; + #proxy_pass http://localhost:5000; + proxy_pass http://apiserver; + + proxy_temp_file_write_size 64k; + proxy_connect_timeout 10080s; + proxy_send_timeout 10080; + proxy_read_timeout 10080; + proxy_buffer_size 64k; + proxy_buffers 16 32k; + proxy_busy_buffers_size 64k; + proxy_redirect off; + proxy_request_buffering off; + proxy_buffering off; + } + +} + +proxy_connect_timeout 600; +proxy_send_timeout 600; +proxy_read_timeout 600; +send_timeout 600; \ No newline at end of file diff --git a/scripts/nginx/vueapp.conf b/scripts/nginx/vueapp.conf new file mode 100644 index 0000000..093acb8 --- /dev/null +++ b/scripts/nginx/vueapp.conf @@ -0,0 +1,19 @@ +server { + listen 8888; + server_name nov.camera-trap.tw; + location / { + root /usr/share/nginx/dist; + index index.html; + try_files $uri $uri/ /index.html; + } +} + + +#location /match/here { +# proxy_set_header HOST $host; +# proxy_set_header X-Forwarded-Proto $scheme; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# +# proxy_pass http://example.com/new/prefix; +#} \ No newline at end of file From 282eef5c43fc16c2b9ed69c87706bde80f8c06bc Mon Sep 17 00:00:00 2001 From: MooGoo Date: Mon, 6 Jul 2020 05:02:24 +0800 Subject: [PATCH 09/16] fixed project err while no annotations --- src/handlers/project-handler/getProject.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/handlers/project-handler/getProject.js b/src/handlers/project-handler/getProject.js index b0d0fb8..39018ab 100644 --- a/src/handlers/project-handler/getProject.js +++ b/src/handlers/project-handler/getProject.js @@ -63,7 +63,11 @@ module.exports = async (req, res) => { .sort('-time') .limit(1) .findOne(), - ]).then(([d1, d2]) => [d1.time, d2.time]); + ]).then(([d1, d2]) => { + if (d1 && d2) { + return [d1.time, d2.time]; + } + }); res.json({ ...project.dump(), From d20cc74a7e752e0ec1afe2f7576f6bb076e50521 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Wed, 8 Jul 2020 03:21:12 +0800 Subject: [PATCH 10/16] add concurrently in prod --- package-lock.json | 200 +++++++++++++----------------- package.json | 2 +- scripts/api/production/Dockerfile | 4 +- 3 files changed, 86 insertions(+), 120 deletions(-) diff --git a/package-lock.json b/package-lock.json index 282a2c1..2af4480 100644 --- a/package-lock.json +++ b/package-lock.json @@ -340,7 +340,7 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", "dev": true }, "accepts": { @@ -466,7 +466,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -505,7 +505,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -519,7 +518,7 @@ "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", "dev": true, "requires": { "micromatch": "^3.1.4", @@ -529,7 +528,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -607,7 +606,7 @@ "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -703,7 +702,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "arr-union": { @@ -1023,7 +1022,7 @@ "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", "dev": true }, "async-limiter": { @@ -1111,7 +1110,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -1135,7 +1134,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -1144,7 +1143,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -1153,7 +1152,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -1177,7 +1176,7 @@ "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", "dev": true }, "bindings": { @@ -1269,7 +1268,7 @@ "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", + "integrity": "sha1-VcbDmouljZxhrSLNh3Uy3rZlogs=", "dev": true, "requires": { "ansi-align": "^2.0.0", @@ -1302,7 +1301,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -1466,7 +1465,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -1554,7 +1553,7 @@ "capture-stack-trace": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", - "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "integrity": "sha1-psC74fOPOqC5Ijjstv9Cw0TUE10=", "dev": true }, "catchment": { @@ -1586,7 +1585,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1610,7 +1608,7 @@ "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -1630,7 +1628,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -1699,7 +1697,7 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", "dev": true }, "to-regex-range": { @@ -1735,7 +1733,7 @@ "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -2024,7 +2022,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-5.2.0.tgz", "integrity": "sha512-XxcDbQ4/43d6CxR7+iV8IZXhur4KbmEJk1CetVMUqCy34z9l0DkszbY+/9wvmSnToTej0SYomc2WSRH+L0zVJw==", - "dev": true, "requires": { "chalk": "^2.4.2", "date-fns": "^2.0.1", @@ -2040,20 +2037,17 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, "requires": { "string-width": "^3.1.0", "strip-ansi": "^5.2.0", @@ -2063,14 +2057,12 @@ "date-fns": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz", - "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw==", - "dev": true + "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw==" }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -2078,20 +2070,17 @@ "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==", - "dev": true + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -2101,7 +2090,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -2110,7 +2098,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -2119,20 +2106,17 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, "read-pkg": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", - "dev": true, "requires": { "normalize-package-data": "^2.3.2", "parse-json": "^4.0.0", @@ -2142,14 +2126,12 @@ "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==", - "dev": true + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -2160,7 +2142,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -2169,7 +2150,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -2177,14 +2157,12 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -2194,14 +2172,12 @@ "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==", - "dev": true + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yargs": { "version": "13.3.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, "requires": { "cliui": "^5.0.0", "find-up": "^3.0.0", @@ -2219,7 +2195,6 @@ "version": "13.1.2", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -2238,7 +2213,7 @@ "configstore": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", + "integrity": "sha1-xvJd767vJt8S3TNBSwAf6BpUP48=", "dev": true, "requires": { "dot-prop": "^4.1.0", @@ -2601,7 +2576,7 @@ "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", "dev": true, "requires": { "is-descriptor": "^1.0.2", @@ -2611,7 +2586,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -2620,7 +2595,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -2629,7 +2604,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -2840,8 +2815,7 @@ "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", - "dev": true + "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=" }, "enabled": { "version": "1.0.2", @@ -3046,8 +3020,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { "version": "5.16.0", @@ -3545,7 +3518,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { "ms": "2.0.0" @@ -3693,7 +3666,7 @@ "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -3735,7 +3708,7 @@ "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", "dev": true, "requires": { "array-unique": "^0.3.2", @@ -3769,7 +3742,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -3778,7 +3751,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -3787,7 +3760,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -4370,8 +4343,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { "version": "1.0.0", @@ -4943,7 +4915,7 @@ "is-ci": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "integrity": "sha1-43ecjuF/zPQoSI9uKBGH8uYyhBw=", "dev": true, "requires": { "ci-info": "^1.5.0" @@ -4952,7 +4924,7 @@ "ci-info": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "integrity": "sha1-LKINu5zrMtRSSmgzAzE/AwSx5Jc=", "dev": true } } @@ -4974,7 +4946,7 @@ "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", @@ -4985,7 +4957,7 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", "dev": true } } @@ -5110,7 +5082,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "dev": true, "requires": { "isobject": "^3.0.1" @@ -5144,7 +5116,7 @@ "is-retry-allowed": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=", "dev": true }, "is-set": { @@ -5180,7 +5152,7 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", "dev": true }, "is-yarn-global": { @@ -5267,8 +5239,7 @@ "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=", - "dev": true + "integrity": "sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk=" }, "json-parse-helpfulerror": { "version": "1.0.3", @@ -6166,7 +6137,7 @@ "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", "dev": true, "requires": { "for-in": "^1.0.2", @@ -6176,7 +6147,7 @@ "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { "is-plain-object": "^2.0.4" @@ -6683,7 +6654,7 @@ "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -6899,7 +6870,7 @@ "nodemon": { "version": "1.19.4", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.4.tgz", - "integrity": "sha512-VGPaqQBNk193lrJFotBU8nvWZPqEZY2eIzymy2jjY0fJ9qIsxA0sxQ8ATPl0gZC645gijYEc1jtZvpS8QWzJGQ==", + "integrity": "sha1-VttcYHQI4P34kg0rREgZrxquCXE=", "dev": true, "requires": { "chokidar": "^2.1.8", @@ -6917,7 +6888,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", "dev": true, "requires": { "ms": "^2.1.1" @@ -6926,7 +6897,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", "dev": true } } @@ -8583,7 +8554,7 @@ "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -8594,7 +8565,7 @@ "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", "dev": true, "requires": { "arr-flatten": "^1.1.0", @@ -8672,7 +8643,7 @@ "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", "dev": true, "requires": { "arr-diff": "^4.0.0", @@ -8748,7 +8719,7 @@ "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", "dev": true, "requires": { "extend-shallow": "^3.0.2", @@ -8858,7 +8829,7 @@ "registry-auth-token": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", - "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "integrity": "sha1-10RoFUM/XV7WQxzV3KIQSPZrOX4=", "dev": true, "requires": { "rc": "^1.1.6", @@ -8882,7 +8853,7 @@ "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", "dev": true }, "repeat-string": { @@ -8981,7 +8952,7 @@ "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", "dev": true }, "retry": { @@ -9046,7 +9017,6 @@ "version": "6.5.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", "integrity": "sha1-UQ4mMX9NuRp+sd532d2boKSJmjo=", - "dev": true, "requires": { "tslib": "^1.9.0" } @@ -9182,7 +9152,7 @@ "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -9382,7 +9352,7 @@ "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", "dev": true, "requires": { "base": "^0.11.1", @@ -9398,7 +9368,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { "ms": "2.0.0" @@ -9433,7 +9403,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", "dev": true, "requires": { "define-property": "^1.0.0", @@ -9453,7 +9423,7 @@ "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9462,7 +9432,7 @@ "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { "kind-of": "^6.0.0" @@ -9471,7 +9441,7 @@ "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", @@ -9490,7 +9460,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -9564,8 +9534,7 @@ "spawn-command": { "version": "0.0.2-1", "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", - "dev": true + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=" }, "spawn-please": { "version": "0.3.0", @@ -9609,7 +9578,7 @@ "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", "dev": true, "requires": { "extend-shallow": "^3.0.0" @@ -10140,7 +10109,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -10364,7 +10332,7 @@ "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", "dev": true, "requires": { "define-property": "^2.0.2", @@ -10395,7 +10363,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", "dev": true, "requires": { "nopt": "~1.0.10" @@ -10404,8 +10372,7 @@ "tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==" }, "triple-beam": { "version": "1.3.0", @@ -10415,8 +10382,7 @@ "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo=", - "dev": true + "integrity": "sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo=" }, "twix": { "version": "1.3.0", @@ -10523,7 +10489,7 @@ "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", "dev": true, "requires": { "arr-union": "^3.1.0", @@ -10613,13 +10579,13 @@ "upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", "dev": true }, "update-notifier": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", + "integrity": "sha1-0HRFk+E/Fh5AassdlAi3LK0Ir/Y=", "dev": true, "requires": { "boxen": "^1.2.1", @@ -10676,7 +10642,7 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", "dev": true }, "util-deprecate": { diff --git a/package.json b/package.json index 2971abd..91684d9 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "bluebird": "^3.5.5", "body-parser": "^1.19.0", "compression": "^1.7.4", + "concurrently": "^5.2.0", "config": "^3.1.0", "connect-mongo": "^3.2.0", "cookie-parser": "^1.4.4", @@ -79,7 +80,6 @@ "devDependencies": { "@tbif/eslint-config-base": "github:TaiBIF/eslint-base", "camera-trap-credentials": "github:TaiBIF/camera-trap-credentials#3f1d61d7d4ffc3f1299716369015c857c2a6d940", - "concurrently": "^5.2.0", "eslint-plugin-mocha": "^5.3.0", "husky": "^3.0.3", "lint-staged": "^9.2.1", diff --git a/scripts/api/production/Dockerfile b/scripts/api/production/Dockerfile index 66b5287..d5ee927 100644 --- a/scripts/api/production/Dockerfile +++ b/scripts/api/production/Dockerfile @@ -21,5 +21,5 @@ EXPOSE 3000 ENV NODE_ENV="production-nov" #CMD ["node", "--max-old-space-size=8192", "src/web-starter"] -#CMD ["npm", "run", "start"] -CMD ["node", "src/web-starter"] +CMD ["npm", "run", "start"] +#CMD ["node", "src/web-starter"] From 90aa5ffdd2e9cf60202dde1fee748676bb7e1ad2 Mon Sep 17 00:00:00 2001 From: MooGoo Date: Wed, 8 Jul 2020 03:52:01 +0800 Subject: [PATCH 11/16] try concurrently in production --- package.json | 1 + scripts/api/production/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 91684d9..e85c797 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "precommit": "lint-staged", "start": "concurrently --kill-others \"./node_modules/nodemon/bin/nodemon.js src/web-starter.js --watch src\" \"./node_modules/nodemon/bin/nodemon.js src/task-worker.js --watch src\"", + "start_prod": "concurrently --kill-others \"node src/web-starter.js\" \"node src/task-worker.js --watch src\"", "lint": "eslint src/", "db:init": "NODE_ENV=test node . -c; NODE_ENV=test node . -i", "test": "NODE_ENV=test ./node_modules/.bin/mocha test", diff --git a/scripts/api/production/Dockerfile b/scripts/api/production/Dockerfile index d5ee927..e22a56e 100644 --- a/scripts/api/production/Dockerfile +++ b/scripts/api/production/Dockerfile @@ -21,5 +21,5 @@ EXPOSE 3000 ENV NODE_ENV="production-nov" #CMD ["node", "--max-old-space-size=8192", "src/web-starter"] -CMD ["npm", "run", "start"] +CMD ["npm", "run", "start_prod"] #CMD ["node", "src/web-starter"] From 68f4a0fe249519eae4e4bb96a269c6dbc74fa98f Mon Sep 17 00:00:00 2001 From: MooGoo Date: Wed, 15 Jul 2020 12:05:32 +0800 Subject: [PATCH 12/16] close mongodb port --- production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/production.yml b/production.yml index 56efd87..ace42e2 100644 --- a/production.yml +++ b/production.yml @@ -16,8 +16,8 @@ services: restart: always expose: - 27017 - ports: - - "27017:27017" + #ports: + # - "27017:27017" volumes: - ../ct-volumes/mongo_data:/data/db - ../ct-volumes/bucket:/bucket From 27b066acb7bbf0b21ef7b0c0d0863b5b6946114f Mon Sep 17 00:00:00 2001 From: MooGoo Date: Fri, 24 Jul 2020 16:33:08 +0800 Subject: [PATCH 13/16] fix +8 problem when uploading images (not zip) --- .../file-handler/uploadAnnotationImage.js | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/handlers/file-handler/uploadAnnotationImage.js b/src/handlers/file-handler/uploadAnnotationImage.js index fc2cd3f..ae220ec 100644 --- a/src/handlers/file-handler/uploadAnnotationImage.js +++ b/src/handlers/file-handler/uploadAnnotationImage.js @@ -1,4 +1,5 @@ -const moment = require('moment'); +// const moment = require('moment'); +const config = require('config'); const utils = require('../../common/utils'); const errors = require('../../models/errors'); const FileModel = require('../../models/data/file-model'); @@ -61,10 +62,25 @@ module.exports = async (user, file, cameraLocationId, workingRange) => { const exif = await utils.getExif(utils.convertBufferToStream(file.buffer)); const filename = file.originalname; - const fileDateTime = moment( - exif.DateTimeOriginal, - 'YYYY:MM:DD HH:mm:ss', - ).toISOString(); + + /* fixed +8 problen, referance from file-model.js#251 */ + // const fileDateTime = moment( + // exif.DateTimeOriginal, + // 'YYYY:MM:DD HH:mm:ss', + // ).toISOString(); + let dateTime; + const dateTimeOriginal = exif.DateTimeOriginal; + if (dateTimeOriginal) { + // dateTimeOriginal is like this "2018:05:17 09:39:29" + dateTime = new Date( + `${dateTimeOriginal + .replace(':', '-') + .replace(':', '-') + .replace(' ', 'T')}.000Z`, + ); + dateTime.setUTCMinutes(dateTime.getUTCMinutes() - config.defaultTimezone); + } + const fileDateTime = dateTime; const fileObject = new FileModel({ type, From 3a90030cfaadd9232f2614f76c96aa43c1909f4e Mon Sep 17 00:00:00 2001 From: v02202 Date: Fri, 21 Aug 2020 18:01:45 +0800 Subject: [PATCH 14/16] add importing excel --- src/common/utils.js | 8 +- src/handlers/file-handler/multerMapping.js | 7 + .../file-handler/uploadAnnotationCsv.js | 5 +- .../file-handler/uploadAnnotationExcel.js | 300 ++++++++++++++++++ src/handlers/file-handler/uploadFile.js | 16 +- src/models/const/file-extension-name.js | 1 + src/models/const/file-type.js | 2 + src/models/data/file-model.js | 23 ++ 8 files changed, 359 insertions(+), 3 deletions(-) create mode 100644 src/handlers/file-handler/uploadAnnotationExcel.js diff --git a/src/common/utils.js b/src/common/utils.js index 5dcfcaf..c458830 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -132,7 +132,13 @@ exports.getFileUrl = (fileType, filename, isAnnotationThumbnail) => { if (!filename) { return; } - if ([FileType.annotationCSV, FileType.annotationZIP].indexOf(fileType) >= 0) { + if ( + [ + FileType.annotationCSV, + FileType.annotationZIP, + FileType.annotationExcel, + ].indexOf(fileType) >= 0 + ) { return; } if (fileType === FileType.annotationImage && isAnnotationThumbnail) { diff --git a/src/handlers/file-handler/multerMapping.js b/src/handlers/file-handler/multerMapping.js index b9105bd..0d5642b 100644 --- a/src/handlers/file-handler/multerMapping.js +++ b/src/handlers/file-handler/multerMapping.js @@ -22,6 +22,12 @@ const multers = { limits: { fileSize: config.limit.csvFileSize }, }).single('file'), ), + excel: util.promisify( + multer({ + storage: multer.diskStorage({}), + limits: { fileSize: config.limit.excelFileSize }, + }).single('file'), + ), zip: util.promisify( multer({ storage: multer.diskStorage({}), @@ -41,6 +47,7 @@ multerTable[FileType.projectCoverImage] = multers.image; multerTable[FileType.annotationImage] = multers.image; multerTable[FileType.annotationVideo] = multers.video; multerTable[FileType.annotationCSV] = multers.csv; +multerTable[FileType.annotationExcel] = multers.excel; multerTable[FileType.annotationZIP] = multers.zip; multerTable[FileType.issueAttachment] = multers.issueAttachment; diff --git a/src/handlers/file-handler/uploadAnnotationCsv.js b/src/handlers/file-handler/uploadAnnotationCsv.js index 3f6392c..fd699d9 100644 --- a/src/handlers/file-handler/uploadAnnotationCsv.js +++ b/src/handlers/file-handler/uploadAnnotationCsv.js @@ -79,6 +79,8 @@ module.exports = async (user, file, cameraLocationId, workingRange) => { const csvObject = csvParse(await fetchCsvFileContent(file.path), { bom: true, }); + console.log(file.path); + console.log(csvObject); // check csv validate const timePattern = /20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]/; @@ -87,8 +89,9 @@ module.exports = async (user, file, cameraLocationId, workingRange) => { [studyAreaName, subStudyAreaName, cameraLocationName, filename, time], index, ) => { + console.log(time.match(timePattern)); if (!time.match(timePattern) && index !== 0) { - throw new errors.Http400('Csv 時間格式錯誤 YYYY-MM-DD HH:mm:ss'); + throw new errors.Http400('時間格式錯誤,應為文字,請見教學手冊'); } }, ); diff --git a/src/handlers/file-handler/uploadAnnotationExcel.js b/src/handlers/file-handler/uploadAnnotationExcel.js new file mode 100644 index 0000000..5eca44b --- /dev/null +++ b/src/handlers/file-handler/uploadAnnotationExcel.js @@ -0,0 +1,300 @@ +const fs = require('fs'); +const { keyBy } = require('lodash'); +const Promise = require('bluebird'); +const moment = require('moment-timezone'); +// const detectCharacterEncoding = require('detect-character-encoding'); +// const iconv = require('iconv-lite'); +const xlsx = require('node-xlsx'); +const errors = require('../../models/errors'); +const FileModel = require('../../models/data/file-model'); +const FileType = require('../../models/const/file-type'); +const AnnotationState = require('../../models/const/annotation-state'); +const AnnotationModel = require('../../models/data/annotation-model'); +const UploadSessionModel = require('../../models/data/upload-session-model'); +const UploadSessionState = require('../../models/const/upload-session-state'); +const UploadSessionErrorType = require('../../models/const/upload-session-error-type'); +const fetchCameraLocation = require('./fetchCameraLocation'); +const DataFieldModel = require('../../models/data/data-field-model'); +const SpeciesModel = require('../../models/data/species-model'); +const logger = require('../../logger'); + +const concurrency = 10; +const fileNameIndex = 3; + +/* const fetchExcelFileContent = path => + new Promise((resolve, reject) => { + const { encoding } = detectCharacterEncoding(fs.readFileSync(path)); + // /console.log(iconv.encodingExists("windows-1252")); check if encoding is supported + let reader; + if (encoding === 'windows-1252') { + reader = fs.createReadStream(path).pipe(iconv.decodeStream('win1252')); + logger.info('decode windows-1252 to utf8'); + } else { + reader = fs.createReadStream(path); + } + + reader.on('data', chunk => { + resolve(chunk.toString()); + }); + }); */ + +const rawDataToObject = (excelArray, dataFields) => { + const excelHeaderRow = excelArray[0]; // Define first element as header + const excelContentRows = excelArray.slice(1); // only retain content without header + + const annotationIndex = excelHeaderRow.findIndex( + row => row === 'Annotation id', + ); // check every row has "Annotation id" + + const indexes = {}; + // generate indexes related to CName + dataFields.forEach(({ _id, title: { 'zh-TW': CName } }) => { + const index = excelHeaderRow.findIndex(row => row === CName); + if (index) { + indexes[_id] = index; + } + }); + + // generate a rawData table (subtable is data) extracted the row from content + const rawData = excelContentRows.map(raw => { + const data = { + cameraLocation: raw[2], + fileName: raw[fileNameIndex], // fileNameIndex=3 + time: raw[4], + species: raw[5], + annotationId: raw[annotationIndex], // row with AnnotationId + origin: raw, + }; + + Object.keys(indexes).forEach(id => { + data[id] = raw[indexes[id]]; + }); + return data; + }); + + return rawData; +}; + +module.exports = async (user, file, cameraLocationId, workingRange) => { + logger.info('Start import excel'); + const type = FileType.annotationExcel; + console.log(file.path); + + const excelObjectOld = xlsx.parse(fs.readFileSync(file.path)); // Parsing a xlsx from buffer, outputs an array + // const csvObject = csvParse(await fetchExcelFileContent(file.path), { + // bom: true, + // }); + + const excelObject = excelObjectOld[0].data; + console.log(excelObject); + const timePattern = /20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]/; + excelObject.forEach( + ( + [studyAreaName, subStudyAreaName, cameraLocationName, filename, time], + index, + ) => { + // check the format of time + // console.log(!time.match(timePattern)); + if (!time.match(timePattern) && index !== 0) { + throw new errors.Http400('時間格式錯誤,應為文字,請見教學手冊'); + } + }, + ); + + const cameraLocation = await fetchCameraLocation(cameraLocationId, user); // populate (refer documents in other collections) project and studyArea from CameraLocationModel + const { project } = cameraLocation; // get the project id from camerLocation + + const filename = file.originalname; + + // generate a fileObject table inherit FileModel(File in Mongo) + const fileObject = new FileModel({ + type, + user, + originalFilename: filename, + project, + }); + + // generate a fileObject table inherit UploadSessionModel(UploadSessions in Mongo) + const uploadSession = new UploadSessionModel({ + state: UploadSessionState.processing, + project, + user, + cameraLocation, + file: fileObject, + }); + + // ensure saving above tables + await uploadSession.save(); + await fileObject.saveWithContent(file.path); + + // generate a dataFields table and assign the _id from the project(Projects in Mongo).dataFields + const dataFields = await DataFieldModel.where({ + _id: { $in: project.dataFields }, + }); + + const species = await SpeciesModel.where(); + + const excelHeaderRow = excelObject[0]; + + const annotationIndex = excelHeaderRow.findIndex( + row => row === 'Annotation id', + ); + + // run the rawDataToObject function(above) to generate the rawData... + const excelContentRows = rawDataToObject(excelObject, dataFields); + + if (annotationIndex < 0) { + const startWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[0] + : undefined; + const endWorkingDate = + workingRange !== undefined && workingRange.split(',').length === 2 + ? workingRange.split(',')[1] + : undefined; + + const annotations = excelContentRows.map(data => { + // 組 fields + const fields = dataFields.map(({ _id, options }) => { + const tempValue = data[_id]; + let value = {}; + + if (options.length) { + const option = + options.find( + opt => + `${opt._id}` === tempValue || `${opt['zh-TW']}` === tempValue, + ) || {}; + + value = { + selectId: option._id, + text: option._id || tempValue, + selectLabel: option['zh-TW'], + }; + } else { + value = { + text: tempValue, + }; + } + + return { + dataField: _id, + value, + }; + }); + + const annotationSpecies = species.find( + x => x.title['zh-TW'] === data.species, + ); + + return new AnnotationModel({ + project, + cameraLocation, + studyArea: cameraLocation.studyArea, + time: moment.tz(data.time, 'Asia/Taipei').toISOString(), + filename: data.fileName, + species: annotationSpecies || null, + failures: annotationSpecies ? [] : ['new-species'], + fields, + rawData: data.origin, + startWorkingDate, + endWorkingDate, + }); + }); + + try { + await Promise.resolve(annotations).map( + annotation => { + annotation.state = AnnotationState.active; + annotation.save(); + return annotation; + }, + { + concurrency, + }, + ); + logger.info(`Total save: ${annotations.length}`); + uploadSession.state = UploadSessionState.success; + } catch (e) { + uploadSession.errorType = UploadSessionErrorType.others; + uploadSession.errorMessage = e.message; + uploadSession.state = UploadSessionState.failure; + } + } else { + const excelContentRowsWithAnnotationId = keyBy( + excelContentRows, + 'annotationId', + ); + const annotationIds = Object.keys(excelContentRowsWithAnnotationId); + const annotations = await AnnotationModel.where({ + _id: { $in: annotationIds }, + state: AnnotationState.active, + }); + + try { + await Promise.resolve(annotations).map( + annotation => { + const data = excelContentRowsWithAnnotationId[annotation._id]; + + // 組 fields + const fields = dataFields.map(({ _id, options }) => { + const tempValue = data[_id]; + let value = {}; + + if (options.length) { + const option = + options.find( + opt => + `${opt._id}` === tempValue || + `${opt['zh-TW']}` === tempValue, + ) || {}; + + value = { + selectId: option._id, + text: option._id || tempValue, + selectLabel: option['zh-TW'], + }; + } else { + value = { + text: tempValue, + }; + } + + return { + dataField: _id, + value, + }; + }); + + const annotationSpecies = species.find( + x => x.title['zh-TW'] === data.species, + ); + + annotation.filename = data.fileName; + annotation.species = annotationSpecies || null; + annotation.failures = + annotation.species === null ? ['new-species'] : []; + annotation.fields = fields; + annotation.rawData = data.origin; + annotation.saveAndAddRevision(user); + return annotation; + }, + { + concurrency, + }, + ); + uploadSession.state = UploadSessionState.success; + } catch (e) { + uploadSession.errorType = UploadSessionErrorType.others; + uploadSession.errorMessage = e.message; + uploadSession.state = UploadSessionState.failure; + } + logger.info(`Total update: ${annotations.length}`); + } + + // update status + await uploadSession.save(); + + fs.unlinkSync(file.path); + return { ...fileObject.dump(), uploadSession: uploadSession._id }; +}; diff --git a/src/handlers/file-handler/uploadFile.js b/src/handlers/file-handler/uploadFile.js index 4becd4e..7322eb6 100644 --- a/src/handlers/file-handler/uploadFile.js +++ b/src/handlers/file-handler/uploadFile.js @@ -8,6 +8,7 @@ const uploadAnnotationImage = require('./uploadAnnotationImage'); const uploadAnnotationVideo = require('./uploadAnnotationVideo'); const uploadAnnotationByZip = require('./uploadAnnotationByZip'); const uploadAnnotationCsv = require('./uploadAnnotationCsv'); +const uploadAnnotationExcel = require('./uploadAnnotationExcel'); const uploadIssueAttachment = require('./uploadIssueAttachment'); const multerTable = require('./multerMapping'); @@ -15,7 +16,8 @@ const needCheckCameraLocaion = type => { if ( type === FileType.annotationImage || type === FileType.annotationZIP || - type === FileType.annotationCSV + type === FileType.annotationCSV || + type === FileType.annotationExcel ) { return true; } @@ -124,6 +126,18 @@ module.exports = async (req, res) => { return; } + if (form.type === FileType.annotationExcel) { + res.json( + await uploadAnnotationExcel( + user, + file, + form.cameraLocation, + form.workingRange, + ), + ); + return; + } + if (form.type === FileType.issueAttachment) { res.json(await uploadIssueAttachment(user, file, form.cameraLocation)); } diff --git a/src/models/const/file-extension-name.js b/src/models/const/file-extension-name.js index 577f263..627fe0e 100644 --- a/src/models/const/file-extension-name.js +++ b/src/models/const/file-extension-name.js @@ -2,6 +2,7 @@ module.exports = { annotationImage: ['jpg', 'png'], annotationVideo: ['avi', 'm4v', 'mov', 'mp4'], annotationZip: ['zip'], + annotationExcel: ['xls', 'xlsx'], annotationCsv: ['csv'], projectCoverImage: ['jpg', 'png'], issueAttachment: [ diff --git a/src/models/const/file-type.js b/src/models/const/file-type.js index 4a82f83..76bbaa0 100644 --- a/src/models/const/file-type.js +++ b/src/models/const/file-type.js @@ -3,6 +3,7 @@ module.exports = { annotationImage: 'annotation-image', annotationVideo: 'annotation-video', annotationCSV: 'annotation-csv', + annotationExcel: 'annotation-excel', annotationZIP: 'annotation-zip', issueAttachment: 'issue-attachment', all() { @@ -11,6 +12,7 @@ module.exports = { this.annotationImage, this.annotationVideo, this.annotationCSV, + this.annotationExcel, this.annotationZIP, this.issueAttachment, ]; diff --git a/src/models/data/file-model.js b/src/models/data/file-model.js index 2f2add7..606aadc 100644 --- a/src/models/data/file-model.js +++ b/src/models/data/file-model.js @@ -109,6 +109,15 @@ schema.post('remove', file => { utils.logError(error, file); }); break; + case FileType.annotationExcel: + utils + .deleteS3Objects([ + `${config.s3.folders.annotationExcels}/${file.getFilename()}`, + ]) + .catch(error => { + utils.logError(error, file); + }); + break; case FileType.issueAttachment: utils .deleteS3Objects([ @@ -331,6 +340,20 @@ schema.method('saveWithContent', function(source, lastModified) { }) .then(() => resolve(this)); break; + case FileType.annotationExcel: + utils + .uploadToS3({ + Key: `${ + config.s3.folders.annotationExcels + }/${this.getFilename()}`, + Body: + typeof source === 'string' + ? fs.createReadStream(source) + : source, + StorageClass: 'STANDARD_IA', + }) + .then(() => resolve(this)); + break; case FileType.issueAttachment: utils .uploadToS3({ From db901e67744793c60aa70143aa69c1fdf58a24a8 Mon Sep 17 00:00:00 2001 From: v02202 Date: Tue, 1 Sep 2020 14:08:52 +0800 Subject: [PATCH 15/16] work-hour new method --- package-lock.json | 151 +++++---- package.json | 2 + .../calculator-handler/work-hours-real.js | 113 +++++++ src/handlers/calculator-handler/work-hours.js | 304 +++++++++++++++++- 4 files changed, 481 insertions(+), 89 deletions(-) create mode 100644 src/handlers/calculator-handler/work-hours-real.js diff --git a/package-lock.json b/package-lock.json index 2af4480..6454005 100644 --- a/package-lock.json +++ b/package-lock.json @@ -330,7 +330,7 @@ "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "integrity": "sha1-MgjB8I06TZkmGrZPkjArwV4RHKA=", "dev": true, "requires": { "jsonparse": "^1.2.0", @@ -390,7 +390,7 @@ "agent-base": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "integrity": "sha1-gWXwHENgCbzK0LHRIvBe13Dvxu4=", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -399,7 +399,7 @@ "agentkeepalive": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", - "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "integrity": "sha1-oROSTdP6JKC8O3gQjEUMKr7gD2c=", "dev": true, "requires": { "humanize-ms": "^1.2.1" @@ -658,7 +658,7 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", "dev": true }, "archiver-utils": { @@ -1188,9 +1188,9 @@ } }, "bl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", - "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -1340,13 +1340,13 @@ "browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", "dev": true }, "bson": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" }, "buffer": { "version": "4.9.1", @@ -2296,7 +2296,7 @@ "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", "dev": true, "requires": { "aproba": "^1.1.1", @@ -2792,7 +2792,7 @@ "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", "dev": true, "requires": { "end-of-stream": "^1.0.0", @@ -2842,7 +2842,7 @@ "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -3007,7 +3007,7 @@ "es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "integrity": "sha1-TrIVlMlyvEBVPSduUQU5FD21Pgo=", "dev": true } } @@ -3948,7 +3948,7 @@ "flat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "integrity": "sha1-CQvsiwXjnLowl0fx1YjwTbr5jbI=", "dev": true, "requires": { "is-buffer": "~2.0.3" @@ -3957,7 +3957,7 @@ "is-buffer": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "integrity": "sha1-PlcvI8hBGlz9lVfISeNmXgspBiM=", "dev": true } } @@ -3993,7 +3993,7 @@ "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "integrity": "sha1-jdfYc6G6vCB9lOrQwuDkQnbr8ug=", "dev": true, "requires": { "inherits": "^2.0.3", @@ -4003,7 +4003,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", "dev": true }, "readable-stream": { @@ -4024,7 +4024,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -4092,7 +4092,7 @@ "fs-minipass": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "integrity": "sha1-zP+FcIQef+QmVpPaiJNsVa7X98c=", "dev": true, "requires": { "minipass": "^2.6.0" @@ -4145,7 +4145,7 @@ "genfun": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", - "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", + "integrity": "sha1-ndlxCgaQClxKW/V6yl2k5S/nZTc=", "dev": true }, "get-caller-file": { @@ -4292,7 +4292,7 @@ "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=", "dev": true }, "handlebars": { @@ -4411,7 +4411,7 @@ "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", "dev": true }, "hosted-git-info": { @@ -4439,7 +4439,7 @@ "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "integrity": "sha1-5IIb7vWyFCogJr1zkm/lN2McVAU=", "dev": true, "requires": { "agent-base": "4", @@ -4449,7 +4449,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "dev": true, "requires": { "ms": "2.0.0" @@ -4460,7 +4460,7 @@ "https-proxy-agent": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "integrity": "sha1-TuenN6vZJniik9mzShr00NCMeHs=", "dev": true, "requires": { "agent-base": "^4.3.0", @@ -4470,7 +4470,7 @@ "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", "dev": true, "requires": { "ms": "^2.1.1" @@ -4479,7 +4479,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=", "dev": true } } @@ -4621,7 +4621,7 @@ "ignore-walk": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "integrity": "sha1-AX4kRxhL/q3nwjjkrv3R6PlbHjc=", "dev": true, "requires": { "minimatch": "^3.0.4" @@ -4671,7 +4671,7 @@ "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "integrity": "sha1-xM78qo5RBRwqQLos6KPScpWvlGc=", "dev": true }, "inflight": { @@ -6092,7 +6092,7 @@ "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "integrity": "sha1-5xN2Ln0+Mv7YAxFc+T4EvKn8yaY=", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -6102,7 +6102,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", "dev": true } } @@ -6110,7 +6110,7 @@ "minizlib": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "integrity": "sha1-IpDeloGKNMKVUcio0wEha9Zahh0=", "dev": true, "requires": { "minipass": "^2.9.0" @@ -6119,7 +6119,7 @@ "mississippi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "integrity": "sha1-6goykfl+C16HdrNj1fChLZTGcCI=", "dev": true, "requires": { "concat-stream": "^1.5.0", @@ -6502,9 +6502,9 @@ } }, "mongodb": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz", - "integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.0.tgz", + "integrity": "sha512-/XWWub1mHZVoqEsUppE0GV7u9kanLvHxho6EvBxQbShXTKYF9trhZC2NzbulRGeG7xMJHD8IOWRcdKx5LPjAjQ==", "requires": { "bl": "^2.2.0", "bson": "^1.1.4", @@ -7199,7 +7199,7 @@ "npm-package-arg": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", - "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "integrity": "sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc=", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -7222,7 +7222,7 @@ "npm-pick-manifest": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", - "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", + "integrity": "sha1-9Nnl/UviFT5fTl+be+jcQZqZq7c=", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -7725,7 +7725,7 @@ "osenv": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", "dev": true, "requires": { "os-homedir": "^1.0.0", @@ -7916,7 +7916,7 @@ "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", - "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "integrity": "sha1-kEnKN9bLIYLDsdLHIL6U0UpYFPw=", "dev": true, "requires": { "cyclist": "^1.0.1", @@ -8234,7 +8234,7 @@ "protoduck": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", - "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", + "integrity": "sha1-A8NlnKGAB7aaUP2Cp+vMUWJhFR8=", "dev": true, "requires": { "genfun": "^5.0.0" @@ -8386,7 +8386,7 @@ "pumpify": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "integrity": "sha1-NlE74karJ1cLGjdKXOJ4v9dDcM4=", "dev": true, "requires": { "duplexify": "^3.6.0", @@ -8397,7 +8397,7 @@ "pump": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "integrity": "sha1-Ejma3W5M91Jtlzy8i1zi4pCLOQk=", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -9346,7 +9346,7 @@ "smart-buffer": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", - "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "integrity": "sha1-kWBcJdkWUvRmHqacz0XxszHKIbo=", "dev": true }, "snapdragon": { @@ -9469,7 +9469,7 @@ "socks": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", - "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", + "integrity": "sha1-ARKfCl1TTSuJdxLtis6rfuZdeOM=", "dev": true, "requires": { "ip": "1.1.5", @@ -9479,7 +9479,7 @@ "socks-proxy-agent": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", - "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", + "integrity": "sha1-PImR8xRbJ5nnDhG9X7yLGWMRY4Y=", "dev": true, "requires": { "agent-base": "~4.2.1", @@ -9489,7 +9489,7 @@ "agent-base": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "integrity": "sha1-2J5ZmfeXh1Z0wH2H8mD8Qeg+jKk=", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -9601,7 +9601,7 @@ "ssri": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "integrity": "sha1-KjxBso3UW2K2Nnbst0ABJlrp7dg=", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -9641,7 +9641,7 @@ "stream-each": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", - "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "integrity": "sha1-6+J6DDibBPvMIzZClS4Qcxr6m64=", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -10174,7 +10174,7 @@ "tar": { "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "integrity": "sha1-Q7NkvFKIjVVSmGN7ENYHkCVKtSU=", "dev": true, "requires": { "chownr": "^1.1.1", @@ -10189,7 +10189,7 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "integrity": "sha1-27fa+b/YusmrRev2ArjLrQ1dCP0=", "dev": true } } @@ -10257,7 +10257,7 @@ "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", "dev": true, "requires": { "readable-stream": "~2.3.6", @@ -10267,7 +10267,7 @@ "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", "dev": true }, "readable-stream": { @@ -10288,7 +10288,7 @@ "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -10481,10 +10481,9 @@ } }, "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha1-BtzjSg5op7q8KbNluOdLiSUgOWE=", - "optional": true + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.11.0.tgz", + "integrity": "sha512-xY96SsN3NA461qIRKZ/+qox37YXPtSBswMGfiNptr+wrt6ds4HaMw23TP612fEyGekRE6LNRiLYr/aqbHXNedw==" }, "union-value": { "version": "1.0.1", @@ -10501,7 +10500,7 @@ "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "integrity": "sha1-HWl2k2mtoFgxA6HmrodoG1ZXMjA=", "dev": true, "requires": { "unique-slug": "^2.0.0" @@ -10510,7 +10509,7 @@ "unique-slug": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "integrity": "sha1-uqvOkQg/xk6UWw861hPiZPfNTmw=", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -10726,7 +10725,7 @@ "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", "dev": true, "requires": { "string-width": "^1.0.2 || 2" @@ -11072,7 +11071,7 @@ "yargs-unparser": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "integrity": "sha1-7yXCx2n/a9CeSw+dfGBfsnhG6p8=", "dev": true, "requires": { "flat": "^4.1.0", @@ -11083,19 +11082,19 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", "dev": true }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", "dev": true }, "cliui": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=", "dev": true, "requires": { "string-width": "^3.1.0", @@ -11106,7 +11105,7 @@ "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -11115,7 +11114,7 @@ "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==", + "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", "dev": true }, "is-fullwidth-code-point": { @@ -11127,7 +11126,7 @@ "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -11137,7 +11136,7 @@ "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -11152,13 +11151,13 @@ "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==", + "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", "dev": true }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -11169,7 +11168,7 @@ "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -11184,7 +11183,7 @@ "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -11195,7 +11194,7 @@ "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==", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", "dev": true }, "yargs": { diff --git a/package.json b/package.json index e85c797..cc3170d 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "mime-types": "^2.1.24", "moment": "^2.24.0", "moment-timezone": "^0.5.26", + "mongodb": "^3.6.0", "mongoose": "^5.7.9", "mongoose-paginate-v2": "^1.3.0", "multer": "^1.4.1", @@ -75,6 +76,7 @@ "string-template": "^1.0.0", "tmp": "^0.1.0", "twix": "^1.3.0", + "underscore": "^1.11.0", "winston": "^3.2.1", "xmlbuilder": "^13.0.2" }, diff --git a/src/handlers/calculator-handler/work-hours-real.js b/src/handlers/calculator-handler/work-hours-real.js new file mode 100644 index 0000000..c62912c --- /dev/null +++ b/src/handlers/calculator-handler/work-hours-real.js @@ -0,0 +1,113 @@ +const moment = require('moment'); +require('twix'); +const CameraLocationModel = require('../../models/data/camera-location-model'); +const CameraLocationState = require('../../models/const/camera-location-state'); +const ProjectTrip = require('../../models/data/project-trip-model'); + +const fetchCameraLocations = async cameraLocationIds => { + const cameraLocations = await CameraLocationModel.where({ + _id: { $in: cameraLocationIds }, + }).where({ state: CameraLocationState.active }); + + return cameraLocations; +}; + +const getMonthRange = (startDate, endDate) => { + const s = moment(startDate); + const e = moment(endDate); + + const result = []; + while (s.isBefore(e)) { + result.push(s.format('YYYY-MM')); + s.add(1, 'month'); + } + return result; +}; + +module.exports = async (req, res) => { + const form = req.query; + const { cameraLocationIds = [], startDateTime, endDateTime } = form; + const cameraLocations = await fetchCameraLocations(cameraLocationIds); + + const trips = await ProjectTrip.find({ + 'studyAreas.cameraLocations.cameraLocation': { + $in: cameraLocationIds, + }, + }); + + const times = {}; + const totalTime = {}; + trips.forEach(t => { + t.studyAreas.forEach(s => { + s.cameraLocations.forEach( + ({ cameraLocation: cameraLocationId, title, projectCameras }) => { + projectCameras.forEach(({ startActiveDate, endActiveDate }) => { + if (typeof times[title] === 'undefined') { + times[title] = []; + } + + if (typeof totalTime[title] === 'undefined') { + totalTime[title] = 0; + } + const durations = moment(endActiveDate).diff(startActiveDate); + totalTime[title] += durations; + times[title].push({ + cameraLocationId, + startTime: startActiveDate, + endTime: endActiveDate, + }); + }); + }, + ); + }); + }); + + let data = []; + + if (form.range === 'month') { + const monthList = getMonthRange(startDateTime, endDateTime); + cameraLocations.forEach(c => { + const workingCameraRange = times[c.name]; + monthList.forEach(m => { + const begin = moment(m).startOf('month'); + const end = moment(m).endOf('month'); + + let total = 0; + + workingCameraRange.forEach(({ startTime, endTime }) => { + const range1 = moment(startTime).twix(endTime); + const range2 = moment(begin).twix(end); + + const rr = range1.intersection(range2); + const duration = rr._end.diff(rr._start); + total += moment + .duration(duration < 0 ? 0 : rr._end.diff(rr._start)) + .asHours(); + }); + + data.push({ + cameraLocationId: c._id, + title: c.name, + workHours: parseFloat(total.toFixed(2)), + month: moment(m).format('M'), + year: moment(m).format('Y'), + }); + }); + }); + } else { + data = Object.keys(totalTime).map((v, i) => { + const [cam] = times[v]; + return { + cameraLocationId: cam.cameraLocationId, + title: v, + workHours: parseFloat( + moment + .duration(totalTime[v]) + .asHours() + .toFixed(2), + ), + }; + }); + } + res.json(data); +}; diff --git a/src/handlers/calculator-handler/work-hours.js b/src/handlers/calculator-handler/work-hours.js index c62912c..51795b0 100644 --- a/src/handlers/calculator-handler/work-hours.js +++ b/src/handlers/calculator-handler/work-hours.js @@ -1,8 +1,11 @@ -const moment = require('moment'); +const moment = require('moment'); require('twix'); +const _ = require('underscore'); + +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); +const AnnotationModel = require('../../models/data/annotation-model'); const fetchCameraLocations = async cameraLocationIds => { const cameraLocations = await CameraLocationModel.where({ @@ -10,38 +13,154 @@ const fetchCameraLocations = async cameraLocationIds => { }).where({ state: CameraLocationState.active }); return cameraLocations; -}; +}; // generate table "cameraLocations" by _id and active const getMonthRange = (startDate, endDate) => { const s = moment(startDate); const e = moment(endDate); const result = []; + // check Invalid date before the startDate while (s.isBefore(e)) { result.push(s.format('YYYY-MM')); - s.add(1, 'month'); + s.add(1, 'month'); // add 1 month on Invalidate } return result; }; module.exports = async (req, res) => { const form = req.query; - const { cameraLocationIds = [], startDateTime, endDateTime } = form; - const cameraLocations = await fetchCameraLocations(cameraLocationIds); + const { cameraLocationIds = [], startDateTime, endDateTime } = form; // create form including three variables + const cameraLocations = await fetchCameraLocations(cameraLocationIds); // get cameraLocations + console.log(cameraLocationIds); - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + console.log(userid); + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, + }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, }, + ]); + // console.log(timesTT) + + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + console.log(result); + + let dataT = []; + if (form.range === 'month') { + const monthList = getMonthRange(startDateTime, endDateTime); + cameraLocations.forEach(c => { + const workingCameraRange = result[c._id]; + monthList.forEach(m => { + const beginT = moment(m).startOf('month'); + + const endT = moment(m).endOf('month'); + + let total = 0; + + workingCameraRange.forEach(({ start, end }) => { + const range1 = moment(start).twix(end); // output the range from startTime to endTime + const range2 = moment(beginT).twix(endT); // output the range from begin to end + const rr = range1.intersection(range2); // get the overlap hour between range1 and range2 + const durationOne = rr._end.diff(rr._start); + total += moment + .duration(durationOne < 0 ? 0 : rr._end.diff(rr._start)) + .asHours(); + }); + dataT.push({ + cameraLocationId: c._id, + workHours: parseFloat(total.toFixed(2)), + month: moment(m).format('M'), + year: moment(m).format('Y'), + }); + }); + }); + } else { + dataT = Object.keys(totalTest).map((v, i) => { + const [cam] = result[v]; + + return { + cameraLocationId: cam.id, + title: v, + workHours: parseFloat( + moment + .duration(totalTest[v]) + .asHours() + .toFixed(2), + ), + }; + }); + // console.log(dataT); + } + res.json(dataT); +}; + +/* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { s.cameraLocations.forEach( ({ cameraLocation: cameraLocationId, title, projectCameras }) => { + //get startActiveDate and endActiveDate variables in projectCameras projectCameras.forEach(({ startActiveDate, endActiveDate }) => { + //solve the condition with undefined in the type of times and totalTime if (typeof times[title] === 'undefined') { times[title] = []; } @@ -49,6 +168,11 @@ module.exports = async (req, res) => { if (typeof totalTime[title] === 'undefined') { totalTime[title] = 0; } + + // startActiveDate: get the "有效開始工作時間" from the ProjectTrip.studyAreas.cameraLocations.cameraLocation, e.g.,:2017-05-03T03:48:00.000+0000 + // endActiveDate: 2017-06-30T00:23:00.000Z + + //create durarions variable from "endActiveDate - startActiveDate" const durations = moment(endActiveDate).diff(startActiveDate); totalTime[title] += durations; times[title].push({ @@ -56,11 +180,16 @@ module.exports = async (req, res) => { startTime: startActiveDate, endTime: endActiveDate, }); + //console.log(totalTime) }); }, ); }); }); + //console.log(times); + + + let data = []; @@ -70,15 +199,18 @@ module.exports = async (req, res) => { const workingCameraRange = times[c.name]; monthList.forEach(m => { const begin = moment(m).startOf('month'); + const end = moment(m).endOf('month'); let total = 0; workingCameraRange.forEach(({ startTime, endTime }) => { - const range1 = moment(startTime).twix(endTime); - const range2 = moment(begin).twix(end); + const range1 = moment(startTime).twix(endTime); //output the range from startTime to endTime + const range2 = moment(begin).twix(end); //output the range from begin to end + //console.log(range2); + - const rr = range1.intersection(range2); + const rr = range1.intersection(range2); // get the overlap hour between range1 and range2 const duration = rr._end.diff(rr._start); total += moment .duration(duration < 0 ? 0 : rr._end.diff(rr._start)) @@ -95,8 +227,10 @@ module.exports = async (req, res) => { }); }); } else { + data = Object.keys(totalTime).map((v, i) => { const [cam] = times[v]; + return { cameraLocationId: cam.cameraLocationId, title: v, @@ -110,4 +244,148 @@ module.exports = async (req, res) => { }); } res.json(data); + }; + +/* output table + +times: { + YM03: [ + { + cameraLocationId: 5f3f6984405af60035d645ec, + startTime: 2017-05-03T03:48:00.000Z, + endTime: 2017-06-30T00:23:00.000Z + } + ] + } the startTime and endTime from the active start and end time + +cam: { + cameraLocationId: 5f3f6984405af60035d645ec, + startTime: 2017-05-03T03:48:00.000Z, + endTime: 2017-06-30T00:23:00.000Z + } + { + cameraLocationId: 5f3defea0afc7e02901c64ee, + startTime: 2017-04-28T12:59:00.000Z, + endTime: 2017-05-17T02:32:00.000Z + } + + trips: [ + { + _id: 5f2a807c72cda4003b8cef6f, + project: 5f2a78eb72cda4003b8cef1c, + sn: 'YM', + date: 2018-05-28T00:00:00.000Z, + member: 'Vivian, Mike', + studyAreas: [ [Object] ], + createTime: 2020-08-05T09:48:44.958Z, + updateTime: 2020-08-25T02:54:20.243Z, + __v: 4 + } + ] + +form: { + calculateTimeIntervel: '120000', + cameraLocationIds: [ '5f3f6984405af60035d645ec' ], + endDateTime: '2017-07-31T15:59:00.000Z', + index: '1', + projectIds: [ '5f2a78eb72cda4003b8cef1c' ], + range: 'month', + startDateTime: '2017-05-31T16:00:00.000Z' + } startDateTime and endDateTime are from filtering + + + +data: [ + { + cameraLocationId: 5f3f6984405af60035d645ec, + title: 'YM03', + workHours: 0, + month: '4', + year: '2017' + }, + { + cameraLocationId: 5f3f6984405af60035d645ec, + title: 'YM03', + workHours: 692.2, + month: '5', + year: '2017' + },.... + ] + +begin: Moment { + _isAMomentObject: true, + _i: '2017-07', + _f: 'YYYY-MM', + _isUTC: false, + _pf: { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -1, + charsLeftOver: 0, + nullInput: false, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: true, + parsedDateParts: [ 2017, 6 ], + meridiem: undefined, + rfc2822: false, + weekdayMismatch: false + }, + _locale: Locale { + _calendar: { + sameDay: '[Today at] LT',... + }, + _longDateFormat: { + LTS: 'h:mm:ss A', + LT: 'h:mm A',... + }, + _invalidDate: 'Invalid date', + ordinal: [Function: ordinal], + _dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + _relativeTime: { + future: 'in %s', + past: '%s ago',... + }, + _months: [ + 'January', 'February', + 'March', 'April', + 'May', 'June',... + ], + _monthsShort: [ + 'Jan', 'Feb', 'Mar', + 'Apr', 'May', 'Jun',.. + ], + _week: { dow: 0, doy: 6 }, + _weekdays: [ + 'Sunday', + 'Monday',.. + ], + _weekdaysMin: [ + 'Su', 'Mo',... + ], + _weekdaysShort: [ + 'Sun', 'Mon', + 'Tue', 'Wed',... + ], + _meridiemParse: /[ap]\.?m?\.?/i, + _abbr: 'en', + _config: { + calendar: [Object], + longDateFormat: [Object], + invalidDate: 'Invalid date', + ordinal: [Function: ordinal],... + }, + _dayOfMonthOrdinalParseLenient: /\d{1,2}(th|st|nd|rd)|\d{1,2}/ + }, + _a: [ + 2017, 6, 1, 0, + 0, 0, 0 + ], + _d: 2017-07-01T00:00:00.000Z, + _isValid: true, + _z: null + } + */ From 4cac9bcfdba29af39157e0b27e477ce8bdf56cb8 Mon Sep 17 00:00:00 2001 From: v02202 Date: Wed, 9 Sep 2020 17:54:39 +0800 Subject: [PATCH 16/16] statistics and calacultors --- .../calculator-handler/capture-rate.js | 80 ++++- src/handlers/calculator-handler/events.js | 85 ++++- src/handlers/calculator-handler/oi1.js | 84 ++++- src/handlers/calculator-handler/oi2.js | 84 ++++- src/handlers/calculator-handler/oi3-real.js | 234 +++++++++++++ src/handlers/calculator-handler/oi3.js | 96 ++++- src/handlers/calculator-handler/work-hours.js | 14 +- .../file-handler/uploadAnnotationExcel.js | 2 +- src/handlers/statistic-handler-real.js | 330 ++++++++++++++++++ src/handlers/statistic-handler.js | 3 +- src/routers/web-router.js | 2 +- 11 files changed, 946 insertions(+), 68 deletions(-) create mode 100644 src/handlers/calculator-handler/oi3-real.js create mode 100644 src/handlers/statistic-handler-real.js diff --git a/src/handlers/calculator-handler/capture-rate.js b/src/handlers/calculator-handler/capture-rate.js index 7e39baa..42ae5bb 100644 --- a/src/handlers/calculator-handler/capture-rate.js +++ b/src/handlers/calculator-handler/capture-rate.js @@ -1,11 +1,12 @@ const moment = require('moment-timezone'); require('twix'); +const _ = require('underscore'); const mongoose = require('mongoose'); +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); const AnnotationModel = require('../../models/data/annotation-model'); const AnnotationState = require('../../models/const/annotation-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); const SpeciesModel = require('../../models/data/species-model'); const fetchCameraLocations = async cameraLocationIds => { @@ -113,13 +114,72 @@ module.exports = async (req, res) => { const annotationQuery = getAnnotationQuery(form); const annotations = await annotationQuery; - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, + }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, }, + ]); + // console.log(timesTT) + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + /* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { @@ -144,7 +204,7 @@ module.exports = async (req, res) => { }, ); }); - }); + }); */ const data = []; @@ -154,7 +214,7 @@ module.exports = async (req, res) => { const cameraLocationWorkPerMonth = {}; const eventDatesPerMonth = []; cameraLocations.forEach(c => { - const workingCameraRange = times[c.name]; + const workingCameraRange = result[c._id]; const eventDatesPerMonthOfCamera = {}; // 整理每個月事件數 annotations @@ -169,9 +229,9 @@ module.exports = async (req, res) => { }); // 整理每個月工作天數 - workingCameraRange.forEach(({ startTime, endTime }) => { - const datesList = enumerateDaysBetweenDates(startTime, endTime); - // console.log(datesList, startTime, endTime); + workingCameraRange.forEach(({ start, end }) => { + const datesList = enumerateDaysBetweenDates(start, end); + // console.log(datesList, start, end); datesList.forEach(date => { const dateM = moment(date).format('YYYY-MM'); if (typeof cameraLocationWorkPerMonth[dateM] === 'undefined') { diff --git a/src/handlers/calculator-handler/events.js b/src/handlers/calculator-handler/events.js index eed1eea..8d45b48 100644 --- a/src/handlers/calculator-handler/events.js +++ b/src/handlers/calculator-handler/events.js @@ -1,11 +1,12 @@ const moment = require('moment'); require('twix'); const mongoose = require('mongoose'); +const _ = require('underscore'); +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); const AnnotationModel = require('../../models/data/annotation-model'); const AnnotationState = require('../../models/const/annotation-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); const SpeciesModel = require('../../models/data/species-model'); const fetchCameraLocations = async cameraLocationIds => { @@ -100,13 +101,72 @@ module.exports = async (req, res) => { const annotationQuery = getAnnotationQuery(form); const annotations = await annotationQuery; - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, + }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, }, + ]); + // console.log(timesTT) + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + /* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { @@ -131,14 +191,15 @@ module.exports = async (req, res) => { }, ); }); - }); + }); */ const data = []; if (range === 'month') { const monthList = getMonthRange(startDateTime, endDateTime); species.forEach(({ _id: s }) => { cameraLocations.forEach(c => { - const workingCameraRange = times[c.name]; + const workingCameraRange = result[c._id]; + console.log(workingCameraRange); monthList.forEach(m => { let totalEvents = 0; let lastValidAnnotationTime; @@ -167,13 +228,13 @@ module.exports = async (req, res) => { }); // 整理時數 - const begin = moment(m).startOf('month'); - const end = moment(m).endOf('month'); + const beginT = moment(m).startOf('month'); + const endT = moment(m).endOf('month'); let hours = 0; - workingCameraRange.forEach(({ startTime, endTime }) => { - const range1 = moment(startTime).twix(endTime); - const range2 = moment(begin).twix(end); + workingCameraRange.forEach(({ start, end }) => { + const range1 = moment(start).twix(end); + const range2 = moment(beginT).twix(endT); const rr = range1.intersection(range2); const duration = rr._end.diff(rr._start); diff --git a/src/handlers/calculator-handler/oi1.js b/src/handlers/calculator-handler/oi1.js index 6ec6a02..45fc9be 100644 --- a/src/handlers/calculator-handler/oi1.js +++ b/src/handlers/calculator-handler/oi1.js @@ -1,11 +1,12 @@ const moment = require('moment'); require('twix'); +const _ = require('underscore'); const mongoose = require('mongoose'); +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); const AnnotationModel = require('../../models/data/annotation-model'); const AnnotationState = require('../../models/const/annotation-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); const SpeciesModel = require('../../models/data/species-model'); const DataFieldModel = require('../../models/data/data-field-model'); @@ -105,13 +106,72 @@ module.exports = async (req, res) => { 'title.zh-TW': '個體 ID', }); - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, + }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, }, + ]); + // console.log(timesTT) + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + /* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { @@ -136,7 +196,7 @@ module.exports = async (req, res) => { }, ); }); - }); + }); */ const data = []; const organismIdList = []; @@ -144,7 +204,7 @@ module.exports = async (req, res) => { const monthList = getMonthRange(startDateTime, endDateTime); species.forEach(({ _id: s }) => { cameraLocations.forEach(c => { - const workingCameraRange = times[c.name]; + const workingCameraRange = result[c._id]; monthList.forEach(m => { let totalPics = 0; let lastValidAnnotationTime; @@ -186,13 +246,13 @@ module.exports = async (req, res) => { }); // 整理時數 - const begin = moment(m).startOf('month'); - const end = moment(m).endOf('month'); + const beginT = moment(m).startOf('month'); + const endT = moment(m).endOf('month'); let hours = 0; - workingCameraRange.forEach(({ startTime, endTime }) => { - const range1 = moment(startTime).twix(endTime); - const range2 = moment(begin).twix(end); + workingCameraRange.forEach(({ start, end }) => { + const range1 = moment(start).twix(end); + const range2 = moment(beginT).twix(endT); const rr = range1.intersection(range2); const duration = rr._end.diff(rr._start); diff --git a/src/handlers/calculator-handler/oi2.js b/src/handlers/calculator-handler/oi2.js index 7435b91..9be62ac 100644 --- a/src/handlers/calculator-handler/oi2.js +++ b/src/handlers/calculator-handler/oi2.js @@ -1,11 +1,12 @@ const moment = require('moment'); require('twix'); +const _ = require('underscore'); const mongoose = require('mongoose'); +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); const AnnotationModel = require('../../models/data/annotation-model'); const AnnotationState = require('../../models/const/annotation-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); const SpeciesModel = require('../../models/data/species-model'); const DataFieldModel = require('../../models/data/data-field-model'); @@ -105,13 +106,72 @@ module.exports = async (req, res) => { 'title.zh-TW': '隻數', }); - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, + }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, }, + ]); + // console.log(timesTT) + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + /* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { @@ -136,14 +196,14 @@ module.exports = async (req, res) => { }, ); }); - }); + }); */ const data = []; if (range === 'month') { const monthList = getMonthRange(startDateTime, endDateTime); species.forEach(({ _id: s }) => { cameraLocations.forEach(c => { - const workingCameraRange = times[c.name]; + const workingCameraRange = result[c._id]; monthList.forEach(m => { let totalPics = 0; let lastValidAnnotationTime; @@ -182,13 +242,13 @@ module.exports = async (req, res) => { }); // 整理時數 - const begin = moment(m).startOf('month'); - const end = moment(m).endOf('month'); + const beginT = moment(m).startOf('month'); + const endT = moment(m).endOf('month'); let hours = 0; - workingCameraRange.forEach(({ startTime, endTime }) => { - const range1 = moment(startTime).twix(endTime); - const range2 = moment(begin).twix(end); + workingCameraRange.forEach(({ start, end }) => { + const range1 = moment(start).twix(end); + const range2 = moment(beginT).twix(endT); const rr = range1.intersection(range2); const duration = rr._end.diff(rr._start); diff --git a/src/handlers/calculator-handler/oi3-real.js b/src/handlers/calculator-handler/oi3-real.js new file mode 100644 index 0000000..f622782 --- /dev/null +++ b/src/handlers/calculator-handler/oi3-real.js @@ -0,0 +1,234 @@ +const moment = require('moment'); +require('twix'); +const mongoose = require('mongoose'); +const CameraLocationModel = require('../../models/data/camera-location-model'); +const CameraLocationState = require('../../models/const/camera-location-state'); +const AnnotationModel = require('../../models/data/annotation-model'); +const AnnotationState = require('../../models/const/annotation-state'); +const ProjectTrip = require('../../models/data/project-trip-model'); +const SpeciesModel = require('../../models/data/species-model'); + +const fetchCameraLocations = async cameraLocationIds => { + const cameraLocations = await CameraLocationModel.where({ + _id: { $in: cameraLocationIds }, + }).where({ state: CameraLocationState.active }); + + return cameraLocations; +}; + +const getAnnotationQuery = form => { + const query = AnnotationModel.where({ state: AnnotationState.active }) + .populate('species') + .populate('studyArea') + .populate('file') + .sort('cameraLocation time filename'); + + if (form.cameraLocationIds.length) { + query.where({ + cameraLocation: { $in: form.cameraLocationIds }, + }); + } + + if (form.speciesIds.length) { + query.where({ + species: { + $in: form.speciesIds, + }, + }); + } + + if (form.startDateTime) { + query.where({ time: { $gte: form.startDateTime } }); + } + + if (form.endDateTime) { + query.where({ time: { $lte: form.endDateTime } }); + } + + const otherDataFields = Object.keys(form); + if (otherDataFields.length) { + otherDataFields.forEach(dataFieldId => { + if (!mongoose.Types.ObjectId.isValid(dataFieldId)) { + return; + } + + if (!mongoose.Types.ObjectId.isValid(dataFieldId)) { + return; + } + const dataFieldValue = form[dataFieldId]; + query.where({ + fields: { + $elemMatch: { + dataField: dataFieldId, + 'value.text': dataFieldValue, + }, + }, + }); + }); + } + + return query; +}; + +const getMonthRange = (startDate, endDate) => { + const s = moment(startDate); + const e = moment(endDate); + + const result = []; + while (s.isBefore(e)) { + result.push(s.format('YYYY-MM')); + s.add(1, 'month'); + } + return result; +}; + +module.exports = async (req, res) => { + const form = req.query; + const { + cameraLocationIds = [], + startDateTime, + endDateTime, + range, + speciesIds, + } = form; + const calculateTimeIntervel = parseInt(form.calculateTimeIntervel || 0, 10); + const species = await SpeciesModel.find({ + _id: { $in: speciesIds }, + }); + + const cameraLocations = await fetchCameraLocations(cameraLocationIds); + const annotationQuery = getAnnotationQuery(form); + const annotations = await annotationQuery; + + const trips = await ProjectTrip.find({ + 'studyAreas.cameraLocations.cameraLocation': { + $in: cameraLocationIds, + }, + }); + + const times = {}; + const totalTime = {}; + trips.forEach(t => { + t.studyAreas.forEach(s => { + s.cameraLocations.forEach( + ({ cameraLocation: cameraLocationId, title, projectCameras }) => { + projectCameras.forEach(({ startActiveDate, endActiveDate }) => { + if (typeof times[title] === 'undefined') { + times[title] = []; + } + + if (typeof totalTime[title] === 'undefined') { + totalTime[title] = 0; + } + const durations = moment(endActiveDate).diff(startActiveDate); + totalTime[title] += durations; + times[title].push({ + cameraLocationId, + startTime: startActiveDate, + endTime: endActiveDate, + }); + }); + }, + ); + }); + }); + + const data = []; + if (range === 'month') { + const monthList = getMonthRange(startDateTime, endDateTime); + species.forEach(({ _id: s }) => { + cameraLocations.forEach(c => { + const workingCameraRange = times[c.name]; + monthList.forEach(m => { + let totalPics = 0; + let lastValidAnnotationTime; + annotations + .filter(({ cameraLocation }) => `${cameraLocation}` === `${c._id}`) + .filter(({ time }) => moment(time).format('YYYY-MM') === m) + .filter( + ({ species: { _id: annotationSpeicesId } }) => + `${annotationSpeicesId}` === `${s}`, + ) + .forEach(({ time }) => { + if (!lastValidAnnotationTime) { + lastValidAnnotationTime = time; + totalPics = 1; + } + + if ( + moment(time).diff(lastValidAnnotationTime) > + calculateTimeIntervel + ) { + lastValidAnnotationTime = time; + totalPics += 1; + } + }); + + // 整理時數 + const begin = moment(m).startOf('month'); + const end = moment(m).endOf('month'); + let hours = 0; + + workingCameraRange.forEach(({ startTime, endTime }) => { + const range1 = moment(startTime).twix(endTime); + const range2 = moment(begin).twix(end); + + const rr = range1.intersection(range2); + const duration = rr._end.diff(rr._start); + hours += moment + .duration(duration < 0 ? 0 : rr._end.diff(rr._start)) + .asHours(); + }); + + const totalHours = parseFloat(hours.toFixed(4)); + + data.push({ + species: s, + cameraLocationId: c._id, + title: c.name, + count: parseFloat((totalPics / totalHours).toFixed(5)) * 1000, + month: moment(m).format('M'), + year: moment(m).format('Y'), + }); + }); + }); + }); + } else { + species.forEach(({ _id: s }) => { + cameraLocations.forEach(c => { + let total = 0; + let lastValidAnnotationTime; + annotations + .filter(({ cameraLocation }) => `${cameraLocation}` === `${c._id}`) + .filter( + ({ species: { _id: annotationSpeicesId } }) => + `${annotationSpeicesId}` === `${s}`, + ) + .forEach(({ time }) => { + if (!lastValidAnnotationTime) { + lastValidAnnotationTime = time; + total = 1; + } + + if ( + moment(time).diff(lastValidAnnotationTime) > calculateTimeIntervel + ) { + lastValidAnnotationTime = time; + total += 1; + } + }); + + data.push({ + species: s, + cameraLocationId: c._id, + title: c.name, + count: total, + }); + }); + }); + } + res.json({ + species, + data, + }); +}; diff --git a/src/handlers/calculator-handler/oi3.js b/src/handlers/calculator-handler/oi3.js index f622782..c93c4eb 100644 --- a/src/handlers/calculator-handler/oi3.js +++ b/src/handlers/calculator-handler/oi3.js @@ -1,11 +1,12 @@ const moment = require('moment'); require('twix'); +const _ = require('underscore'); const mongoose = require('mongoose'); +const { ObjectID } = require('mongodb'); const CameraLocationModel = require('../../models/data/camera-location-model'); const CameraLocationState = require('../../models/const/camera-location-state'); const AnnotationModel = require('../../models/data/annotation-model'); const AnnotationState = require('../../models/const/annotation-state'); -const ProjectTrip = require('../../models/data/project-trip-model'); const SpeciesModel = require('../../models/data/species-model'); const fetchCameraLocations = async cameraLocationIds => { @@ -83,7 +84,10 @@ const getMonthRange = (startDate, endDate) => { }; module.exports = async (req, res) => { - const form = req.query; + const form = req.query; // 一個Express的API,用來取得網址參數的方法 + + // console.log(form) + const { cameraLocationIds = [], startDateTime, @@ -91,25 +95,88 @@ module.exports = async (req, res) => { range, speciesIds, } = form; + const calculateTimeIntervel = parseInt(form.calculateTimeIntervel || 0, 10); const species = await SpeciesModel.find({ _id: { $in: speciesIds }, - }); + }); // from model get the species infor. const cameraLocations = await fetchCameraLocations(cameraLocationIds); const annotationQuery = getAnnotationQuery(form); const annotations = await annotationQuery; - const trips = await ProjectTrip.find({ - 'studyAreas.cameraLocations.cameraLocation': { - $in: cameraLocationIds, + const userid = []; + cameraLocationIds.forEach(stringId => { + userid.push(new ObjectID(stringId)); + }); + + const timesTT = await AnnotationModel.aggregate([ + { + $match: { cameraLocation: { $in: userid } }, }, + + { + $sort: { + time: -1.0, + }, + }, + { + $group: { + _id: '$cameraLocation', + starttimes: { + $first: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + endtimes: { + $last: { + $arrayElemAt: ['$rawData', 4.0], + }, + }, + }, + }, + ]); + // console.log(timesTT) + const timesArray = []; + const totalTest = {}; + await timesTT.forEach(t => { + const Start = moment(t.starttimes).format('YYYY-MM-DDTHH:mm:ss'); + const End = moment(t.endtimes).format('YYYY-MM-DDTHH:mm:ss'); + + if (moment(End).isAfter(Start)) { + const durationsT = moment(End).diff(Start); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: Start, + end: End, + }); + } else { + const durationsT = moment(Start).diff(End); + totalTest[t._id] = durationsT; + + // console.log(totalTest) + + timesArray.push({ + id: t._id, + start: End, + end: Start, + }); + } }); - const times = {}; + const result = _.groupBy(timesArray, 'id'); + + // console.log(result); + + /* const times = {}; const totalTime = {}; trips.forEach(t => { t.studyAreas.forEach(s => { + //console.log(s.cameraLocations); s.cameraLocations.forEach( ({ cameraLocation: cameraLocationId, title, projectCameras }) => { projectCameras.forEach(({ startActiveDate, endActiveDate }) => { @@ -132,13 +199,14 @@ module.exports = async (req, res) => { ); }); }); + console.log(times); */ const data = []; if (range === 'month') { const monthList = getMonthRange(startDateTime, endDateTime); species.forEach(({ _id: s }) => { cameraLocations.forEach(c => { - const workingCameraRange = times[c.name]; + const workingCameraRange = result[c._id]; monthList.forEach(m => { let totalPics = 0; let lastValidAnnotationTime; @@ -165,13 +233,13 @@ module.exports = async (req, res) => { }); // 整理時數 - const begin = moment(m).startOf('month'); - const end = moment(m).endOf('month'); + const beginT = moment(m).startOf('month'); + const endT = moment(m).endOf('month'); let hours = 0; - workingCameraRange.forEach(({ startTime, endTime }) => { - const range1 = moment(startTime).twix(endTime); - const range2 = moment(begin).twix(end); + workingCameraRange.forEach(({ start, end }) => { + const range1 = moment(start).twix(end); + const range2 = moment(beginT).twix(endT); const rr = range1.intersection(range2); const duration = rr._end.diff(rr._start); @@ -181,7 +249,7 @@ module.exports = async (req, res) => { }); const totalHours = parseFloat(hours.toFixed(4)); - + console.log(totalPics); data.push({ species: s, cameraLocationId: c._id, diff --git a/src/handlers/calculator-handler/work-hours.js b/src/handlers/calculator-handler/work-hours.js index 51795b0..7bb6e9c 100644 --- a/src/handlers/calculator-handler/work-hours.js +++ b/src/handlers/calculator-handler/work-hours.js @@ -32,14 +32,13 @@ module.exports = async (req, res) => { const form = req.query; const { cameraLocationIds = [], startDateTime, endDateTime } = form; // create form including three variables const cameraLocations = await fetchCameraLocations(cameraLocationIds); // get cameraLocations - console.log(cameraLocationIds); const userid = []; cameraLocationIds.forEach(stringId => { userid.push(new ObjectID(stringId)); }); - console.log(userid); + // console.log(userid); const timesTT = await AnnotationModel.aggregate([ { $match: { cameraLocation: { $in: userid } }, @@ -101,7 +100,7 @@ module.exports = async (req, res) => { const result = _.groupBy(timesArray, 'id'); - console.log(result); + // console.log(result); let dataT = []; if (form.range === 'month') { @@ -110,6 +109,7 @@ module.exports = async (req, res) => { const workingCameraRange = result[c._id]; monthList.forEach(m => { const beginT = moment(m).startOf('month'); + // console.log(beginT); const endT = moment(m).endOf('month'); @@ -119,13 +119,18 @@ module.exports = async (req, res) => { const range1 = moment(start).twix(end); // output the range from startTime to endTime const range2 = moment(beginT).twix(endT); // output the range from begin to end const rr = range1.intersection(range2); // get the overlap hour between range1 and range2 + // console.log(rr._start.format()); + const durationOne = rr._end.diff(rr._start); + // console.log(moment.duration(range2)); + total += moment .duration(durationOne < 0 ? 0 : rr._end.diff(rr._start)) .asHours(); }); dataT.push({ cameraLocationId: c._id, + title: c.name, workHours: parseFloat(total.toFixed(2)), month: moment(m).format('M'), year: moment(m).format('Y'), @@ -138,7 +143,7 @@ module.exports = async (req, res) => { return { cameraLocationId: cam.id, - title: v, + title: cam.id, workHours: parseFloat( moment .duration(totalTest[v]) @@ -147,7 +152,6 @@ module.exports = async (req, res) => { ), }; }); - // console.log(dataT); } res.json(dataT); }; diff --git a/src/handlers/file-handler/uploadAnnotationExcel.js b/src/handlers/file-handler/uploadAnnotationExcel.js index 5eca44b..cc2564c 100644 --- a/src/handlers/file-handler/uploadAnnotationExcel.js +++ b/src/handlers/file-handler/uploadAnnotationExcel.js @@ -94,7 +94,7 @@ module.exports = async (user, file, cameraLocationId, workingRange) => { index, ) => { // check the format of time - // console.log(!time.match(timePattern)); + if (!time.match(timePattern) && index !== 0) { throw new errors.Http400('時間格式錯誤,應為文字,請見教學手冊'); } diff --git a/src/handlers/statistic-handler-real.js b/src/handlers/statistic-handler-real.js new file mode 100644 index 0000000..d583ae0 --- /dev/null +++ b/src/handlers/statistic-handler-real.js @@ -0,0 +1,330 @@ +const _ = require('lodash'); +const bluebird = require('bluebird'); +const AnnotationModel = require('../models/data/annotation-model'); +const CameraLocationModel = require('../models/data/camera-location-model'); +const SpeciesModel = require('../models/data/species-model'); +const FileModel = require('../models/data/file-model'); +const CameraLocationsModel = require('../models/data/camera-location-model'); +const ProjectTripsModel = require('../models/data/project-trip-model'); + +exports.getStatistics = async (req, res) => { + /* + GET /api/v1/statistics + */ + const oldestCameraLocation = await CameraLocationModel.find({ + settingTime: { $ne: '' }, + }) + .sort('settingTime') + .limit(1); + const oldestPicture = await AnnotationModel.find({ + time: { $ne: '', $gt: new Date('2008') }, + }) + .sort('time') + .limit(1); + + const startYear = Math.min( + oldestCameraLocation[0].settingTime.getFullYear(), + oldestPicture[0].time.getFullYear(), + ); + const endYear = new Date().getFullYear(); + + // eslint-disable-next-line prefer-const + let totalCameraLocation = 0; + let totalPictureCount = 0; + const yearArr = []; + for (let year = startYear; year <= endYear; year += 1) { + const startDate = new Date(`${year}-01-01 00:00:00`).toLocaleString( + 'zh-TW', + { timeZone: 'Asia/Taipei' }, + ); + const endDate = new Date(`${year}-12-31 23:59:59`).toLocaleString('zh-TW', { + timeZone: 'Asia/Taipei', + }); + + // eslint-disable-next-line no-await-in-loop + const pictureCount = await AnnotationModel.find({ + time: { $gt: new Date(startDate), $lte: new Date(endDate) }, + }).count(); + + totalPictureCount += pictureCount; + + // eslint-disable-next-line no-await-in-loop + const cameraLocations = await CameraLocationModel.find({ + settingTime: { $gt: new Date(startDate), $lte: new Date(endDate) }, + }).exec(); + + totalCameraLocation += cameraLocations.length; + + yearArr.push({ + year, + totalPicture: totalPictureCount, + totalCameraLocation, + }); + } + + // species + const speciesData = await SpeciesModel.where('isAcceptedName') + .equals(true) + .sort('sort'); + const speciesArr = await bluebird.map( + speciesData, + async species => { + species = species.dump(); + + const totalPicture = await AnnotationModel.distinct('filename', { + species: species.id, + }).exec(); + const totalLocation = await AnnotationModel.distinct('cameraLocation', { + species: species.id, + }).exec(); + + console.log( + 'totalPicture %d, totalLocation %d', + totalPicture.length, + totalLocation.length, + ); + const TT = 'just a test'; + + return { + TT, + species: species.id, + name: species.title['zh-TW'], + totalPicture: totalPicture.length, + totalLocation: totalLocation.length, + }; + }, + { concurrency: 20 }, + ); + + const funderArr = await FileModel.aggregate([ + { + $group: { + _id: '$project', + size: { $sum: '$size' }, + }, + }, + { + $match: { _id: { $ne: null } }, + }, + { + $lookup: { + from: 'Projects', + localField: '_id', + foreignField: '_id', + as: 'project', + }, + }, + { $unwind: '$project' }, + { + $group: { + _id: '$project.funder', + size: { $sum: '$size' }, + }, + }, + { + $project: { + name: '$_id', + totalData: '$size', + }, + }, + ]); + + res.json({ year: yearArr, species: speciesArr, funder: funderArr }); +}; + +exports.getStatisticsByCounty = async (req, res) => { + /* + GET /api/v1/statistics/county/{countyName} + */ + const { countyName } = req.params; + + const studyAreaIds = await CameraLocationsModel.distinct('studyArea', { + city: countyName, + }); + const projects = await CameraLocationsModel.distinct('project', { + city: countyName, + }); + + const cameraLocations = await CameraLocationsModel.distinct('name', { + studyArea: { $in: studyAreaIds }, + }); + + // identifiedSpecies + const cameraLocationIds = await CameraLocationsModel.distinct('_id', { + studyArea: { $in: studyAreaIds }, + }); + const allAnnotationCount = await AnnotationModel.find({ + cameraLocation: { $in: cameraLocationIds }, + }).count(); + const identifiedAnnotationCount = await AnnotationModel.find({ + species: { $exists: true }, + cameraLocation: { $in: cameraLocationIds }, + }).count(); + + const identifiedSpeciesIds = await AnnotationModel.distinct('species', { + species: { $exists: true }, + cameraLocation: { $in: cameraLocationIds }, + }); + + let identifiedSpecies = await SpeciesModel.find( + { _id: { $in: identifiedSpeciesIds } }, + { title: 1 }, + ); + + identifiedSpecies = identifiedSpecies.map(species => ({ + name: species.title, + species: species._id, + })); + + // picture + const pictureTotal = await AnnotationModel.distinct('filename', { + cameraLocation: { $in: cameraLocationIds }, + }); + + // TotalWorkHour + const totalWorkHour = await ProjectTripsModel.aggregate([ + { + $match: { + 'studyAreas.studyArea': { $in: studyAreaIds }, + }, + }, + { $unwind: '$studyAreas' }, + { + $match: { + 'studyAreas.studyArea': { $in: studyAreaIds }, + }, + }, + { $unwind: '$studyAreas.cameraLocations' }, + { $unwind: '$studyAreas.cameraLocations.projectCameras' }, + { + $project: { + dateDifference: { + $subtract: [ + '$studyAreas.cameraLocations.projectCameras.endActiveDate', + '$studyAreas.cameraLocations.projectCameras.startActiveDate', + ], + }, + }, + }, + { + $group: { + _id: null, + duringTime: { $sum: { $divide: ['$dateDifference', 1000] } }, + }, + }, + { + $project: { + totalWorkHour: { $divide: ['$duringTime', 3600] }, + }, + }, + ]); + + // studyArea + const studyAreaItems = await CameraLocationModel.aggregate([ + { + $match: { studyArea: { $in: studyAreaIds } }, + }, + { + $lookup: { + as: 'data', + from: 'Annotations', + let: { + cameraLocation: '$_id', + }, + pipeline: [ + { + $match: { + $expr: { + $eq: ['$cameraLocation', '$$cameraLocation'], + }, + }, + }, + { $count: 'total' }, + ], + }, + }, + { $unwind: '$data' }, + { + $project: { + studyArea: '$studyArea', + cameraLocation: '$_id', + name: '$name', + settingTime: '$settingTime', + latitude: '$latitude', + longitude: '$longitude', + altitude: '$altitude', + landCoverType: '$landCoverType', + vegetation: '$vegetation', + data: '$data', + }, + }, + { + $group: { + _id: '$studyArea', + total: { $sum: 1 }, + items: { $push: '$$ROOT' }, + }, + }, + { + $project: { + studyArea: '$studyArea', + cameraLocation: { + total: '$total', + items: '$items', + }, + }, + }, + { + $lookup: { + as: 'data', + from: 'Annotations', + let: { + studyArea: '$_id', + }, + pipeline: [ + { + $match: { + $expr: { + $eq: ['$studyArea', '$$studyArea'], + }, + }, + }, + { $count: 'total' }, + ], + }, + }, + { $unwind: '$data' }, + { + $lookup: { + from: 'StudyAreas', + localField: '_id', + foreignField: '_id', + as: 'studyAreasData', + }, + }, + { $unwind: '$studyAreasData' }, + { + $project: { + studyArea: '$_id', + title: '$studyAreasData.title', + cameraLocation: '$cameraLocation', + data: '$data', + }, + }, + ]); + + res.json({ + title: { 'zh-TW': req.params.countyName }, + project: { total: projects.length }, + cameraLocation: { total: cameraLocations.length }, + identifiedSpecies: { + percentage: (identifiedAnnotationCount / allAnnotationCount) * 100 || 0, + items: identifiedSpecies, + }, + picture: { total: pictureTotal.length }, + camera: { totalWorkHour: _.get(totalWorkHour, '0.totalWorkHour') || 0 }, + studyArea: { + items: studyAreaItems, + }, + }); +}; diff --git a/src/handlers/statistic-handler.js b/src/handlers/statistic-handler.js index f9758f8..683496a 100644 --- a/src/handlers/statistic-handler.js +++ b/src/handlers/statistic-handler.js @@ -63,9 +63,10 @@ exports.getStatistics = async (req, res) => { } // species - const speciesData = await SpeciesModel.where('isAcceptedName') + const speciesData = await SpeciesModel.where('isDefault') .equals(true) .sort('sort'); + // console.log(speciesData); const speciesArr = await bluebird.map( speciesData, async species => { diff --git a/src/routers/web-router.js b/src/routers/web-router.js index 1663e37..88dd1a2 100644 --- a/src/routers/web-router.js +++ b/src/routers/web-router.js @@ -377,7 +377,7 @@ const cache = apicache.options({ redisClient, }).middleware; -apiRouter.get('/statistics', cache(), statisticHandler.getStatistics); +apiRouter.get('/statistics', statisticHandler.getStatistics, cache()); apiRouter.get( '/statistics/county/:countyName',