diff --git a/package-lock.json b/package-lock.json index 25714d35..0ea3789a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,12 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/node": { + "version": "4.2.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-4.2.23.tgz", + "integrity": "sha512-U6IchCNLRyswc9p6G6lxWlbE+KwAhZp6mGo6MD2yWpmFomhYmetK+c98OpKyvphNn04CU3aXeJrXdOqbXVTS/w==", + "dev": true + }, "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", @@ -21,7 +27,7 @@ "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", "dev": true, "requires": { - "acorn": "3.3.0" + "acorn": "^3.0.4" }, "dependencies": { "acorn": { @@ -37,8 +43,8 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" } }, "ajv-keywords": { @@ -74,8 +80,8 @@ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.3" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "argparse": { @@ -84,7 +90,7 @@ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", "dev": true, "requires": { - "sprintf-js": "1.0.3" + "sprintf-js": "~1.0.2" } }, "array-back": { @@ -92,7 +98,7 @@ "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", "requires": { - "typical": "2.6.1" + "typical": "^2.6.1" } }, "array-union": { @@ -101,7 +107,7 @@ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "dev": true, "requires": { - "array-uniq": "1.0.3" + "array-uniq": "^1.0.1" } }, "array-uniq": { @@ -116,8 +122,8 @@ "integrity": "sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA=", "dev": true, "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.8.0" + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" } }, "arrify": { @@ -162,9 +168,9 @@ "integrity": "sha1-AnYgvuVnqIwyVhV05/0IAdMxGOQ=", "dev": true, "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" + "chalk": "^1.1.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" } }, "babel-eslint": { @@ -173,11 +179,11 @@ "integrity": "sha1-UpNBn+NnLWZZjTJ9qWlFZ7pqXy8=", "dev": true, "requires": { - "babel-traverse": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "lodash.assign": "4.2.0", - "lodash.pickby": "4.6.0" + "babel-traverse": "^6.0.20", + "babel-types": "^6.0.19", + "babylon": "^6.0.18", + "lodash.assign": "^4.0.0", + "lodash.pickby": "^4.0.0" } }, "babel-messages": { @@ -186,7 +192,7 @@ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "dev": true, "requires": { - "babel-runtime": "6.25.0" + "babel-runtime": "^6.22.0" } }, "babel-runtime": { @@ -195,8 +201,8 @@ "integrity": "sha1-M7mOql1IK7AajRqmtDetKwGuxBw=", "dev": true, "requires": { - "core-js": "2.5.0", - "regenerator-runtime": "0.10.5" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.10.0" } }, "babel-traverse": { @@ -205,15 +211,15 @@ "integrity": "sha1-IldJfi/NGbie3BPEyROB+VEklvE=", "dev": true, "requires": { - "babel-code-frame": "6.22.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.25.0", - "babel-types": "6.25.0", - "babylon": "6.17.4", - "debug": "2.2.0", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" + "babel-code-frame": "^6.22.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.22.0", + "babel-types": "^6.25.0", + "babylon": "^6.17.2", + "debug": "^2.2.0", + "globals": "^9.0.0", + "invariant": "^2.2.0", + "lodash": "^4.2.0" } }, "babel-types": { @@ -222,10 +228,10 @@ "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=", "dev": true, "requires": { - "babel-runtime": "6.25.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" + "babel-runtime": "^6.22.0", + "esutils": "^2.0.2", + "lodash": "^4.2.0", + "to-fast-properties": "^1.0.1" } }, "babylon": { @@ -250,7 +256,7 @@ "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "optional": true, "requires": { - "tweetnacl": "0.14.5" + "tweetnacl": "^0.14.3" } }, "bl": { @@ -258,7 +264,7 @@ "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", "requires": { - "readable-stream": "2.3.3" + "readable-stream": "^2.0.5" } }, "block-stream": { @@ -266,7 +272,7 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "requires": { - "inherits": "2.0.3" + "inherits": "~2.0.0" } }, "bluebird": { @@ -280,7 +286,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "brace-expansion": { @@ -288,7 +294,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -298,8 +304,8 @@ "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", "requires": { "base64-js": "0.0.8", - "ieee754": "1.1.8", - "isarray": "1.0.0" + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "buffer-crc32": { @@ -319,7 +325,7 @@ "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "callsites": "0.2.0" + "callsites": "^0.2.0" } }, "callsites": { @@ -339,7 +345,7 @@ "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", "dev": true, "requires": { - "underscore-contrib": "0.3.0" + "underscore-contrib": "~0.3.0" } }, "chalk": { @@ -348,11 +354,11 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" } }, "circular-json": { @@ -367,7 +373,7 @@ "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true, "requires": { - "restore-cursor": "1.0.1" + "restore-cursor": "^1.0.1" } }, "cli-width": { @@ -391,7 +397,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "requires": { - "delayed-stream": "1.0.0" + "delayed-stream": "~1.0.0" } }, "command-line-args": { @@ -399,9 +405,9 @@ "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-4.0.7.tgz", "integrity": "sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA==", "requires": { - "array-back": "2.0.0", - "find-replace": "1.0.3", - "typical": "2.6.1" + "array-back": "^2.0.0", + "find-replace": "^1.0.3", + "typical": "^2.6.1" } }, "commander": { @@ -409,7 +415,7 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", "requires": { - "graceful-readlink": "1.0.1" + "graceful-readlink": ">= 1.0.0" } }, "concat-map": { @@ -422,9 +428,9 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3", - "typedarray": "0.0.6" + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "console-control-strings": { @@ -448,7 +454,7 @@ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "requires": { - "boom": "2.10.1" + "boom": "2.x.x" } }, "d": { @@ -457,7 +463,7 @@ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { - "es5-ext": "0.10.27" + "es5-ext": "^0.10.9" } }, "dashdash": { @@ -465,7 +471,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -494,14 +500,14 @@ "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", "requires": { - "decompress-tar": "4.1.1", - "decompress-tarbz2": "4.1.1", - "decompress-targz": "4.1.1", - "decompress-unzip": "4.0.1", - "graceful-fs": "4.1.11", - "make-dir": "1.0.0", - "pify": "2.3.0", - "strip-dirs": "2.0.0" + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" } }, "decompress-tar": { @@ -509,9 +515,9 @@ "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", "requires": { - "file-type": "5.2.0", - "is-stream": "1.1.0", - "tar-stream": "1.5.4" + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" } }, "decompress-tarbz2": { @@ -519,11 +525,11 @@ "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", "requires": { - "decompress-tar": "4.1.1", - "file-type": "6.2.0", - "is-stream": "1.1.0", - "seek-bzip": "1.0.5", - "unbzip2-stream": "1.2.5" + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" }, "dependencies": { "file-type": { @@ -538,27 +544,9 @@ "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", "requires": { - "decompress-tar": "4.1.1", - "file-type": "5.2.0", - "is-stream": "1.1.0" - } - }, - "decompress-tarxz": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/decompress-tarxz/-/decompress-tarxz-2.1.1.tgz", - "integrity": "sha512-U7LniyhLTpCc07lAmNXMX4NBW60ONkpGTwo6KxIDk9zk22GYh5NKjEI09F8I1oYkGr9WGOA6OH7scqLo7Xu5lA==", - "requires": { - "decompress-tar": "4.1.1", - "file-type": "3.9.0", - "is-stream": "1.1.0", - "lzma-native": "3.0.1" - }, - "dependencies": { - "file-type": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", - "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" - } + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" } }, "decompress-unzip": { @@ -566,10 +554,10 @@ "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", "requires": { - "file-type": "3.9.0", - "get-stream": "2.3.1", - "pify": "2.3.0", - "yauzl": "2.8.0" + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" }, "dependencies": { "file-type": { @@ -582,8 +570,8 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", "requires": { - "buffer-crc32": "0.2.13", - "fd-slicer": "1.0.1" + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.0.1" } } } @@ -599,14 +587,19 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.1.0.tgz", + "integrity": "sha512-Q89Z26KAfA3lpPGhbF6XMfYAm3jIV3avViy6KOJ2JLzFbeWHOvPQUu5aSJIWXap3gDZC2y1eF5HXEPI2wGqgvw==" + }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.11" + "foreach": "^2.0.5", + "object-keys": "^1.0.8" } }, "del": { @@ -615,13 +608,13 @@ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "dev": true, "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.1" + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" } }, "delayed-stream": { @@ -640,8 +633,8 @@ "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", "dev": true, "requires": { - "asap": "2.0.6", - "wrappy": "1.0.2" + "asap": "^2.0.0", + "wrappy": "1" } }, "doctrine": { @@ -650,8 +643,8 @@ "integrity": "sha1-xz2NKQnSIpHhoAejlYBNqLZl/mM=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } }, "ecc-jsbn": { @@ -660,7 +653,7 @@ "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "~0.1.0" } }, "encoding": { @@ -668,7 +661,7 @@ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "requires": { - "iconv-lite": "0.4.18" + "iconv-lite": "~0.4.13" } }, "end-of-stream": { @@ -676,7 +669,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "es-abstract": { @@ -685,11 +678,11 @@ "integrity": "sha1-OwA4XoVymTK+/6kWO76hI06TKRQ=", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.0", - "has": "1.0.1", - "is-callable": "1.1.3", - "is-regex": "1.0.4" + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.0", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -698,9 +691,9 @@ "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { - "is-callable": "1.1.3", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" } }, "es5-ext": { @@ -709,8 +702,8 @@ "integrity": "sha512-3KXJRYzKXTd7xfFy5uZsJCXue55fAYQ035PRjyYk2PicllxIwcW9l3AbM/eGaw3vgVAUW4tl4xg9AXDEI6yw0w==", "dev": true, "requires": { - "es6-iterator": "2.0.1", - "es6-symbol": "3.1.1" + "es6-iterator": "2", + "es6-symbol": "~3.1" } }, "es6-iterator": { @@ -719,9 +712,9 @@ "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-symbol": "^3.1" } }, "es6-map": { @@ -730,12 +723,12 @@ "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27", - "es6-iterator": "2.0.1", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" } }, "es6-object-assign": { @@ -750,11 +743,11 @@ "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27", - "es6-iterator": "2.0.1", + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" + "event-emitter": "~0.3.5" } }, "es6-symbol": { @@ -763,8 +756,8 @@ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27" + "d": "1", + "es5-ext": "~0.10.14" } }, "es6-weak-map": { @@ -773,10 +766,10 @@ "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27", - "es6-iterator": "2.0.1", - "es6-symbol": "3.1.1" + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" } }, "escape-string-regexp": { @@ -791,10 +784,10 @@ "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "dev": true, "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", - "estraverse": "4.2.0" + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "eslint": { @@ -803,41 +796,41 @@ "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", "dev": true, "requires": { - "babel-code-frame": "6.22.0", - "chalk": "1.1.3", - "concat-stream": "1.6.0", - "debug": "2.2.0", - "doctrine": "2.0.0", - "escope": "3.6.0", - "espree": "3.5.0", - "esquery": "1.0.0", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.3", - "imurmurhash": "0.1.4", - "inquirer": "0.12.0", - "is-my-json-valid": "2.16.0", - "is-resolvable": "1.0.0", - "js-yaml": "3.9.1", - "json-stable-stringify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.4", - "mkdirp": "0.5.0", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "1.2.1", - "progress": "1.1.8", - "require-uncached": "1.0.3", - "shelljs": "0.7.8", - "strip-bom": "3.0.0", - "strip-json-comments": "2.0.1", - "table": "3.8.3", - "text-table": "0.2.0", - "user-home": "2.0.0" + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.5.2", + "debug": "^2.1.1", + "doctrine": "^2.0.0", + "escope": "^3.6.0", + "espree": "^3.4.0", + "esquery": "^1.0.0", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.14.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~2.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" }, "dependencies": { "progress": { @@ -860,11 +853,11 @@ "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", "dev": true, "requires": { - "array.prototype.find": "2.0.4", - "doctrine": "1.5.0", - "has": "1.0.1", - "jsx-ast-utils": "1.4.1", - "object.assign": "4.0.4" + "array.prototype.find": "^2.0.1", + "doctrine": "^1.2.2", + "has": "^1.0.1", + "jsx-ast-utils": "^1.3.4", + "object.assign": "^4.0.4" }, "dependencies": { "doctrine": { @@ -873,8 +866,8 @@ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "esutils": "^2.0.2", + "isarray": "^1.0.0" } } } @@ -885,8 +878,8 @@ "integrity": "sha1-mDWGJb3QVYYeon4oZ+pyn69GPY0=", "dev": true, "requires": { - "acorn": "5.1.1", - "acorn-jsx": "3.0.1" + "acorn": "^5.1.1", + "acorn-jsx": "^3.0.0" } }, "esprima": { @@ -901,7 +894,7 @@ "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.0.0" } }, "esrecurse": { @@ -910,8 +903,8 @@ "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", "dev": true, "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "^4.1.0", + "object-assign": "^4.0.1" } }, "estraverse": { @@ -932,8 +925,8 @@ "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, "requires": { - "d": "1.0.0", - "es5-ext": "0.10.27" + "d": "1", + "es5-ext": "~0.10.14" } }, "exit-hook": { @@ -963,13 +956,13 @@ "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", "integrity": "sha1-0dviviVMNakeCfMfnNUKQLKg7Rw=", "requires": { - "core-js": "1.2.7", - "isomorphic-fetch": "2.2.1", - "loose-envify": "1.3.1", - "object-assign": "4.1.1", - "promise": "7.3.1", - "setimmediate": "1.0.5", - "ua-parser-js": "0.7.14" + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.9" }, "dependencies": { "core-js": { @@ -984,7 +977,7 @@ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", "requires": { - "pend": "1.2.0" + "pend": "~1.2.0" } }, "figures": { @@ -993,8 +986,8 @@ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" } }, "file-entry-cache": { @@ -1003,8 +996,8 @@ "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { - "flat-cache": "1.2.2", - "object-assign": "4.1.1" + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" } }, "file-type": { @@ -1017,8 +1010,8 @@ "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", "integrity": "sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=", "requires": { - "array-back": "1.0.4", - "test-value": "2.1.0" + "array-back": "^1.0.4", + "test-value": "^2.1.0" }, "dependencies": { "array-back": { @@ -1026,7 +1019,7 @@ "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", "requires": { - "typical": "2.6.1" + "typical": "^2.6.0" } } } @@ -1037,10 +1030,10 @@ "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", "dev": true, "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" + "circular-json": "^0.3.1", + "del": "^2.0.2", + "graceful-fs": "^4.1.2", + "write": "^0.2.1" } }, "foreach": { @@ -1059,9 +1052,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.16" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.5", + "mime-types": "^2.1.12" } }, "fs-extra": { @@ -1069,9 +1062,9 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "fs.realpath": { @@ -1084,10 +1077,10 @@ "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.0", - "rimraf": "2.6.1" + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" } }, "fstream-ignore": { @@ -1095,9 +1088,9 @@ "resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz", "integrity": "sha1-nDHa40dnAY/h0kmyTa2mfQktoQU=", "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" + "fstream": "^1.0.0", + "inherits": "2", + "minimatch": "^3.0.0" } }, "function-bind": { @@ -1111,14 +1104,14 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "requires": { - "aproba": "1.1.2", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "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" } }, "generate-function": { @@ -1133,7 +1126,7 @@ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, "requires": { - "is-property": "1.0.2" + "is-property": "^1.0.0" } }, "get-stream": { @@ -1141,8 +1134,8 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", "requires": { - "object-assign": "4.1.1", - "pinkie-promise": "2.0.1" + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" } }, "getpass": { @@ -1150,7 +1143,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "1.0.0" + "assert-plus": "^1.0.0" }, "dependencies": { "assert-plus": { @@ -1165,12 +1158,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "globals": { @@ -1185,12 +1178,12 @@ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "dev": true, "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "graceful-fs": { @@ -1213,8 +1206,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" + "ajv": "^4.9.1", + "har-schema": "^1.0.5" } }, "has": { @@ -1223,7 +1216,7 @@ "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { - "function-bind": "1.1.0" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -1232,7 +1225,7 @@ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "has-unicode": { @@ -1245,10 +1238,10 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" } }, "hoek": { @@ -1267,9 +1260,9 @@ "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-2.5.1.tgz", "integrity": "sha1-jORHvbW2xXf4pj4/p4BW7Eu02/s=", "requires": { - "caseless": "0.11.0", - "concat-stream": "1.6.0", - "http-response-object": "1.1.0" + "caseless": "~0.11.0", + "concat-stream": "^1.4.6", + "http-response-object": "^1.0.0" }, "dependencies": { "caseless": { @@ -1289,9 +1282,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" + "assert-plus": "^0.2.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, "iconv-lite": { @@ -1321,8 +1314,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1341,19 +1334,19 @@ "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", "dev": true, "requires": { - "ansi-escapes": "1.4.0", - "ansi-regex": "2.1.1", - "chalk": "1.1.3", - "cli-cursor": "1.0.2", - "cli-width": "2.1.0", - "figures": "1.7.0", - "lodash": "4.17.4", - "readline2": "1.0.1", - "run-async": "0.1.0", - "rx-lite": "3.1.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "through": "2.3.8" + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" } }, "interpret": { @@ -1368,7 +1361,7 @@ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "^1.0.0" } }, "is-builtin-module": { @@ -1377,7 +1370,7 @@ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { - "builtin-modules": "1.1.1" + "builtin-modules": "^1.0.0" } }, "is-callable": { @@ -1397,7 +1390,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "is-my-json-valid": { @@ -1406,10 +1399,10 @@ "integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=", "dev": true, "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" } }, "is-natural-number": { @@ -1429,7 +1422,7 @@ "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", "dev": true, "requires": { - "is-path-inside": "1.0.0" + "is-path-inside": "^1.0.0" } }, "is-path-inside": { @@ -1438,7 +1431,7 @@ "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", "dev": true, "requires": { - "path-is-inside": "1.0.2" + "path-is-inside": "^1.0.1" } }, "is-property": { @@ -1453,7 +1446,7 @@ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "1.0.1" + "has": "^1.0.1" } }, "is-resolvable": { @@ -1462,7 +1455,7 @@ "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", "dev": true, "requires": { - "tryit": "1.0.3" + "tryit": "^1.0.1" } }, "is-stream": { @@ -1491,8 +1484,8 @@ "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "requires": { - "node-fetch": "1.7.2", - "whatwg-fetch": "2.0.3" + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" } }, "isstream": { @@ -1517,8 +1510,8 @@ "integrity": "sha1-CHdc69/dNZIJ8NKs04PI+GppBKA=", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "4.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, "js2xmlparser": { @@ -1527,7 +1520,7 @@ "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", "dev": true, "requires": { - "xmlcreate": "1.0.2" + "xmlcreate": "^1.0.1" } }, "jsbn": { @@ -1543,17 +1536,17 @@ "dev": true, "requires": { "babylon": "7.0.0-beta.19", - "bluebird": "3.5.1", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "js2xmlparser": "3.0.0", - "klaw": "2.0.0", - "marked": "0.3.7", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", + "bluebird": "~3.5.0", + "catharsis": "~0.8.9", + "escape-string-regexp": "~1.0.5", + "js2xmlparser": "~3.0.0", + "klaw": "~2.0.0", + "marked": "~0.3.6", + "mkdirp": "~0.5.1", + "requizzle": "~0.2.1", + "strip-json-comments": "~2.0.1", "taffydb": "2.6.2", - "underscore": "1.8.3" + "underscore": "~1.8.3" }, "dependencies": { "babylon": { @@ -1579,7 +1572,7 @@ "integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", "dev": true, "requires": { - "jju": "1.3.0" + "jju": "^1.1.0" } }, "json-schema": { @@ -1592,7 +1585,7 @@ "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", "requires": { - "jsonify": "0.0.0" + "jsonify": "~0.0.0" } }, "json-stringify-safe": { @@ -1605,7 +1598,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.6" } }, "jsonify": { @@ -1649,7 +1642,7 @@ "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", "dev": true, "requires": { - "graceful-fs": "4.1.11" + "graceful-fs": "^4.1.9" } }, "levn": { @@ -1658,8 +1651,8 @@ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "dev": true, "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "license-checker": { @@ -1668,13 +1661,13 @@ "integrity": "sha1-kQaulguA6OGJhGeLsC6gr/fvjng=", "dev": true, "requires": { - "chalk": "0.5.1", - "debug": "2.2.0", - "mkdirp": "0.3.5", - "nopt": "2.2.1", - "read-installed": "4.0.3", - "semver": "5.4.1", - "treeify": "1.0.1" + "chalk": "~0.5.1", + "debug": "^2.2.0", + "mkdirp": "^0.3.5", + "nopt": "^2.2.0", + "read-installed": "~4.0.3", + "semver": "^5.3.0", + "treeify": "^1.0.1" }, "dependencies": { "ansi-regex": { @@ -1695,11 +1688,11 @@ "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "dev": true, "requires": { - "ansi-styles": "1.1.0", - "escape-string-regexp": "1.0.5", - "has-ansi": "0.1.0", - "strip-ansi": "0.3.0", - "supports-color": "0.2.0" + "ansi-styles": "^1.1.0", + "escape-string-regexp": "^1.0.0", + "has-ansi": "^0.1.0", + "strip-ansi": "^0.3.0", + "supports-color": "^0.2.0" } }, "has-ansi": { @@ -1708,7 +1701,7 @@ "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", "dev": true, "requires": { - "ansi-regex": "0.2.1" + "ansi-regex": "^0.2.0" } }, "mkdirp": { @@ -1723,7 +1716,7 @@ "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", "dev": true, "requires": { - "abbrev": "1.1.0" + "abbrev": "1" } }, "strip-ansi": { @@ -1732,7 +1725,7 @@ "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "dev": true, "requires": { - "ansi-regex": "0.2.1" + "ansi-regex": "^0.2.1" } }, "supports-color": { @@ -1766,726 +1759,7 @@ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { - "js-tokens": "3.0.2" - } - }, - "lzma-native": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lzma-native/-/lzma-native-3.0.1.tgz", - "integrity": "sha512-RZsLWwvuCpkaXEt2p2pmx7dI20UUfXK9OTyG8KGxSiZA79i67TWLnhlNtCMGGZ0xP3NaWjkq4W5+gol7l7RyPQ==", - "requires": { - "nan": "2.5.1", - "node-pre-gyp": "0.6.36", - "readable-stream": "2.2.11", - "rimraf": "2.6.1" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.2", - "bundled": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.11" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "co": { - "version": "4.6.0", - "bundled": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "requires": { - "aproba": "1.1.2", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true - }, - "nan": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz", - "integrity": "sha1-1bAWkSUzJql6K77p5hxV2NYDUeI=" - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true - }, - "qs": { - "version": "6.4.0", - "bundled": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true - } - } - }, - "readable-stream": { - "version": "2.2.11", - "bundled": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.0.1", - "string_decoder": "1.0.2", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true - } - } - }, - "string_decoder": { - "version": "1.0.2", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.11", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - } + "js-tokens": "^3.0.0" } }, "make-dir": { @@ -2493,7 +1767,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.0.0.tgz", "integrity": "sha1-l6ARdR6R3YfPre9Ygy67BJNt6Xg=", "requires": { - "pify": "2.3.0" + "pify": "^2.3.0" } }, "marked": { @@ -2512,7 +1786,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", "requires": { - "mime-db": "1.29.0" + "mime-db": "~1.29.0" } }, "minimatch": { @@ -2520,7 +1794,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2554,9 +1828,9 @@ "dev": true }, "nan": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", - "integrity": "sha1-5P805slf37WuzAjeZZb0NgWn20U=" + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, "natural-compare": { "version": "1.4.0", @@ -2569,8 +1843,8 @@ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.2.tgz", "integrity": "sha1-xU6arFfkModSM1JfPIkcQVn/79c=", "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" + "encoding": "^0.1.11", + "is-stream": "^1.0.1" } }, "node-pre-gyp": { @@ -2578,15 +1852,15 @@ "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.36.tgz", "integrity": "sha1-22BBEst04NR3VU6bUFsXq936t4Y=", "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.2", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.4.1", - "tar": "2.2.1", - "tar-pack": "3.4.0" + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "request": "^2.81.0", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^2.2.1", + "tar-pack": "^3.4.0" }, "dependencies": { "mkdirp": { @@ -2604,8 +1878,8 @@ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" + "abbrev": "1", + "osenv": "^0.1.4" } }, "normalize-package-data": { @@ -2614,10 +1888,10 @@ "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "npmlog": { @@ -2625,10 +1899,10 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "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": { @@ -2658,9 +1932,9 @@ "integrity": "sha1-scnMBE7xuf5jYG/BQau7MuFHMMw=", "dev": true, "requires": { - "define-properties": "1.1.2", - "function-bind": "1.1.0", - "object-keys": "1.0.11" + "define-properties": "^1.1.2", + "function-bind": "^1.1.0", + "object-keys": "^1.0.10" } }, "once": { @@ -2668,7 +1942,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "onetime": { @@ -2683,12 +1957,12 @@ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "dev": true, "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "os-homedir": { @@ -2706,8 +1980,8 @@ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz", "integrity": "sha1-Qv5tWVPfBsgGS+bxdsPQWqqjRkQ=", "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -2752,7 +2026,7 @@ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { - "pinkie": "2.0.4" + "pinkie": "^2.0.0" } }, "pluralize": { @@ -2782,7 +2056,7 @@ "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", "requires": { - "asap": "2.0.6" + "asap": "~2.0.3" } }, "prop-types": { @@ -2790,8 +2064,8 @@ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", "requires": { - "fbjs": "0.8.14", - "loose-envify": "1.3.1" + "fbjs": "^0.8.9", + "loose-envify": "^1.3.1" } }, "punycode": { @@ -2805,19 +2079,19 @@ "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" }, "querystringify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz", - "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==" }, "rc": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.1.tgz", "integrity": "sha1-LgPo5C7kULjLPc5lvhv4l04d/ZU=", "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "~0.4.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -2833,13 +2107,13 @@ "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", "dev": true, "requires": { - "debuglog": "1.0.1", - "graceful-fs": "4.1.11", - "read-package-json": "2.0.10", - "readdir-scoped-modules": "1.0.2", - "semver": "5.4.1", - "slide": "1.1.6", - "util-extend": "1.0.3" + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" } }, "read-package-json": { @@ -2848,10 +2122,10 @@ "integrity": "sha512-iNWaEs9hW9nviu5rHADmkm/Ob5dvah5zajtTS1XbyERSzkWgSwWZ6Z12bION7bEAzVc2YRFWnAz8k/tAr+5/eg==", "dev": true, "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "json-parse-helpfulerror": "1.0.3", - "normalize-package-data": "2.4.0" + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-helpfulerror": "^1.0.2", + "normalize-package-data": "^2.0.0" } }, "readable-stream": { @@ -2859,13 +2133,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.0.3", + "util-deprecate": "~1.0.1" } }, "readdir-scoped-modules": { @@ -2874,10 +2148,10 @@ "integrity": "sha1-n6+jfShr5dksuuve4DDcm19AZ0c=", "dev": true, "requires": { - "debuglog": "1.0.1", - "dezalgo": "1.0.3", - "graceful-fs": "4.1.11", - "once": "1.4.0" + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" } }, "readline2": { @@ -2886,8 +2160,8 @@ "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", "mute-stream": "0.0.5" } }, @@ -2897,7 +2171,7 @@ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { - "resolve": "1.4.0" + "resolve": "^1.1.6" } }, "regenerator-runtime": { @@ -2911,28 +2185,28 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.16", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.1.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "aws-sign2": "~0.6.0", + "aws4": "^1.2.1", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.0", + "forever-agent": "~0.6.1", + "form-data": "~2.1.1", + "har-validator": "~4.2.1", + "hawk": "~3.1.3", + "http-signature": "~1.1.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.7", + "oauth-sign": "~0.8.1", + "performance-now": "^0.2.0", + "qs": "~6.4.0", + "safe-buffer": "^5.0.1", + "stringstream": "~0.0.4", + "tough-cookie": "~2.3.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.0.0" } }, "require-uncached": { @@ -2941,8 +2215,8 @@ "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "dev": true, "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" } }, "requires-port": { @@ -2956,7 +2230,7 @@ "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", "dev": true, "requires": { - "underscore": "1.6.0" + "underscore": "~1.6.0" }, "dependencies": { "underscore": { @@ -2973,7 +2247,7 @@ "integrity": "sha1-p1vgHFPaJdk0qY69DkxKcxL5KoY=", "dev": true, "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-from": { @@ -2988,8 +2262,8 @@ "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true, "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" } }, "rimraf": { @@ -2997,7 +2271,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "run-async": { @@ -3006,7 +2280,7 @@ "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", "dev": true, "requires": { - "once": "1.4.0" + "once": "^1.3.0" } }, "rx-lite": { @@ -3025,7 +2299,7 @@ "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", "requires": { - "commander": "2.8.1" + "commander": "~2.8.1" } }, "semver": { @@ -3049,9 +2323,9 @@ "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", "dev": true, "requires": { - "glob": "7.1.2", - "interpret": "1.0.3", - "rechoir": "0.6.2" + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" } }, "shx": { @@ -3060,9 +2334,9 @@ "integrity": "sha1-CjBNAgsO3xMGrYFXDoDwNG31ijk=", "dev": true, "requires": { - "es6-object-assign": "1.1.0", - "minimist": "1.2.0", - "shelljs": "0.7.8" + "es6-object-assign": "^1.0.3", + "minimist": "^1.2.0", + "shelljs": "^0.7.3" }, "dependencies": { "minimist": { @@ -3095,7 +2369,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "requires": { - "hoek": "2.16.3" + "hoek": "2.x.x" } }, "spdx-correct": { @@ -3104,7 +2378,7 @@ "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-license-ids": "^1.0.2" } }, "spdx-expression-parse": { @@ -3130,14 +2404,14 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" }, "dependencies": { "assert-plus": { @@ -3152,22 +2426,22 @@ "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-1.0.0.tgz", "integrity": "sha1-kc8lac5NxQYf6816yyY5SloRR1E=" }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "requires": { + "safe-buffer": "~5.1.0" } }, "stringstream": { @@ -3180,7 +2454,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-bom": { @@ -3194,7 +2468,7 @@ "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.0.0.tgz", "integrity": "sha1-YQzbKSggDaAAT0HcuQ/JXNkZoLY=", "requires": { - "is-natural-number": "4.0.1" + "is-natural-number": "^4.0.1" } }, "strip-json-comments": { @@ -3213,9 +2487,9 @@ "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-3.0.1.tgz", "integrity": "sha1-yqEjWq+Im6UBB2oYNMQ2gwqC+3M=", "requires": { - "concat-stream": "1.6.0", - "http-response-object": "1.1.0", - "then-request": "2.2.0" + "concat-stream": "^1.4.7", + "http-response-object": "^1.0.1", + "then-request": "^2.0.1" } }, "table": { @@ -3224,12 +2498,12 @@ "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", "dev": true, "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", - "lodash": "4.17.4", + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", + "chalk": "^1.1.1", + "lodash": "^4.0.0", "slice-ansi": "0.0.4", - "string-width": "2.1.1" + "string-width": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -3250,8 +2524,8 @@ "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "strip-ansi": { @@ -3260,7 +2534,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } } } @@ -3276,9 +2550,9 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "tar-pack": { @@ -3286,14 +2560,14 @@ "resolved": "https://registry.npmjs.org/tar-pack/-/tar-pack-3.4.0.tgz", "integrity": "sha1-I74tf2cagzk3bL2wuP4/3r8xeYQ=", "requires": { - "debug": "2.2.0", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.3.3", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" + "debug": "^2.2.0", + "fstream": "^1.0.10", + "fstream-ignore": "^1.0.5", + "once": "^1.3.3", + "readable-stream": "^2.1.4", + "rimraf": "^2.5.1", + "tar": "^2.2.1", + "uid-number": "^0.0.6" } }, "tar-stream": { @@ -3301,10 +2575,10 @@ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", "integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", "requires": { - "bl": "1.2.1", - "end-of-stream": "1.4.0", - "readable-stream": "2.3.3", - "xtend": "4.0.1" + "bl": "^1.0.0", + "end-of-stream": "^1.0.0", + "readable-stream": "^2.0.0", + "xtend": "^4.0.0" } }, "test-value": { @@ -3312,8 +2586,8 @@ "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", "requires": { - "array-back": "1.0.4", - "typical": "2.6.1" + "array-back": "^1.0.3", + "typical": "^2.6.0" }, "dependencies": { "array-back": { @@ -3321,7 +2595,7 @@ "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", "requires": { - "typical": "2.6.1" + "typical": "^2.6.0" } } } @@ -3337,12 +2611,12 @@ "resolved": "https://registry.npmjs.org/then-request/-/then-request-2.2.0.tgz", "integrity": "sha1-ZnizL6DKIY/laZgbvYhxtZQGDYE=", "requires": { - "caseless": "0.11.0", - "concat-stream": "1.6.0", - "http-basic": "2.5.1", - "http-response-object": "1.1.0", - "promise": "7.3.1", - "qs": "6.4.0" + "caseless": "~0.11.0", + "concat-stream": "^1.4.7", + "http-basic": "^2.5.1", + "http-response-object": "^1.1.0", + "promise": "^7.1.1", + "qs": "^6.1.0" }, "dependencies": { "caseless": { @@ -3368,7 +2642,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", "requires": { - "punycode": "1.4.1" + "punycode": "^1.4.1" } }, "treeify": { @@ -3388,7 +2662,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "^5.0.1" } }, "tweetnacl": { @@ -3403,7 +2677,7 @@ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "typedarray": { @@ -3431,8 +2705,8 @@ "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz", "integrity": "sha512-izD3jxT8xkzwtXRUZjtmRwKnZoeECrfZ8ra/ketwOcusbZEp4mjULMnJOCfTDZBgGQAAY1AJ/IgxcwkavcX9Og==", "requires": { - "buffer": "3.6.0", - "through": "2.3.8" + "buffer": "^3.0.1", + "through": "^2.3.6" } }, "underscore": { @@ -3464,12 +2738,12 @@ "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, "url-parse": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.1.9.tgz", - "integrity": "sha1-xn8dd11R8KGJEd17P/rSe7nlvRk=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.1.tgz", + "integrity": "sha512-x95Td74QcvICAA0+qERaVkRpTGKyBHHYdwL2LXZm5t/gBtCB9KQSO/0zQgSTYEV1p0WcvSg79TLNPSvd5IDJMQ==", "requires": { - "querystringify": "1.0.0", - "requires-port": "1.0.0" + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" } }, "user-home": { @@ -3478,7 +2752,7 @@ "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", "dev": true, "requires": { - "os-homedir": "1.0.2" + "os-homedir": "^1.0.0" } }, "util-deprecate": { @@ -3503,8 +2777,8 @@ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "~1.0.0", + "spdx-expression-parse": "~1.0.0" } }, "verror": { @@ -3512,9 +2786,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "1.0.0", + "assert-plus": "^1.0.0", "core-util-is": "1.0.2", - "extsprintf": "1.3.0" + "extsprintf": "^1.2.0" }, "dependencies": { "assert-plus": { @@ -3534,7 +2808,7 @@ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wordwrap": { @@ -3554,7 +2828,7 @@ "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", "dev": true, "requires": { - "mkdirp": "0.5.1" + "mkdirp": "^0.5.1" }, "dependencies": { "mkdirp": { diff --git a/package.json b/package.json index 7191b16a..9c1d5f0e 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "deepmerge": "2.1.0", "fs-extra": "^4.0.2", "ini": "^1.3.4", - "nan": "2.8.0", + "nan": "^2.10.0", "node-fetch": "^1.6.3", "node-pre-gyp": "^0.6.36", "progress": "^2.0.0", diff --git a/src/js_class.hpp b/src/js_class.hpp index 761838d5..b3fea748 100644 --- a/src/js_class.hpp +++ b/src/js_class.hpp @@ -27,12 +27,6 @@ namespace realm { namespace js { -template -using ConstructorType = void(typename T::Context, typename T::Object, size_t, const typename T::Value[]); - -template -using MethodType = void(typename T::Context, typename T::Function, typename T::Object, size_t, const typename T::Value[], ReturnValue &); - template struct Arguments { const typename T::Context ctx; @@ -52,15 +46,24 @@ struct Arguments { } } - void validate_count(size_t actual) const { - if (count != actual) { - throw std::invalid_argument(util::format("Invalid arguments: %1 expected, but %s supplied.", actual, count)); + void validate_count(size_t expected) const { + if (count != expected) { + throw std::invalid_argument(util::format("Invalid arguments: %1 expected, but %2 supplied.", expected, count)); + } + } + + void validate_between(size_t min, size_t max) const { + if (count < min || count > max) { + throw std::invalid_argument(util::format("Invalid arguments: expected between %1 and %2, but %3 supplied.", min, max, count)); } } }; template -using ArgumentsMethodType = void(typename T::Context, typename T::Object, Arguments, ReturnValue &); +using ConstructorType = void(typename T::Context, typename T::Object, Arguments &); + +template +using ArgumentsMethodType = void(typename T::Context, typename T::Object, Arguments &, ReturnValue &); template struct PropertyType { diff --git a/src/js_list.hpp b/src/js_list.hpp index ae4af82f..def1de03 100644 --- a/src/js_list.hpp +++ b/src/js_list.hpp @@ -65,22 +65,22 @@ struct ListClass : ClassDefinition, CollectionClass> { static bool set_index(ContextType, ObjectType, uint32_t, ValueType); // methods - static void push(ContextType, ObjectType, Arguments, ReturnValue &); - static void pop(ContextType, ObjectType, Arguments, ReturnValue &); - static void unshift(ContextType, ObjectType, Arguments, ReturnValue &); - static void shift(ContextType, ObjectType, Arguments, ReturnValue &); - static void splice(ContextType, ObjectType, Arguments, ReturnValue &); - static void snapshot(ContextType, ObjectType, Arguments, ReturnValue &); - static void filtered(ContextType, ObjectType, Arguments, ReturnValue &); - static void sorted(ContextType, ObjectType, Arguments, ReturnValue &); - static void is_valid(ContextType, ObjectType, Arguments, ReturnValue &); - static void is_empty(ContextType, ObjectType, Arguments, ReturnValue &); - static void index_of(ContextType, ObjectType, Arguments, ReturnValue &); + static void push(ContextType, ObjectType, Arguments &, ReturnValue &); + static void pop(ContextType, ObjectType, Arguments &, ReturnValue &); + static void unshift(ContextType, ObjectType, Arguments &, ReturnValue &); + static void shift(ContextType, ObjectType, Arguments &, ReturnValue &); + static void splice(ContextType, ObjectType, Arguments &, ReturnValue &); + static void snapshot(ContextType, ObjectType, Arguments &, ReturnValue &); + static void filtered(ContextType, ObjectType, Arguments &, ReturnValue &); + static void sorted(ContextType, ObjectType, Arguments &, ReturnValue &); + static void is_valid(ContextType, ObjectType, Arguments &, ReturnValue &); + static void is_empty(ContextType, ObjectType, Arguments &, ReturnValue &); + static void index_of(ContextType, ObjectType, Arguments &, ReturnValue &); // observable - static void add_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_all_listeners(ContextType, ObjectType, Arguments, ReturnValue &); + static void add_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_all_listeners(ContextType, ObjectType, Arguments &, ReturnValue &); std::string const name = "List"; @@ -157,7 +157,7 @@ bool ListClass::set_index(ContextType ctx, ObjectType object, uint32_t index, } template -void ListClass::push(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::push(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); for (size_t i = 0; i < args.count; i++) { validate_value(ctx, *list, args[i]); @@ -172,7 +172,7 @@ void ListClass::push(ContextType ctx, ObjectType this_object, Arguments args, } template -void ListClass::pop(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::pop(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto list = get_internal>(this_object); @@ -188,7 +188,7 @@ void ListClass::pop(ContextType ctx, ObjectType this_object, Arguments args, } template -void ListClass::unshift(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::unshift(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); for (size_t i = 0; i < args.count; i++) { validate_value(ctx, *list, args[i]); @@ -203,7 +203,7 @@ void ListClass::unshift(ContextType ctx, ObjectType this_object, Arguments ar } template -void ListClass::shift(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::shift(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto list = get_internal>(this_object); @@ -218,7 +218,7 @@ void ListClass::shift(ContextType ctx, ObjectType this_object, Arguments args } template -void ListClass::splice(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::splice(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); size_t size = list->size(); long index = std::min(Value::to_number(ctx, args[0]), size); @@ -251,36 +251,36 @@ void ListClass::splice(ContextType ctx, ObjectType this_object, Arguments arg } template -void ListClass::snapshot(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::snapshot(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto list = get_internal>(this_object); return_value.set(ResultsClass::create_instance(ctx, list->snapshot())); } template -void ListClass::filtered(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::filtered(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); return_value.set(ResultsClass::create_filtered(ctx, *list, args)); } template -void ListClass::sorted(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::sorted(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); return_value.set(ResultsClass::create_instance(ctx, list->sort(ResultsClass::get_keypaths(ctx, args)))); } template -void ListClass::is_valid(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::is_valid(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { return_value.set(get_internal>(this_object)->is_valid()); } template -void ListClass::is_empty(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::is_empty(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { return_value.set(get_internal>(this_object)->size() == 0); } template -void ListClass::index_of(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::index_of(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto fn = [&](auto&& row) { auto list = get_internal>(this_object); NativeAccessor accessor(ctx, *list); @@ -290,19 +290,19 @@ void ListClass::index_of(ContextType ctx, ObjectType this_object, Arguments a } template -void ListClass::add_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::add_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); ResultsClass::add_listener(ctx, *list, this_object, args); } template -void ListClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto list = get_internal>(this_object); ResultsClass::remove_listener(ctx, *list, this_object, args); } template -void ListClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ListClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto list = get_internal>(this_object); list->m_notification_tokens.clear(); diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 33fde2b9..e592c428 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -218,25 +218,25 @@ public: static FunctionType create_constructor(ContextType); // methods - static void objects(ContextType, ObjectType, Arguments, ReturnValue &); - static void object_for_primary_key(ContextType, ObjectType, Arguments, ReturnValue &); - static void create(ContextType, ObjectType, Arguments, ReturnValue &); - static void delete_one(ContextType, ObjectType, Arguments, ReturnValue &); - static void delete_all(ContextType, ObjectType, Arguments, ReturnValue &); - static void write(ContextType, ObjectType, Arguments, ReturnValue &); - static void begin_transaction(ContextType, ObjectType, Arguments, ReturnValue&); - static void commit_transaction(ContextType, ObjectType, Arguments, ReturnValue&); - static void cancel_transaction(ContextType, ObjectType, Arguments, ReturnValue&); - static void add_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void wait_for_download_completion(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_all_listeners(ContextType, ObjectType, Arguments, ReturnValue &); - static void close(ContextType, ObjectType, Arguments, ReturnValue &); - static void compact(ContextType, ObjectType, Arguments, ReturnValue &); - static void writeCopyTo(ContextType, ObjectType, Arguments, ReturnValue &); - static void delete_model(ContextType, ObjectType, Arguments, ReturnValue &); - static void object_for_object_id(ContextType, ObjectType, Arguments, ReturnValue&); - static void privileges(ContextType, ObjectType, Arguments, ReturnValue&); + static void objects(ContextType, ObjectType, Arguments &, ReturnValue &); + static void object_for_primary_key(ContextType, ObjectType, Arguments &, ReturnValue &); + static void create(ContextType, ObjectType, Arguments &, ReturnValue &); + static void delete_one(ContextType, ObjectType, Arguments &, ReturnValue &); + static void delete_all(ContextType, ObjectType, Arguments &, ReturnValue &); + static void write(ContextType, ObjectType, Arguments &, ReturnValue &); + static void begin_transaction(ContextType, ObjectType, Arguments &, ReturnValue&); + static void commit_transaction(ContextType, ObjectType, Arguments &, ReturnValue&); + static void cancel_transaction(ContextType, ObjectType, Arguments &, ReturnValue&); + static void add_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void wait_for_download_completion(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_all_listeners(ContextType, ObjectType, Arguments &, ReturnValue &); + static void close(ContextType, ObjectType, Arguments &, ReturnValue &); + static void compact(ContextType, ObjectType, Arguments &, ReturnValue &); + static void writeCopyTo(ContextType, ObjectType, Arguments &, ReturnValue &); + static void delete_model(ContextType, ObjectType, Arguments &, ReturnValue &); + static void object_for_object_id(ContextType, ObjectType, Arguments &, ReturnValue&); + static void privileges(ContextType, ObjectType, Arguments &, ReturnValue&); // properties static void get_empty(ContextType, ObjectType, ReturnValue &); @@ -252,13 +252,13 @@ public: #endif // static methods - static void constructor(ContextType, ObjectType, size_t, const ValueType[]); + static void constructor(ContextType, ObjectType, Arguments &); static SharedRealm create_shared_realm(ContextType, realm::Realm::Config, bool, ObjectDefaultsMap &&, ConstructorMap &&); - static void schema_version(ContextType, ObjectType, Arguments, ReturnValue &); - static void clear_test_state(ContextType, ObjectType, Arguments, ReturnValue &); - static void copy_bundled_realm_files(ContextType, ObjectType, Arguments, ReturnValue &); - static void delete_file(ContextType, ObjectType, Arguments, ReturnValue &); + static void schema_version(ContextType, ObjectType, Arguments &, ReturnValue &); + static void clear_test_state(ContextType, ObjectType, Arguments &, ReturnValue &); + static void copy_bundled_realm_files(ContextType, ObjectType, Arguments &, ReturnValue &); + static void delete_file(ContextType, ObjectType, Arguments &, ReturnValue &); // static properties static void get_default_path(ContextType, ObjectType, ReturnValue &); @@ -434,17 +434,17 @@ static inline void convert_outdated_datetime_columns(const SharedRealm &realm) { } template -void RealmClass::constructor(ContextType ctx, ObjectType this_object, size_t argc, const ValueType arguments[]) { +void RealmClass::constructor(ContextType ctx, ObjectType this_object, Arguments &args) { realm::Realm::Config config; ObjectDefaultsMap defaults; ConstructorMap constructors; bool schema_updated = false; - if (argc == 0) { + if (args.count == 0) { config.path = default_path(); } - else if (argc == 1) { - ValueType value = arguments[0]; + else if (args.count == 1) { + ValueType value = args[0]; if (Value::is_string(ctx, value)) { config.path = Value::validated_to_string(ctx, value, "path"); } @@ -628,7 +628,7 @@ SharedRealm RealmClass::create_shared_realm(ContextType ctx, realm::Realm::Co } template -void RealmClass::schema_version(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::schema_version(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); realm::Realm::Config config; @@ -649,19 +649,19 @@ void RealmClass::schema_version(ContextType ctx, ObjectType this_object, Argu template -void RealmClass::clear_test_state(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::clear_test_state(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); js::clear_test_state(); } template -void RealmClass::copy_bundled_realm_files(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::copy_bundled_realm_files(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); realm::copy_bundled_realm_files(); } template -void RealmClass::delete_file(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::delete_file(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); ValueType value = args[0]; @@ -692,7 +692,7 @@ void RealmClass::delete_file(ContextType ctx, ObjectType this_object, Argumen } template -void RealmClass::delete_model(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::delete_model(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); ValueType value = args[0]; @@ -772,7 +772,7 @@ void RealmClass::get_sync_session(ContextType ctx, ObjectType object, ReturnV #if REALM_ENABLE_SYNC template -void RealmClass::wait_for_download_completion(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::wait_for_download_completion(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); auto callback_function = Value::validated_to_function(ctx, args[0 + (args.count == 2)]); @@ -840,7 +840,7 @@ void RealmClass::wait_for_download_completion(ContextType ctx, ObjectType thi #endif template -void RealmClass::objects(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::objects(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); SharedRealm realm = *get_internal>(this_object); @@ -849,7 +849,7 @@ void RealmClass::objects(ContextType ctx, ObjectType this_object, Arguments a } template -void RealmClass::object_for_primary_key(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::object_for_primary_key(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); SharedRealm realm = *get_internal>(this_object); @@ -867,7 +867,7 @@ void RealmClass::object_for_primary_key(ContextType ctx, ObjectType this_obje } template -void RealmClass::create(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::create(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(3); SharedRealm realm = *get_internal>(this_object); @@ -890,7 +890,7 @@ void RealmClass::create(ContextType ctx, ObjectType this_object, Arguments ar } template -void RealmClass::delete_one(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::delete_one(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); SharedRealm realm = *get_internal>(this_object); @@ -938,7 +938,7 @@ void RealmClass::delete_one(ContextType ctx, ObjectType this_object, Argument } template -void RealmClass::delete_all(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::delete_all(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -960,7 +960,7 @@ void RealmClass::delete_all(ContextType ctx, ObjectType this_object, Argument } template -void RealmClass::write(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::write(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); SharedRealm realm = *get_internal>(this_object); @@ -980,7 +980,7 @@ void RealmClass::write(ContextType ctx, ObjectType this_object, Arguments arg } template -void RealmClass::begin_transaction(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::begin_transaction(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -988,7 +988,7 @@ void RealmClass::begin_transaction(ContextType ctx, ObjectType this_object, A } template -void RealmClass::commit_transaction(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::commit_transaction(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -996,7 +996,7 @@ void RealmClass::commit_transaction(ContextType ctx, ObjectType this_object, } template -void RealmClass::cancel_transaction(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::cancel_transaction(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -1004,7 +1004,7 @@ void RealmClass::cancel_transaction(ContextType ctx, ObjectType this_object, } template -void RealmClass::add_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::add_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); auto name = validated_notification_name(ctx, args[0]); @@ -1021,7 +1021,7 @@ void RealmClass::add_listener(ContextType ctx, ObjectType this_object, Argume } template -void RealmClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); auto name = validated_notification_name(ctx, args[0]); @@ -1038,7 +1038,7 @@ void RealmClass::remove_listener(ContextType ctx, ObjectType this_object, Arg } template -void RealmClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); std::string name = "change"; if (args.count) { @@ -1056,7 +1056,7 @@ void RealmClass::remove_all_listeners(ContextType ctx, ObjectType this_object } template -void RealmClass::close(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::close(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -1064,7 +1064,7 @@ void RealmClass::close(ContextType ctx, ObjectType this_object, Arguments arg } template -void RealmClass::compact(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::compact(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); SharedRealm realm = *get_internal>(this_object); @@ -1076,7 +1076,7 @@ void RealmClass::compact(ContextType ctx, ObjectType this_object, Arguments a } template -void RealmClass::writeCopyTo(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::writeCopyTo(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(2); if (args.count == 0) { @@ -1106,7 +1106,7 @@ void RealmClass::writeCopyTo(ContextType ctx, ObjectType this_object, Argumen } template -void RealmClass::object_for_object_id(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue& return_value) { +void RealmClass::object_for_object_id(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue& return_value) { args.validate_count(2); #if REALM_ENABLE_SYNC @@ -1129,7 +1129,7 @@ void RealmClass::object_for_object_id(ContextType ctx, ObjectType this_object } template -void RealmClass::privileges(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void RealmClass::privileges(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); using Privilege = realm::ComputedPrivileges; diff --git a/src/js_realm_object.hpp b/src/js_realm_object.hpp index a42a9718..43ebc6c6 100644 --- a/src/js_realm_object.hpp +++ b/src/js_realm_object.hpp @@ -50,13 +50,13 @@ struct RealmObjectClass : ClassDefinition { static bool set_property(ContextType, ObjectType, const String &, ValueType); static std::vector get_property_names(ContextType, ObjectType); - static void is_valid(ContextType, FunctionType, ObjectType, size_t, const ValueType [], ReturnValue &); - static void get_object_schema(ContextType, FunctionType, ObjectType, size_t, const ValueType [], ReturnValue &); - static void linking_objects(ContextType, FunctionType, ObjectType, size_t, const ValueType [], ReturnValue &); - static void linking_objects_count(ContextType, FunctionType, ObjectType, size_t, const ValueType [], ReturnValue &); - static void get_object_id(ContextType, ObjectType, Arguments, ReturnValue &); - static void is_same_object(ContextType, ObjectType, Arguments, ReturnValue &); - static void set_link(ContextType, ObjectType, Arguments, ReturnValue &); + static void is_valid(ContextType, ObjectType, Arguments &, ReturnValue &); + static void get_object_schema(ContextType, ObjectType, Arguments &, ReturnValue &); + static void linking_objects(ContextType, ObjectType, Arguments &, ReturnValue &); + static void linking_objects_count(ContextType, ObjectType, Arguments &, ReturnValue &); + static void get_object_id(ContextType, ObjectType, Arguments &, ReturnValue &); + static void is_same_object(ContextType, ObjectType, Arguments &, ReturnValue &); + static void set_link(ContextType, ObjectType, Arguments &, ReturnValue &); const std::string name = "RealmObject"; @@ -78,12 +78,12 @@ struct RealmObjectClass : ClassDefinition { }; template -void RealmObjectClass::is_valid(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { +void RealmObjectClass::is_valid(ContextType, ObjectType this_object, Arguments &, ReturnValue &return_value) { return_value.set(get_internal>(this_object)->is_valid()); } template -void RealmObjectClass::get_object_schema(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { +void RealmObjectClass::get_object_schema(ContextType ctx, ObjectType this_object, Arguments &, ReturnValue &return_value) { auto object = get_internal>(this_object); return_value.set(Schema::object_for_object_schema(ctx, object->get_object_schema())); } @@ -143,7 +143,7 @@ bool RealmObjectClass::set_property(ContextType ctx, ObjectType object, const } template -void RealmObjectClass::set_link(ContextType ctx, ObjectType object, Arguments args, ReturnValue& return_value) { +void RealmObjectClass::set_link(ContextType ctx, ObjectType object, Arguments &args, ReturnValue& return_value) { args.validate_count(2); auto realm_object = get_internal>(object); @@ -208,7 +208,7 @@ std::vector> RealmObjectClass::get_property_names(ContextType ctx, } template -void RealmObjectClass::get_object_id(ContextType ctx, ObjectType object, Arguments args, ReturnValue& return_value) { +void RealmObjectClass::get_object_id(ContextType ctx, ObjectType object, Arguments &args, ReturnValue& return_value) { args.validate_maximum(0); #if REALM_ENABLE_SYNC @@ -226,7 +226,7 @@ void RealmObjectClass::get_object_id(ContextType ctx, ObjectType object, Argu } template -void RealmObjectClass::is_same_object(ContextType ctx, ObjectType object, Arguments args, ReturnValue& return_value) { +void RealmObjectClass::is_same_object(ContextType ctx, ObjectType object, Arguments &args, ReturnValue& return_value) { args.validate_count(1); ObjectType otherObject = Value::validated_to_object(ctx, args[0]); @@ -253,7 +253,7 @@ void RealmObjectClass::is_same_object(ContextType ctx, ObjectType object, Arg } template -void RealmObjectClass::linking_objects_count(ContextType ctx, FunctionType, ObjectType object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { +void RealmObjectClass::linking_objects_count(ContextType, ObjectType object, Arguments &, ReturnValue &return_value) { auto realm_object = get_internal>(object); const Row& row = realm_object->row(); @@ -268,11 +268,11 @@ void RealmObjectClass::linking_objects_count(ContextType ctx, FunctionType, O #include "js_results.hpp" template -void realm::js::RealmObjectClass::linking_objects(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 2); +void realm::js::RealmObjectClass::linking_objects(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(2); - std::string object_type = Value::validated_to_string(ctx, arguments[0], "objectType"); - std::string property_name = Value::validated_to_string(ctx, arguments[1], "property"); + std::string object_type = Value::validated_to_string(ctx, args[0], "objectType"); + std::string property_name = Value::validated_to_string(ctx, args[1], "property"); auto object = get_internal>(this_object); diff --git a/src/js_results.hpp b/src/js_results.hpp index f2ab1772..c16fd4be 100644 --- a/src/js_results.hpp +++ b/src/js_results.hpp @@ -74,40 +74,40 @@ struct ResultsClass : ClassDefinition, CollectionClass< static ObjectType create_instance(ContextType, SharedRealm, const std::string &object_type); template - static ObjectType create_filtered(ContextType, const U &, Arguments); + static ObjectType create_filtered(ContextType, const U &, Arguments &); - static std::vector> get_keypaths(ContextType, Arguments); + static std::vector> get_keypaths(ContextType, Arguments &); static void get_length(ContextType, ObjectType, ReturnValue &); static void get_type(ContextType, ObjectType, ReturnValue &); static void get_optional(ContextType, ObjectType, ReturnValue &); static void get_index(ContextType, ObjectType, uint32_t, ReturnValue &); - static void snapshot(ContextType, ObjectType, Arguments, ReturnValue &); - static void filtered(ContextType, ObjectType, Arguments, ReturnValue &); - static void sorted(ContextType, ObjectType, Arguments, ReturnValue &); - static void is_valid(ContextType, ObjectType, Arguments, ReturnValue &); - static void is_empty(ContextType, ObjectType, Arguments, ReturnValue &); + static void snapshot(ContextType, ObjectType, Arguments &, ReturnValue &); + static void filtered(ContextType, ObjectType, Arguments &, ReturnValue &); + static void sorted(ContextType, ObjectType, Arguments &, ReturnValue &); + static void is_valid(ContextType, ObjectType, Arguments &, ReturnValue &); + static void is_empty(ContextType, ObjectType, Arguments &, ReturnValue &); #if REALM_ENABLE_SYNC - static void subscribe(ContextType, ObjectType, Arguments, ReturnValue &); + static void subscribe(ContextType, ObjectType, Arguments &, ReturnValue &); #endif - static void index_of(ContextType, ObjectType, Arguments, ReturnValue &); + static void index_of(ContextType, ObjectType, Arguments &, ReturnValue &); template - static void index_of(ContextType, Fn&, Arguments, ReturnValue &); + static void index_of(ContextType, Fn&, Arguments &, ReturnValue &); - static void update(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); + static void update(ContextType, ObjectType, Arguments &, ReturnValue &); // observable - static void add_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_all_listeners(ContextType, ObjectType, Arguments, ReturnValue &); + static void add_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_all_listeners(ContextType, ObjectType, Arguments &, ReturnValue &); template - static void add_listener(ContextType, U&, ObjectType, Arguments); + static void add_listener(ContextType, U&, ObjectType, Arguments &); template - static void remove_listener(ContextType, U&, ObjectType, Arguments); + static void remove_listener(ContextType, U&, ObjectType, Arguments &); std::string const name = "Results"; @@ -171,7 +171,7 @@ inline void alias_backlinks(parser::KeyPathMapping &mapping, const realm::Shared template template -typename T::Object ResultsClass::create_filtered(ContextType ctx, const U &collection, Arguments args) { +typename T::Object ResultsClass::create_filtered(ContextType ctx, const U &collection, Arguments &args) { if (collection.get_type() != realm::PropertyType::Object) { throw std::runtime_error("Filtering non-object Lists and Results is not yet implemented."); } @@ -196,7 +196,7 @@ typename T::Object ResultsClass::create_filtered(ContextType ctx, const U &co template std::vector> -ResultsClass::get_keypaths(ContextType ctx, Arguments args) { +ResultsClass::get_keypaths(ContextType ctx, Arguments &args) { args.validate_maximum(2); std::vector> sort_order; @@ -262,37 +262,37 @@ void ResultsClass::get_index(ContextType ctx, ObjectType object, uint32_t ind } template -void ResultsClass::snapshot(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::snapshot(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto results = get_internal>(this_object); return_value.set(ResultsClass::create_instance(ctx, results->snapshot())); } template -void ResultsClass::filtered(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::filtered(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto results = get_internal>(this_object); return_value.set(create_filtered(ctx, *results, args)); } template -void ResultsClass::sorted(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::sorted(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto results = get_internal>(this_object); return_value.set(ResultsClass::create_instance(ctx, results->sort(ResultsClass::get_keypaths(ctx, args)))); } template -void ResultsClass::is_valid(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::is_valid(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { return_value.set(get_internal>(this_object)->is_valid()); } template -void ResultsClass::is_empty(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::is_empty(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { return_value.set(get_internal>(this_object)->size() == 0); } #if REALM_ENABLE_SYNC template -void ResultsClass::subscribe(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::subscribe(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); auto results = get_internal>(this_object); @@ -314,7 +314,7 @@ void ResultsClass::subscribe(ContextType ctx, ObjectType this_object, Argumen template template -void ResultsClass::index_of(ContextType ctx, Fn& fn, Arguments args, ReturnValue &return_value) { +void ResultsClass::index_of(ContextType ctx, Fn& fn, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); size_t ndx; @@ -337,10 +337,10 @@ void ResultsClass::index_of(ContextType ctx, Fn& fn, Arguments args, ReturnVa } template -void ResultsClass::update(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 2); +void ResultsClass::update(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_maximum(2); - std::string property = Value::validated_to_string(ctx, arguments[0], "property"); + std::string property = Value::validated_to_string(ctx, args[0], "property"); auto results = get_internal>(this_object); auto schema = results->get_object_schema(); @@ -358,13 +358,13 @@ void ResultsClass::update(ContextType ctx, FunctionType, ObjectType this_obje for (auto i = results->size(); i > 0; i--) { auto realm_object = realm::Object(realm, schema, results->get(i - 1)); auto obj = RealmObjectClass::create_instance(ctx, realm_object); - RealmObjectClass::set_property(ctx, obj, property, arguments[1]); + RealmObjectClass::set_property(ctx, obj, property, args[1]); } } template void ResultsClass::index_of(ContextType ctx, ObjectType this_object, - Arguments args, ReturnValue &return_value) { + Arguments &args, ReturnValue &return_value) { auto fn = [&](auto&& row) { auto results = get_internal>(this_object); NativeAccessor accessor(ctx, *results); @@ -375,7 +375,7 @@ void ResultsClass::index_of(ContextType ctx, ObjectType this_object, template template -void ResultsClass::add_listener(ContextType ctx, U& collection, ObjectType this_object, Arguments args) { +void ResultsClass::add_listener(ContextType ctx, U& collection, ObjectType this_object, Arguments &args) { args.validate_maximum(1); auto callback = Value::validated_to_function(ctx, args[0]); @@ -395,14 +395,14 @@ void ResultsClass::add_listener(ContextType ctx, U& collection, ObjectType th } template -void ResultsClass::add_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::add_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto results = get_internal>(this_object); add_listener(ctx, *results, this_object, args); } template template -void ResultsClass::remove_listener(ContextType ctx, U& collection, ObjectType this_object, Arguments args) { +void ResultsClass::remove_listener(ContextType ctx, U& collection, ObjectType this_object, Arguments &args) { args.validate_maximum(1); auto callback = Value::validated_to_function(ctx, args[0]); @@ -416,13 +416,13 @@ void ResultsClass::remove_listener(ContextType ctx, U& collection, ObjectType } template -void ResultsClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { auto results = get_internal>(this_object); remove_listener(ctx, *results, this_object, args); } template -void ResultsClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void ResultsClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto results = get_internal>(this_object); diff --git a/src/js_sync.hpp b/src/js_sync.hpp index be57f8eb..9025ef8b 100644 --- a/src/js_sync.hpp +++ b/src/js_sync.hpp @@ -89,9 +89,9 @@ public: {"isAdminToken", {wrap, nullptr}}, }; - static void create_user(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void admin_user(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void get_existing_user(ContextType, ObjectType, Arguments, ReturnValue&); + static void create_user(ContextType, ObjectType, Arguments &, ReturnValue &); + static void admin_user(ContextType, ObjectType, Arguments &, ReturnValue &); + static void get_existing_user(ContextType, ObjectType, Arguments &, ReturnValue&); MethodMap const static_methods = { {"createUser", wrap}, @@ -100,15 +100,15 @@ public: }; /*static void current_user(ContextType ctx, ObjectType object, ReturnValue &return_value);*/ - static void all_users(ContextType ctx, ObjectType object, ReturnValue &return_value); + static void all_users(ContextType ctx, ObjectType object, ReturnValue &); PropertyMap const static_properties = { /*{"current", {wrap, nullptr}},*/ {"all", {wrap, nullptr}}, }; - static void logout(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void session_for_on_disk_path(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); + static void logout(ContextType, ObjectType, Arguments &, ReturnValue &); + static void session_for_on_disk_path(ContextType, ObjectType, Arguments &, ReturnValue &); MethodMap const methods = { {"_logout", wrap}, @@ -145,39 +145,39 @@ void UserClass::is_admin_token(ContextType ctx, ObjectType object, ReturnValu } template -void UserClass::create_user(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 3, 5); +void UserClass::create_user(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_between(3, 5); SyncUserIdentifier userIdentifier { - Value::validated_to_string(ctx, arguments[1], "identity"), - Value::validated_to_string(ctx, arguments[0], "authServerUrl") + Value::validated_to_string(ctx, args[1], "identity"), + Value::validated_to_string(ctx, args[0], "authServerUrl") }; SharedUser *user = new SharedUser(syncManagerShared().get_user( userIdentifier, - Value::validated_to_string(ctx, arguments[2], "refreshToken") + Value::validated_to_string(ctx, args[2], "refreshToken") )); - if (argc == 5) { - (*user)->set_is_admin(Value::validated_to_boolean(ctx, arguments[4], "isAdmin")); + if (args.count == 5) { + (*user)->set_is_admin(Value::validated_to_boolean(ctx, args[4], "isAdmin")); } return_value.set(create_object>(ctx, user)); } template -void UserClass::admin_user(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 2, 2); +void UserClass::admin_user(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(2); SharedUser *user = new SharedUser(syncManagerShared().get_admin_token_user( - Value::validated_to_string(ctx, arguments[0], "authServerUrl"), - Value::validated_to_string(ctx, arguments[1], "refreshToken") + Value::validated_to_string(ctx, args[0], "authServerUrl"), + Value::validated_to_string(ctx, args[1], "refreshToken") )); return_value.set(create_object>(ctx, user)); } template -void UserClass::get_existing_user(ContextType ctx, ObjectType, Arguments arguments, ReturnValue& return_value) { - arguments.validate_count(2); +void UserClass::get_existing_user(ContextType ctx, ObjectType, Arguments &args, ReturnValue &return_value) { + args.validate_count(2); if (auto user = syncManagerShared().get_existing_logged_in_user(SyncUserIdentifier{ - Value::validated_to_string(ctx, arguments[1], "identity"), - Value::validated_to_string(ctx, arguments[0], "authServerUrl")})) { + Value::validated_to_string(ctx, args[1], "identity"), + Value::validated_to_string(ctx, args[0], "authServerUrl")})) { return_value.set(create_object>(ctx, new SharedUser(std::move(user)))); } } @@ -194,7 +194,7 @@ void UserClass::all_users(ContextType ctx, ObjectType object, ReturnValue &re } template -void UserClass::logout(ContextType ctx, FunctionType, ObjectType this_object, size_t, const ValueType[], ReturnValue &) { +void UserClass::logout(ContextType, ObjectType this_object, Arguments &, ReturnValue &) { get_internal>(this_object)->get()->log_out(); } @@ -221,12 +221,12 @@ public: static void get_url(ContextType, ObjectType, ReturnValue &); static void get_state(ContextType, ObjectType, ReturnValue &); - static void simulate_error(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void refresh_access_token(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void add_progress_notification(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &); - static void remove_progress_notification(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &); + static void simulate_error(ContextType, ObjectType, Arguments &, ReturnValue &); + static void refresh_access_token(ContextType, ObjectType, Arguments &, ReturnValue &); + static void add_progress_notification(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_progress_notification(ContextType, ObjectType, Arguments &, ReturnValue &); - static void override_server(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue&); + static void override_server(ContextType, ObjectType, Arguments &, ReturnValue &); PropertyMap const properties = { {"config", {wrap, nullptr}}, @@ -383,9 +383,10 @@ private: }; template -void UserClass::session_for_on_disk_path(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { +void UserClass::session_for_on_disk_path(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(1); auto user = *get_internal>(this_object); - if (auto session = user->session_for_on_disk_path(Value::validated_to_string(ctx, arguments[0]))) { + if (auto session = user->session_for_on_disk_path(Value::validated_to_string(ctx, args[0]))) { return_value.set(create_object>(ctx, new WeakSession(session))); } else { return_value.set_undefined(); @@ -455,38 +456,38 @@ void SessionClass::get_state(ContextType ctx, ObjectType object, ReturnValue } template -void SessionClass::simulate_error(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &) { - validate_argument_count(argc, 2); +void SessionClass::simulate_error(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &) { + args.validate_count(2); if (auto session = get_internal>(this_object)->lock()) { - std::error_code error_code(Value::validated_to_number(ctx, arguments[0]), realm::sync::protocol_error_category()); - std::string message = Value::validated_to_string(ctx, arguments[1]); + std::error_code error_code(Value::validated_to_number(ctx, args[0]), realm::sync::protocol_error_category()); + std::string message = Value::validated_to_string(ctx, args[1]); SyncSession::OnlyForTesting::handle_error(*session, SyncError(error_code, message, false)); } } template -void SessionClass::refresh_access_token(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &) { - validate_argument_count(argc, 3); +void SessionClass::refresh_access_token(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &) { + args.validate_count(3); if (auto session = get_internal>(this_object)->lock()) { - std::string sync_label = Value::validated_to_string(ctx, arguments[2], "syncLabel"); + std::string sync_label = Value::validated_to_string(ctx, args[2], "syncLabel"); session->set_multiplex_identifier(std::move(sync_label)); - std::string access_token = Value::validated_to_string(ctx, arguments[0], "accessToken"); - std::string realm_url = Value::validated_to_string(ctx, arguments[1], "realmUrl"); + std::string access_token = Value::validated_to_string(ctx, args[0], "accessToken"); + std::string realm_url = Value::validated_to_string(ctx, args[1], "realmUrl"); session->refresh_access_token(std::move(access_token), std::move(realm_url)); } } template -void SessionClass::add_progress_notification(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 3); +void SessionClass::add_progress_notification(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(3); if (auto session = get_internal>(this_object)->lock()) { - std::string direction = Value::validated_to_string(ctx, arguments[0], "direction"); - std::string mode = Value::validated_to_string(ctx, arguments[1], "mode"); + std::string direction = Value::validated_to_string(ctx, args[0], "direction"); + std::string mode = Value::validated_to_string(ctx, args[1], "mode"); SyncSession::NotifierType notifierType; if (direction == "download") { notifierType = SyncSession::NotifierType::download; @@ -509,7 +510,7 @@ void SessionClass::add_progress_notification(ContextType ctx, FunctionType, O throw std::invalid_argument("Invalid argument 'mode'. Only 'reportIndefinitely' and 'forCurrentlyOutstandingWork' progress notification modes are supported"); } - auto callback_function = Value::validated_to_function(ctx, arguments[2], "callback"); + auto callback_function = Value::validated_to_function(ctx, args[2], "callback"); Protected protected_callback(ctx, callback_function); Protected protected_this(ctx, this_object); @@ -536,9 +537,9 @@ void SessionClass::add_progress_notification(ContextType ctx, FunctionType, O } template -void SessionClass::remove_progress_notification(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 1); - auto callback_function = Value::validated_to_function(ctx, arguments[0], "callback"); +void SessionClass::remove_progress_notification(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(1); + auto callback_function = Value::validated_to_function(ctx, args[0], "callback"); auto syncSessionProp = Object::get_property(ctx, callback_function, "_syncSession"); if (Value::is_undefined(ctx, syncSessionProp) || Value::is_null(ctx, syncSessionProp)) { return; @@ -554,7 +555,7 @@ void SessionClass::remove_progress_notification(ContextType ctx, FunctionType } template -void SessionClass::override_server(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue&) { +void SessionClass::override_server(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue&) { args.validate_count(2); std::string address = Value::validated_to_string(ctx, args[0], "address"); @@ -602,10 +603,10 @@ public: static void get_state(ContextType, ObjectType, ReturnValue &); static void get_error(ContextType, ObjectType, ReturnValue &); - static void unsubscribe(ContextType, ObjectType, Arguments, ReturnValue &); - static void add_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_listener(ContextType, ObjectType, Arguments, ReturnValue &); - static void remove_all_listeners(ContextType, ObjectType, Arguments, ReturnValue &); + static void unsubscribe(ContextType, ObjectType, Arguments &, ReturnValue &); + static void add_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_listener(ContextType, ObjectType, Arguments &, ReturnValue &); + static void remove_all_listeners(ContextType, ObjectType, Arguments &, ReturnValue &); PropertyMap const properties = { {"state", {wrap, nullptr}}, @@ -648,7 +649,7 @@ void SubscriptionClass::get_error(ContextType ctx, ObjectType object, ReturnV } template -void SubscriptionClass::unsubscribe(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void SubscriptionClass::unsubscribe(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto subscription = get_internal>(this_object); partial_sync::unsubscribe(*subscription); @@ -656,7 +657,7 @@ void SubscriptionClass::unsubscribe(ContextType ctx, ObjectType this_object, } template -void SubscriptionClass::add_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void SubscriptionClass::add_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); auto subscription = get_internal>(this_object); @@ -678,7 +679,7 @@ void SubscriptionClass::add_listener(ContextType ctx, ObjectType this_object, } template -void SubscriptionClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void SubscriptionClass::remove_listener(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(1); auto subscription = get_internal>(this_object); @@ -693,7 +694,7 @@ void SubscriptionClass::remove_listener(ContextType ctx, ObjectType this_obje } template -void SubscriptionClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) { +void SubscriptionClass::remove_all_listeners(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { args.validate_maximum(0); auto subscription = get_internal>(this_object); subscription->m_notification_tokens.clear(); @@ -711,14 +712,15 @@ class SyncClass : public ClassDefinition { using Value = js::Value; using Function = js::Function; using ReturnValue = js::ReturnValue; + using Arguments = js::Arguments; public: std::string const name = "Sync"; static FunctionType create_constructor(ContextType); - static void set_sync_log_level(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); - static void initiate_client_reset(ContextType, FunctionType, ObjectType, size_t, const ValueType[], ReturnValue &); + static void set_sync_log_level(ContextType, ObjectType, Arguments &, ReturnValue &); + static void initiate_client_reset(ContextType, ObjectType, Arguments &, ReturnValue &); // private static std::function session_bind_callback(ContextType ctx, ObjectType sync_constructor); @@ -746,18 +748,18 @@ inline typename T::Function SyncClass::create_constructor(ContextType ctx) { } template -void SyncClass::initiate_client_reset(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue & return_value) { - validate_argument_count(argc, 1); - std::string path = Value::validated_to_string(ctx, arguments[0]); +void SyncClass::initiate_client_reset(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue & return_value) { + args.validate_count(1); + std::string path = Value::validated_to_string(ctx, args[0]); if (!SyncManager::shared().immediately_run_file_actions(std::string(path))) { throw std::runtime_error(util::format("Realm was not configured correctly. Client Reset could not be run for Realm at: %1", path)); } } template -void SyncClass::set_sync_log_level(ContextType ctx, FunctionType, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) { - validate_argument_count(argc, 1); - std::string log_level = Value::validated_to_string(ctx, arguments[0]); +void SyncClass::set_sync_log_level(ContextType ctx, ObjectType this_object, Arguments &args, ReturnValue &return_value) { + args.validate_count(1); + std::string log_level = Value::validated_to_string(ctx, args[0]); std::istringstream in(log_level); // Throws in.imbue(std::locale::classic()); // Throws in.unsetf(std::ios_base::skipws); diff --git a/src/js_util.hpp b/src/js_util.hpp index 59faf4aa..b41cecb6 100644 --- a/src/js_util.hpp +++ b/src/js_util.hpp @@ -85,7 +85,7 @@ static inline void validate_argument_count_at_least(size_t count, size_t expecte template void compute_aggregate_on_collection(typename T::ContextType ctx, typename T::ObjectType this_object, - typename T::Arguments args, typename T::ReturnValue &return_value) { + typename T::Arguments &args, typename T::ReturnValue &return_value) { auto list = get_internal(this_object); diff --git a/src/jsc/jsc_class.hpp b/src/jsc/jsc_class.hpp index 031e26dd..738f55eb 100644 --- a/src/jsc/jsc_class.hpp +++ b/src/jsc/jsc_class.hpp @@ -31,7 +31,6 @@ using ClassDefinition = js::ClassDefinition; using ConstructorType = js::ConstructorType; using ArgumentsMethodType = js::ArgumentsMethodType; -using MethodType = js::MethodType; using Arguments = js::Arguments; using PropertyType = js::PropertyType; using IndexPropertyType = js::IndexPropertyType; @@ -229,8 +228,9 @@ inline JSValueRef ObjectWrap::call(JSContextRef ctx, JSObjectRef func // Classes without a constructor should still be subclassable. if (reinterpret_cast(s_class.constructor)) { + jsc::Arguments args{ctx, argc, arguments}; try { - s_class.constructor(ctx, this_object, argc, arguments); + s_class.constructor(ctx, this_object, args); } catch (std::exception &e) { *exception = jsc::Exception::value(ctx, e); @@ -249,8 +249,9 @@ inline JSObjectRef ObjectWrap::construct(JSContextRef ctx, JSObjectRe } JSObjectRef this_object = create_instance(ctx); + jsc::Arguments args{ctx, argc, arguments}; try { - s_class.constructor(ctx, this_object, argc, arguments); + s_class.constructor(ctx, this_object, args); } catch (std::exception &e) { *exception = jsc::Exception::value(ctx, e); @@ -381,24 +382,12 @@ namespace js { template class ObjectWrap : public jsc::ObjectWrap {}; -template -JSValueRef wrap(JSContextRef ctx, JSObjectRef function, JSObjectRef this_object, size_t argc, const JSValueRef arguments[], JSValueRef* exception) { - jsc::ReturnValue return_value(ctx); - try { - F(ctx, function, this_object, argc, arguments, return_value); - return return_value; - } - catch (std::exception &e) { - *exception = jsc::Exception::value(ctx, e); - return nullptr; - } -} - template JSValueRef wrap(JSContextRef ctx, JSObjectRef, JSObjectRef this_object, size_t argc, const JSValueRef arguments[], JSValueRef* exception) { + jsc::Arguments args{ctx, argc, arguments}; jsc::ReturnValue return_value(ctx); try { - F(ctx, this_object, jsc::Arguments{ctx, argc, arguments}, return_value); + F(ctx, this_object, args, return_value); return return_value; } catch (std::exception &e) { diff --git a/src/node/node_class.hpp b/src/node/node_class.hpp index e4693b19..88ff595f 100644 --- a/src/node/node_class.hpp +++ b/src/node/node_class.hpp @@ -30,7 +30,6 @@ template using ClassDefinition = js::ClassDefinition; using ConstructorType = js::ConstructorType; -using MethodType = js::MethodType; using ArgumentsMethodType = js::ArgumentsMethodType; using Arguments = js::Arguments; using PropertyType = js::PropertyType; @@ -51,7 +50,7 @@ class ObjectWrap : public Nan::ObjectWrap { return Nan::New(js_template); } - static void construct(const v8::FunctionCallbackInfo&); + static void construct(const Nan::FunctionCallbackInfo&); static bool has_instance(v8::Isolate* isolate, const v8::Local &value) { return get_template()->HasInstance(value); @@ -77,26 +76,26 @@ class ObjectWrap : public Nan::ObjectWrap { static v8::Local create_template(); - static void setup_method(v8::Local, const std::string &, v8::FunctionCallback); - static void setup_static_method(v8::Local, const std::string &, v8::FunctionCallback); + static void setup_method(v8::Local, const std::string &, Nan::FunctionCallback); + static void setup_static_method(v8::Local, const std::string &, Nan::FunctionCallback); template static void setup_property(v8::Local, const std::string &, const PropertyType &); - static void get_indexes(const v8::PropertyCallbackInfo&); - static void set_property(v8::Local, v8::Local, const v8::PropertyCallbackInfo&); + static void get_indexes(const Nan::PropertyCallbackInfo&); + static void set_property(v8::Local, v8::Local, const Nan::PropertyCallbackInfo&); - static void set_readonly_property(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { + static void set_readonly_property(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info) { std::string message = std::string("Cannot assign to read only property '") + std::string(String(property)) + "'"; Nan::ThrowError(message.c_str()); } - static void set_readonly_index(uint32_t index, v8::Local value, const v8::PropertyCallbackInfo& info) { + static void set_readonly_index(uint32_t index, v8::Local value, const Nan::PropertyCallbackInfo& info) { std::string message = std::string("Cannot assign to read only index ") + util::to_string(index); Nan::ThrowError(message.c_str()); } - static void get_nonexistent_property(v8::Local, const v8::PropertyCallbackInfo&) { + static void get_nonexistent_property(v8::Local, const Nan::PropertyCallbackInfo&) { // Do nothing. This function exists only to prevent a crash where it is used. } }; @@ -112,7 +111,7 @@ class ObjectWrap { }; // This helper function is needed outside the scope of the ObjectWrap class as well. -static inline std::vector> get_arguments(const v8::FunctionCallbackInfo &info) { +static inline std::vector> get_arguments(const Nan::FunctionCallbackInfo &info) { int count = info.Length(); std::vector> arguments; arguments.reserve(count); @@ -159,7 +158,7 @@ template inline v8::Local ObjectWrap::create_template() { Nan::EscapableHandleScope scope; - v8::Local tpl = v8::FunctionTemplate::New(v8::Isolate::GetCurrent(), construct); + v8::Local tpl = Nan::New(construct); v8::Local instance_tpl = tpl->InstanceTemplate(); v8::Local name = Nan::New(s_class.name).ToLocalChecked(); @@ -184,21 +183,21 @@ inline v8::Local ObjectWrap::create_template() if (s_class.index_accessor.getter) { auto &index_accessor = s_class.index_accessor; - instance_tpl->SetIndexedPropertyHandler(index_accessor.getter, index_accessor.setter ? index_accessor.setter : set_readonly_index, 0, 0, get_indexes); + Nan::SetIndexedPropertyHandler(instance_tpl, index_accessor.getter, index_accessor.setter ? index_accessor.setter : set_readonly_index, 0, 0, get_indexes); } if (s_class.string_accessor.getter || s_class.index_accessor.getter || s_class.index_accessor.setter) { // Use our own wrapper for the setter since we want to throw for negative indices. auto &string_accessor = s_class.string_accessor; - instance_tpl->SetNamedPropertyHandler(string_accessor.getter ? string_accessor.getter : get_nonexistent_property, set_property, 0, 0, string_accessor.enumerator); + Nan::SetNamedPropertyHandler(instance_tpl, string_accessor.getter ? string_accessor.getter : get_nonexistent_property, set_property, 0, 0, string_accessor.enumerator); } return scope.Escape(tpl); } template -inline void ObjectWrap::setup_method(v8::Local tpl, const std::string &name, v8::FunctionCallback callback) { +inline void ObjectWrap::setup_method(v8::Local tpl, const std::string &name, Nan::FunctionCallback callback) { v8::Local signature = Nan::New(tpl); - v8::Local fn_tpl = v8::FunctionTemplate::New(v8::Isolate::GetCurrent(), callback, v8::Local(), signature); + v8::Local fn_tpl = Nan::New(callback, v8::Local(), signature); v8::Local fn_name = Nan::New(name).ToLocalChecked(); // The reason we use this rather than Nan::SetPrototypeMethod is DontEnum. @@ -207,8 +206,8 @@ inline void ObjectWrap::setup_method(v8::Local } template -inline void ObjectWrap::setup_static_method(v8::Local tpl, const std::string &name, v8::FunctionCallback callback) { - v8::Local fn_tpl = v8::FunctionTemplate::New(v8::Isolate::GetCurrent(), callback); +inline void ObjectWrap::setup_static_method(v8::Local tpl, const std::string &name, Nan::FunctionCallback callback) { + v8::Local fn_tpl = Nan::New(callback); v8::Local fn_name = Nan::New(name).ToLocalChecked(); tpl->Set(fn_name, fn_tpl, v8::PropertyAttribute::DontEnum); @@ -221,17 +220,18 @@ inline void ObjectWrap::setup_property(v8::Local target, v8::Local prop_name = Nan::New(name).ToLocalChecked(); v8::PropertyAttribute attributes = v8::PropertyAttribute(v8::DontEnum | v8::DontDelete); - target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local(), v8::DEFAULT, attributes); + Nan::SetAccessor(target, prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local(), v8::DEFAULT, attributes); } template -inline void ObjectWrap::construct(const v8::FunctionCallbackInfo& info) { +inline void ObjectWrap::construct(const Nan::FunctionCallbackInfo& info) { if (!info.IsConstructCall()) { Nan::ThrowError("Constructor must be called with new"); } if (reinterpret_cast(s_class.constructor)) { auto isolate = info.GetIsolate(); auto arguments = get_arguments(info); + node::Arguments args{isolate, arguments.size(), arguments.data()}; v8::Local this_object = info.This(); info.GetReturnValue().Set(this_object); @@ -239,7 +239,7 @@ inline void ObjectWrap::construct(const v8::FunctionCallbackInfoWrap(this_object); try { - s_class.constructor(isolate, this_object, arguments.size(), arguments.data()); + s_class.constructor(isolate, this_object, args); } catch (std::exception &e) { Nan::ThrowError(node::Exception::value(isolate, e)); @@ -251,7 +251,7 @@ inline void ObjectWrap::construct(const v8::FunctionCallbackInfo -inline void ObjectWrap::get_indexes(const v8::PropertyCallbackInfo& info) { +inline void ObjectWrap::get_indexes(const Nan::PropertyCallbackInfo& info) { uint32_t length; try { length = Object::validated_get_length(info.GetIsolate(), info.This()); @@ -270,7 +270,7 @@ inline void ObjectWrap::get_indexes(const v8::PropertyCallbackInfo -inline void ObjectWrap::set_property(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { +inline void ObjectWrap::set_property(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info) { if (s_class.index_accessor.getter || s_class.index_accessor.setter) { try { // Negative indices are passed into this string property interceptor, so check for them here. @@ -296,28 +296,15 @@ namespace js { template class ObjectWrap : public node::ObjectWrap {}; -template -void wrap(const v8::FunctionCallbackInfo& info) { - v8::Isolate* isolate = info.GetIsolate(); - node::ReturnValue return_value(info.GetReturnValue()); - auto arguments = node::get_arguments(info); - - try { - F(isolate, info.Callee(), info.This(), arguments.size(), arguments.data(), return_value); - } - catch (std::exception &e) { - Nan::ThrowError(node::Exception::value(isolate, e)); - } -} - template -void wrap(const v8::FunctionCallbackInfo& info) { +void wrap(const Nan::FunctionCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); - node::ReturnValue return_value(info.GetReturnValue()); auto arguments = node::get_arguments(info); + node::Arguments args{isolate, arguments.size(), arguments.data()}; + node::ReturnValue return_value(info.GetReturnValue()); try { - F(isolate, info.This(), node::Arguments{isolate, arguments.size(), arguments.data()}, return_value); + F(isolate, info.This(), args, return_value); } catch (std::exception &e) { Nan::ThrowError(node::Exception::value(isolate, e)); @@ -326,7 +313,7 @@ void wrap(const v8::FunctionCallbackInfo& info) { template -void wrap(v8::Local property, const v8::PropertyCallbackInfo& info) { +void wrap(v8::Local property, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); node::ReturnValue return_value(info.GetReturnValue()); try { @@ -338,7 +325,7 @@ void wrap(v8::Local property, const v8::PropertyCallbackInfo -void wrap(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { +void wrap(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); try { F(isolate, info.This(), value); @@ -349,7 +336,7 @@ void wrap(v8::Local property, v8::Local value, const v8:: } template -void wrap(uint32_t index, const v8::PropertyCallbackInfo& info) { +void wrap(uint32_t index, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); node::ReturnValue return_value(info.GetReturnValue()); try { @@ -365,7 +352,7 @@ void wrap(uint32_t index, const v8::PropertyCallbackInfo& info) { } template -void wrap(uint32_t index, v8::Local value, const v8::PropertyCallbackInfo& info) { +void wrap(uint32_t index, v8::Local value, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); try { if (F(isolate, info.This(), index, value)) { @@ -379,7 +366,7 @@ void wrap(uint32_t index, v8::Local value, const v8::PropertyCallback } template -void wrap(v8::Local property, const v8::PropertyCallbackInfo& info) { +void wrap(v8::Local property, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); node::ReturnValue return_value(info.GetReturnValue()); try { @@ -391,7 +378,7 @@ void wrap(v8::Local property, const v8::PropertyCallbackInfo -void wrap(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { +void wrap(v8::Local property, v8::Local value, const Nan::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); try { if (F(isolate, info.This(), property, value)) { @@ -405,7 +392,7 @@ void wrap(v8::Local property, v8::Local value, const v8:: } template -void wrap(const v8::PropertyCallbackInfo& info) { +void wrap(const Nan::PropertyCallbackInfo& info) { auto names = F(info.GetIsolate(), info.This()); int count = (int)names.size(); v8::Local array = Nan::New(count); diff --git a/src/node/node_return_value.hpp b/src/node/node_return_value.hpp index dfb3a1d7..7ee768ac 100644 --- a/src/node/node_return_value.hpp +++ b/src/node/node_return_value.hpp @@ -25,10 +25,10 @@ namespace js { template<> class ReturnValue { - v8::ReturnValue m_value; + Nan::ReturnValue m_value; public: - ReturnValue(v8::ReturnValue value) : m_value(value) {} + ReturnValue(Nan::ReturnValue value) : m_value(value) {} void set(const v8::Local &value) { m_value.Set(value); diff --git a/src/node/node_types.hpp b/src/node/node_types.hpp index b041e861..09dfea53 100644 --- a/src/node/node_types.hpp +++ b/src/node/node_types.hpp @@ -43,15 +43,15 @@ struct Types { using String = v8::Local; using Function = v8::Local; - using ConstructorCallback = v8::FunctionCallback; - using FunctionCallback = v8::FunctionCallback; - using PropertyGetterCallback = v8::AccessorGetterCallback; - using PropertySetterCallback = v8::AccessorSetterCallback; - using IndexPropertyGetterCallback = v8::IndexedPropertyGetterCallback; - using IndexPropertySetterCallback = v8::IndexedPropertySetterCallback; - using StringPropertyGetterCallback = v8::NamedPropertyGetterCallback; - using StringPropertySetterCallback = v8::NamedPropertySetterCallback; - using StringPropertyEnumeratorCallback = v8::NamedPropertyEnumeratorCallback; + using ConstructorCallback = Nan::FunctionCallback; + using FunctionCallback = Nan::FunctionCallback; + using PropertyGetterCallback = Nan::GetterCallback; + using PropertySetterCallback = Nan::SetterCallback; + using IndexPropertyGetterCallback = Nan::IndexGetterCallback; + using IndexPropertySetterCallback = Nan::IndexSetterCallback; + using StringPropertyGetterCallback = Nan::PropertyGetterCallback; + using StringPropertySetterCallback = Nan::PropertySetterCallback; + using StringPropertyEnumeratorCallback = Nan::PropertyEnumeratorCallback; }; template diff --git a/src/rpc.cpp b/src/rpc.cpp index 3a1afdba..7c5038b7 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -365,10 +365,10 @@ RPCServer::~RPCServer() { JSGlobalContextRelease(m_context); } -void RPCServer::run_callback(JSContextRef ctx, JSObjectRef function, JSObjectRef this_object, size_t argc, const JSValueRef arguments[], jsc::ReturnValue &return_value) { +JSValueRef RPCServer::run_callback(JSContextRef ctx, JSObjectRef function, JSObjectRef this_object, size_t argc, const JSValueRef arguments[], JSValueRef* exception) { RPCServer* server = get_rpc_server(JSContextGetGlobalContext(ctx)); if (!server) { - return; + return JSValueMakeUndefined(ctx); } u_int64_t counter = server->m_callback_call_counter++; @@ -419,11 +419,15 @@ void RPCServer::run_callback(JSContextRef ctx, JSObjectRef function, JSObjectRef assert(callback_id == resultCallbackId.get()); if (!error.is_null()) { - throw jsc::Exception(ctx, error.get()); + JSStringRef message = JSStringCreateWithUTF8CString(error.get().c_str()); + JSValueRef arguments[] { JSValueMakeString(ctx, message) }; + JSStringRelease(message); + + *exception = JSObjectMakeError(ctx, 1, arguments, nullptr); } - return_value.set(server->deserialize_json_value(results["result"])); + return server->deserialize_json_value(results["result"]); } @@ -649,7 +653,7 @@ JSValueRef RPCServer::deserialize_json_value(const json dict) { RPCObjectID callback_id = value.get(); if (!m_callbacks.count(callback_id)) { - JSObjectRef callback = JSObjectMakeFunctionWithCallback(m_context, nullptr, js::wrap); + JSObjectRef callback = JSObjectMakeFunctionWithCallback(m_context, nullptr, run_callback); m_callbacks.emplace(callback_id, js::Protected(m_context, callback)); m_callback_ids.emplace(callback, callback_id); } diff --git a/src/rpc.hpp b/src/rpc.hpp index f753c4eb..490bef1e 100644 --- a/src/rpc.hpp +++ b/src/rpc.hpp @@ -83,7 +83,7 @@ class RPCServer { RPCWorker m_worker; u_int64_t m_callback_call_counter; - static void run_callback(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], jsc::ReturnValue &); + static JSValueRef run_callback(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef *exception); RPCObjectID store_object(JSObjectRef object);