diff --git a/.eslintrc.json b/.eslintrc.json index 55743e4c18..495c000f5c 100755 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -108,9 +108,6 @@ "COMPILE_TIME": false, "COMPILE_MSG": false, - "PKG_VERSION": false, - "ENVIRONMENT_IS_WORKER": false, - "ENVIRONMENT_IS_NODE": false, - "ENVIRONMENT_IS_WEB": false + "PKG_VERSION": false } } diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6064121c71..e90196e54a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -22,7 +22,7 @@ Before your contributions can be accepted, you must: * Line endings: UNIX style (\n) -## Design Principals +## Design Principles 1. If at all possible, all operations and features should be client-side and not rely on connections to an external server. This increases the utility of CyberChef on closed networks and in virtual machines that are not connected to the Internet. Calls to external APIs may be accepted if there is no other option, but not for critical components. 2. Latency should be kept to a minimum to enhance the user experience. This means that all operation code should sit on the client, rather than being loaded dynamically from a server. @@ -30,7 +30,7 @@ Before your contributions can be accepted, you must: 4. Minimise the use of large libraries, especially for niche operations that won't be used very often - these will be downloaded by everyone using the app, whether they use that operation or not (due to principal 2). -With these principals in mind, any changes or additions to CyberChef should keep it: +With these principles in mind, any changes or additions to CyberChef should keep it: - Standalone - Efficient diff --git a/.gitignore b/.gitignore index b5aad5d047..6c9f300af3 100755 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,8 @@ docs/* src/core/config/modules/* src/core/config/OperationConfig.json src/core/operations/index.mjs +src/node/config/OperationConfig.json +src/node/index.mjs +**/*.DS_Store tests/browser/output/* diff --git a/.travis.yml b/.travis.yml index 63d397195c..de8a1d1f34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: node_js node_js: - lts/* +cache: npm addons: chrome: stable install: npm install @@ -10,8 +11,9 @@ before_script: script: - grunt lint - grunt test + - grunt test-node - grunt docs - - grunt node + - npm run node-prod - grunt prod --msg="$COMPILE_MSG" - xvfb-run --server-args="-screen 0 1200x800x24" grunt testui before_deploy: diff --git a/Gruntfile.js b/Gruntfile.js index 48d47bcb04..2dc74b182b 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,6 +15,8 @@ const path = require("path"); * @license Apache-2.0 */ +const NODE_PROD = process.env.NODE_ENV === "production"; + module.exports = function (grunt) { grunt.file.defaultEncoding = "utf8"; grunt.file.preserveBOM = false; @@ -26,16 +28,20 @@ module.exports = function (grunt) { grunt.registerTask("node", "Compiles CyberChef into a single NodeJS module.", - ["clean:node", "clean:config", "exec:generateConfig", "webpack:node", "chmod:build"]); + ["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:node", "webpack:nodeRepl", "chmod:build"]); grunt.registerTask("test", "A task which runs all the operation tests in the tests directory.", - ["exec:generateConfig", "exec:opTests"]); + ["clean", "exec:generateConfig", "exec:opTests"]); grunt.registerTask("testui", "A task which runs all the UI tests in the tests directory. The prod task must already have been run.", ["connect:prod", "exec:browserTests"]); + grunt.registerTask("test-node", + "Run all the node tests in the tests directory", + ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:nodeTests"]); + grunt.registerTask("docs", "Compiles documentation in the /docs directory.", ["clean:docs", "jsdoc", "chmod:docs"]); @@ -80,15 +86,6 @@ module.exports = function (grunt) { COMPILE_TIME: JSON.stringify(compileTime), COMPILE_MSG: JSON.stringify(grunt.option("compile-msg") || grunt.option("msg") || ""), PKG_VERSION: JSON.stringify(pkg.version), - ENVIRONMENT_IS_WORKER: function() { - return typeof importScripts === "function"; - }, - ENVIRONMENT_IS_NODE: function() { - return typeof process === "object" && typeof require === "function"; - }, - ENVIRONMENT_IS_WEB: function() { - return typeof window === "object"; - } }, moduleEntryPoints = listEntryModules(); @@ -113,7 +110,7 @@ module.exports = function (grunt) { dev: ["build/dev/*"], prod: ["build/prod/*"], node: ["build/node/*"], - config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs"], + config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs", "src/node/index.mjs", "src/node/config/OperationConfig.json"], docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"], standalone: ["build/prod/CyberChef*.html"] }, @@ -201,10 +198,12 @@ module.exports = function (grunt) { }; }, node: { - mode: "production", + mode: NODE_PROD ? "production" : "development", target: "node", entry: "./src/node/index.mjs", - externals: [NodeExternals()], + externals: [NodeExternals({ + whitelist: ["crypto-api/src/crypto-api"] + })], output: { filename: "CyberChef.js", path: __dirname + "/build/node", @@ -212,8 +211,31 @@ module.exports = function (grunt) { libraryTarget: "commonjs2" }, plugins: [ - new webpack.DefinePlugin(BUILD_CONSTANTS) - ] + new webpack.DefinePlugin(BUILD_CONSTANTS), + new webpack.optimize.LimitChunkCountPlugin({ + maxChunks: 1 + }) + ], + }, + nodeRepl: { + mode: NODE_PROD ? "production" : "development", + target: "node", + entry: "./src/node/repl-index.mjs", + externals: [NodeExternals({ + whitelist: ["crypto-api/src/crypto-api"] + })], + output: { + filename: "CyberChef-repl.js", + path: __dirname + "/build/node", + library: "CyberChef", + libraryTarget: "commonjs2" + }, + plugins: [ + new webpack.DefinePlugin(BUILD_CONSTANTS), + new webpack.optimize.LimitChunkCountPlugin({ + maxChunks: 1 + }) + ], } }, "webpack-dev-server": { @@ -249,9 +271,6 @@ module.exports = function (grunt) { "./config/modules/OpModules": "./config/modules/Default" } }, - output: { - globalObject: "this", - }, plugins: [ new webpack.DefinePlugin(BUILD_CONSTANTS), new HtmlWebpackPlugin({ @@ -358,7 +377,7 @@ module.exports = function (grunt) { watch: { config: { files: ["src/core/operations/**/*", "!src/core/operations/index.mjs"], - tasks: ["exec:generateConfig"] + tasks: ["exec:generateNodeIndex", "exec:generateConfig"] } }, concurrent: { @@ -390,11 +409,21 @@ module.exports = function (grunt) { "echo '--- Config scripts finished. ---\n'" ].join(";") }, + generateNodeIndex: { + command: [ + "echo '\n--- Regenerating node index ---'", + "node --experimental-modules src/node/config/scripts/generateNodeIndex.mjs", + "echo '--- Node index generated. ---\n'" + ].join(";"), + }, opTests: { command: "node --experimental-modules --no-warnings --no-deprecation tests/operations/index.mjs" }, browserTests: { command: "./node_modules/.bin/nightwatch --env prod" + }, + nodeTests: { + command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs" } }, }); diff --git a/babel.config.js b/babel.config.js index cb37b2c71e..4e9503c463 100644 --- a/babel.config.js +++ b/babel.config.js @@ -10,7 +10,7 @@ module.exports = function(api) { }] ], "plugins": [ - "babel-plugin-syntax-dynamic-import", + "dynamic-import-node", [ "babel-plugin-transform-builtin-extend", { "globals": ["Error"] diff --git a/package-lock.json b/package-lock.json index de3a33a80f..249dff7664 100644 --- a/package-lock.json +++ b/package-lock.json @@ -444,9 +444,9 @@ } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -925,6 +925,11 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" } } }, @@ -1011,6 +1016,13 @@ "integrity": "sha512-2xsuyZ0R0RBFwjgae5NpXk8FcfH4qovj5cEM5VEeB7KXnKqzaisIu2HSV/mCEISolJJuR4wkViUGYujA8MH9tw==", "requires": { "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + } } }, "@babel/runtime-corejs2": { @@ -1134,6 +1146,15 @@ "tinycolor2": "^1.4.1" }, "dependencies": { + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, "core-js": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", @@ -1784,12 +1805,6 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, - "abab": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", - "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1837,9 +1852,9 @@ } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -1865,9 +1880,9 @@ } }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==", "dev": true }, "acorn-dynamic-import": { @@ -1919,27 +1934,38 @@ } }, "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", + "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "dependencies": { + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + } } }, "ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz", + "integrity": "sha1-7PAh+hCP0X37Xms4Py3SM+Mf/Fk=", "dev": true }, "ajv-keywords": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", - "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, "amdefine": { @@ -1988,17 +2014,6 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } } }, "aproba": { @@ -2015,6 +2030,38 @@ "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "argparse": { @@ -2121,6 +2168,23 @@ "dev": true, "requires": { "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } } }, "assert-plus": { @@ -2154,10 +2218,13 @@ "dev": true }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } }, "async-each": { "version": "1.0.3", @@ -2279,6 +2346,18 @@ "@babel/types": "^7.0.0", "eslint-scope": "3.7.1", "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } } }, "babel-loader": { @@ -2291,6 +2370,14 @@ "loader-utils": "^1.0.2", "mkdirp": "^0.5.1", "pify": "^4.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } } }, "babel-messages": { @@ -2310,12 +2397,6 @@ "object.assign": "^4.1.0" } }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", - "dev": true - }, "babel-plugin-transform-builtin-extend": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/babel-plugin-transform-builtin-extend/-/babel-plugin-transform-builtin-extend-1.1.2.tgz", @@ -2472,9 +2553,9 @@ "dev": true }, "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", "dev": true, "requires": { "tweetnacl": "^0.14.3" @@ -2506,9 +2587,9 @@ } }, "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", "dev": true }, "bignumber.js": { @@ -2833,15 +2914,36 @@ "requires": { "buffer": "^5.1.0", "long": "^4.0.0" + }, + "dependencies": { + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + } } }, "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true, "requires": { "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } } }, "buffer-equal": { @@ -2872,6 +2974,12 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -2920,6 +3028,15 @@ "yallist": "^3.0.2" } }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -3106,6 +3223,14 @@ "path-is-absolute": "^1.0.0", "readdirp": "^2.2.1", "upath": "^1.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } } }, "chownr": { @@ -3134,6 +3259,20 @@ "mkdirp": "^0.5.1", "request": "^2.88.0", "tcp-port-used": "^1.0.1" + }, + "dependencies": { + "extract-zip": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", + "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "yauzl": "2.4.1" + } + } } }, "cipher-base": { @@ -3350,6 +3489,12 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true } } }, @@ -3369,6 +3514,38 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "connect": { @@ -3381,6 +3558,23 @@ "finalhandler": "1.1.2", "parseurl": "~1.3.3", "utils-merge": "1.0.1" + }, + "dependencies": { + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + } } }, "connect-history-api-fallback": { @@ -3653,11 +3847,54 @@ "schema-utils": "^1.0.0" }, "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "postcss-value-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz", "integrity": "sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ==", "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } } } }, @@ -3674,9 +3911,9 @@ } }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz", + "integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==", "dev": true }, "cssesc": { @@ -3686,18 +3923,26 @@ "dev": true }, "cssom": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", - "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", "dev": true }, "cssstyle": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.2.tgz", - "integrity": "sha512-43wY3kl1CVQSvL7wUY1qXkxVGkStjpkDmVjiIKX8R97uhajy8Bybay78uOtqvh7Q5GK75dNPfW0geWjE6qQQow==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.3.0.tgz", + "integrity": "sha512-wXsoRfsRfsLVNaVzoKdqvEmK/5PFaEXNspVT22Ots6K/cnJdpoDKuQFw+qlMiXnmaif1OgeC466X1zISgAOcGg==", "dev": true, "requires": { - "cssom": "0.3.x" + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } } }, "ctph.js": { @@ -4032,6 +4277,12 @@ "whatwg-url": "^7.0.0" }, "dependencies": { + "abab": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "dev": true + }, "whatwg-url": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", @@ -4096,9 +4347,9 @@ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" }, "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true }, "deep-for-each": { @@ -4131,6 +4382,13 @@ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "requires": { "object-keys": "^1.0.12" + }, + "dependencies": { + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + } } }, "define-property": { @@ -4206,19 +4464,36 @@ "p-map": "^2.0.0", "pify": "^4.0.1", "rimraf": "^2.6.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true }, "depd": { "version": "1.1.2", @@ -4308,13 +4583,27 @@ } }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", "dev": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "~1.1.1", + "entities": "~1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", + "dev": true + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } } }, "dom-walk": { @@ -4329,9 +4618,9 @@ "dev": true }, "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.2.1.tgz", + "integrity": "sha512-SQVCLFS2E7G5CRCMdn6K9bIhRj1bS6QBWZfF0TUPh4V/BbqrQ619IdSS3/izn0FZ+9l+uODzaZjb08fjOfablA==", "dev": true }, "domexception": { @@ -4344,9 +4633,9 @@ } }, "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", "dev": true, "requires": { "domelementtype": "1" @@ -4375,15 +4664,47 @@ "dev": true }, "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", + "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", "dev": true, "requires": { "end-of-stream": "^1.0.0", "inherits": "^2.0.1", "readable-stream": "^2.0.0", "stream-shift": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "ecc-jsbn": { @@ -4394,6 +4715,14 @@ "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" + }, + "dependencies": { + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + } } }, "ecdsa-sig-formatter": { @@ -4475,12 +4804,6 @@ "tapable": "^1.0.0" } }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", @@ -4501,25 +4824,24 @@ } }, "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", + "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "requires": { - "es-to-primitive": "^1.2.0", + "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" } }, "es-to-primitive": { @@ -4530,6 +4852,13 @@ "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" + }, + "dependencies": { + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + } } }, "es6-object-assign": { @@ -4651,6 +4980,18 @@ "text-table": "^0.2.0" }, "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -4686,22 +5027,22 @@ "ms": "^2.1.1" } }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4735,9 +5076,9 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4848,6 +5189,14 @@ "acorn": "^6.0.7", "acorn-jsx": "^5.0.0", "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + } } }, "esprima": { @@ -5178,15 +5527,73 @@ } }, "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.6.tgz", + "integrity": "sha1-EpDt6NINCHK0Kf0/NRyhKOxe+Fw=", "dev": true, "requires": { - "concat-stream": "1.6.2", + "concat-stream": "1.6.0", "debug": "2.6.9", - "mkdirp": "0.5.1", + "mkdirp": "0.5.0", "yauzl": "2.4.1" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "extsprintf": { @@ -5268,6 +5675,45 @@ "requires": { "loader-utils": "^1.2.2", "schema-utils": "^1.0.0" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "file-saver": { @@ -5334,6 +5780,14 @@ "parseurl": "~1.3.3", "statuses": "~1.5.0", "unpipe": "~1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } } }, "find-cache-dir": { @@ -5345,6 +5799,24 @@ "commondir": "^1.0.1", "make-dir": "^2.0.0", "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } } }, "find-up": { @@ -5389,6 +5861,17 @@ "flatted": "^2.0.0", "rimraf": "2.6.3", "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "flatted": { @@ -5398,13 +5881,45 @@ "dev": true }, "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", + "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "follow-redirects": { @@ -5496,6 +6011,38 @@ "requires": { "inherits": "^2.0.1", "readable-stream": "^2.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "fs-extra": { @@ -5540,21 +6087,20 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "resolved": false, "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "resolved": false, "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true @@ -5572,17 +6118,15 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5597,28 +6141,25 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true @@ -5642,21 +6183,21 @@ }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "resolved": false, "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "resolved": false, "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "resolved": false, "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, @@ -5666,14 +6207,14 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": false, "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "resolved": false, "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, @@ -5705,7 +6246,7 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "resolved": false, "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true @@ -5722,7 +6263,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "resolved": false, "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, @@ -5732,7 +6273,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": false, "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, @@ -5743,58 +6284,53 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "resolved": false, "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": false, "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5812,10 +6348,9 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5860,7 +6395,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "resolved": false, "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, @@ -5889,7 +6424,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "resolved": false, "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, @@ -5902,45 +6437,43 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": false, "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "resolved": false, "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, @@ -5951,14 +6484,14 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": false, "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "resolved": false, "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true @@ -5978,7 +6511,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": false, "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true @@ -5987,7 +6520,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": false, "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, @@ -6015,19 +6548,18 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "resolved": false, "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "resolved": false, "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true @@ -6041,24 +6573,23 @@ }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "resolved": false, "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "resolved": false, "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6067,7 +6598,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": false, "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, @@ -6077,17 +6608,16 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "resolved": false, "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true @@ -6110,7 +6640,7 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": false, "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true @@ -6127,17 +6657,15 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true, - "optional": true + "dev": true } } }, @@ -6162,31 +6690,7 @@ "readable-stream": "1.1.x", "xregexp": "2.0.0" }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, + "dependencies": { "xregexp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", @@ -6250,9 +6754,9 @@ } }, "gaze": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz", - "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz", + "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=", "dev": true, "requires": { "globule": "^1.0.0" @@ -6335,6 +6839,15 @@ "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } + }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } } } }, @@ -6401,6 +6914,13 @@ "requires": { "min-document": "^2.19.0", "process": "~0.5.1" + }, + "dependencies": { + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + } } }, "globals": { @@ -6430,13 +6950,13 @@ } }, "globule": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz", - "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.0.tgz", + "integrity": "sha1-HcScaCLdnoovoAuiopUAboZkvQk=", "dev": true, "requires": { "glob": "~7.1.1", - "lodash": "~4.17.10", + "lodash": "~4.17.4", "minimatch": "~3.0.2" } }, @@ -6504,6 +7024,16 @@ "resolve": "~1.1.0" } }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, "resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", @@ -6528,6 +7058,14 @@ "dev": true, "requires": { "shelljs": "^0.5.3" + }, + "dependencies": { + "shelljs": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=", + "dev": true + } } }, "grunt-concurrent": { @@ -6564,17 +7102,6 @@ "requires": { "async": "^2.6.1", "rimraf": "^2.6.2" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - } } }, "grunt-contrib-connect": { @@ -6592,17 +7119,6 @@ "portscanner": "^2.2.0", "serve-index": "^1.9.1", "serve-static": "^1.13.2" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - } } }, "grunt-contrib-copy": { @@ -6775,6 +7291,14 @@ "lodash": "~4.17.10", "underscore.string": "~3.3.4", "which": "~1.3.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, "grunt-retro": { @@ -6811,6 +7335,14 @@ "requires": { "duplexer": "^0.1.1", "pify": "^4.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } } }, "handle-thing": { @@ -6836,11 +7368,11 @@ } }, "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "requires": { - "function-bind": "^1.1.1" + "function-bind": "^1.0.2" } }, "has-ansi": { @@ -6971,9 +7503,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "dev": true }, "hpack.js": { @@ -6986,6 +7518,38 @@ "obuf": "^1.0.0", "readable-stream": "^2.0.1", "wbuf": "^1.1.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "html-encoding-sniffer": { @@ -7059,15 +7623,9 @@ "util.promisify": "1.0.0" }, "dependencies": { - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", - "dev": true - }, "json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, @@ -7091,33 +7649,6 @@ "integrity": "sha512-4LU3IaTLS7hMhueYE6a6G+QuwFkIA9S+V9KCXttnJ9YnJ/Kpl+L7R7aH+nohw1jaf0KjaHqQ7Y2uXgsWNIIxQA==", "dev": true }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -7277,12 +7808,65 @@ "dev": true, "requires": { "postcss": "^7.0.14" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, "iferr": { "version": "0.1.5", @@ -7567,10 +8151,19 @@ "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", "dev": true }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" }, "is-data-descriptor": { "version": "0.1.4", @@ -7813,9 +8406,9 @@ } }, "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "isexe": { @@ -7866,9 +8459,9 @@ "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" }, "js-base64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", - "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.0.tgz", + "integrity": "sha512-wlEBIZ5LP8usDylWbDNhKPEFVFdI5hCHpnVoT/Ysvoi/PRhJENm/Rlh9TvjYB38HFfKZN7OzEbRjmjvLkFw11g==", "dev": true }, "js-crc": { @@ -7911,12 +8504,6 @@ "xmlcreate": "^2.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, "jsdoc": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.2.tgz", @@ -8018,6 +8605,12 @@ "xml-name-validator": "^3.0.0" }, "dependencies": { + "abab": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "dev": true + }, "acorn": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", @@ -8074,14 +8667,6 @@ "dev": true, "requires": { "minimist": "^1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "jsonfile": { @@ -8210,13 +8795,6 @@ "purepack": ">=1.0.4", "triplesec": "^4.0.3", "tweetnacl": "^0.13.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } } }, "kew": { @@ -8326,6 +8904,13 @@ "phin": "^2.9.1", "xhr": "^2.0.1", "xtend": "^4.0.0" + }, + "dependencies": { + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + } } }, "load-json-file": { @@ -8356,29 +8941,20 @@ "dev": true }, "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "dev": true, "requires": { - "big.js": "^5.2.2", + "big.js": "^3.1.3", "emojis-list": "^2.0.0", - "json5": "^1.0.1" + "json5": "^0.5.0" }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true } } @@ -8613,11 +9189,11 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "js-tokens": "^3.0.0" } }, "loud-rejection": { @@ -8637,25 +9213,15 @@ "dev": true }, "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" } }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } - }, "mamacro": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", @@ -8703,6 +9269,14 @@ "linkify-it": "^2.0.0", "mdurl": "^1.0.1", "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + } } }, "markdown-it-anchor": { @@ -8759,16 +9333,48 @@ } } }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, "meow": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", @@ -8785,14 +9391,6 @@ "read-pkg-up": "^1.0.1", "redent": "^1.0.0", "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "merge-descriptors": { @@ -8838,11 +9436,6 @@ "brorand": "^1.0.1" } }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, "mime-db": { "version": "1.40.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", @@ -8882,6 +9475,19 @@ "normalize-url": "1.9.1", "schema-utils": "^1.0.0", "webpack-sources": "^1.1.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "minimalistic-assert": { @@ -8906,9 +9512,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mississippi": { "version": "3.0.0", @@ -8985,6 +9591,13 @@ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } } }, "mkpath": { @@ -9150,7 +9763,8 @@ "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true + "dev": true, + "optional": true }, "nanomatch": { "version": "1.2.13", @@ -9321,17 +9935,6 @@ "vm-browserify": "^1.0.1" }, "dependencies": { - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", @@ -9350,6 +9953,12 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -9362,6 +9971,41 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -9370,15 +10014,6 @@ "requires": { "setimmediate": "^1.0.4" } - }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } } } }, @@ -9430,6 +10065,12 @@ "lru-cache": "^4.0.1", "which": "^1.2.9" } + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true } } }, @@ -9448,22 +10089,25 @@ } }, "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", + "is-builtin-module": "^1.0.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } }, "normalize-range": { "version": "0.1.2", @@ -9593,7 +10237,8 @@ "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true }, "object-visit": { "version": "1.0.1", @@ -9656,9 +10301,9 @@ } }, "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", "dev": true }, "once": { @@ -9686,9 +10331,9 @@ "dev": true }, "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz", + "integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==", "dev": true, "requires": { "is-wsl": "^1.1.0" @@ -9704,6 +10349,12 @@ "wordwrap": "~0.0.2" }, "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -9931,9 +10582,9 @@ } }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" }, "parallel-transform": { "version": "1.1.0", @@ -9944,6 +10595,38 @@ "cyclist": "~0.2.2", "inherits": "^2.0.3", "readable-stream": "^2.1.5" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "param-case": { @@ -10157,9 +10840,9 @@ "integrity": "sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==" }, "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -10225,6 +10908,14 @@ "async": "^1.5.2", "debug": "^2.2.0", "mkdirp": "0.5.x" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } } }, "portscanner": { @@ -10235,17 +10926,6 @@ "requires": { "async": "^2.6.0", "is-number-like": "^1.0.3" - }, - "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - } } }, "posix-character-classes": { @@ -10392,6 +11072,19 @@ "postcss": "^7.0.0", "postcss-load-config": "^2.0.0", "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "postcss-modules-extract-imports": { @@ -10431,6 +11124,59 @@ "requires": { "postcss": "^7.0.6", "postcss-selector-parser": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "postcss-modules-values": { @@ -10441,6 +11187,59 @@ "requires": { "icss-utils": "^4.0.0", "postcss": "^7.0.6" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz", + "integrity": "sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "postcss-selector-parser": { @@ -10487,11 +11286,6 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, - "process": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" - }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -10521,6 +11315,43 @@ "revalidator": "0.1.x", "utile": "0.3.x", "winston": "2.1.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", + "dev": true + }, + "winston": { + "version": "2.1.1", + "resolved": "http://registry.npmjs.org/winston/-/winston-2.1.1.tgz", + "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", + "dev": true, + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", + "dev": true + } + } + } } }, "proxy-addr": { @@ -10628,8 +11459,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "purepack": { "version": "1.0.5", @@ -10708,34 +11538,18 @@ "requires": { "bytes": "1", "string_decoder": "0.10" - }, - "dependencies": { - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } } }, "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "requires": { - "deep-extend": "^0.6.0", + "deep-extend": "^0.5.1", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "read": { @@ -10807,18 +11621,15 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "1.1.14", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" } }, "readdirp": { @@ -10830,6 +11641,38 @@ "graceful-fs": "^4.1.11", "micromatch": "^3.1.10", "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "redent": { @@ -10943,16 +11786,60 @@ "dev": true }, "renderkid": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.3.tgz", - "integrity": "sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.2.tgz", + "integrity": "sha512-FsygIxevi1jSiPY9h7vZmBFUbAOcbYm9UwyiLNdVsLRs/5We9Ob5NMPbGYUTWiLq5L+ezlVdE0A8bbME5CWTpg==", "dev": true, "requires": { "css-select": "^1.1.0", - "dom-converter": "^0.2", - "htmlparser2": "^3.3.0", + "dom-converter": "~0.2", + "htmlparser2": "~3.3.0", "strip-ansi": "^3.0.0", "utila": "^0.4.0" + }, + "dependencies": { + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + } } }, "repeat-element": { @@ -11002,6 +11889,20 @@ "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } } }, "request-progress": { @@ -11014,23 +11915,23 @@ } }, "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.13.1" } }, "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", "dev": true, "requires": { - "request-promise-core": "1.1.2", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" + "request-promise-core": "1.1.1", + "stealthy-require": "^1.1.0", + "tough-cookie": ">=2.3.3" } }, "require-directory": { @@ -11127,12 +12028,12 @@ "dev": true }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "^7.1.3" + "glob": "^7.0.5" } }, "ripemd160": { @@ -11230,9 +12131,9 @@ } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -11240,6 +12141,102 @@ "supports-color": "^5.3.0" } }, + "domelementtype": { + "version": "1.3.0", + "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=", + "dev": true + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "htmlparser2": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.0.tgz", + "integrity": "sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.0.6" + } + }, + "postcss": { + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "readable-stream": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.0.6.tgz", + "integrity": "sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -11275,14 +12272,6 @@ "neo-async": "^2.5.0", "pify": "^3.0.0", "semver": "^5.5.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "sax": { @@ -11291,13 +12280,12 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "schema-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", - "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", "dev": true, "requires": { "ajv": "^6.1.0", - "ajv-errors": "^1.0.0", "ajv-keywords": "^3.1.0" } }, @@ -11351,9 +12339,9 @@ } }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "send": { "version": "0.17.1", @@ -11389,6 +12377,12 @@ "toidentifier": "1.0.0" } }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -11521,12 +12515,6 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shelljs": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=", - "dev": true - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -11861,9 +12849,9 @@ "dev": true }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -11961,6 +12949,15 @@ "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } + }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } } } }, @@ -12009,9 +13006,9 @@ "integrity": "sha1-mItJTQ3JwxkAX9rJZj1jOO/tHyI=" }, "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -12025,6 +13022,12 @@ "tweetnacl": "~0.14.0" }, "dependencies": { + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -12090,6 +13093,38 @@ "dev": true, "requires": { "readable-stream": "^2.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stealthy-require": { @@ -12106,6 +13141,38 @@ "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-each": { @@ -12129,6 +13196,38 @@ "readable-stream": "^2.3.6", "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "stream-shift": { @@ -12187,13 +13286,10 @@ } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true }, "strip-ansi": { "version": "3.0.1", @@ -12241,6 +13337,27 @@ "requires": { "loader-utils": "^1.1.0", "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + } } }, "supports-color": { @@ -12256,6 +13373,34 @@ "requires": { "file-loader": "4.0.0", "loader-utils": "1.2.3" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + } } }, "symbol-tree": { @@ -12276,6 +13421,18 @@ "string-width": "^3.0.0" }, "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", @@ -12363,6 +13520,14 @@ "commander": "^2.19.0", "source-map": "~0.6.1", "source-map-support": "~0.5.10" + }, + "dependencies": { + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + } } }, "terser-webpack-plugin": { @@ -12381,6 +13546,45 @@ "terser": "^4.0.0", "webpack-sources": "^1.3.0", "worker-farm": "^1.7.0" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } } }, "text-table": { @@ -12414,6 +13618,38 @@ "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "thunkify": { @@ -12430,7 +13666,7 @@ }, "timers-browserify": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz", + "resolved": "http://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz", "integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=", "dev": true, "requires": { @@ -12798,17 +14034,6 @@ "dev": true, "requires": { "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } } }, "unpipe": { @@ -12854,6 +14079,12 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true } } }, @@ -12918,6 +14149,17 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } } } }, @@ -12951,18 +14193,18 @@ } }, "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "dev": true, "requires": { - "inherits": "2.0.1" + "inherits": "2.0.3" }, "dependencies": { "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true } } @@ -13030,9 +14272,9 @@ "dev": true }, "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -13140,14 +14382,21 @@ "webpack-sources": "^1.3.0" }, "dependencies": { - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "dev": true, "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" } } } @@ -13173,6 +14422,12 @@ "ws": "^6.0.0" }, "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -13193,6 +14448,12 @@ "supports-color": "^5.3.0" } }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -13278,6 +14539,12 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -13330,6 +14597,15 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "opn": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", + "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -13341,6 +14617,17 @@ "mem": "^4.0.0" } }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, "semver": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.2.tgz", @@ -13451,6 +14738,36 @@ "xtend": "^4.0.0" }, "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "ws": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", @@ -13474,9 +14791,9 @@ } }, "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz", + "integrity": "sha512-5YSO1nMd5D1hY3WzAQV3PzZL83W3YeyR1yW9PcH26Weh1t+Vzh9B6XkDh7aXm83HBZ4nSMvkjvN2H2ySWIvBgw==", "dev": true }, "whatwg-url": { @@ -13491,9 +14808,9 @@ } }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -13514,41 +14831,6 @@ "string-width": "^1.0.2 || 2" } }, - "winston": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz", - "integrity": "sha1-PJNJ0ZYgf9G9/51LxD73JRDjoS4=", - "dev": true, - "requires": { - "async": "~1.0.0", - "colors": "1.0.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "pkginfo": "0.3.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", - "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - }, - "pkginfo": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", - "dev": true - } - } - }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -13571,18 +14853,6 @@ "requires": { "loader-utils": "^1.0.0", "schema-utils": "^0.4.0" - }, - "dependencies": { - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - } } }, "wrap-ansi": { @@ -13670,13 +14940,15 @@ "requires": { "sax": ">=0.6.0", "xmlbuilder": "~9.0.1" + }, + "dependencies": { + "xmlbuilder": { + "version": "9.0.7", + "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } } }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" - }, "xmlcreate": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.1.tgz", diff --git a/package.json b/package.json index 5e3d9c492a..66a00415da 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "url": "https://github.com/gchq/CyberChef/" }, "main": "build/node/CyberChef.js", + "module": "src/node/index.mjs", "bugs": "https://github.com/gchq/CyberChef/issues", "browserslist": [ "Chrome >= 40", @@ -42,7 +43,7 @@ "autoprefixer": "^9.6.0", "babel-eslint": "^10.0.2", "babel-loader": "^8.0.6", - "babel-plugin-syntax-dynamic-import": "^6.18.0", + "babel-plugin-dynamic-import-node": "^2.2.0", "chromedriver": "^75.0.1", "colors": "^1.3.3", "css-loader": "^3.0.0", @@ -155,7 +156,11 @@ "scripts": { "start": "grunt dev", "build": "grunt prod", + "node": "NODE_ENV=development grunt node", + "node-prod": "NODE_ENV=production grunt node", + "repl": "grunt node && node build/node/CyberChef-repl.js", "test": "grunt test", + "test-node": "grunt test-node", "testui": "grunt testui", "docs": "grunt docs", "lint": "grunt lint", diff --git a/src/core/Chef.mjs b/src/core/Chef.mjs index daab2ab19f..46e1c78f19 100755 --- a/src/core/Chef.mjs +++ b/src/core/Chef.mjs @@ -7,6 +7,7 @@ import Dish from "./Dish"; import Recipe from "./Recipe"; import log from "loglevel"; +import { isWorkerEnvironment } from "./Utils"; /** * The main controller for CyberChef. @@ -45,7 +46,7 @@ class Chef { let error = false, progress = 0; - if (containsFc && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); + if (containsFc && isWorkerEnvironment()) self.setOption("attemptHighlight", false); // Load data const type = input instanceof ArrayBuffer ? Dish.ARRAY_BUFFER : Dish.STRING; diff --git a/src/core/Dish.mjs b/src/core/Dish.mjs index 1e2331eb67..d393dd401b 100755 --- a/src/core/Dish.mjs +++ b/src/core/Dish.mjs @@ -5,12 +5,24 @@ * @license Apache-2.0 */ -import Utils from "./Utils"; +import Utils, { isNodeEnvironment } from "./Utils"; import DishError from "./errors/DishError"; import BigNumber from "bignumber.js"; -import {detectFileType} from "./lib/FileType"; +import { detectFileType } from "./lib/FileType"; import log from "loglevel"; +import { + DishByteArray, + DishBigNumber, + DishFile, + DishHTML, + DishJSON, + DishListFile, + DishNumber, + DishString, +} from "./dishTypes"; + + /** * The data being operated on by each operation. */ @@ -19,16 +31,27 @@ class Dish { /** * Dish constructor * - * @param {Dish} [dish=null] - A dish to clone + * @param {Dish || *} [dishOrInput=null] - A dish to clone OR an object + * literal to make into a dish + * @param {Enum} [type=null] (optional) - A type to accompany object + * literal input */ - constructor(dish=null) { + constructor(dishOrInput=null, type = null) { this.value = new ArrayBuffer(0); this.type = Dish.ARRAY_BUFFER; - if (dish && - Object.prototype.hasOwnProperty.call(dish, "value") && - Object.prototype.hasOwnProperty.call(dish, "type")) { - this.set(dish.value, dish.type); + // Case: dishOrInput is dish object + if (dishOrInput && + Object.prototype.hasOwnProperty.call(dishOrInput, "value") && + Object.prototype.hasOwnProperty.call(dishOrInput, "type")) { + this.set(dishOrInput.value, dishOrInput.type); + // input and type defined separately + } else if (dishOrInput && type !== null) { + this.set(dishOrInput, type); + // No type declared, so infer it. + } else if (dishOrInput) { + const inferredType = Dish.typeEnum(dishOrInput.constructor.name); + this.set(dishOrInput, inferredType); } } @@ -57,6 +80,7 @@ class Dish { case "big number": return Dish.BIG_NUMBER; case "json": + case "object": // object constructor name. To allow JSON input in node. return Dish.JSON; case "file": return Dish.FILE; @@ -100,6 +124,43 @@ class Dish { } + /** + * Returns the value of the data in the type format specified. + * + * If running in a browser, get is asynchronous. + * + * @param {number} type - The data type of value, see Dish enums. + * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8. + * @returns {* | Promise} - (Broswer) A promise | (Node) value of dish in given type + */ + get(type, notUTF8=false) { + if (typeof type === "string") { + type = Dish.typeEnum(type); + } + + if (this.type !== type) { + + // Node environment => _translate is sync + if (isNodeEnvironment()) { + this._translate(type, notUTF8); + return this.value; + + // Browser environment => _translate is async + } else { + return new Promise((resolve, reject) => { + this._translate(type, notUTF8) + .then(() => { + resolve(this.value); + }) + .catch(reject); + }); + } + } + + return this.value; + } + + /** * Sets the data value and type and then validates them. * @@ -123,22 +184,20 @@ class Dish { } } - /** - * Returns the value of the data in the type format specified. + * Returns the Dish as the given type, without mutating the original dish. + * + * If running in a browser, get is asynchronous. + * + * @Node * * @param {number} type - The data type of value, see Dish enums. * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8. - * @returns {*} - The value of the output data. + * @returns {Dish | Promise} - (Broswer) A promise | (Node) value of dish in given type */ - async get(type, notUTF8=false) { - if (typeof type === "string") { - type = Dish.typeEnum(type); - } - if (this.type !== type) { - await this._translate(type, notUTF8); - } - return this.value; + presentAs(type, notUTF8=false) { + const clone = this.clone(); + return clone.get(type, notUTF8); } @@ -189,98 +248,6 @@ class Dish { return title.slice(0, maxLength); } - - /** - * Translates the data to the given type format. - * - * @param {number} toType - The data type of value, see Dish enums. - * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8. - */ - async _translate(toType, notUTF8=false) { - log.debug(`Translating Dish from ${Dish.enumLookup(this.type)} to ${Dish.enumLookup(toType)}`); - - // Convert data to intermediate ArrayBuffer type - try { - switch (this.type) { - case Dish.STRING: - this.value = this.value ? Utils.strToArrayBuffer(this.value) : new ArrayBuffer; - break; - case Dish.NUMBER: - this.value = typeof this.value === "number" ? Utils.strToArrayBuffer(this.value.toString()) : new ArrayBuffer; - break; - case Dish.HTML: - this.value = this.value ? Utils.strToArrayBuffer(Utils.unescapeHtml(Utils.stripHtmlTags(this.value, true))) : new ArrayBuffer; - break; - case Dish.BYTE_ARRAY: - this.value = new Uint8Array(this.value).buffer; - break; - case Dish.BIG_NUMBER: - this.value = BigNumber.isBigNumber(this.value) ? Utils.strToArrayBuffer(this.value.toFixed()) : new ArrayBuffer; - break; - case Dish.JSON: - this.value = this.value ? Utils.strToArrayBuffer(JSON.stringify(this.value, null, 4)) : new ArrayBuffer; - break; - case Dish.FILE: - this.value = (await Utils.readFile(this.value)).buffer; - break; - case Dish.LIST_FILE: - this.value = await Promise.all(this.value.map(async f => Utils.readFile(f))); - this.value = concatenateTypedArrays(...this.value).buffer; - break; - default: - break; - } - } catch (err) { - throw new DishError(`Error translating from ${Dish.enumLookup(this.type)} to ArrayBuffer: ${err}`); - } - - this.type = Dish.ARRAY_BUFFER; - - // Convert from ArrayBuffer to toType - try { - switch (toType) { - case Dish.STRING: - case Dish.HTML: - this.value = this.value ? Utils.arrayBufferToStr(this.value, !notUTF8) : ""; - this.type = Dish.STRING; - break; - case Dish.NUMBER: - this.value = this.value ? parseFloat(Utils.arrayBufferToStr(this.value, !notUTF8)) : 0; - this.type = Dish.NUMBER; - break; - case Dish.BYTE_ARRAY: - this.value = Array.prototype.slice.call(new Uint8Array(this.value)); - this.type = Dish.ARRAY_BUFFER; - break; - case Dish.BIG_NUMBER: - try { - this.value = new BigNumber(Utils.arrayBufferToStr(this.value, !notUTF8)); - } catch (err) { - this.value = new BigNumber(NaN); - } - this.type = Dish.BIG_NUMBER; - break; - case Dish.JSON: - this.value = JSON.parse(Utils.arrayBufferToStr(this.value, !notUTF8)); - this.type = Dish.JSON; - break; - case Dish.FILE: - this.value = new File(this.value, "unknown"); - this.type = Dish.FILE; - break; - case Dish.LIST_FILE: - this.value = [new File(this.value, "unknown")]; - this.type = Dish.LIST_FILE; - break; - default: - break; - } - } catch (err) { - throw new DishError(`Error translating from ArrayBuffer to ${Dish.enumLookup(toType)}: ${err}`); - } - } - - /** * Validates that the value is the type that has been specified. * May have to disable parts of BYTE_ARRAY validation if it effects performance. @@ -290,7 +257,7 @@ class Dish { valid() { switch (this.type) { case Dish.BYTE_ARRAY: - if (!(this.value instanceof Array)) { + if (!(this.value instanceof Uint8Array) && !(this.value instanceof Array)) { return false; } @@ -418,26 +385,109 @@ class Dish { return newDish; } -} + /** + * Translates the data to the given type format. + * + * If running in the browser, _translate is asynchronous. + * + * @param {number} toType - The data type of value, see Dish enums. + * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8. + * @returns {Promise || undefined} + */ + _translate(toType, notUTF8=false) { + log.debug(`Translating Dish from ${Dish.enumLookup(this.type)} to ${Dish.enumLookup(toType)}`); -/** - * Concatenates a list of Uint8Arrays together - * - * @param {Uint8Array[]} arrays - * @returns {Uint8Array} - */ -function concatenateTypedArrays(...arrays) { - let totalLength = 0; - for (const arr of arrays) { - totalLength += arr.length; + // Node environment => translate is sync + if (isNodeEnvironment()) { + this._toArrayBuffer(); + this.type = Dish.ARRAY_BUFFER; + this._fromArrayBuffer(toType, notUTF8); + + // Browser environment => translate is async + } else { + return new Promise((resolve, reject) => { + this._toArrayBuffer() + .then(() => this.type = Dish.ARRAY_BUFFER) + .then(() => { + this._fromArrayBuffer(toType); + resolve(); + }) + .catch(reject); + }); + } + + } + + /** + * Convert this.value to an ArrayBuffer + * + * If running in a browser, _toByteArray is asynchronous. + * + * @returns {Promise || undefined} + */ + _toArrayBuffer() { + // Using 'bind' here to allow this.value to be mutated within translation functions + const toByteArrayFuncs = { + browser: { + [Dish.STRING]: () => Promise.resolve(DishString.toArrayBuffer.bind(this)()), + [Dish.NUMBER]: () => Promise.resolve(DishNumber.toArrayBuffer.bind(this)()), + [Dish.HTML]: () => Promise.resolve(DishHTML.toArrayBuffer.bind(this)()), + [Dish.ARRAY_BUFFER]: () => Promise.resolve(), + [Dish.BIG_NUMBER]: () => Promise.resolve(DishBigNumber.toArrayBuffer.bind(this)()), + [Dish.JSON]: () => Promise.resolve(DishJSON.toArrayBuffer.bind(this)()), + [Dish.FILE]: () => DishFile.toArrayBuffer.bind(this)(), + [Dish.LIST_FILE]: () => Promise.resolve(DishListFile.toArrayBuffer.bind(this)()), + [Dish.BYTE_ARRAY]: () => Promise.resolve(DishByteArray.toArrayBuffer.bind(this)()), + }, + node: { + [Dish.STRING]: () => DishString.toArrayBuffer.bind(this)(), + [Dish.NUMBER]: () => DishNumber.toArrayBuffer.bind(this)(), + [Dish.HTML]: () => DishHTML.toArrayBuffer.bind(this)(), + [Dish.ARRAY_BUFFER]: () => {}, + [Dish.BIG_NUMBER]: () => DishBigNumber.toArrayBuffer.bind(this)(), + [Dish.JSON]: () => DishJSON.toArrayBuffer.bind(this)(), + [Dish.FILE]: () => DishFile.toArrayBuffer.bind(this)(), + [Dish.LIST_FILE]: () => DishListFile.toArrayBuffer.bind(this)(), + [Dish.BYTE_ARRAY]: () => DishByteArray.toArrayBuffer.bind(this)(), + } + }; + + try { + return toByteArrayFuncs[isNodeEnvironment() && "node" || "browser"][this.type](); + } catch (err) { + throw new DishError(`Error translating from ${Dish.enumLookup(this.type)} to ArrayBuffer: ${err}`); + } } - const result = new Uint8Array(totalLength); - let offset = 0; - for (const arr of arrays) { - result.set(arr, offset); - offset += arr.length; + + /** + * Convert this.value to the given type from ArrayBuffer + * + * @param {number} toType - the Dish enum to convert to + * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8. + */ + _fromArrayBuffer(toType, notUTF8) { + + // Using 'bind' here to allow this.value to be mutated within translation functions + const toTypeFunctions = { + [Dish.STRING]: () => DishString.fromArrayBuffer.bind(this)(notUTF8), + [Dish.NUMBER]: () => DishNumber.fromArrayBuffer.bind(this)(notUTF8), + [Dish.HTML]: () => DishHTML.fromArrayBuffer.bind(this)(notUTF8), + [Dish.ARRAY_BUFFER]: () => {}, + [Dish.BIG_NUMBER]: () => DishBigNumber.fromArrayBuffer.bind(this)(notUTF8), + [Dish.JSON]: () => DishJSON.fromArrayBuffer.bind(this)(notUTF8), + [Dish.FILE]: () => DishFile.fromArrayBuffer.bind(this)(), + [Dish.LIST_FILE]: () => DishListFile.fromArrayBuffer.bind(this)(), + [Dish.BYTE_ARRAY]: () => DishByteArray.fromArrayBuffer.bind(this)(), + }; + + try { + toTypeFunctions[toType](); + this.type = toType; + } catch (err) { + throw new DishError(`Error translating from ArrayBuffer to ${Dish.enumLookup(toType)}: ${err}`); + } } - return result; + } diff --git a/src/core/Recipe.mjs b/src/core/Recipe.mjs index bed6845c83..15e51529c1 100755 --- a/src/core/Recipe.mjs +++ b/src/core/Recipe.mjs @@ -9,6 +9,7 @@ import OperationError from "./errors/OperationError"; import Operation from "./Operation"; import DishError from "./errors/DishError"; import log from "loglevel"; +import { isWorkerEnvironment } from "./Utils"; // Cache container for modules let modules = null; @@ -202,7 +203,7 @@ class Recipe { input = await dish.get(op.inputType); log.debug(`Executing operation '${op.name}'`); - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { self.sendStatusMessage(`Baking... (${i+1}/${this.opList.length})`); self.sendProgressMessage(i + 1, this.opList.length); } diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index 625d74361a..fa974622e8 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -10,7 +10,6 @@ import {fromHex} from "./lib/Hex"; import {fromDecimal} from "./lib/Decimal"; import {fromBinary} from "./lib/Binary"; - /** * Utility functions for use in operations, the core framework and the stage. */ @@ -95,7 +94,7 @@ class Utils { const paddedBytes = new Array(numBytes); paddedBytes.fill(padByte); - Array.prototype.map.call(arr, function(b, i) { + [...arr].forEach((b, i) => { paddedBytes[i] = b; }); @@ -174,7 +173,7 @@ class Utils { * @returns {string} */ static printable(str, preserveWs=false) { - if (ENVIRONMENT_IS_WEB() && window.app && !window.app.options.treatAsUtf8) { + if (isWebEnvironment() && window.app && !window.app.options.treatAsUtf8) { str = Utils.byteArrayToChars(Utils.strToByteArray(str)); } @@ -421,9 +420,9 @@ class Utils { const utf8Str = utf8.encode(str); if (str.length !== utf8Str.length) { - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { self.setOption("attemptHighlight", false); - } else if (ENVIRONMENT_IS_WEB()) { + } else if (isWebEnvironment()) { window.app.options.attemptHighlight = false; } } @@ -476,9 +475,9 @@ class Utils { const utf8Str = utf8.encode(str); if (str.length !== utf8Str.length) { - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { self.setOption("attemptHighlight", false); - } else if (ENVIRONMENT_IS_WEB()) { + } else if (isWebEnvironment()) { window.app.options.attemptHighlight = false; } } @@ -538,11 +537,10 @@ class Utils { const str = Utils.byteArrayToChars(byteArray); try { const utf8Str = utf8.decode(str); - if (str.length !== utf8Str.length) { - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { self.setOption("attemptHighlight", false); - } else if (ENVIRONMENT_IS_WEB()) { + } else if (isWebEnvironment()) { window.app.options.attemptHighlight = false; } } @@ -995,7 +993,7 @@ class Utils { /** * Reads a File and returns the data as a Uint8Array. * - * @param {File} file + * @param {File | for node: array|arrayBuffer|buffer|string} file * @returns {Uint8Array} * * @example @@ -1003,33 +1001,57 @@ class Utils { * await Utils.readFile(new File(["hello"], "test")) */ static readFile(file) { - return new Promise((resolve, reject) => { - const reader = new FileReader(); - const data = new Uint8Array(file.size); - let offset = 0; - const CHUNK_SIZE = 10485760; // 10MiB - - const seek = function() { - if (offset >= file.size) { - resolve(data); - return; - } - const slice = file.slice(offset, offset + CHUNK_SIZE); - reader.readAsArrayBuffer(slice); - }; - reader.onload = function(e) { - data.set(new Uint8Array(reader.result), offset); - offset += CHUNK_SIZE; + if (isNodeEnvironment()) { + return Buffer.from(file).buffer; + + } else { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + const data = new Uint8Array(file.size); + let offset = 0; + const CHUNK_SIZE = 10485760; // 10MiB + + const seek = function() { + if (offset >= file.size) { + resolve(data); + return; + } + const slice = file.slice(offset, offset + CHUNK_SIZE); + reader.readAsArrayBuffer(slice); + }; + + reader.onload = function(e) { + data.set(new Uint8Array(reader.result), offset); + offset += CHUNK_SIZE; + seek(); + }; + + reader.onerror = function(e) { + reject(reader.error.message); + }; + seek(); - }; + }); + } + } - reader.onerror = function(e) { - reject(reader.error.message); - }; + /** + * Synchronously read the raw data from a File object. + * + * Only works in the Node environment + * + * @param {File} file - a File shim object (see src/node/File.mjs) + * @returns {ArrayBuffer} the data from the file in an ArrayBuffer + * @throws {TypeError} thrown if the method is called from a browser environment + */ + static readFileSync(file) { + if (!isNodeEnvironment()) { + throw new TypeError("Browser environment cannot support readFileSync"); + } - seek(); - }); + const arrayBuffer = Uint8Array.from(file.data); + return arrayBuffer.buffer; } @@ -1131,6 +1153,30 @@ class Utils { } +/** + * Check whether the code is running in a Node.js environment + * @returns {boolean} + */ +export function isNodeEnvironment() { + return typeof process !== "undefined" && process.versions != null && process.versions.node != null; +} + +/** + * Check whether the code is running in a web environment + * @returns {boolean} +*/ +export function isWebEnvironment() { + return typeof window === "object"; +} + +/** + * Check whether the code is running in a worker + * @returns {boolean} +*/ +export function isWorkerEnvironment() { + return typeof importScripts === "function"; +} + export default Utils; @@ -1248,12 +1294,13 @@ String.prototype.count = function(chr) { * @param {string} msg */ export function sendStatusMessage(msg) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage(msg); - else if (ENVIRONMENT_IS_WEB()) + else if (isWebEnvironment()) app.alert(msg, 10000); - else if (ENVIRONMENT_IS_NODE()) - log.debug(msg); + else if (isNodeEnvironment()) + // eslint-disable-next-line no-console + console.debug(msg); } diff --git a/src/core/dishTypes/DishBigNumber.mjs b/src/core/dishTypes/DishBigNumber.mjs new file mode 100644 index 0000000000..d6e19f20d0 --- /dev/null +++ b/src/core/dishTypes/DishBigNumber.mjs @@ -0,0 +1,39 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishType from "./DishType"; +import Utils from "../Utils"; +import BigNumber from "bignumber.js"; + +/** + * translation methods for BigNumber Dishes + */ +class DishBigNumber extends DishType { + + /** + * convert the given value to a ArrayBuffer + * @param {BigNumber} value + */ + static toArrayBuffer() { + DishBigNumber.checkForValue(this.value); + this.value = BigNumber.isBigNumber(this.value) ? Utils.strToArrayBuffer(this.value.toFixed()) : new ArrayBuffer; + } + + /** + * convert the given value from a ArrayBuffer + * @param {boolean} notUTF8 + */ + static fromArrayBuffer(notUTF8) { + DishBigNumber.checkForValue(this.value); + try { + this.value = new BigNumber(Utils.arrayBufferToStr(this.value, !notUTF8)); + } catch (err) { + this.value = new BigNumber(NaN); + } + } +} + +export default DishBigNumber; diff --git a/src/core/dishTypes/DishByteArray.mjs b/src/core/dishTypes/DishByteArray.mjs new file mode 100644 index 0000000000..8e66888211 --- /dev/null +++ b/src/core/dishTypes/DishByteArray.mjs @@ -0,0 +1,31 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishType from "./DishType"; + +/** + * Translation methods for ArrayBuffer Dishes + */ +class DishByteArray extends DishType { + + /** + * convert the given value to a ArrayBuffer + */ + static toArrayBuffer() { + DishByteArray.checkForValue(this.value); + this.value = new Uint8Array(this.value).buffer; + } + + /** + * convert the given value from a ArrayBuffer + */ + static fromArrayBuffer() { + DishByteArray.checkForValue(this.value); + this.value = Array.prototype.slice.call(new Uint8Array(this.value)); + } +} + +export default DishByteArray; diff --git a/src/core/dishTypes/DishFile.mjs b/src/core/dishTypes/DishFile.mjs new file mode 100644 index 0000000000..91fac9aff9 --- /dev/null +++ b/src/core/dishTypes/DishFile.mjs @@ -0,0 +1,42 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishType from "./DishType"; +import Utils, { isNodeEnvironment } from "../Utils"; + +/** + * Translation methods for file Dishes + */ +class DishFile extends DishType { + + /** + * convert the given value to an ArrayBuffer + * @param {File} value + */ + static toArrayBuffer() { + DishFile.checkForValue(this.value); + if (isNodeEnvironment()) { + this.value = Utils.readFileSync(this.value); + } else { + return new Promise((resolve, reject) => { + Utils.readFile(this.value) + .then(v => this.value = v.buffer) + .then(resolve) + .catch(reject); + }); + } + } + + /** + * convert the given value from an ArrayBuffer + */ + static fromArrayBuffer() { + DishFile.checkForValue(this.value); + this.value = new File(this.value, "unknown"); + } +} + +export default DishFile; diff --git a/src/core/dishTypes/DishHTML.mjs b/src/core/dishTypes/DishHTML.mjs new file mode 100644 index 0000000000..369357edc0 --- /dev/null +++ b/src/core/dishTypes/DishHTML.mjs @@ -0,0 +1,26 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishString from "./DishString"; +import Utils from "../Utils"; + +/** + * Translation methods for HTML Dishes + */ +class DishHTML extends DishString { + + /** + * convert the given value to a ArrayBuffer + * @param {String} value + */ + static toArrayBuffer() { + DishHTML.checkForValue(this.value); + this.value = this.value ? Utils.strToArrayBuffer(Utils.unescapeHtml(Utils.stripHtmlTags(this.value, true))) : new ArrayBuffer; + } + +} + +export default DishHTML; diff --git a/src/core/dishTypes/DishJSON.mjs b/src/core/dishTypes/DishJSON.mjs new file mode 100644 index 0000000000..e15475bf2b --- /dev/null +++ b/src/core/dishTypes/DishJSON.mjs @@ -0,0 +1,33 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishType from "./DishType"; +import Utils from "../Utils"; + +/** + * Translation methods for JSON dishes + */ +class DishJSON extends DishType { + + /** + * convert the given value to a ArrayBuffer + */ + static toArrayBuffer() { + DishJSON.checkForValue(this.value); + this.value = this.value ? Utils.strToArrayBuffer(JSON.stringify(this.value, null, 4)) : new ArrayBuffer; + } + + /** + * convert the given value from a ArrayBuffer + * @param {boolean} notUTF8 + */ + static fromArrayBuffer(notUTF8) { + DishJSON.checkForValue(this.value); + this.value = JSON.parse(Utils.arrayBufferToStr(this.value, !notUTF8)); + } +} + +export default DishJSON; diff --git a/src/core/dishTypes/DishListFile.mjs b/src/core/dishTypes/DishListFile.mjs new file mode 100644 index 0000000000..1a7d75f7be --- /dev/null +++ b/src/core/dishTypes/DishListFile.mjs @@ -0,0 +1,58 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import DishType from "./DishType"; +import { isNodeEnvironment } from "../Utils.mjs"; + + +/** + * Translation methods for ListFile Dishes + */ +class DishListFile extends DishType { + + /** + * convert the given value to a ArrayBuffer + */ + static toArrayBuffer() { + DishListFile.checkForValue(this.value); + + if (isNodeEnvironment()) { + this.value = this.value.map(file => Uint8Array.from(file.data)); + } + this.value = DishListFile.concatenateTypedArrays(...this.value).buffer; + } + + /** + * convert the given value from a ArrayBuffer + */ + static fromArrayBuffer() { + DishListFile.checkForValue(this.value); + this.value = [new File(this.value, "unknown")]; + } + + + /** + * Concatenates a list of Uint8Arrays together + * + * @param {Uint8Array[]} arrays + * @returns {Uint8Array} + */ + static concatenateTypedArrays(...arrays) { + let totalLength = 0; + for (const arr of arrays) { + totalLength += arr.length; + } + const result = new Uint8Array(totalLength); + let offset = 0; + for (const arr of arrays) { + result.set(arr, offset); + offset += arr.length; + } + return result; + } +} + +export default DishListFile; diff --git a/src/core/dishTypes/DishNumber.mjs b/src/core/dishTypes/DishNumber.mjs new file mode 100644 index 0000000000..0bd6ffc19a --- /dev/null +++ b/src/core/dishTypes/DishNumber.mjs @@ -0,0 +1,34 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + + +import DishType from "./DishType"; +import Utils from "../Utils"; + +/** + * Translation methods for number dishes + */ +class DishNumber extends DishType { + + /** + * convert the given value to a ArrayBuffer + */ + static toArrayBuffer() { + DishNumber.checkForValue(this.value); + this.value = typeof this.value === "number" ? Utils.strToArrayBuffer(this.value.toString()) : new ArrayBuffer; + } + + /** + * convert the given value from a ArrayBuffer + * @param {boolean} notUTF8 + */ + static fromArrayBuffer(notUTF8) { + DishNumber.checkForValue(this.value); + this.value = this.value ? parseFloat(Utils.arrayBufferToStr(this.value, !notUTF8)) : 0; + } +} + +export default DishNumber; diff --git a/src/core/dishTypes/DishString.mjs b/src/core/dishTypes/DishString.mjs new file mode 100644 index 0000000000..3e32cfaa7a --- /dev/null +++ b/src/core/dishTypes/DishString.mjs @@ -0,0 +1,34 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + + +import DishType from "./DishType"; +import Utils from "../Utils"; + +/** + * Translation methods for string dishes + */ +class DishString extends DishType { + + /** + * convert the given value to a ArrayBuffer + */ + static toArrayBuffer() { + DishString.checkForValue(this.value); + this.value = this.value ? Utils.strToArrayBuffer(this.value) : new ArrayBuffer; + } + + /** + * convert the given value from a ArrayBuffer + * @param {boolean} notUTF8 + */ + static fromArrayBuffer(notUTF8) { + DishString.checkForValue(this.value); + this.value = this.value ? Utils.arrayBufferToStr(this.value, !notUTF8) : ""; + } +} + +export default DishString; diff --git a/src/core/dishTypes/DishType.mjs b/src/core/dishTypes/DishType.mjs new file mode 100644 index 0000000000..849b575676 --- /dev/null +++ b/src/core/dishTypes/DishType.mjs @@ -0,0 +1,39 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + + +/** + * Abstract class for dish translation methods + */ +class DishType { + + /** + * Warn translations dont work without value from bind + */ + static checkForValue(value) { + if (value === undefined) { + throw new Error("only use translation methods with .bind"); + } + } + + /** + * convert the given value to a ArrayBuffer + * @param {*} value + */ + static toArrayBuffer() { + throw new Error("toArrayBuffer has not been implemented"); + } + + /** + * convert the given value from a ArrayBuffer + * @param {boolean} notUTF8 + */ + static fromArrayBuffer(notUTF8=undefined) { + throw new Error("fromArrayBuffer has not been implemented"); + } +} + +export default DishType; diff --git a/src/core/dishTypes/index.mjs b/src/core/dishTypes/index.mjs new file mode 100644 index 0000000000..1443a4f885 --- /dev/null +++ b/src/core/dishTypes/index.mjs @@ -0,0 +1,26 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + + +import DishByteArray from "./DishByteArray"; +import DishBigNumber from "./DishBigNumber"; +import DishFile from "./DishFile"; +import DishHTML from "./DishHTML"; +import DishJSON from "./DishJSON"; +import DishListFile from "./DishListFile"; +import DishNumber from "./DishNumber"; +import DishString from "./DishString"; + +export { + DishByteArray, + DishBigNumber, + DishFile, + DishHTML, + DishJSON, + DishListFile, + DishNumber, + DishString, +}; diff --git a/src/core/errors/ExcludedOperationError.mjs b/src/core/errors/ExcludedOperationError.mjs new file mode 100644 index 0000000000..2972c31d0c --- /dev/null +++ b/src/core/errors/ExcludedOperationError.mjs @@ -0,0 +1,25 @@ +/** + * Custom error type for handling operation that isnt included in node.js API + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ +class ExcludedOperationError extends Error { + /** + * Standard error constructor. Adds no new behaviour. + * + * @param args - Standard error args + */ + constructor(...args) { + super(...args); + + this.type = "ExcludedOperationError"; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, ExcludedOperationError); + } + } +} + +export default ExcludedOperationError; diff --git a/src/core/lib/Magic.mjs b/src/core/lib/Magic.mjs index f680aa2b0b..00c76f8531 100644 --- a/src/core/lib/Magic.mjs +++ b/src/core/lib/Magic.mjs @@ -1,5 +1,5 @@ import OperationConfig from "../config/OperationConfig.json"; -import Utils from "../Utils"; +import Utils, { isWorkerEnvironment } from "../Utils"; import Recipe from "../Recipe"; import Dish from "../Dish"; import {detectFileType} from "./FileType"; @@ -395,7 +395,7 @@ class Magic { const dish = new Dish(); dish.set(input, Dish.ARRAY_BUFFER); - if (ENVIRONMENT_IS_WORKER()) self.loadRequiredModules(recipeConfig); + if (isWorkerEnvironment()) self.loadRequiredModules(recipeConfig); const recipe = new Recipe(recipeConfig); try { diff --git a/src/core/lib/PGP.mjs b/src/core/lib/PGP.mjs index 1654b38041..d833409ff0 100644 --- a/src/core/lib/PGP.mjs +++ b/src/core/lib/PGP.mjs @@ -11,6 +11,7 @@ */ import OperationError from "../errors/OperationError"; +import { isWorkerEnvironment } from "../Utils"; import kbpgp from "kbpgp"; import * as es6promisify from "es6-promisify"; const promisify = es6promisify.default ? es6promisify.default.promisify : es6promisify.promisify; @@ -45,7 +46,7 @@ export const ASP = kbpgp.ASP({ msg = `Stage: ${info.what}`; } - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage(msg); } }); diff --git a/src/core/operations/AddTextToImage.mjs b/src/core/operations/AddTextToImage.mjs index 97b2f7995c..430ce5523d 100644 --- a/src/core/operations/AddTextToImage.mjs +++ b/src/core/operations/AddTextToImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -131,7 +132,7 @@ class AddTextToImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Adding text to image..."); const fontsMap = {}; diff --git a/src/core/operations/Bcrypt.mjs b/src/core/operations/Bcrypt.mjs index 36a2060789..40bd16721b 100644 --- a/src/core/operations/Bcrypt.mjs +++ b/src/core/operations/Bcrypt.mjs @@ -6,6 +6,7 @@ import Operation from "../Operation"; import bcrypt from "bcryptjs"; +import { isWorkerEnvironment } from "../Utils"; /** * Bcrypt operation @@ -44,7 +45,7 @@ class Bcrypt extends Operation { return await bcrypt.hash(input, salt, null, p => { // Progress callback - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage(`Progress: ${(p * 100).toFixed(0)}%`); }); diff --git a/src/core/operations/BcryptCompare.mjs b/src/core/operations/BcryptCompare.mjs index 5d8c393e06..516f6efa34 100644 --- a/src/core/operations/BcryptCompare.mjs +++ b/src/core/operations/BcryptCompare.mjs @@ -6,6 +6,8 @@ import Operation from "../Operation"; import bcrypt from "bcryptjs"; +import { isWorkerEnvironment } from "../Utils"; + /** * Bcrypt compare operation @@ -43,7 +45,7 @@ class BcryptCompare extends Operation { const match = await bcrypt.compare(input, hash, null, p => { // Progress callback - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage(`Progress: ${(p * 100).toFixed(0)}%`); }); diff --git a/src/core/operations/BlurImage.mjs b/src/core/operations/BlurImage.mjs index d112d7c8d9..0a74aca19e 100644 --- a/src/core/operations/BlurImage.mjs +++ b/src/core/operations/BlurImage.mjs @@ -6,6 +6,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; +import { isWorkerEnvironment } from "../Utils"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; import jimp from "jimp"; @@ -65,12 +66,12 @@ class BlurImage extends Operation { try { switch (blurType){ case "Fast": - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Fast blurring image..."); image.blur(blurAmount); break; case "Gaussian": - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Gaussian blurring image..."); image = gaussianBlur(image, blurAmount); break; diff --git a/src/core/operations/Bombe.mjs b/src/core/operations/Bombe.mjs index c2ea82bf5c..080344ecd1 100644 --- a/src/core/operations/Bombe.mjs +++ b/src/core/operations/Bombe.mjs @@ -8,8 +8,9 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; -import {BombeMachine} from "../lib/Bombe"; -import {ROTORS, ROTORS_FOURTH, REFLECTORS, Reflector} from "../lib/Enigma"; +import { isWorkerEnvironment } from "../Utils"; +import { BombeMachine } from "../lib/Bombe"; +import { ROTORS, ROTORS_FOURTH, REFLECTORS, Reflector } from "../lib/Enigma"; /** * Bombe operation @@ -139,7 +140,7 @@ class Bombe extends Operation { const ciphertext = input.slice(offset); const reflector = new Reflector(reflectorstr); let update; - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { update = this.updateStatus; } else { update = undefined; diff --git a/src/core/operations/Bzip2Compress.mjs b/src/core/operations/Bzip2Compress.mjs index ea92107f91..84ac6783a4 100644 --- a/src/core/operations/Bzip2Compress.mjs +++ b/src/core/operations/Bzip2Compress.mjs @@ -7,6 +7,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import Bzip2 from "libbzip2-wasm"; +import { isWorkerEnvironment } from "../Utils"; /** * Bzip2 Compress operation @@ -51,10 +52,10 @@ class Bzip2Compress extends Operation { if (input.byteLength <= 0) { throw new OperationError("Please provide an input."); } - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Loading Bzip2..."); + if (isWorkerEnvironment()) self.sendStatusMessage("Loading Bzip2..."); return new Promise((resolve, reject) => { Bzip2().then(bzip2 => { - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Compressing data..."); + if (isWorkerEnvironment()) self.sendStatusMessage("Compressing data..."); const inpArray = new Uint8Array(input); const bzip2cc = bzip2.compressBZ2(inpArray, blockSize, workFactor); if (bzip2cc.error !== 0) { diff --git a/src/core/operations/Bzip2Decompress.mjs b/src/core/operations/Bzip2Decompress.mjs index 08a1f3d7ec..fcd3588313 100644 --- a/src/core/operations/Bzip2Decompress.mjs +++ b/src/core/operations/Bzip2Decompress.mjs @@ -7,6 +7,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import Bzip2 from "libbzip2-wasm"; +import { isWorkerEnvironment } from "../Utils"; /** * Bzip2 Decompress operation @@ -51,10 +52,10 @@ class Bzip2Decompress extends Operation { if (input.byteLength <= 0) { throw new OperationError("Please provide an input."); } - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Loading Bzip2..."); + if (isWorkerEnvironment()) self.sendStatusMessage("Loading Bzip2..."); return new Promise((resolve, reject) => { Bzip2().then(bzip2 => { - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Decompressing data..."); + if (isWorkerEnvironment()) self.sendStatusMessage("Decompressing data..."); const inpArray = new Uint8Array(input); const bzip2cc = bzip2.decompressBZ2(inpArray, small ? 1 : 0); if (bzip2cc.error !== 0) { diff --git a/src/core/operations/ContainImage.mjs b/src/core/operations/ContainImage.mjs index e6edd9e15b..b136ab5123 100644 --- a/src/core/operations/ContainImage.mjs +++ b/src/core/operations/ContainImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -117,7 +118,7 @@ class ContainImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Containing image..."); image.contain(width, height, alignMap[hAlign] | alignMap[vAlign], resizeMap[alg]); diff --git a/src/core/operations/CoverImage.mjs b/src/core/operations/CoverImage.mjs index e55b4da1c9..9a09bcdcc5 100644 --- a/src/core/operations/CoverImage.mjs +++ b/src/core/operations/CoverImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -112,7 +113,7 @@ class CoverImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Covering image..."); image.cover(width, height, alignMap[hAlign] | alignMap[vAlign], resizeMap[alg]); let imageBuffer; diff --git a/src/core/operations/CropImage.mjs b/src/core/operations/CropImage.mjs index a1114bea89..e251ac6234 100644 --- a/src/core/operations/CropImage.mjs +++ b/src/core/operations/CropImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -103,7 +104,7 @@ class CropImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Cropping image..."); if (autocrop) { image.autocrop({ diff --git a/src/core/operations/DitherImage.mjs b/src/core/operations/DitherImage.mjs index aee703897c..fa432afc03 100644 --- a/src/core/operations/DitherImage.mjs +++ b/src/core/operations/DitherImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -48,7 +49,7 @@ class DitherImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Applying dither to image..."); image.dither565(); diff --git a/src/core/operations/FlipImage.mjs b/src/core/operations/FlipImage.mjs index 1679344100..1167b96c92 100644 --- a/src/core/operations/FlipImage.mjs +++ b/src/core/operations/FlipImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -55,7 +56,7 @@ class FlipImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Flipping image..."); switch (flipAxis){ case "Horizontal": diff --git a/src/core/operations/FromCharcode.mjs b/src/core/operations/FromCharcode.mjs index 3ae54b6cc6..0c60a9c8af 100644 --- a/src/core/operations/FromCharcode.mjs +++ b/src/core/operations/FromCharcode.mjs @@ -6,7 +6,8 @@ import Operation from "../Operation"; import Utils from "../Utils"; -import {DELIM_OPTIONS} from "../lib/Delim"; +import { DELIM_OPTIONS } from "../lib/Delim"; +import { isWorkerEnvironment } from "../Utils"; import OperationError from "../errors/OperationError"; /** @@ -61,7 +62,7 @@ class FromCharcode extends Operation { return []; } - if (base !== 16 && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); + if (base !== 16 && isWorkerEnvironment()) self.setOption("attemptHighlight", false); // Split into groups of 2 if the whole string is concatenated and // too long to be a single character diff --git a/src/core/operations/FromHexdump.mjs b/src/core/operations/FromHexdump.mjs index 7f4d9119cd..0eacd6cf84 100644 --- a/src/core/operations/FromHexdump.mjs +++ b/src/core/operations/FromHexdump.mjs @@ -5,7 +5,9 @@ */ import Operation from "../Operation"; -import {fromHex} from "../lib/Hex"; +import { fromHex } from "../lib/Hex"; +import { isWorkerEnvironment } from "../Utils"; + /** * From Hexdump operation @@ -55,7 +57,7 @@ class FromHexdump extends Operation { const w = (width - 13) / 4; // w should be the specified width of the hexdump and therefore a round number if (Math.floor(w) !== w || input.indexOf("\r") !== -1 || output.indexOf(13) !== -1) { - if (ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); + if (isWorkerEnvironment()) self.setOption("attemptHighlight", false); } return output; } diff --git a/src/core/operations/ImageBrightnessContrast.mjs b/src/core/operations/ImageBrightnessContrast.mjs index f1c8f4e087..50efdf3e85 100644 --- a/src/core/operations/ImageBrightnessContrast.mjs +++ b/src/core/operations/ImageBrightnessContrast.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -65,12 +66,12 @@ class ImageBrightnessContrast extends Operation { } try { if (brightness !== 0) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image brightness..."); image.brightness(brightness / 100); } if (contrast !== 0) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image contrast..."); image.contrast(contrast / 100); } diff --git a/src/core/operations/ImageFilter.mjs b/src/core/operations/ImageFilter.mjs index be96c04663..19b1cb0c1e 100644 --- a/src/core/operations/ImageFilter.mjs +++ b/src/core/operations/ImageFilter.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -58,7 +59,7 @@ class ImageFilter extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Applying " + filterType.toLowerCase() + " filter to image..."); if (filterType === "Greyscale") { image.greyscale(); diff --git a/src/core/operations/ImageHueSaturationLightness.mjs b/src/core/operations/ImageHueSaturationLightness.mjs index d5b3718bb7..42f6abf5b9 100644 --- a/src/core/operations/ImageHueSaturationLightness.mjs +++ b/src/core/operations/ImageHueSaturationLightness.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -73,7 +74,7 @@ class ImageHueSaturationLightness extends Operation { } try { if (hue !== 0) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image hue..."); image.colour([ { @@ -83,7 +84,7 @@ class ImageHueSaturationLightness extends Operation { ]); } if (saturation !== 0) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image saturation..."); image.colour([ { @@ -93,7 +94,7 @@ class ImageHueSaturationLightness extends Operation { ]); } if (lightness !== 0) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image lightness..."); image.colour([ { diff --git a/src/core/operations/ImageOpacity.mjs b/src/core/operations/ImageOpacity.mjs index 4303fcbf58..6724e12536 100644 --- a/src/core/operations/ImageOpacity.mjs +++ b/src/core/operations/ImageOpacity.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -57,7 +58,7 @@ class ImageOpacity extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Changing image opacity..."); image.opacity(opacity / 100); diff --git a/src/core/operations/InvertImage.mjs b/src/core/operations/InvertImage.mjs index 9c29f38aa0..43c9249d75 100644 --- a/src/core/operations/InvertImage.mjs +++ b/src/core/operations/InvertImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -48,7 +49,7 @@ class InvertImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Inverting image..."); image.invert(); diff --git a/src/core/operations/MultipleBombe.mjs b/src/core/operations/MultipleBombe.mjs index b6a488723f..3ec7d4a0f6 100644 --- a/src/core/operations/MultipleBombe.mjs +++ b/src/core/operations/MultipleBombe.mjs @@ -9,8 +9,10 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; -import {BombeMachine} from "../lib/Bombe"; -import {ROTORS, ROTORS_FOURTH, REFLECTORS, Reflector} from "../lib/Enigma"; +import { BombeMachine } from "../lib/Bombe"; +import { ROTORS, ROTORS_FOURTH, REFLECTORS, Reflector } from "../lib/Enigma"; +import { isWorkerEnvironment } from "../Utils"; + /** * Convenience method for flattening the preset ROTORS object into a newline-separated string. @@ -222,7 +224,7 @@ class MultipleBombe extends Operation { crib = crib.replace(/[^A-Za-z]/g, "").toUpperCase(); const ciphertext = input.slice(offset); let update; - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { update = this.updateStatus; } else { update = undefined; diff --git a/src/core/operations/PseudoRandomNumberGenerator.mjs b/src/core/operations/PseudoRandomNumberGenerator.mjs index 6fdebefd44..f93af37dd2 100644 --- a/src/core/operations/PseudoRandomNumberGenerator.mjs +++ b/src/core/operations/PseudoRandomNumberGenerator.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import Utils from "../Utils"; import forge from "node-forge/dist/forge.min.js"; import BigNumber from "bignumber.js"; +import { isWorkerEnvironment } from "../Utils"; /** * Pseudo-Random Number Generator operation @@ -50,7 +51,7 @@ class PseudoRandomNumberGenerator extends Operation { let bytes; - if (ENVIRONMENT_IS_WORKER() && self.crypto) { + if (isWorkerEnvironment() && self.crypto) { bytes = self.crypto.getRandomValues(new Uint8Array(numBytes)); bytes = Utils.arrayBufferToStr(bytes.buffer); } else { diff --git a/src/core/operations/Register.mjs b/src/core/operations/Register.mjs index 13119632ce..22039402aa 100644 --- a/src/core/operations/Register.mjs +++ b/src/core/operations/Register.mjs @@ -7,6 +7,7 @@ import Operation from "../Operation"; import Dish from "../Dish"; import XRegExp from "xregexp"; +import { isWorkerEnvironment } from "../Utils"; /** * Register operation @@ -72,7 +73,7 @@ class Register extends Operation { if (!registers) return state; - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { self.setRegisters(state.forkOffset + state.progress, state.numRegisters, registers.slice(1)); } diff --git a/src/core/operations/ResizeImage.mjs b/src/core/operations/ResizeImage.mjs index 1a1521e6e9..c8d906ddf7 100644 --- a/src/core/operations/ResizeImage.mjs +++ b/src/core/operations/ResizeImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64.mjs"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -102,7 +103,7 @@ class ResizeImage extends Operation { height = image.getHeight() * (height / 100); } - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Resizing image..."); if (aspect) { image.scaleToFit(width, height, resizeMap[resizeAlg]); diff --git a/src/core/operations/RotateImage.mjs b/src/core/operations/RotateImage.mjs index 08e345f062..187eb91795 100644 --- a/src/core/operations/RotateImage.mjs +++ b/src/core/operations/RotateImage.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -56,7 +57,7 @@ class RotateImage extends Operation { throw new OperationError(`Error loading image. (${err})`); } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Rotating image..."); image.rotate(degrees); diff --git a/src/core/operations/ScanForEmbeddedFiles.mjs b/src/core/operations/ScanForEmbeddedFiles.mjs index 4ae8a66272..4b03857e40 100644 --- a/src/core/operations/ScanForEmbeddedFiles.mjs +++ b/src/core/operations/ScanForEmbeddedFiles.mjs @@ -6,8 +6,8 @@ import Operation from "../Operation"; import Utils from "../Utils"; -import {scanForFileTypes} from "../lib/FileType"; -import {FILE_SIGNATURES} from "../lib/FileSignatures"; +import { scanForFileTypes } from "../lib/FileType"; +import { FILE_SIGNATURES } from "../lib/FileSignatures"; /** * Scan for Embedded Files operation diff --git a/src/core/operations/Scrypt.mjs b/src/core/operations/Scrypt.mjs index 134a04fcdc..8f05b9c6d5 100644 --- a/src/core/operations/Scrypt.mjs +++ b/src/core/operations/Scrypt.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import Utils from "../Utils"; import OperationError from "../errors/OperationError"; import scryptsy from "scryptsy"; +import { isWorkerEnvironment } from "../Utils"; /** * Scrypt operation @@ -73,7 +74,7 @@ class Scrypt extends Operation { input, salt, iterations, memFactor, parallelFactor, keyLength, p => { // Progress callback - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage(`Progress: ${p.percent.toFixed(0)}%`); } ); diff --git a/src/core/operations/SharpenImage.mjs b/src/core/operations/SharpenImage.mjs index d7a17357b5..ea408ecb6f 100644 --- a/src/core/operations/SharpenImage.mjs +++ b/src/core/operations/SharpenImage.mjs @@ -9,6 +9,7 @@ import OperationError from "../errors/OperationError"; import { isImage } from "../lib/FileType"; import { toBase64 } from "../lib/Base64"; import { gaussianBlur } from "../lib/ImageManipulation"; +import { isWorkerEnvironment } from "../Utils"; import jimp from "jimp"; /** @@ -73,16 +74,16 @@ class SharpenImage extends Operation { } try { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Sharpening image... (Cloning image)"); const blurMask = image.clone(); - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Sharpening image... (Blurring cloned image)"); const blurImage = gaussianBlur(image.clone(), radius, 3); - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Sharpening image... (Creating unsharp mask)"); blurMask.scan(0, 0, blurMask.bitmap.width, blurMask.bitmap.height, function(x, y, idx) { const blurRed = blurImage.bitmap.data[idx]; @@ -99,7 +100,7 @@ class SharpenImage extends Operation { this.bitmap.data[idx + 2] = (normalBlue > blurBlue) ? normalBlue - blurBlue : 0; }); - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Sharpening image... (Merging with unsharp mask)"); image.scan(0, 0, image.bitmap.width, image.bitmap.height, function(x, y, idx) { let maskRed = blurMask.bitmap.data[idx]; diff --git a/src/core/operations/ToBase32.mjs b/src/core/operations/ToBase32.mjs index fd0a61369f..fd7170e9d8 100644 --- a/src/core/operations/ToBase32.mjs +++ b/src/core/operations/ToBase32.mjs @@ -46,7 +46,6 @@ class ToBase32 extends Operation { chr1, chr2, chr3, chr4, chr5, enc1, enc2, enc3, enc4, enc5, enc6, enc7, enc8, i = 0; - while (i < input.length) { chr1 = input[i++]; chr2 = input[i++]; @@ -77,7 +76,6 @@ class ToBase32 extends Operation { alphabet.charAt(enc4) + alphabet.charAt(enc5) + alphabet.charAt(enc6) + alphabet.charAt(enc7) + alphabet.charAt(enc8); } - return output; } diff --git a/src/core/operations/ToCharcode.mjs b/src/core/operations/ToCharcode.mjs index 1100668501..8105250e94 100644 --- a/src/core/operations/ToCharcode.mjs +++ b/src/core/operations/ToCharcode.mjs @@ -6,8 +6,9 @@ import Operation from "../Operation"; import Utils from "../Utils"; -import {DELIM_OPTIONS} from "../lib/Delim"; +import { DELIM_OPTIONS } from "../lib/Delim"; import OperationError from "../errors/OperationError"; +import { isWorkerEnvironment } from "../Utils"; /** * To Charcode operation @@ -69,11 +70,11 @@ class ToCharcode extends Operation { else if (ordinal < 4294967296) padding = 8; else padding = 2; - if (padding > 2 && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); + if (padding > 2 && isWorkerEnvironment()) self.setOption("attemptHighlight", false); output += Utils.hex(ordinal, padding) + delim; } else { - if (ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); + if (isWorkerEnvironment()) self.setOption("attemptHighlight", false); output += ordinal.toString(base) + delim; } } diff --git a/src/core/operations/ToMessagePack.mjs b/src/core/operations/ToMessagePack.mjs index 3de1daa741..3c0719a3d5 100644 --- a/src/core/operations/ToMessagePack.mjs +++ b/src/core/operations/ToMessagePack.mjs @@ -7,6 +7,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import notepack from "notepack.io"; +import { isWorkerEnvironment } from "../Utils"; /** * To MessagePack operation @@ -35,7 +36,7 @@ class ToMessagePack extends Operation { */ run(input, args) { try { - if (ENVIRONMENT_IS_WORKER()) { + if (isWorkerEnvironment()) { return notepack.encode(input); } else { const res = notepack.encode(input); diff --git a/src/core/operations/TranslateDateTimeFormat.mjs b/src/core/operations/TranslateDateTimeFormat.mjs index 08f2d6463f..2e9628f592 100644 --- a/src/core/operations/TranslateDateTimeFormat.mjs +++ b/src/core/operations/TranslateDateTimeFormat.mjs @@ -61,7 +61,7 @@ class TranslateDateTimeFormat extends Operation { * @returns {html} */ run(input, args) { - const [inputFormat, inputTimezone, outputFormat, outputTimezone] = args.splice(1); + const [inputFormat, inputTimezone, outputFormat, outputTimezone] = args.slice(1); let date; try { diff --git a/src/core/operations/XORBruteForce.mjs b/src/core/operations/XORBruteForce.mjs index 6284793f9a..3fde5bf987 100644 --- a/src/core/operations/XORBruteForce.mjs +++ b/src/core/operations/XORBruteForce.mjs @@ -8,6 +8,7 @@ import Operation from "../Operation"; import Utils from "../Utils"; import { bitOp, xor } from "../lib/BitwiseOp"; import { toHex } from "../lib/Hex"; +import { isWorkerEnvironment } from "../Utils"; /** * XOR Brute Force operation @@ -94,7 +95,7 @@ class XORBruteForce extends Operation { input = input.slice(sampleOffset, sampleOffset + sampleLength); - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Calculating " + Math.pow(256, keyLength) + " values..."); /** @@ -114,7 +115,7 @@ class XORBruteForce extends Operation { }; for (let key = 1, l = Math.pow(256, keyLength); key < l; key++) { - if (key % 10000 === 0 && ENVIRONMENT_IS_WORKER()) { + if (key % 10000 === 0 && isWorkerEnvironment()) { self.sendStatusMessage("Calculating " + l + " values... " + Math.floor(key / l * 100) + "%"); } diff --git a/src/core/operations/YARARules.mjs b/src/core/operations/YARARules.mjs index 91a27963d8..0a30dbbc88 100644 --- a/src/core/operations/YARARules.mjs +++ b/src/core/operations/YARARules.mjs @@ -7,6 +7,7 @@ import Operation from "../Operation"; import OperationError from "../errors/OperationError"; import Yara from "libyara-wasm"; +import { isWorkerEnvironment } from "../Utils"; /** * YARA Rules operation @@ -61,21 +62,21 @@ class YARARules extends Operation { * @returns {string} */ run(input, args) { - if (ENVIRONMENT_IS_WORKER()) + if (isWorkerEnvironment()) self.sendStatusMessage("Instantiating YARA..."); const [rules, showStrings, showLengths, showMeta, showCounts] = args; return new Promise((resolve, reject) => { Yara().then(yara => { - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Converting data for YARA."); + if (isWorkerEnvironment()) self.sendStatusMessage("Converting data for YARA."); let matchString = ""; const inpArr = new Uint8Array(input); // Turns out embind knows that JS uint8array <==> C++ std::string - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Running YARA matching."); + if (isWorkerEnvironment()) self.sendStatusMessage("Running YARA matching."); const resp = yara.run(inpArr, rules); - if (ENVIRONMENT_IS_WORKER()) self.sendStatusMessage("Processing data."); + if (isWorkerEnvironment()) self.sendStatusMessage("Processing data."); if (resp.compileErrors.size() > 0) { for (let i = 0; i < resp.compileErrors.size(); i++) { diff --git a/src/node/File.mjs b/src/node/File.mjs new file mode 100644 index 0000000000..1b4ffe455b --- /dev/null +++ b/src/node/File.mjs @@ -0,0 +1,76 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +import { detectFileType } from "../core/lib/FileType"; + + +/** + * FileShim + * + * Create a class that behaves like the File object in the Browser so that + * operations that use the File object still work. + * + * File doesn't write to disk, but it would be easy to do so with e.gfs.writeFile. + */ +class File { + + /** + * Constructor + * + * https://w3c.github.io/FileAPI/#file-constructor + * + * @param {String|Array|ArrayBuffer|Buffer|[File]} bits - file content + * @param {String} name (optional) - file name + * @param {Object} stats (optional) - file stats e.g. lastModified + */ + constructor(data, name="", stats={}) { + + if (!Array.isArray(data)) { + data = [data]; + } + + const buffers = data.map((d) => { + if (d instanceof File) { + return Buffer.from(d.data); + } + + if (d instanceof ArrayBuffer) { + return Buffer.from(d); + } + + return Buffer.from(d); + }); + const totalLength = buffers.reduce((p, c) => p + c.length, 0); + this.data = Buffer.concat(buffers, totalLength); + + this.name = name; + this.lastModified = stats.lastModified || Date.now(); + + const types = detectFileType(this.data); + if (types.length) { + this.type = types[0].mime; + } else { + this.type = "application/unknown"; + } + } + + /** + * size property + */ + get size() { + return this.data.length; + } + + /** + * Return lastModified as Date + */ + get lastModifiedDate() { + return new Date(this.lastModified); + } + +} + +export default File; diff --git a/src/node/NodeDish.mjs b/src/node/NodeDish.mjs new file mode 100644 index 0000000000..916092b4ce --- /dev/null +++ b/src/node/NodeDish.mjs @@ -0,0 +1,84 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import util from "util"; +import Dish from "../core/Dish"; + +/** + * Subclass of Dish for use in the Node.js environment. + * + * Adds some helper functions and improves coercion for Node.js logging. + */ +class NodeDish extends Dish { + + /** + * Create a Dish + * @param {any} inputOrDish - The dish input + * @param {String|Number} - The dish type, as enum or string + */ + constructor(inputOrDish=null, type=null) { + + // Allow `fs` file input: + // Any node fs Buffers transformed to array buffer + // Use Array.from as Uint8Array doesnt pass instanceof Array test + if (Buffer.isBuffer(inputOrDish)) { + inputOrDish = Array.from(inputOrDish); + type = Dish.BYTE_ARRAY; + } + super(inputOrDish, type); + } + + /** + * Apply the inputted operation to the dish. + * + * @param {WrappedOperation} operation the operation to perform + * @param {*} args - any arguments for the operation + * @returns {Dish} a new dish with the result of the operation. + */ + apply(operation, args=null) { + return operation(this, args); + } + + /** + * alias for get + * @param args see get args + */ + to(...args) { + return this.get(...args); + } + + /** + * Avoid coercion to a String primitive. + */ + toString() { + return this.presentAs(Dish.typeEnum("string")); + } + + /** + * What we want to log to the console. + */ + [util.inspect.custom](depth, options) { + return this.presentAs(Dish.typeEnum("string")); + } + + /** + * Backwards compatibility for node v6 + * Log only the value to the console in node. + */ + inspect() { + return this.presentAs(Dish.typeEnum("string")); + } + + /** + * Avoid coercion to a Number primitive. + */ + valueOf() { + return this.presentAs(Dish.typeEnum("number")); + } + +} + +export default NodeDish; diff --git a/src/node/NodeRecipe.mjs b/src/node/NodeRecipe.mjs new file mode 100644 index 0000000000..8539a22ddd --- /dev/null +++ b/src/node/NodeRecipe.mjs @@ -0,0 +1,92 @@ +/** + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import {operations} from "./index"; +import { sanitise } from "./apiUtils"; + +/** + * Similar to core/Recipe, Recipe controls a list of operations and + * the NodeDish the operate on. However, this Recipe is for the node + * environment. + */ +class NodeRecipe { + + /** + * Recipe constructor + * @param recipeConfig + */ + constructor(recipeConfig) { + this._parseConfig(recipeConfig); + } + + + /** + * Validate an ingredient $ coerce to operation if necessary. + * @param {String | Function | Object} ing + */ + _validateIngredient(ing) { + if (typeof ing === "string") { + const op = operations.find((op) => { + return sanitise(op.opName) === sanitise(ing); + }); + if (op) { + return op; + } else { + throw new TypeError(`Couldn't find an operation with name '${ing}'.`); + } + } else if (typeof ing === "function") { + if (operations.includes(ing)) { + return ing; + } else { + throw new TypeError("Inputted function not a Chef operation."); + } + // CASE: op with configuration + } else if (ing.op && ing.args) { + // Return op and args pair for opList item. + const sanitisedOp = this._validateIngredient(ing.op); + return {op: sanitisedOp, args: ing.args}; + } else { + throw new TypeError("Recipe can only contain function names or functions"); + } + } + + + /** + * Parse config for recipe. + * @param {String | Function | String[] | Function[] | [String | Function]} recipeConfig + */ + _parseConfig(recipeConfig) { + if (!recipeConfig) { + this.opList = []; + return; + } + + if (!Array.isArray(recipeConfig)) { + recipeConfig = [recipeConfig]; + } + + this.opList = recipeConfig.map((ing) => this._validateIngredient(ing)); + } + + /** + * Run the dish through each operation, one at a time. + * @param {NodeDish} dish + * @returns {NodeDish} + */ + execute(dish) { + return this.opList.reduce((prev, curr) => { + // CASE where opList item is op and args + if (Object.prototype.hasOwnProperty.call(curr, "op") && + Object.prototype.hasOwnProperty.call(curr, "args")) { + return curr.op(prev, curr.args); + } + // CASE opList item is just op. + return curr(prev); + }, dish); + } +} + +export default NodeRecipe; diff --git a/src/node/api.mjs b/src/node/api.mjs new file mode 100644 index 0000000000..59d5db0d4a --- /dev/null +++ b/src/node/api.mjs @@ -0,0 +1,333 @@ +/** + * Wrap operations for consumption in Node. + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +/*eslint no-console: ["off"] */ + +import NodeDish from "./NodeDish"; +import NodeRecipe from "./NodeRecipe"; +import OperationConfig from "../core/config/OperationConfig.json"; +import { sanitise, removeSubheadingsFromArray, sentenceToCamelCase } from "./apiUtils"; +import ExludedOperationError from "../core/errors/ExcludedOperationError"; + + +/** + * transformArgs + * + * Take the default args array and update with any user-defined + * operation arguments. Allows user to define arguments in object style, + * with accommodating name matching. Using named args in the API is more + * clear to the user. + * + * Argument name matching is case and space insensitive + * @private + * @param {Object[]} originalArgs - the operation-s args list + * @param {Object} newArgs - any inputted args + */ +function transformArgs(opArgsList, newArgs) { + + if (newArgs && Array.isArray(newArgs)) { + return newArgs; + } + + // Filter out arg values that are list subheadings - they are surrounded in []. + // See Strings op for example. + const opArgs = Object.assign([], opArgsList).map((a) => { + if (Array.isArray(a.value)) { + a.value = removeSubheadingsFromArray(a.value); + } + return a; + }); + + // Reconcile object style arg info to fit operation args shape. + if (newArgs) { + Object.keys(newArgs).map((key) => { + const index = opArgs.findIndex((arg) => { + return arg.name.toLowerCase().replace(/ /g, "") === + key.toLowerCase().replace(/ /g, ""); + }); + + if (index > -1) { + const argument = opArgs[index]; + if (argument.type === "toggleString") { + if (typeof newArgs[key] === "string") { + argument.string = newArgs[key]; + } else { + argument.string = newArgs[key].string; + argument.option = newArgs[key].option; + } + } else if (argument.type === "editableOption") { + // takes key: "option", key: {name, val: "string"}, key: {name, val: [...]} + argument.value = typeof newArgs[key] === "string" ? newArgs[key]: newArgs[key].value; + } else { + argument.value = newArgs[key]; + } + } + }); + } + + // Sanitise args + return opArgs.map((arg) => { + if (arg.type === "option") { + // pick default option if not already chosen + return typeof arg.value === "string" ? arg.value : arg.value[0]; + } + + if (arg.type === "editableOption") { + return typeof arg.value === "string" ? arg.value : arg.value[0].value; + } + + if (arg.type === "toggleString") { + // ensure string and option exist when user hasn't defined + arg.string = arg.string || ""; + arg.option = arg.option || arg.toggleValues[0]; + return arg; + } + + return arg.value; + }); +} + + +/** + * Ensure an input is a SyncDish object. + * @param input + */ +function ensureIsDish(input) { + if (!input) { + return new NodeDish(); + } + + if (input instanceof NodeDish) { + return input; + } else { + return new NodeDish(input); + } +} + + +/** + * prepareOp: transform args, make input the right type. + * Also convert any Buffers to ArrayBuffers. + * @param opInstance - instance of the operation + * @param input - operation input + * @param args - operation args + */ +function prepareOp(opInstance, input, args) { + const dish = ensureIsDish(input); + // Transform object-style args to original args array + const transformedArgs = transformArgs(opInstance.args, args); + const transformedInput = dish.get(opInstance.inputType); + return {transformedInput, transformedArgs}; +} + + +/** + * createArgInfo + * + * Create an object of options for each argument in the given operation + * + * Argument names are converted to camel case for consistency. + * + * @param {Operation} op - the operation to extract args from + * @returns {{}} - arrays of options for args. +*/ +function createArgInfo(op) { + const result = {}; + op.args.forEach((a) => { + if (a.type === "option" || a.type === "editableOption") { + result[sentenceToCamelCase(a.name)] = { + type: a.type, + options: removeSubheadingsFromArray(a.value) + }; + } else if (a.type === "toggleString") { + result[sentenceToCamelCase(a.name)] = { + type: a.type, + value: a.value, + toggleValues: removeSubheadingsFromArray(a.toggleValues), + }; + } else { + result[sentenceToCamelCase(a.name)] = { + type: a.type, + value: a.value, + }; + } + }); + + return result; +} + + +/** + * Wrap an operation to be consumed by node API. + * Checks to see if run function is async or not. + * new Operation().run() becomes operation() + * Perform type conversion on input + * @private + * @param {Operation} Operation + * @returns {Function} The operation's run function, wrapped in + * some type conversion logic + */ +export function _wrap(OpClass) { + + // Check to see if class's run function is async. + const opInstance = new OpClass(); + const isAsync = opInstance.run.constructor.name === "AsyncFunction"; + + let wrapped; + + // If async, wrap must be async. + if (isAsync) { + /** + * Async wrapped operation run function + * @param {*} input + * @param {Object | String[]} args - either in Object or normal args array + * @returns {Promise} operation's output, on a Dish. + * @throws {OperationError} if the operation throws one. + */ + wrapped = async (input, args=null) => { + const {transformedInput, transformedArgs} = prepareOp(opInstance, input, args); + const result = await opInstance.run(transformedInput, transformedArgs); + return new NodeDish({ + value: result, + type: opInstance.outputType, + }); + }; + } else { + /** + * wrapped operation run function + * @param {*} input + * @param {Object | String[]} args - either in Object or normal args array + * @returns {SyncDish} operation's output, on a Dish. + * @throws {OperationError} if the operation throws one. + */ + wrapped = (input, args=null) => { + const {transformedInput, transformedArgs} = prepareOp(opInstance, input, args); + const result = opInstance.run(transformedInput, transformedArgs); + return new NodeDish({ + value: result, + type: opInstance.outputType, + }); + }; + } + + // used in chef.help + wrapped.opName = OpClass.name; + wrapped.args = createArgInfo(opInstance); + + return wrapped; +} + + +/** + * help: Give information about operations matching the given search term, + * or inputted operation. + * + * @param {String || wrapped operation} input - the name of the operation to get help for. + * Case and whitespace are ignored in search. + * @returns {Object[]} Config of matching operations. + */ +export function help(input) { + let searchTerm = false; + if (typeof input === "string") { + searchTerm = input; + } else if (typeof input === "function") { + searchTerm = input.opName; + } + + if (!searchTerm) { + return null; + } + + let exactMatchExists = false; + + // Look for matches in operation name and description, listing name + // matches first. + const matches = Object.keys(OperationConfig) + // hydrate operation: swap op name for op config object (with name) + .map((m) => { + const hydrated = OperationConfig[m]; + hydrated.name = m; + + // flag up an exact name match. Only first exact match counts. + if (!exactMatchExists) { + exactMatchExists = sanitise(hydrated.name) === sanitise(searchTerm); + } + // Return hydrated along with what type of match it was + return { + hydrated, + nameExactMatch: sanitise(hydrated.name) === sanitise(searchTerm), + nameMatch: sanitise(hydrated.name).includes(sanitise(searchTerm)), + descMatch: sanitise(hydrated.description).includes(sanitise(searchTerm)) + }; + }) + // Filter out non-matches. If exact match exists, filter out all others. + .filter((result) => { + if (exactMatchExists) { + return !!result.nameExactMatch; + } + return result.nameMatch || result.descMatch; + }) + // sort results with name match first + .sort((a, b) => { + const aInt = a.nameMatch ? 1 : 0; + const bInt = b.nameMatch ? 1 : 0; + return bInt - aInt; + }) + // extract just the hydrated config + .map(result => result.hydrated); + + if (matches && matches.length) { + console.log(`${matches.length} result${matches.length > 1 ? "s" : ""} found.`); + return matches; + } + + console.log("No results found."); + return null; +} + + +/** + * bake [Wrapped] - Perform an array of operations on some input. + * @returns {Function} + */ +export function bake(){ + + /** + * bake + * + * @param {*} input - some input for a recipe. + * @param {String | Function | String[] | Function[] | [String | Function]} recipeConfig - + * An operation, operation name, or an array of either. + * @returns {SyncDish} of the result + * @throws {TypeError} if invalid recipe given. + */ + return function(input, recipeConfig) { + const recipe = new NodeRecipe(recipeConfig); + const dish = ensureIsDish(input); + return recipe.execute(dish); + }; +} + + +/** + * explainExcludedFunction + * + * Explain that the given operation is not included in the Node.js version. + * @param {String} name - name of operation + */ +export function _explainExludedFunction(name) { + /** + * Throw new error type with useful message. + */ + const func = () => { + throw new ExludedOperationError(`Sorry, the ${name} operation is not available in the Node.js version of CyberChef.`); + }; + // Add opName prop so NodeRecipe can handle it, just like wrap does. + func.opName = name; + return func; +} diff --git a/src/node/apiUtils.mjs b/src/node/apiUtils.mjs new file mode 100644 index 0000000000..8d53008356 --- /dev/null +++ b/src/node/apiUtils.mjs @@ -0,0 +1,86 @@ +/** + * Utility functions for the node environment + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + + +/** + * someName => Somename + * + * @param {String} str = string to be altered + * @returns {String} + */ +const capitalise = function capitalise(str) { + // Don't edit names that start with 2+ caps + if (/^[A-Z0-9]{2,}/g.test(str)) { + return str; + } + // reserved. Don't change for now. + if (str === "Return") { + return str; + } + + return `${str.charAt(0).toUpperCase()}${str.substr(1).toLowerCase()}`; +}; + + +/** + * SomeName => someName + * @param {String} name - string to be altered + * @returns {String} decapitalised + */ +export function decapitalise(str) { + // Don't decapitalise str that start with 2+ caps + if (/^[A-Z0-9]{2,}/g.test(str)) { + return str; + } + // reserved. Don't change for now. + if (str === "Return") { + return str; + } + + return `${str.charAt(0).toLowerCase()}${str.substr(1)}`; +} + + +/** + * Remove strings surrounded with [] from the given array. +*/ +export function removeSubheadingsFromArray(array) { + if (Array.isArray(array)) { + return array.filter((i) => { + if (typeof i === "string") { + return !i.match(/^\[[\s\S]*\]$/); + } + return true; + }); + } +} + + +/** + * Remove spaces, make lower case. + * @param str + */ +export function sanitise(str) { + return str.replace(/ /g, "").toLowerCase(); +} + + +/** + * sonething like this => somethingLikeThis + * ABC a sentence => ABCASentence +*/ +export function sentenceToCamelCase(str) { + return str.split(" ") + .map((s, index) => { + if (index === 0) { + return decapitalise(s); + } + return capitalise(s); + }) + .reduce((prev, curr) => `${prev}${curr}`, ""); +} diff --git a/src/node/config/excludedOperations.mjs b/src/node/config/excludedOperations.mjs new file mode 100644 index 0000000000..f9873eafc9 --- /dev/null +++ b/src/node/config/excludedOperations.mjs @@ -0,0 +1,24 @@ +/** + * Operations to exlude from the Node API + * + * @author d98762656 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ +export default [ + // This functionality can be done more easily using JavaScript + "Fork", + "Merge", + "Jump", + "ConditionalJump", + "Label", + "Comment", + + // esprima doesn't work in .mjs + "JavaScriptBeautify", + "JavaScriptMinify", + "JavaScriptParser", + + // Irrelevant in Node console + "SyntaxHighlighter", +]; diff --git a/src/node/config/scripts/generateNodeIndex.mjs b/src/node/config/scripts/generateNodeIndex.mjs new file mode 100644 index 0000000000..6f3bf00649 --- /dev/null +++ b/src/node/config/scripts/generateNodeIndex.mjs @@ -0,0 +1,124 @@ +/** + * This script generates the exports functionality for the node API. + * + * it exports chef as default, but all the wrapped operations as + * other top level exports. + * + * @author d98762656 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +/*eslint no-console: 0 */ + +import fs from "fs"; +import path from "path"; +import * as operations from "../../../core/operations/index"; +import { decapitalise } from "../../apiUtils"; +import excludedOperations from "../excludedOperations"; + +const includedOperations = Object.keys(operations).filter((op => excludedOperations.indexOf(op) === -1)); + +const dir = path.join(`${process.cwd()}/src/node`); +if (!fs.existsSync(dir)) { + console.log("\nCWD: " + process.cwd()); + console.log("Error: generateNodeIndex.mjs should be run from the project root"); + console.log("Example> node --experimental-modules src/core/config/scripts/generateNodeIndex.mjs"); + process.exit(1); +} + +let code = `/** +* THIS FILE IS AUTOMATICALLY GENERATED BY src/node/config/scripts/generateNodeIndex.mjs +* +* @author d98762625 [d98762625@gmail.com] +* @copyright Crown Copyright 2019 +* @license Apache-2.0 +*/ + +/* eslint camelcase: 0 */ + + +import NodeDish from "./NodeDish"; +import { _wrap, help, bake, _explainExludedFunction } from "./api"; +import File from "./File"; +import { + // import as core_ to avoid name clashes after wrap. +`; + +includedOperations.forEach((op) => { + // prepend with core_ to avoid name collision later. + code += ` ${op} as core_${op},\n`; +}); + +code +=` +} from "../core/operations/index"; + +global.File = File; + +/** + * generateChef + * + * Creates decapitalised, wrapped ops in chef object for default export. + */ +function generateChef() { + return { +`; + +includedOperations.forEach((op) => { + code += ` "${decapitalise(op)}": _wrap(core_${op}),\n`; +}); + +excludedOperations.forEach((op) => { + code += ` "${decapitalise(op)}": _explainExludedFunction("${op}"),\n`; +}); + +code += ` }; +} + +const chef = generateChef(); +// Add some additional features to chef object. +chef.help = help; +chef.Dish = NodeDish; + +// Define consts here so we can add to top-level export - wont allow +// export of chef property. +`; + +Object.keys(operations).forEach((op) => { + code += `const ${decapitalise(op)} = chef.${decapitalise(op)};\n`; +}); + +code +=` + +// Define array of all operations to create register for bake. +const operations = [\n`; + +Object.keys(operations).forEach((op) => { + code += ` ${decapitalise(op)},\n`; +}); + +code += `]; + +const prebaked = bake(operations); +chef.bake = prebaked; +export default chef; + +// Operations as top level exports. +export { + operations, +`; + +Object.keys(operations).forEach((op) => { + code += ` ${decapitalise(op)},\n`; +}); + +code += " NodeDish as Dish,\n"; +code += " prebaked as bake,\n"; +code += " help,\n"; +code += "};\n"; + + +fs.writeFileSync( + path.join(dir, "./index.mjs"), + code +); diff --git a/src/node/index.mjs b/src/node/index.mjs deleted file mode 100644 index 4a68e12ad0..0000000000 --- a/src/node/index.mjs +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Node view for CyberChef. - * - * @author n1474335 [n1474335@gmail.com] - * @copyright Crown Copyright 2017 - * @license Apache-2.0 - */ - -// Define global environment functions -global.ENVIRONMENT_IS_WORKER = function() { - return typeof importScripts === "function"; -}; -global.ENVIRONMENT_IS_NODE = function() { - return typeof process === "object" && typeof require === "function"; -}; -global.ENVIRONMENT_IS_WEB = function() { - return typeof window === "object"; -}; - -import Chef from "../core/Chef"; - -const CyberChef = { - - bake: function(input, recipeConfig) { - this.chef = new Chef(); - return this.chef.bake( - input, - recipeConfig, - {}, - 0, - false - ); - } - -}; - -export default CyberChef; -export {CyberChef}; diff --git a/src/node/repl-index.mjs b/src/node/repl-index.mjs new file mode 100644 index 0000000000..1849601143 --- /dev/null +++ b/src/node/repl-index.mjs @@ -0,0 +1,36 @@ +/** + * Create a REPL server for chef + * + * + * @author d98762656 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import chef from "./index"; +import repl from "repl"; +import File from "./File"; + +/*eslint no-console: ["off"] */ + +console.log(` + ______ __ ________ ____ + / ____/_ __/ /_ ___ _____/ ____/ /_ ___ / __/ + / / / / / / __ \\/ _ \\/ ___/ / / __ \\/ _ \\/ /_ +/ /___/ /_/ / /_/ / __/ / / /___/ / / / __/ __/ +\\____/\\__, /_.___/\\___/_/ \\____/_/ /_/\\___/_/ + /____/ + +`); +const replServer = repl.start({ + prompt: "chef > ", +}); + +global.File = File; + +Object.keys(chef).forEach((key) => { + if (key !== "operations") { + replServer.context[key] = chef[key]; + } +}); + diff --git a/tests/operations/TestRegister.mjs b/tests/lib/TestRegister.mjs similarity index 69% rename from tests/operations/TestRegister.mjs rename to tests/lib/TestRegister.mjs index 6bebebc8c4..eb11fc4be7 100644 --- a/tests/operations/TestRegister.mjs +++ b/tests/lib/TestRegister.mjs @@ -5,37 +5,49 @@ * ensure that they will get run by the frontend. * * @author tlwr [toby@toby.codes] - * @copyright Crown Copyright 2017 + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 * @license Apache-2.0 */ import Chef from "../../src/core/Chef"; -(function() { +/** + * Object to store and run the list of tests. + * + * @class + * @constructor + */ +class TestRegister { + /** - * Object to store and run the list of tests. - * - * @class - * @constructor + * initialise with no tests */ - function TestRegister() { + constructor() { this.tests = []; + this.apiTests = []; } - /** * Add a list of tests to the register. * * @param {Object[]} tests */ - TestRegister.prototype.addTests = function(tests) { + addTests(tests) { this.tests = this.tests.concat(tests); - }; + } + /** + * Add a list of api tests to the register + * @param {Object[]} tests + */ + addApiTests(tests) { + this.apiTests = this.apiTests.concat(tests); + } /** * Runs all the tests in the register. */ - TestRegister.prototype.runTests = function() { + runTests () { return Promise.all( this.tests.map(function(test, i) { const chef = new Chef(); @@ -85,12 +97,29 @@ import Chef from "../../src/core/Chef"; }); }) ); - }; - - - // Singleton TestRegister, keeping things simple and obvious. - global.TestRegister = global.TestRegister || new TestRegister(); -})(); + } -export default global.TestRegister; + /** + * Run all api related tests and wrap results in report format + */ + runApiTests() { + return Promise.all(this.apiTests.map(async function(test, i) { + const result = { + test: test, + status: null, + output: null, + }; + try { + await test.run(); + result.status = "passing"; + } catch (e) { + result.status = "erroring"; + result.output = e.message; + } + return result; + })); + } +} +// Export an instance to make a singleton +export default new TestRegister(); diff --git a/tests/lib/utils.mjs b/tests/lib/utils.mjs new file mode 100644 index 0000000000..c04290b225 --- /dev/null +++ b/tests/lib/utils.mjs @@ -0,0 +1,84 @@ +/** + * Utils for test suite + * + * @author d98762625@gmail.com + * @author tlwr [toby@toby.codes] + * @author n1474335 [n1474335@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + + +/** + * Helper function to convert a status to an icon. + * + * @param {string} status + * @returns {string} + */ +const statusToIcon = function statusToIcon(status) { + const icons = { + erroring: "🔥", + failing: "❌", + passing: "✔️️", + }; + return icons[status] || "?"; +}; + + +/** + * Displays a given test result in the console. + * Counts test statuses. + * + * @param {Object} testStatusCounts + * @param {Object} testResult + */ +function handleTestResult(testStatus, testResult) { + testStatus.allTestsPassing = testStatus.allTestsPassing && testResult.status === "passing"; + const newCount = (testStatus.counts[testResult.status] || 0) + 1; + testStatus.counts[testResult.status] = newCount; + testStatus.counts.total += 1; + console.log([ + statusToIcon(testResult.status), + testResult.test.name + ].join(" ")); + + if (testResult.output) { + console.log( + testResult.output + .trim() + .replace(/^/, "\t") + .replace(/\n/g, "\n\t") + ); + } +} + +/** + * Log each test result, count tests and failures. Log test suite run duration. + * + * @param {Object} testStatus - object describing test run data + * @param {Object[]} results - results from TestRegister + */ +export function logTestReport(testStatus, results) { + results.forEach(r => handleTestResult(testStatus, r)); + console.log("\n"); + + for (const testStatusCount in testStatus.counts) { + const count = testStatus.counts[testStatusCount]; + if (count > 0) { + console.log(testStatusCount.toUpperCase(), count); + } + } + + process.exit(testStatus.allTestsPassing ? 0 : 1); +} + +/** + * Fail if the process takes longer than 60 seconds. + */ +export function setLongTestFailure() { + setTimeout(function() { + console.log("Tests took longer than 60 seconds to run, returning."); + process.exit(1); + }, 60 * 1000); +} + diff --git a/tests/node/assertionHandler.mjs b/tests/node/assertionHandler.mjs new file mode 100644 index 0000000000..0096db4259 --- /dev/null +++ b/tests/node/assertionHandler.mjs @@ -0,0 +1,60 @@ +/** + * assertionHandler.mjs + * + * Pair native node assertions with a description for + * the benefit of the TestRegister. + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2019 + * @license Apache-2.0 + */ + +/* eslint no-console: 0 */ + + +/** + * Print useful stack on error + */ +const wrapRun = (run) => () => { + try { + run(); + } catch (e) { + console.dir(e); + throw e; + } +}; + + +/** + * it - wrapper for assertions to provide a helpful description + * to the TestRegister + * @namespace ApiTests + * @param {String} description - The description of the test + * @param {Function} assertion - The test + * + * @example + * // One assertion + * it("should run one assertion", () => assert.equal(1,1)) + * + * @example + * // multiple assertions + * it("should handle multiple assertions", () => { + * assert.equal(1,1) + * assert.notEqual(3,4) + * }) + * + * @example + * // async assertions + * it("should handle async", async () => { + * let r = await asyncFunc() + * assert(r) + * }) + */ +export function it(name, run) { + return { + name: `Node API: ${name}`, + run: wrapRun(run), + }; +} + +export default it; diff --git a/tests/node/index.mjs b/tests/node/index.mjs new file mode 100644 index 0000000000..c2e8d8f285 --- /dev/null +++ b/tests/node/index.mjs @@ -0,0 +1,37 @@ +/* eslint no-console: 0 */ + +/** + * Node API Test Runner + * + * @author d98762625 [d98762625@gmail.com] + * @author tlwr [toby@toby.codes] + * @author n1474335 [n1474335@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import { + setLongTestFailure, + logTestReport, +} from "../lib/utils"; + +import TestRegister from "../lib/TestRegister"; +import "./tests/nodeApi"; +import "./tests/operations"; +import "./tests/File"; +import "./tests/NodeDish"; + +const testStatus = { + allTestsPassing: true, + counts: { + total: 0, + } +}; + +setLongTestFailure(); + +const logOpsTestReport = logTestReport.bind(null, testStatus); + +TestRegister.runApiTests() + .then(logOpsTestReport); + diff --git a/tests/node/sampleData/pic.jpg b/tests/node/sampleData/pic.jpg new file mode 100644 index 0000000000..05c213276a Binary files /dev/null and b/tests/node/sampleData/pic.jpg differ diff --git a/tests/node/tests/File.mjs b/tests/node/tests/File.mjs new file mode 100644 index 0000000000..9395319fb9 --- /dev/null +++ b/tests/node/tests/File.mjs @@ -0,0 +1,82 @@ +import assert from "assert"; +import it from "../assertionHandler"; +import TestRegister from "../../lib/TestRegister"; +import File from "../../../src/node/File"; +import {zip, Dish} from "../../../src/node/index"; + +TestRegister.addApiTests([ + it("File: should exist", () => { + assert(File); + }), + + it("File: Should have same properties as DOM File object", () => { + const uint8Array = new Uint8Array(Buffer.from("hello")); + const file = new File([uint8Array], "name.txt"); + assert.equal(file.name, "name.txt"); + assert(typeof file.lastModified, "number"); + assert(file.lastModifiedDate instanceof Date); + assert.equal(file.size, uint8Array.length); + assert.equal(file.type, "application/unknown"); + }), + + it("File: Should determine the type of a file", () => { + const zipped = zip("hello"); + const file = new File([zipped.value]); + assert(file); + assert.strictEqual(file.type, "application/zip"); + }), + + it("File: unknown type should have a type of application/unknown", () => { + const uint8Array = new Uint8Array(Buffer.from("hello")); + const file = new File([uint8Array], "sample.txt"); + assert.strictEqual(file.type, "application/unknown"); + }), + + it("File: should be able to make a dish from it", () => { + const uint8Array = new Uint8Array(Buffer.from("hello")); + const file = new File([uint8Array], "sample.txt"); + try { + const dish = new Dish(file, 7); + assert.ok(dish.valid()); + } catch (e) { + assert.fail(e.message); + } + }), + + it("File: should allow dish to translate to ArrayBuffer", () => { + const uint8Array = new Uint8Array(Buffer.from("hello")); + const file = new File([uint8Array], "sample.txt"); + try { + const dish = new Dish(file, 7); + assert.ok(dish.value); + + dish.get(4); + assert.strictEqual(dish.type, 4); + assert.ok(dish.valid()); + + } catch (e) { + assert.fail(e.message); + } + }), + + it("File: should allow dish to translate from ArrayBuffer to File", () => { + const uint8Array = new Uint8Array(Buffer.from("hello")); + const file = new File([uint8Array], "sample.txt"); + try { + const dish = new Dish(file, 7); + assert.ok(dish.value); + + // translate to ArrayBuffer + dish.get(4); + assert.ok(dish.valid()); + + // translate back to File + dish.get(7); + assert.ok(dish.valid()); + + } catch (e) { + assert.fail(e.message); + } + }) + +]); diff --git a/tests/node/tests/NodeDish.mjs b/tests/node/tests/NodeDish.mjs new file mode 100644 index 0000000000..67ac9e9a1b --- /dev/null +++ b/tests/node/tests/NodeDish.mjs @@ -0,0 +1,199 @@ +import assert from "assert"; +import it from "../assertionHandler"; +import fs from "fs"; + +import BigNumber from "bignumber.js"; + +import { Dish, toBase32, SHA3 } from "../../../src/node/index"; +import File from "../../../src/node/File"; +import TestRegister from "../../lib/TestRegister"; + +TestRegister.addApiTests([ + it("Composable Dish: Should have top level Dish object", () => { + assert.ok(Dish); + }), + + it("Composable Dish: Should construct empty dish object", () => { + const dish = new Dish(); + assert.strictEqual(dish.value.byteLength, new ArrayBuffer(0).byteLength); + assert.strictEqual(dish.type, 4); + }), + + it("Composable Dish: constructed dish should have apply prototype functions", () => { + const dish = new Dish(); + assert.ok(dish.apply); + assert.throws(() => dish.someInvalidFunction()); + }), + + it("Composable Dish: composed function returns another dish", () => { + const result = new Dish("some input").apply(toBase32); + assert.ok(result instanceof Dish); + }), + + + it("Composable dish: infers type from input if needed", () => { + const dish = new Dish("string input"); + assert.strictEqual(dish.type, 1); + + const numberDish = new Dish(333); + assert.strictEqual(numberDish.type, 2); + + const arrayBufferDish = new Dish(Buffer.from("some buffer input").buffer); + assert.strictEqual(arrayBufferDish.type, 4); + + const byteArrayDish = new Dish(Buffer.from("some buffer input")); + assert.strictEqual(byteArrayDish.type, 0); + + const JSONDish = new Dish({key: "value"}); + assert.strictEqual(JSONDish.type, 6); + }), + + it("Composable dish: Buffer type dishes should be converted to strings", () => { + fs.writeFileSync("test.txt", "abc"); + const dish = new Dish(fs.readFileSync("test.txt")); + assert.strictEqual(dish.type, 0); + fs.unlinkSync("test.txt"); + }), + + it("Composable Dish: apply should allow set of arguments for operation", () => { + const result = new Dish("input").apply(SHA3, {size: "256"}); + assert.strictEqual(result.toString(), "7640cc9b7e3662b2250a43d1757e318bb29fb4860276ac4373b67b1650d6d3e3"); + }), + + it("Composable Dish: apply functions can be chained", () => { + const result = new Dish("input").apply(toBase32).apply(SHA3, {size: "224"}); + assert.strictEqual(result.toString(), "493e8136b759370a415ef2cf2f7a69690441ff86592aba082bc2e2e0"); + }), + + it("Dish translation: ArrayBuffer to ArrayBuffer", () => { + const dish = new Dish(new ArrayBuffer(10), 4); + dish.get("array buffer"); + assert.strictEqual(dish.value.byteLength, 10); + assert.strictEqual(dish.type, 4); + }), + + it("Dish translation: ArrayBuffer and String", () => { + const dish = new Dish("some string", 1); + dish.get("array buffer"); + + assert.strictEqual(dish.type, 4); + assert.deepStrictEqual(dish.value, new ArrayBuffer(11)); + assert.deepEqual(dish.value.byteLength, 11); + + dish.get("string"); + assert.strictEqual(dish.type, 1); + assert.strictEqual(dish.value, "some string"); + }), + + it("Dish translation: ArrayBuffer and number", () => { + const dish = new Dish(100, 2); + dish.get(4); + + assert.strictEqual(dish.type, 4); + assert.deepStrictEqual(dish.value, new ArrayBuffer(10)); + assert.strictEqual(dish.value.byteLength, 3); + + // Check the data in ArrayBuffer represents 100 as a string. + const view = new DataView(dish.value, 0); + assert.strictEqual(String.fromCharCode(view.getUint8(0), view.getUint8(1), view.getUint8(2)), "100"); + + dish.get("number"); + assert.strictEqual(dish.type, 2); + assert.strictEqual(dish.value, 100); + }), + + it("Dish translation: ArrayBuffer and byte array", () => { + const dish = new Dish(new Uint8Array([1, 2, 3]), 0); + dish.get(4); + + // Check intermediate value + const check = new Uint8Array(dish.value); + assert.deepEqual(check, [1, 2, 3]); + + // Check converts back OK + dish.get(0); + assert.deepEqual(dish.value, new Uint8Array([1, 2, 3])); + }), + + it("Dish translation: ArrayBuffer and HTML", () => { + const html = ` + + + + + + Click here + + +`.replace(/\n|\s{4}/g, ""); //remove newlines, tabs + + const dish = new Dish(html, Dish.HTML); + dish.get(4); + + dish.get(3); + assert.strictEqual(dish.value, "Click here"); + }), + + it("Dish translation: ArrayBuffer and BigNumber", () => { + const number = BigNumber(4001); + const dish = new Dish(number, Dish.BIG_NUMBER); + + dish.get(Dish.ARRAY_BUFFER); + assert.deepStrictEqual(dish.value, new ArrayBuffer(10)); + assert.strictEqual(dish.value.byteLength, 4); + + // Check the data in ArrayBuffer represents 4001 as a string. + const view = new DataView(dish.value, 0); + assert.strictEqual(String.fromCharCode(view.getUint8(0), view.getUint8(1), view.getUint8(2), view.getUint8(3)), "4001"); + + dish.get(5); + assert.deepStrictEqual(dish.value, number); + }), + + it("Dish translation: ArrayBuffer and JSON", () => { + const jsonString = "{\"a\": 123455, \"b\": { \"aa\": [1,2,3]}}"; + const dish = new Dish(JSON.parse(jsonString), Dish.JSON); + + dish.get(Dish.ARRAY_BUFFER); + dish.get(Dish.JSON); + + assert.deepStrictEqual(dish.value, JSON.parse(jsonString)); + }), + + it("Dish translation: ArrayBuffer and File", () => { + const file = new File("abcd", "unknown"); + const dish = new Dish(file, Dish.FILE); + + dish.get(Dish.ARRAY_BUFFER); + assert.deepStrictEqual(dish.value, new ArrayBuffer(10)); + assert.strictEqual(dish.value.byteLength, 4); + + // Check the data in ArrayBuffer represents "abcd" + const view = new DataView(dish.value, 0); + assert.strictEqual(String.fromCharCode(view.getUint8(0), view.getUint8(1), view.getUint8(2), view.getUint8(3)), "abcd"); + + dish.get(Dish.FILE); + + assert.deepStrictEqual(dish.value.data, file.data); + assert.strictEqual(dish.value.name, file.name); + assert.strictEqual(dish.value.type, file.type); + // Do not test lastModified + }), + + it("Dish translation: ArrayBuffer and ListFile", () => { + const file1 = new File("abcde", "unknown"); + const file2 = new File("fghijk", "unknown"); + + const dish = new Dish([file1, file2], Dish.LIST_FILE); + + dish.get(Dish.ARRAY_BUFFER); + assert.deepStrictEqual(dish.value, new ArrayBuffer(10)); + assert.strictEqual(dish.value.byteLength, 11); + + dish.get(Dish.LIST_FILE); + const dataArray = new Uint8Array(dish.value[0].data); + // cant store chars in a Uint8Array, so make it a normal one. + const actual = Array.prototype.slice.call(dataArray).map(c => String.fromCharCode(c)).join(""); + assert.strictEqual(actual, "abcdefghijk"); + }), +]); diff --git a/tests/node/tests/nodeApi.mjs b/tests/node/tests/nodeApi.mjs new file mode 100644 index 0000000000..6233459a62 --- /dev/null +++ b/tests/node/tests/nodeApi.mjs @@ -0,0 +1,375 @@ +/* eslint no-console: 0 */ + +/** + * nodeApi.js + * + * Test node api utilities + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import assert from "assert"; +import it from "../assertionHandler"; +import chef from "../../../src/node/index"; +import OperationError from "../../../src/core/errors/OperationError"; +import NodeDish from "../../../src/node/NodeDish"; + +import { toBase32} from "../../../src/node/index"; +import TestRegister from "../../lib/TestRegister"; + +TestRegister.addApiTests([ + it("should have some operations", () => { + assert(chef); + assert(chef.toBase32); + assert(chef.setUnion); + assert(!chef.randomFunction); + }), + + it("should export other functions at top level", () => { + assert(toBase32); + }), + + it("should be synchronous", () => { + try { + const result = chef.toBase32("input"); + assert.notEqual("something", result); + } catch (e) { + // shouldnt reach here + assert(false); + } + + try { + const fail = chef.setUnion("1"); + // shouldnt get here + assert(!fail || false); + } catch (e) { + assert(true); + } + }), + + it("should not catch Errors", () => { + try { + chef.setUnion("1"); + assert(false); + } catch (e) { + assert(e instanceof OperationError); + } + }), + + it("should accept arguments in object format for operations", () => { + const result = chef.setUnion("1 2 3 4:3 4 5 6", { + itemDelimiter: " ", + sampleDelimiter: ":" + }); + + assert.equal(result.value, "1 2 3 4 5 6"); + }), + + it("should accept just some of the optional arguments being overriden", () => { + const result = chef.setIntersection("1 2 3 4 5\\n\\n3 4 5", { + itemDelimiter: " ", + }); + + assert.equal(result.value, "3 4 5"); + }), + + it("should accept no override arguments and just use the default values", () => { + const result = chef.powerSet("1,2,3"); + assert.equal(result.value, "\n3\n2\n1\n2,3\n1,3\n1,2\n1,2,3\n"); + }), + + it("should return an object with a .to method", () => { + const result = chef.toBase32("input"); + assert(result.to); + assert.equal(result.to("string"), "NFXHA5LU"); + }), + + it("should return an object with a .get method", () => { + const result = chef.toBase32("input"); + assert(result.get); + assert.equal(result.get("string"), "NFXHA5LU"); + }), + + it("should return a NodeDish", async () => { + const result = chef.toBase32("input"); + assert(result instanceof NodeDish); + }), + + it("should coerce to a string as you expect", () => { + const result = chef.fromBase32(chef.toBase32("something")); + assert.equal(String(result), "something"); + // This kind of coercion uses toValue + assert.equal(""+result, "NaN"); + }), + + it("should coerce to a number as you expect", () => { + const result = chef.fromBase32(chef.toBase32("32")); + assert.equal(3 + result, 35); + }), + + it("chef.help: should exist", () => { + assert(chef.help); + }), + + it("chef.help: should describe a operation", () => { + const result = chef.help("tripleDESDecrypt"); + assert.strictEqual(result[0].name, "Triple DES Decrypt"); + assert.strictEqual(result[0].module, "Ciphers"); + assert.strictEqual(result[0].inputType, "string"); + assert.strictEqual(result[0].outputType, "string"); + assert.strictEqual(result[0].description, "Triple DES applies DES three times to each block to increase key size.

Key: Triple DES uses a key length of 24 bytes (192 bits).
DES uses a key length of 8 bytes (64 bits).

IV: The Initialization Vector should be 8 bytes long. If not entered, it will default to 8 null bytes.

Padding: In CBC and ECB mode, PKCS#7 padding will be used."); + assert.strictEqual(result[0].args.length, 5); + }), + + it("chef.help: null for invalid operation", () => { + const result = chef.help("some invalid function name"); + assert.strictEqual(result, null); + }), + + it("chef.help: takes a wrapped operation as input", () => { + const result = chef.help(chef.toBase32); + assert.strictEqual(result[0].name, "To Base32"); + assert.strictEqual(result[0].module, "Default"); + }), + + it("chef.help: returns multiple results", () => { + const result = chef.help("base 64"); + assert.strictEqual(result.length, 10); + }), + + it("chef.help: looks in description for matches too", () => { + // string only in one operation's description. + const result = chef.help("Converts a unit of data to another format."); + assert.strictEqual(result.length, 1); + assert.strictEqual(result[0].name, "Convert data units"); + }), + + it("chef.help: lists name matches before desc matches", () => { + const result = chef.help("Checksum"); + assert.ok(result[0].name.includes("Checksum")); + assert.ok(result[1].name.includes("Checksum")); + assert.strictEqual(result[result.length - 1].name.includes("Checksum"), false); + assert.ok(result[result.length - 1].description.includes("checksum")); + }), + + it("chef.help: exact name match only returns one result", () => { + const result = chef.help("MD5"); + assert.strictEqual(result.length, 1); + assert.strictEqual(result[0].name, "MD5"); + }), + + it("chef.help: exact match ignores whitespace", () => { + const result = chef.help("tobase64"); + assert.strictEqual(result.length, 1); + assert.strictEqual(result[0].name, "To Base64"); + }), + + it("chef.bake: should exist", () => { + assert(chef.bake); + }), + + it("chef.bake: should return NodeDish", () => { + const result = chef.bake("input", "to base 64"); + assert(result instanceof NodeDish); + }), + + it("chef.bake: should take an input and an op name and perform it", () => { + const result = chef.bake("some input", "to base 32"); + assert.strictEqual(result.toString(), "ONXW2ZJANFXHA5LU"); + }), + + it("chef.bake: should complain if recipe isnt a valid object", () => { + try { + chef.bake("some input", 3264); + } catch (e) { + assert.strictEqual(e.name, "TypeError"); + assert.strictEqual(e.message, "Recipe can only contain function names or functions"); + } + }), + + it("chef.bake: Should complain if string op is invalid", () => { + try { + chef.bake("some input", "not a valid operation"); + assert.fail("Shouldn't be hit"); + } catch (e) { + assert.strictEqual(e.name, "TypeError"); + assert.strictEqual(e.message, "Couldn't find an operation with name 'not a valid operation'."); + } + }), + + it("chef.bake: Should take an input and an operation and perform it", () => { + const result = chef.bake("https://google.com/search?q=help", chef.parseURI); + assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = help\n"); + }), + + it("chef.bake: Should complain if an invalid operation is inputted", () => { + try { + chef.bake("https://google.com/search?q=help", () => {}); + assert.fail("Shouldn't be hit"); + } catch (e) { + assert.strictEqual(e.name, "TypeError"); + assert.strictEqual(e.message, "Inputted function not a Chef operation."); + } + }), + + it("chef.bake: accepts an array of operation names and performs them all in order", () => { + const result = chef.bake("https://google.com/search?q=that's a complicated question", ["URL encode", "URL decode", "Parse URI"]); + assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n"); + }), + + it("chef.bake: forgiving with operation names", () =>{ + const result = chef.bake("https://google.com/search?q=that's a complicated question", ["urlencode", "url decode", "parseURI"]); + assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n"); + }), + + it("chef.bake: forgiving with operation names", () =>{ + const result = chef.bake("hello", ["to base 64"]); + assert.strictEqual(result.toString(), "aGVsbG8="); + }), + + it("chef.bake: if recipe is empty array, return input as dish", () => { + const result = chef.bake("some input", []); + assert.strictEqual(result.toString(), "some input"); + assert(result instanceof NodeDish, "Result is not instance of NodeDish"); + }), + + it("chef.bake: accepts an array of operations as recipe", () => { + const result = chef.bake("https://google.com/search?q=that's a complicated question", [chef.URLEncode, chef.URLDecode, chef.parseURI]); + assert.strictEqual(result.toString(), "Protocol:\thttps:\nHostname:\tgoogle.com\nPath name:\t/search\nArguments:\n\tq = that's a complicated question\n"); + }), + + it("should complain if an invalid operation is inputted as part of array", () => { + try { + chef.bake("something", [() => {}]); + } catch (e) { + assert.strictEqual(e.name, "TypeError"); + assert.strictEqual(e.message, "Inputted function not a Chef operation."); + } + }), + + it("chef.bake: should take single JSON object describing op and args OBJ", () => { + const result = chef.bake("some input", { + op: chef.toHex, + args: { + Delimiter: "Colon" + } + }); + assert.strictEqual(result.toString(), "73:6f:6d:65:20:69:6e:70:75:74"); + }), + + it("chef.bake: should take single JSON object describing op and args ARRAY", () => { + const result = chef.bake("some input", { + op: chef.toHex, + args: ["Colon"] + }); + assert.strictEqual(result.toString(), "73:6f:6d:65:20:69:6e:70:75:74"); + }), + + it("chef.bake: should error if op in JSON is not chef op", () => { + try { + chef.bake("some input", { + op: () => {}, + args: ["Colon"], + }); + } catch (e) { + assert.strictEqual(e.name, "TypeError"); + assert.strictEqual(e.message, "Inputted function not a Chef operation."); + } + }), + + it("chef.bake: should take multiple ops in JSON object form, some ops by string", () => { + const result = chef.bake("some input", [ + { + op: chef.toHex, + args: ["Colon"] + }, + { + op: "to octal", + args: { + delimiter: "Semi-colon", + } + } + ]); + assert.strictEqual(result.toString(), "67;63;72;66;146;72;66;144;72;66;65;72;62;60;72;66;71;72;66;145;72;67;60;72;67;65;72;67;64"); + }), + + it("chef.bake: should handle op with multiple args", () => { + const result = chef.bake("some input", { + op: "to morse code", + args: { + formatOptions: "Dash/Dot", + wordDelimiter: "Comma", + letterDelimiter: "Backslash", + } + }); + assert.strictEqual(result.toString(), "DotDotDot\\DashDashDash\\DashDash\\Dot,DotDot\\DashDot\\DotDashDashDot\\DotDotDash\\Dash"); + }), + + it("chef.bake: should take compact JSON format from Chef Website as recipe", () => { + const result = chef.bake("some input", [{"op": "To Morse Code", "args": ["Dash/Dot", "Backslash", "Comma"]}, {"op": "Hex to PEM", "args": ["SOMETHING"]}, {"op": "To Snake case", "args": [false]}]); + assert.strictEqual(result.toString(), "begin_something_anananaaaaak_da_aaak_da_aaaaananaaaaaaan_da_aaaaaaanan_da_aaak_end_something"); + }), + + it("chef.bake: should accept Clean JSON format from Chef website as recipe", () => { + const result = chef.bake("some input", [ + { "op": "To Morse Code", + "args": ["Dash/Dot", "Backslash", "Comma"] }, + { "op": "Hex to PEM", + "args": ["SOMETHING"] }, + { "op": "To Snake case", + "args": [false] } + ]); + assert.strictEqual(result.toString(), "begin_something_anananaaaaak_da_aaak_da_aaaaananaaaaaaan_da_aaaaaaanan_da_aaak_end_something"); + }), + + it("Excluded operations: throw a sensible error when you try and call one", () => { + try { + chef.fork(); + } catch (e) { + assert.strictEqual(e.type, "ExcludedOperationError"); + assert.strictEqual(e.message, "Sorry, the Fork operation is not available in the Node.js version of CyberChef."); + } + }), + + it("Excluded operations: throw a sensible error when you try and call one", () => { + try { + chef.renderImage(); + } catch (e) { + assert.strictEqual(e.type, "ExcludedOperationError"); + assert.strictEqual(e.message, "Sorry, the RenderImage operation is not available in the Node.js version of CyberChef."); + } + }), + + it("Operation arguments: should be accessible from operation object if op has array arg", () => { + assert.ok(chef.toCharcode.args); + assert.deepEqual(chef.unzip.args, { + password: { + type: "binaryString", + value: "", + }, + verifyResult: { + type: "boolean", + value: false, + } + }); + }), + + it("Operation arguments: should have key for each argument in operation", () => { + assert.ok(chef.convertDistance.args.inputUnits); + assert.ok(chef.convertDistance.args.outputUnits); + + assert.strictEqual(chef.bitShiftRight.args.amount.type, "number"); + assert.strictEqual(chef.bitShiftRight.args.amount.value, 1); + assert.strictEqual(chef.bitShiftRight.args.type.type, "option"); + assert.ok(Array.isArray(chef.bitShiftRight.args.type.options)); + + }), + + it("Operation arguments: should list all options excluding subheadings", () => { + // First element (subheading) removed + assert.equal(chef.convertDistance.args.inputUnits.options[0], "Nanometres (nm)"); + assert.equal(chef.defangURL.args.process.options[1], "Only full URLs"); + }), +]); diff --git a/tests/node/tests/operations.mjs b/tests/node/tests/operations.mjs new file mode 100644 index 0000000000..f283240d5a --- /dev/null +++ b/tests/node/tests/operations.mjs @@ -0,0 +1,1033 @@ +/* eslint no-console: 0 */ + +/** + * nodeApi.js + * + * Test node api operations + * + * Aim of these tests is to ensure each arg type is + * handled correctly by the wrapper. + * + * Generally just checking operations that use external dependencies to ensure + * it behaves as expected in Node. + * + * @author d98762625 [d98762625@gmail.com] + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ + +import assert from "assert"; +import it from "../assertionHandler"; +import fs from "fs"; + +import { + addLineNumbers, + adler32Checksum, + AESDecrypt, + affineCipherDecode, + affineCipherEncode, + bifidCipherEncode, + bitShiftRight, + cartesianProduct, + CSSMinify, + toBase64, + toHex, +} from "../../../src/node/index"; +import chef from "../../../src/node/index"; +import TestRegister from "../../lib/TestRegister"; +import File from "../../../src/node/File"; + +global.File = File; + +TestRegister.addApiTests([ + + it("ADD: toggleString argument", () => { + const result = chef.ADD("sample input", { + key: { + string: "some key", + option: "Hex" + } + }); + assert.equal(result.toString(), "aO[^ZS\u000eW\\^cb"); + }), + + + it("ADD: default option toggleString argument", () => { + const result = chef.ADD(3, { + key: "4", + }); + assert.strictEqual(result.toString(), "7"); + }), + + it("addLineNumbers: No arguments", () => { + const result = addLineNumbers("sample input"); + assert.equal(result.toString(), "1 sample input"); + }), + + it("adler32Checksum: No args", () => { + const result = adler32Checksum("sample input"); + assert.equal(result.toString(), "1f2304d3"); + }), + + it("AES decrypt: toggleString and option", () => { + const result = AESDecrypt("812c34ae6af353244a63c6ce23b7c34286b60be28ea4645523d4494700e7", { + key: { + string: "some longer key1", + option: "utf8", + }, + iv: { + string: "some iv", + option: "utf8", + }, + mode: "OFB", + }); + assert.equal(result.toString(), "a slightly longer sampleinput?"); + }), + + it("AffineCipherDecode: number input", () => { + const result = affineCipherDecode("some input", { + a: 7, + b: 4 + }); + assert.strictEqual(result.toString(), "cuqa ifjgr"); + }), + + it("affineCipherEncode: number input", () => { + const result = affineCipherEncode("some input", { + a: 11, + b: 6 + }); + assert.strictEqual(result.toString(), "weiy qtpsh"); + }), + + it("analyzeHash", () => { + const result = chef.analyseHash(chef.MD5("some input")); + const expected = `Hash length: 32 +Byte length: 16 +Bit length: 128 + +Based on the length, this hash could have been generated by one of the following hashing functions: +MD5 +MD4 +MD2 +HAVAL-128 +RIPEMD-128 +Snefru +Tiger-128`; + assert.strictEqual(result.toString(), expected); + }), + + it("AND", () => { + const result = chef.AND("Scot-free", { + key: { + string: "Raining Cats and Dogs", + option: "Hex", + } + }); + assert.strictEqual(result.toString(), "\u0000\"M$(D E"); + }), + + it("atBash Cipher", () => { + const result = chef.atbashCipher("Happy as a Clam"); + assert.strictEqual(result.toString(), "Szkkb zh z Xozn"); + }), + + it("Bcrypt", async () => { + const result = await chef.bcrypt("Put a Sock In It"); + assert.strictEqual(result.toString(), "$2a$10$ODeP1.6fMsb.ENk2ngPUCO7qTGVPyHA9TqDVcyupyed8FjsiF65L6"); + }), + + it("bcryptCompare", async() => { + const result = await chef.bcryptCompare("Put a Sock In It", { + hash: "$2a$10$2rT4a3XnIecBsd1H33dMTuyYE1HJ1n9F.V2rjQtAH73rh1qvOf/ae", + }); + assert.strictEqual(result.toString(), "Match: Put a Sock In It"); + }), + + it("Bcrypt Parse", async () => { + const result = await chef.bcryptParse("$2a$10$ODeP1.6fMsb.ENk2ngPUCO7qTGVPyHA9TqDVcyupyed8FjsiF65L6"); + const expected = `Rounds: 10 +Salt: $2a$10$ODeP1.6fMsb.ENk2ngPUCO +Password hash: 7qTGVPyHA9TqDVcyupyed8FjsiF65L6 +Full hash: $2a$10$ODeP1.6fMsb.ENk2ngPUCO7qTGVPyHA9TqDVcyupyed8FjsiF65L6`; + assert.strictEqual(result.toString(), expected); + }), + + it("bifid cipher decode", () => { + const result = chef.bifidCipherDecode("Vhef Qnte Ke Xfhz Mxon Bmgf", { + keyword: "Alpha", + }); + assert.strictEqual(result.toString(), "What Goes Up Must Come Down"); + }), + + it("bifid cipher encode: string option", () => { + const result = bifidCipherEncode("some input", { + keyword: "mykeyword", + }); + assert.strictEqual(result.toString(), "nmhs zmsdo"); + }), + + it("bit shift left", () => { + const result = chef.bitShiftLeft("Keep Your Eyes Peeled"); + assert.strictEqual(result.toString(), "–ÊÊà@²Þêä@ŠòÊæ@ ÊÊØÊÈ"); + }), + + it("bitShiftRight: number and option", () => { + const result = bitShiftRight("some bits to shift", { + type: "Arithmetic shift", + amount: 1, + }); + assert.strictEqual(result.toString(), "9762\u001014:9\u0010:7\u00109443:"); + }), + + it("Blowfish encrypt", () => { + const result = chef.blowfishEncrypt("Fool's Gold", { + key: { + string: "One", + option: "hex", + }, + iv: { + string: "Two", + option: "utf8" + } + }); + assert.strictEqual(result.toString(), "8999b513bf2ff064b2977dea7e05f1b5"); + }), + + it("Blowfish decrypt", () => { + const result = chef.blowfishDecrypt("8999b513bf2ff064b2977dea7e05f1b5", { + key: { + string: "One", + option: "hex", + }, + iv: { + string: "Two", + option: "utf8", + } + }); + assert.strictEqual(result.toString(), "Fool's Gold"); + }), + + it("BSON Serialise / Deserialise", () => { + const result = chef.BSONDeserialise(chef.BSONSerialise("{\"phrase\": \"Mouth-watering\"}")); + assert.strictEqual(result.toString(), `{ + "phrase": "Mouth-watering" +}`); + }), + + it("Bzip2 Decompress", async () => { + const result = await chef.bzip2Decompress(chef.fromBase64("QlpoOTFBWSZTWUdQlt0AAAIVgEAAAQAmJAwAIAAxBkxA0A2pTL6U2CozxdyRThQkEdQlt0A=")); + assert.strictEqual(result.toString(), "Fit as a Fiddle"); + }), + + it("cartesianProduct: binary string", () => { + const result = cartesianProduct("1:2\\n\\n3:4", { + itemDelimiter: ":", + }); + assert.strictEqual(result.toString(), "(1,3):(1,4):(2,3):(2,4)"); + }), + + it("Change IP format", () => { + const result = chef.changeIPFormat("172.20.23.54", { + inputFormat: "Dotted Decimal", + outputFormat: "Hex", + }); + assert.strictEqual(result.toString(), "ac141736"); + }), + + it("Chi square", () => { + const result = chef.chiSquare("Burst Your Bubble"); + assert.strictEqual(result.toString(), "433.55399816176475"); + }), + + it("Compare CTPH Hashes", () => { + const result = chef.compareCTPHHashes("1234\n3456"); + assert.strictEqual(result.toString(), "0"); + }), + + it("Compare SSDEEPHashes", () => { + const result = chef.compareCTPHHashes("1234\n3456"); + assert.strictEqual(result.toString(), "0"); + }), + + it("Convert area", () => { + const result = chef.convertArea("12345", { + inputUnits: "Square metre (sq m)", + outputUnits: "Isle of Wight" + }); + assert.strictEqual(result.toString(), "0.00003248684210526316"); + }), + + it("Convert data units", () => { + const result = chef.convertDataUnits("12345", { + inputUnits: "Bits (b)", + outputUnits: "Kilobytes (KB)", + }); + assert.strictEqual(result.toString(), "1.543125"); + }), + + it("Convert distance", () => { + const result = chef.convertDistance("1234567", { + inputUnits: "Nanometres (nm)", + outputUnits: "Furlongs (fur)", + }); + assert.strictEqual(result.toString(), "0.00000613699494949495"); + }), + + it("Convert mass", () => { + const result = chef.convertMass("123", { + inputUnits: "Earth mass (M⊕)", + outputUnits: "Great Pyramid of Giza (6,000,000 tonnes)", + }); + assert.strictEqual(result.toString(), "122429895000000000"); + }), + + it("Convert speed", () => { + const result = chef.convertSpeed("123", { + inputUnits: "Lunar escape velocity", + outputUnits: "Jet airliner cruising speed", + }); + assert.strictEqual(result.toString(), "1168.5"); + }), + + it("Count occurrences", () => { + const result = chef.countOccurrences("Talk the Talk", { + searchString: { + string: "Tal", + option: "Simple string", + } + }); + assert.strictEqual(result.toString(), "2"); + }), + + it("CRC16 Checksum", () => { + const result = chef.CRC16Checksum("Rain on Your Parade"); + assert.strictEqual(result.toString(), "db1c"); + }), + + it("CRC32 Checksum", () => { + const result = chef.CRC32Checksum("Rain on Your Parade"); + assert.strictEqual(result.toString(), "e902f76c"); + }), + + it("CSS Beautify", () => { + const result = chef.CSSBeautify("header {color:black;padding:3rem;}"); + const expected = `header { +\\tcolor:black; +\\tpadding:3rem; +} +`; + assert.strictEqual(result.toString(), expected); + }), + + it("CSS minify: boolean", () => { + const input = `header { +// comment +width: 100%; +color: white; +}`; + const result = CSSMinify(input, { + preserveComments: true, + }); + assert.strictEqual(result.toString(), "header {// comment width: 100%;color: white;}"); + }), + + it("CSS Selector", () => { + const result = chef.CSSSelector("

Hello

", { + cssSelector: "h1", + }); + assert.strictEqual(result.toString(), "

Hello

"); + }), + + it("CTPH", () => { + const result = chef.CTPH("If You Can't Stand the Heat, Get Out of the Kitchen"); + assert.strictEqual(result.toString(), "A:+EgFgBKAA0V0UFfClEs6:+Qk0gUFse"); + }), + + it("Decode NetBIOS Name", () => { + assert.strictEqual(chef.decodeNetBIOSName("EBGMGMCAEHHCGFGFGLCAFEGPCAENGFCA").toString(), "All Greek To Me"); + }), + + it("Decode text", () => { + const encoded = chef.encodeText("Ugly Duckling", { + encoding: "UTF16LE (1200)", + }); + const result = chef.decodeText(encoded, { + encoding: "UTF16LE (1200)", + }); + assert.strictEqual(result.toString(), "Ugly Duckling"); + }), + + it("Derive EVP Key", () => { + const result = chef.deriveEVPKey("", { + passphrase: { + string: "46 6c 65 61 20 4d 61 72 6b 65 74", + option: "Hex", + }, + salt: { + string: "Market", + option: "Hex", + }, + }); + assert.strictEqual(result.toString(), "7c21a9f5063a4d62fb1050068245c181"); + }), + + it("Derive PBKDF2 Key", () => { + const result = chef.derivePBKDF2Key("", { + passphrase: { + string: "Jack of All Trades Master of None", + option: "utf8", + }, + keySize: 256, + iterations: 2, + hashingFunction: "md5", + salt: { + string: "fruit", + option: "utf8" + } + }); + assert.strictEqual(result.toString(), "728a885b209e8b19cbd7430ca32608ff09190f7ccb7ded204e1d4c50f87c47bf"); + }), + + it("DES Decrypt", () => { + const result = chef.DESDecrypt("713081c66db781c323965ba8f166fd8c230c3bb48504a913", { + key: { + string: "onetwoth", + option: "utf8", + }, + iv: { + string: "threetwo", + option: "Hex", + }, + mode: "ECB", + }); + assert.strictEqual(result.toString(), "Put a Sock In It"); + }), + + it("DES Encrypt", () => { + const result = chef.DESEncrypt("Put a Sock In It", { + key: { + string: "onetwoth", + option: "utf8", + }, + iv: { + string: "threetwo", + option: "Hex", + }, + mode: "ECB", + }); + assert.strictEqual(result.toString(), "713081c66db781c323965ba8f166fd8c230c3bb48504a913"); + }), + + it("Diff", () => { + const result = chef.diff("one two\\n\\none two three"); + assert.strictEqual(result.toString(), "one two three"); + }), + + it("Disassemble x86", () => { + const result = chef.disassembleX86(chef.toBase64("one two three")); + const expected = `0000000000000000 0000 ADD BYTE PTR [RAX],AL\r +0000000000000002 0B250000000B OR ESP,DWORD PTR [0000000-F4FFFFF8]\r +`; + assert.strictEqual(result.toString(), expected); + }), + + it("Divide", () => { + assert.strictEqual(chef.divide("4\n7").toString(), "0.57142857142857142857"); + }), + + it("Drop bytes", () => { + assert.strictEqual(chef.dropBytes("There's No I in Team").toString(), "'s No I in Team"); + }), + + it("Entropy", () => { + const result = chef.entropy("Ride Him, Cowboy!"); + assert.strictEqual(result.toString(), "3.734521664779752"); + }), + + it("Escape string", () => { + const result = chef.escapeString("Know the Ropes", { + escapeLevel: "Everything", + JSONCompatible: false, + ES6Compatible: true, + uppercaseHex: true, + }); + assert.strictEqual(result.toString(), "\\x4B\\x6E\\x6F\\x77\\x20\\x74\\x68\\x65\\x20\\x52\\x6F\\x70\\x65\\x73"); + }), + + it("Escape unicode characters", () => { + assert.strictEqual(chef.escapeUnicodeCharacters("σου").toString(), "\\u03C3\\u03BF\\u03C5"); + }), + + it("Expand alphabet range", () => { + assert.strictEqual( + chef.expandAlphabetRange("Fight Fire With Fire", {delimiter: "t"}).toString(), + "Ftitgthttt tFtitrtet tWtitttht tFtitrte"); + }), + + it("Extract dates", () => { + assert.strictEqual(chef.extractDates("Don't Look a Gift Horse In The Mouth 01/02/1992").toString(), "01/02/1992\n"); + }), + + it("Filter", () => { + const result = chef.filter( + `I Smell a Rat +Every Cloud Has a Silver Lining +Top Drawer`, { + regex: "Every", + }); + const expected = "Every Cloud Has a Silver Lining"; + assert.strictEqual(result.toString(), expected); + }), + + it("Find / Replace", () => { + assert.strictEqual( + chef.findReplace( + "Curiosity Killed The Cat", + { + find: { + string: "l", + option: "Regex", + }, + replace: "s", + }).toString(), + "Curiosity Kissed The Cat"); + }), + + it("Fletcher8 Checksum", () => { + assert.strictEqual(chef.fletcher8Checksum("Keep Your Eyes Peeled").toString(), "48"); + }), + + it("Format MAC addresses", () => { + const result = chef.formatMACAddresses("00-01-02-03-04-05"); + const expected = `000102030405 +000102030405 +00-01-02-03-04-05 +00-01-02-03-04-05 +00:01:02:03:04:05 +00:01:02:03:04:05 +`; + assert.strictEqual(result.toString(), expected); + }), + + it("Frequency distribution", () => { + const result = chef.frequencyDistribution("Don't Count Your Chickens Before They Hatch"); + const expected = "{\"dataLength\":43,\"percentages\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13.953488372093023,0,0,0,0,0,0,2.3255813953488373,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2.3255813953488373,4.651162790697675,2.3255813953488373,0,0,0,2.3255813953488373,0,0,0,0,0,0,0,0,0,0,0,2.3255813953488373,0,0,0,0,2.3255813953488373,0,0,0,0,0,0,0,2.3255813953488373,0,4.651162790697675,0,9.30232558139535,2.3255813953488373,0,6.976744186046512,2.3255813953488373,0,2.3255813953488373,0,0,6.976744186046512,9.30232558139535,0,0,4.651162790697675,2.3255813953488373,6.976744186046512,4.651162790697675,0,0,0,2.3255813953488373,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"distribution\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,2,0,4,1,0,3,1,0,1,0,0,3,4,0,0,2,1,3,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"bytesRepresented\":22}"; + // Whacky formatting, but the data is all there + assert.strictEqual(result.toString().replace(/\r?\n|\r|\s/g, ""), expected); + }), + + it("From base", () => { + assert.strictEqual(chef.fromBase("11", {radix: 13}).toString(), "14"); + }), + + it("From BCD", () => { + assert.strictEqual(chef.fromBCD("1143", { inputFormat: "Raw", scheme: "7 4 2 1"}).toString(), "31313433"); + }), + + it("From binary", () => { + assert.strictEqual(chef.fromBinary("010101011100101101011010").toString(), "UËZ"); + }), + + it("From Charcode", () => { + assert.strictEqual(chef.fromCharcode("4c 6f 6e 67 20 49 6e 20 54 68 65 20 54 6f 6f 74 68 0a").toString(), "Long In The Tooth\n"); + }), + + it("From decimal", () => { + assert.strictEqual(chef.fromDecimal("72 101 108 108 111").toString(), "Hello"); + }), + + it("From hex", () => { + assert.strictEqual(chef.fromHex("52 69 6e 67 20 41 6e 79 20 42 65 6c 6c 73 3f").toString(), "Ring Any Bells?"); + }), + + it("From hex content", () => { + assert.strictEqual(chef.fromHexContent("foo|3d|bar").toString(), "foo=bar"); + }), + + it("To and From hex dump", () => { + assert.strictEqual(chef.fromHexdump(chef.toHexdump("Elephant in the Room")).toString(), "Elephant in the Room"); + }), + + it("From HTML entity", () => { + assert.strictEqual(chef.fromHTMLEntity("&").toString(), "&"); + }), + + it("To and From morse code", () => { + assert.strictEqual(chef.fromMorseCode(chef.toMorseCode("Put a Sock In It")).toString(), "PUT A SOCK IN IT"); + }), + + it("From octal", () => { + assert.strictEqual(chef.fromOctal("113 156 157 167 40 164 150 145 40 122 157 160 145 163").toString(), "Know the Ropes"); + }), + + it("To, From punycode", () => { + assert.strictEqual(chef.fromPunycode(chef.toPunycode("münchen")).toString(), "münchen"); + }), + + it("From unix timestamp", () => { + assert.strictEqual(chef.fromUNIXTimestamp("978346800").toString(), "Mon 1 January 2001 11:00:00 UTC"); + }), + + it("Generate HOTP", () => { + const result = chef.generateHOTP("Cut The Mustard", { + name: "colonel", + }); + const expected = `URI: otpauth://hotp/colonel?secret=IN2XIICUNBSSATLVON2GC4TE + +Password: 034148`; + assert.strictEqual(result.toString(), expected); + }), + + it("Generate PGP Key Pair", async () => { + const result = await chef.generatePGPKeyPair("Back To the Drawing Board", { + keyType: "ECC-256", + }); + const expected = `-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: Keybase OpenPGP v2.0.77 +Comment: https://keybase.io/crypto + +xYgEW3KciQEBAK96Lx9G0WZiw1yhC35IogdumoxEJXsLdAVIjmskXeAfABEBAAEA +AP4wK+OZu3AqojwtRoyIK1pHKU93OAuam1iaLCOGCwCckQCA5PjU0aLNZqy/eKyX +T3rpKQCAxDDT5hHGAUfFPUu73KWABwB/WKpeUp7KwurMSbYVhgr1TijszQDCVAQT +AQoAHgUCW3KciQIbLwMLCQcDFQoIAh4BAheAAxYCAQIZAQAKCRD0VeyUMgmpz3OE +AP9qsnhhoK85Tnu6VKwKm1iMiJAssDQnFztDaMmmVdrN/MeIBFtynIkBAQDDhjIw +fxOprqVMYLk6aC45JyPAA2POzu0Zb/rx0tKeBwARAQABAAD/XAr66oiP9ZORHiT0 +XZH4m7vwZt7AHuq4pYtVlMQXk60AgPw2Mno/wStvE/SBa9R7AtsAgMZ2BkJjvNPZ +9YA6cl4lW0UAgI1+kJVLZ5VR9fPENfJR80EtncKDBBgBCgAPBQJbcpyJBQkPCZwA +AhsuAEgJEPRV7JQyCanPPSAEGQEKAAYFAltynIkACgkQrewgWMQZ/b2blwD/dbwh +/3F9xv+YGAwq8i1mzzswg4qBct6LoSIjGglULT9RIQD/cYd31YfKrEnbSBWD5PLi +zcSsxtBGKphwXiPAlQJ1Q5DHiARbcpyJAQEAs8V418lf1T74PpAwdBTiViEUX9jB +e+ZrAEVaq5nu1C8AEQEAAQAA/iPWhS23hnRTllealR4/H5OofZRwxvIQrxAJp6z1 +ICRxAIDayRpCAbK5EC3DzRU2z4VpAIDSWYSs9inI1VTfamJPMWHXAIC3aaukzCP4 +GEGeFobX/thnKhnCgwQYAQoADwUCW3KciQUJA8JnAAIbLgBICRD0VeyUMgmpzz0g +BBkBCgAGBQJbcpyJAAoJEB4jzL1hmQIXamUA/0c1M6BSqVtxNowPcOAXKYIxMca1 +VFcRWolHnZqdZQ7k/J8A/3HvNLRS3p1HvjQEfXl/qKoRRn843Py09ptDHh+xpGKh +=d+Vp +-----END PGP PRIVATE KEY BLOCK----- + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: Keybase OpenPGP v2.0.77 +Comment: https://keybase.io/crypto + +xi0EW3KciQEBAK96Lx9G0WZiw1yhC35IogdumoxEJXsLdAVIjmskXeAfABEBAAHN +AMJUBBMBCgAeBQJbcpyJAhsvAwsJBwMVCggCHgECF4ADFgIBAhkBAAoJEPRV7JQy +CanPc4QA/2qyeGGgrzlOe7pUrAqbWIyIkCywNCcXO0NoyaZV2s38zi0EW3KciQEB +AMOGMjB/E6mupUxguTpoLjknI8ADY87O7Rlv+vHS0p4HABEBAAHCgwQYAQoADwUC +W3KciQUJDwmcAAIbLgBICRD0VeyUMgmpzz0gBBkBCgAGBQJbcpyJAAoJEK3sIFjE +Gf29m5cA/3W8If9xfcb/mBgMKvItZs87MIOKgXLei6EiIxoJVC0/USEA/3GHd9WH +yqxJ20gVg+Ty4s3ErMbQRiqYcF4jwJUCdUOQzi0EW3KciQEBALPFeNfJX9U++D6Q +MHQU4lYhFF/YwXvmawBFWquZ7tQvABEBAAHCgwQYAQoADwUCW3KciQUJA8JnAAIb +LgBICRD0VeyUMgmpzz0gBBkBCgAGBQJbcpyJAAoJEB4jzL1hmQIXamUA/0c1M6BS +qVtxNowPcOAXKYIxMca1VFcRWolHnZqdZQ7k/J8A/3HvNLRS3p1HvjQEfXl/qKoR +Rn843Py09ptDHh+xpGKh +=ySwG +-----END PGP PUBLIC KEY BLOCK-----`; + assert.strictEqual(result.toString(), expected); + }), + + it("Generate UUID", () => { + const result = chef.generateUUID(); + assert.ok(result.toString()); + assert.strictEqual(result.toString().length, 36); + }), + + it("Gzip, Gunzip", () => { + assert.strictEqual(chef.gunzip(chef.gzip("Down To The Wire")).toString(), "Down To The Wire"); + }), + + it("Hex to Object Identifier", () => { + assert.strictEqual( + chef.hexToObjectIdentifier(chef.toHex("You Can't Teach an Old Dog New Tricks")).toString(), + "2.9.111.117.32.67.97.110.39.116.32.84.101.97.99.104.32.97.110.32.79.108.100.32.68.111.103.32.78.101.119.32.84.114.105.99.107.115"); + }), + + it("Hex to PEM", () => { + const result = chef.hexToPEM(chef.toHex("Yada Yada")); + const expected = `-----BEGIN CERTIFICATE-----\r +WWFkYSBZYWRh\r +-----END CERTIFICATE-----\r\n`; + assert.strictEqual(result.toString(), expected); + }), + + it("HMAC", () => { + assert.strictEqual(chef.HMAC("On Cloud Nine", {key: "idea"}).toString(), "e15c268b4ee755c9e52db094ed50add7"); + }), + + it("JPathExpression", () => { + assert.strictEqual(chef.JPathExpression("{\"key\" : \"value\"}", {query: "$.key"}).toString(), "\"value\""); + }), + + it("JSON Beautify", () => { + assert.strictEqual( + chef.JSONBeautify("{\"key\" : \"value\"}").toString(), + `{ + "key": "value" +}`); + }), + + it("Keccak", () => { + assert.strictEqual(chef.keccak("Flea Market").toString(), "c2a06880b19e453ee5440e8bd4c2024bedc15a6630096aa3f609acfd2b8f15f27cd293e1cc73933e81432269129ce954a6138889ce87831179d55dcff1cc7587"); + }), + + it("MD6", () => { + assert.strictEqual(chef.MD6("Head Over Heels", {key: "arty"}).toString(), "d8f7fe4931fbaa37316f76283d5f615f50ddd54afdc794b61da522556aee99ad"); + }), + + it("Parse ASN.1 Hex string", () => { + assert.strictEqual(chef.parseASN1HexString(chef.toHex("Mouth-watering")).toString(), "UNKNOWN(4d) 7574682d7761746572696e67\n"); + }), + + it("Parse DateTime", () => { + const result = chef.parseDateTime("06/07/2001 01:59:30"); + const expected = `Date: Friday 6th July 2001 +Time: 01:59:30 +Period: AM +Timezone: UTC +UTC offset: +0000 + +Daylight Saving Time: false +Leap year: false +Days in this month: 31 + +Day of year: 187 +Week number: 2001 +Quarter: 3`; + assert.strictEqual(result.toString(), expected); + }), + + it("Parse IPV6 address", () => { + const result = chef.parseIPv6Address("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); + const expected = `Longhand: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 +Shorthand: 2001:db8:85a3::8a2e:370:7334 + +This is a documentation IPv6 address. This range should be used whenever an example IPv6 address is given or to model networking scenarios. Corresponds to 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 in IPv4. +Documentation range: 2001:db8::/32`; + assert.strictEqual(result.toString(), expected); + }), + + it("Parse URI", () => { + const result = chef.parseURI("https://www.google.co.uk/search?q=almonds"); + const expected = `Protocol: https: +Hostname: www.google.co.uk +Path name: /search +Arguments: +\tq = almonds +`; + assert.strictEqual(result.toString(), expected); + }), + + it("Parse user agent", () => { + const result = chef.parseUserAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 "); + const expected = `Browser + Name: Mozilla + Version: 5.0 +Device + Model: unknown + Type: unknown + Vendor: unknown +Engine + Name: Gecko + Version: 47.0 +OS + Name: Windows + Version: 7 +CPU + Architecture: amd64`; + assert.strictEqual(result.toString(), expected); + }), + + it("PGP Encrypt", async () => { + const pbkey = `-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mI0EVWOihAEEALzwFAVWTrD0KiWCH5tX6q6QsGjlRn4IP2uj/xWsJZDNbCKm+JAe +1RvIootpW1+PNNMJlIInwUgtCjtJ9gZbGBpXeqwdSn0oYuj9X86ekXOUnZsRoPCj +RwS8kpbrvRVfhWN8hYuXFcXK2J2Ld0ZpVyJzkncpFdpAgzTPMfrO1HS5ABEBAAG0 +GmdwZyBuYW1lIChjb21tZW50KSA8ZW1AaWw+iLgEEwECACIFAlVjooQCGwMGCwkI +BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBg8dTRwi4g5I40D/2+uUuQxa3uMrAeI +dXLaJWz3V0cl1rotfBP47apDUGbkm1HVgULJUo8Bo15Ii83ST8TUsyja3XcLutHb +IwYSWo41gEV48+NKoN6Oy3HwqBoHfH06bu0If75vdSjnZpB2dO/Ph7L9kz78gc4y +tZx4bE64MTlL2AYghZxyYpFyydjXuI0EVWOihAEEANE4UU+4iB2hMAXq93hiBzIh +AMtn/DlWbJkpdUgrjKOG6tILs28mrw9rI4PivmT7grkyNW8sa3ATsmWC1xChxGTN +T1guyh0Hhbc3Otfng2BFSWcBkPwUoNaOdrVFpP9J51IYrsQHsjbZlY45ghDBzM6t +sISfkmmFCsp0l7w/XAcvABEBAAGInwQYAQIACQUCVWOihAIbDAAKCRAYPHU0cIuI +OQ2BA/9KWqOhXZW75ac7CuJMfileZR7vRy9CkKyNG21cZtAlqftAX+m8FGdG0duU +jKHiPvjXhSfP3lmrQ7brja9LgSzkiBqQzvPW55G67nGQdUC+mqZNJNlRh+8atf9I +5nxg2i8zn6F5cLaNWz7cl27m1/mXKcH3gult1PLR4PiYLiC9aw== +=xw3e +-----END PGP PUBLIC KEY BLOCK-----`; + + const result = await chef.PGPEncrypt("A Fool and His Money are Soon Parted", { + publicKeyOfRecipient: pbkey, + }); + const expected = `-----BEGIN PGP MESSAGE----- +Version: Keybase OpenPGP v2.0.77 +Comment: https://keybase.io/crypto + +wYwDv1kIXPPNwmABA/4syW+oO+S/mfpjdp83/MZJiKh6XNQoPr/N5/1Is/QXYu9V +/v8/b+eReOpUVC6cVrJ8U5cB19y1Az3NQWHXLEC0jND2wL3cUM4sv87hlvv2PLhc +okv8OHNCitRiweo7NZHVygHGdFvY082G47e1PkyPAuVynvzdD450ta/s/KOxZdJg +ARbZIrC6WmjYNLwhbpRYawKD+3N4I5qliRpU2POKRi9UROAW9dth6egy60TTCvyO +jmPGsv1elXxVzqs58UZLD2c3vBhGkU2BV6kRKh+lj/EcVrzsFhGCz/7DKxPoDHLS +=IBYt +-----END PGP MESSAGE----- +`; + assert.strictEqual(result.toString(), expected); + }), + + it("Raw deflate", () => { + assert.strictEqual(chef.rawInflate(chef.rawDeflate("Like Father Like Son", { compressionType: "Fixed Huffman Coding"})).toString(), "Like Father Like Son"); + }), + + it("RC4", () => { + assert.strictEqual( + chef.RC4("Go Out On a Limb", {passphrase: {string: "Under Your Nose", option: "UTF8"}, inputFormat: "UTF8", outputFormat: "Hex"}).toString(), + "7d17e60d9bc94b7f4095851c729e69a2"); + }), + + it("RC4 Drop", () => { + assert.strictEqual( + chef.RC4Drop("Go Out On a Limb", {passphrase: {string: "Under Your Nose", option: "UTF8"}, inputFormat: "UTF8", outputFormat: "Hex"}).toString(), + "8fa5f2751d34476a0c857439f43816cf"); + }), + + it("Regular Expression", () => { + assert.strictEqual(chef.regularExpression("Wouldn't Harm a Fly", {regex: "\\'[a-z]"}).toString(), "Wouldn't Harm a Fly"); + }), + + it("Remove EXIF", () => { + const result = chef.removeEXIF(fs.readFileSync("tests/node/sampleData/pic.jpg")); + assert.strictEqual(result.toString().length, 4582); + }), + + it("Scan for embedded files", () => { + const result = chef.scanForEmbeddedFiles(fs.readFileSync("src/web/static/images/cook_male-32x32.png")); + const expected = "Scanning data for 'magic bytes' which may indicate embedded files."; + assert.ok(result.toString().indexOf(expected) === 0); + }), + + it("Scrypt", () => { + assert.strictEqual( + chef.scrypt("Playing For Keeps", {salt: {string: "salty", option: "Hex"}}).toString(), + "5446b6d86d88515894a163201765bceed0bc39610b1506cdc4d939ffc638bc46e051bce756e2865165d89d955a43a7eb5504502567dea8bfc9e7d49aaa894c07"); + }), + + it("SHA3", () => { + assert.strictEqual( + chef.SHA3("benign gravel").toString(), + "2b1e36e0dbe151a89887be08da3bad141908cce62327f678161bcf058627e87abe57e3c5fce6581678714e6705a207acbd5c1f37f7a812280bc2cc558f00bed9"); + }), + + it("Shake", () => { + assert.strictEqual( + chef.shake("murderous bloodshed").toString(), + "b79b3bb88099330bc6a15122f8dfaededf57a33b51c748d5a94e8122ff18d21e12f83412926b7e4a77a85ba6f36aa4841685e78296036337175e40096b5ac000"); + }), + + it("Snefru", () => { + assert.strictEqual( + chef.snefru("demeaning milestone").toString(), + "a671b48770fe073ce49e9259cc2f47d345a53712639f8ae23c5ad3fec19540a5"); + }), + + it("SQL Beautify", () => { + const result = chef.SQLBeautify(`SELECT MONTH, ID, RAIN_I, TEMP_F +FROM STATS;`); + const expected = `SELECT MONTH, + ID, + RAIN_I, + TEMP_F +FROM STATS;`; + assert.strictEqual(result.toString(), expected); + }), + + it("SSDEEP", () => { + assert.strictEqual( + chef.SSDEEP("shotgun tyranny snugly").toString(), + "3:DLIXzMQCJc:XERKc"); + }), + + it("strings", () => { + const result = chef.strings("smothering ampersand abreast", {displayTotal: true}); + const expected = `Total found: 1 + +smothering ampersand abreast +`; + assert.strictEqual(result.toString(), expected); + }), + + it("toBase64: editableOption", () => { + const result = toBase64("some input", { + alphabet: { + value: "0-9A-W" + }, + }); + assert.strictEqual(result.toString(), "SPI1R1T0"); + }), + + it("toBase64: editableOptions key is value", () => { + const result = toBase64("some input", { + alphabet: "0-9A-W", + }); + assert.strictEqual(result.toString(), "SPI1R1T0"); + }), + + it("toBase64: editableOptions default", () => { + const result = toBase64("some input"); + assert.strictEqual(result.toString(), "c29tZSBpbnB1dA=="); + }), + + it("To BCD", () => { + assert.strictEqual(chef.toBCD("443").toString(), "0100 0100 0011"); + }), + + it("To CamelCase", () => { + assert.strictEqual(chef.toCamelCase("Quickest Wheel").toString(), "quickestWheel"); + }), + + it("toHex: accepts args", () => { + const result = toHex("some input", { + delimiter: "Colon", + }); + assert.strictEqual(result.toString(), "73:6f:6d:65:20:69:6e:70:75:74"); + }), + + it("To Kebab case", () => { + assert.strictEqual(chef.toKebabCase("Elfin Gold").toString(), "elfin-gold"); + }), + + it("To punycode", () => { + assert.strictEqual(chef.toPunycode("♠ ♣ ♥ ♦ ← ↑ ‍ →").toString(), " -m06cw7klao368lfb3aq"); + }), + + it("to snake case", () => { + assert.strictEqual(chef.toSnakeCase("Abhorrent Grass").value, "abhorrent_grass"); + }), + + it("to unix timestamp", () => { + assert.strictEqual(chef.toUNIXTimestamp("04-01-2001").toString(), "986083200 (Sun 1 April 2001 00:00:00 UTC)"); + }), + + it("Translate DateTime format", () => { + assert.strictEqual(chef.translateDateTimeFormat("01/04/1999 22:33:01").toString(), "Thursday 1st April 1999 22:33:01 +00:00 UTC"); + }), + + it("Triple DES encrypt / decrypt", () => { + assert.strictEqual( + chef.tripleDESDecrypt( + chef.tripleDESEncrypt("Destroy Money", {key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}}), + {key: {string: "30 31 2f 30 34 2f 31 39 39 39 20 32 32 3a 33 33 3a 30 3130 31 2f 30 34", option: "Hex"}}).toString(), + "Destroy Money"); + }), + + it("UNIX Timestamp to Windows Filetime", () => { + assert.strictEqual(chef.UNIXTimestampToWindowsFiletime("2020735").toString(), "116464943350000000"); + }), + + it("XML Beautify", () => { + assert.strictEqual( + chef.XMLBeautify("abc").toString(), + ` +\\tabc +`); + }), + + it("XOR: toggleString with default option", () => { + assert.strictEqual(chef.XOR("fe023da5", { + key: "73 6f 6d 65" + }).toString(), + "\u0015\n]W@\u000b\fP"); + }), + + it("XOR: toggleString with custom option", () => { + assert.strictEqual(chef.XOR("fe023da5", { + key: { + string: "73 6f 6d 65", + option: "utf8", + } + }).toString(), + "QV\u0010\u0004UDWQ"); + }), + + it("XPath expression", () => { + assert.strictEqual( + chef.XPathExpression("abc", {xPath: "contact-info/company"}).toString(), + "abc"); + }), + + it("Zlib deflate / inflate", () => { + assert.strictEqual(chef.zlibInflate(chef.zlibDeflate("cut homer wile rooky grits dizen")).toString(), "cut homer wile rooky grits dizen"); + }), + + it("extract EXIF", () => { + assert.strictEqual( + chef.extractEXIF(fs.readFileSync("tests/node/sampleData/pic.jpg")).toString(), + `Found 7 tags. + +Orientation: 1 +XResolution: 72 +YResolution: 72 +ResolutionUnit: 2 +ColorSpace: 1 +ExifImageWidth: 57 +ExifImageHeight: 57`); + }), + + it("Tar", () => { + const tarred = chef.tar("some file content", { + filename: "test.txt" + }); + assert.strictEqual(tarred.type, 7); + assert.strictEqual(tarred.value.size, 2048); + assert.strictEqual(tarred.value.data.toString().substr(0, 8), "test.txt"); + }), + + it("Untar", () => { + const tarred = chef.tar("some file content", { + filename: "filename.txt", + }); + const untarred = chef.untar(tarred); + assert.strictEqual(untarred.type, 8); + assert.strictEqual(untarred.value.length, 1); + assert.strictEqual(untarred.value[0].name, "filename.txt"); + assert.strictEqual(untarred.value[0].data.toString(), "some file content"); + }), + + it("Zip", () => { + const zipped = chef.zip("some file content", { + filename: "sample.zip", + comment: "added", + operaringSystem: "Unix", + }); + + assert.strictEqual(zipped.type, 7); + assert.ok(zipped.value.data.toString().includes("sample.zip")); + assert.ok(zipped.value.data.toString().includes("added")); + }), + + it("Unzip", () => { + const zipped = chef.zip("some file content", { + filename: "zipped.zip", + comment: "zippy", + }); + const unzipped = chef.unzip(zipped); + + assert.equal(unzipped.type, 8); + assert.equal(unzipped.value[0].data, "some file content"); + assert.equal(unzipped.value[0].name, "zipped.zip"); + }), + + it("Unzip with password", () => { + const zipped = chef.zip("some content", { + password: "abcd", + }); + const unzipped = chef.unzip(zipped, { + password: "abcd", + }); + + assert.equal(unzipped.value[0].data, "some content"); + }), + +]); + diff --git a/tests/operations/Dish.mjs b/tests/operations/Dish.mjs new file mode 100644 index 0000000000..9f5264f737 --- /dev/null +++ b/tests/operations/Dish.mjs @@ -0,0 +1,12 @@ +import TestRegister from "../../lib/TestRegister"; +import Dish from "../../src/core/Dish"; +import it from "../node/assertionHandler"; +import assert from "assert"; + +TestRegister.addApiTests([ + it("Dish - presentAs: should exist", () => { + const dish = new Dish(); + assert(dish.presentAs); + }), + +]); diff --git a/tests/operations/index.mjs b/tests/operations/index.mjs index 229ef8b9ba..3a0314a6a6 100644 --- a/tests/operations/index.mjs +++ b/tests/operations/index.mjs @@ -11,18 +11,12 @@ * @license Apache-2.0 */ -// Define global environment functions -global.ENVIRONMENT_IS_WORKER = function() { - return typeof importScripts === "function"; -}; -global.ENVIRONMENT_IS_NODE = function() { - return typeof process === "object" && typeof require === "function"; -}; -global.ENVIRONMENT_IS_WEB = function() { - return typeof window === "object"; -}; +import { + setLongTestFailure, + logTestReport, +} from "../lib/utils"; -import TestRegister from "./TestRegister"; +import TestRegister from "../lib/TestRegister"; import "./tests/BCD"; import "./tests/BSON"; import "./tests/Base58"; @@ -96,81 +90,20 @@ import "./tests/Protobuf"; // Cannot test operations that use the File type yet //import "./tests/SplitColourChannels"; -let allTestsPassing = true; -const testStatusCounts = { - total: 0, -}; - - -/** - * Helper function to convert a status to an icon. - * - * @param {string} status - * @returns {string} - */ -function statusToIcon(status) { - const icons = { - erroring: "🔥", - failing: "❌", - passing: "✔️️", - }; - return icons[status] || "?"; -} - - -/** - * Displays a given test result in the console. - * - * @param {Object} testResult - */ -function handleTestResult(testResult) { - allTestsPassing = allTestsPassing && testResult.status === "passing"; - const newCount = (testStatusCounts[testResult.status] || 0) + 1; - testStatusCounts[testResult.status] = newCount; - testStatusCounts.total += 1; +// import "./tests/nodeApi/nodeApi"; +// import "./tests/nodeApi/ops"; - console.log([ - statusToIcon(testResult.status), - testResult.test.name - ].join(" ")); - - if (testResult.output) { - console.log( - testResult.output - .trim() - .replace(/^/, "\t") - .replace(/\n/g, "\n\t") - ); +const testStatus = { + allTestsPassing: true, + counts: { + total: 0, } -} +}; +setLongTestFailure(); -/** - * Fail if the process takes longer than 60 seconds. - */ -setTimeout(function() { - console.log("Tests took longer than 60 seconds to run, returning."); - process.exit(1); -}, 60 * 1000); - +const logOpsTestReport = logTestReport.bind(null, testStatus); TestRegister.runTests() - .then(function(results) { - results.forEach(handleTestResult); - - console.log("\n"); - - for (const testStatus in testStatusCounts) { - const count = testStatusCounts[testStatus]; - if (count > 0) { - console.log(testStatus.toUpperCase(), count); - } - } - - if (!allTestsPassing) { - console.log("\nFailing tests:\n"); - results.filter(r => r.status !== "passing").forEach(handleTestResult); - } + .then(logOpsTestReport); - process.exit(allTestsPassing ? 0 : 1); - }); diff --git a/tests/operations/tests/BCD.mjs b/tests/operations/tests/BCD.mjs index 87cbd53e5f..41a0b99b65 100644 --- a/tests/operations/tests/BCD.mjs +++ b/tests/operations/tests/BCD.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/BLAKE2b.mjs b/tests/operations/tests/BLAKE2b.mjs index 94c4fab91e..88eff1afe3 100644 --- a/tests/operations/tests/BLAKE2b.mjs +++ b/tests/operations/tests/BLAKE2b.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/BLAKE2s.mjs b/tests/operations/tests/BLAKE2s.mjs index 09d53b6a09..6bddeec18b 100755 --- a/tests/operations/tests/BLAKE2s.mjs +++ b/tests/operations/tests/BLAKE2s.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/BSON.mjs b/tests/operations/tests/BSON.mjs index f9eb6a879f..58c7bc3f8b 100644 --- a/tests/operations/tests/BSON.mjs +++ b/tests/operations/tests/BSON.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Base58.mjs b/tests/operations/tests/Base58.mjs index 0cc7612c7a..65885af695 100644 --- a/tests/operations/tests/Base58.mjs +++ b/tests/operations/tests/Base58.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Base62.mjs b/tests/operations/tests/Base62.mjs index bb98348bfa..a0b72862ff 100644 --- a/tests/operations/tests/Base62.mjs +++ b/tests/operations/tests/Base62.mjs @@ -7,7 +7,7 @@ * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Base64.mjs b/tests/operations/tests/Base64.mjs index d48c93c69f..969235e52f 100644 --- a/tests/operations/tests/Base64.mjs +++ b/tests/operations/tests/Base64.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const ALL_BYTES = [ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", diff --git a/tests/operations/tests/BitwiseOp.mjs b/tests/operations/tests/BitwiseOp.mjs index 09af70a150..96f01b44bc 100644 --- a/tests/operations/tests/BitwiseOp.mjs +++ b/tests/operations/tests/BitwiseOp.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Bombe.mjs b/tests/operations/tests/Bombe.mjs index b44e032c87..5f747c6a36 100644 --- a/tests/operations/tests/Bombe.mjs +++ b/tests/operations/tests/Bombe.mjs @@ -4,7 +4,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ByteRepr.mjs b/tests/operations/tests/ByteRepr.mjs index 86b6d58d25..f2514ef5ec 100644 --- a/tests/operations/tests/ByteRepr.mjs +++ b/tests/operations/tests/ByteRepr.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const ALL_BYTES = [ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", diff --git a/tests/operations/tests/CSV.mjs b/tests/operations/tests/CSV.mjs index 28610058a0..f90ad79e78 100644 --- a/tests/operations/tests/CSV.mjs +++ b/tests/operations/tests/CSV.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const EXAMPLE_CSV = `A,B,C,D,E,F\r 1,2,3,4,5,6\r diff --git a/tests/operations/tests/CartesianProduct.mjs b/tests/operations/tests/CartesianProduct.mjs index cb89ac5b92..da7bff7afe 100644 --- a/tests/operations/tests/CartesianProduct.mjs +++ b/tests/operations/tests/CartesianProduct.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/CharEnc.mjs b/tests/operations/tests/CharEnc.mjs index d154ca3ee5..029f966d4f 100644 --- a/tests/operations/tests/CharEnc.mjs +++ b/tests/operations/tests/CharEnc.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Charts.mjs b/tests/operations/tests/Charts.mjs index 5b6d97811d..aa891d81c6 100644 --- a/tests/operations/tests/Charts.mjs +++ b/tests/operations/tests/Charts.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Checksum.mjs b/tests/operations/tests/Checksum.mjs index 4df7783c00..f7801470c9 100644 --- a/tests/operations/tests/Checksum.mjs +++ b/tests/operations/tests/Checksum.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const BASIC_STRING = "The ships hung in the sky in much the same way that bricks don't."; const UTF8_STR = "ნუ პანიკას"; diff --git a/tests/operations/tests/Ciphers.mjs b/tests/operations/tests/Ciphers.mjs index f806e5539c..132c9c1f85 100644 --- a/tests/operations/tests/Ciphers.mjs +++ b/tests/operations/tests/Ciphers.mjs @@ -7,7 +7,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ diff --git a/tests/operations/tests/Code.mjs b/tests/operations/tests/Code.mjs index 048e13d68d..1d01cbf53e 100644 --- a/tests/operations/tests/Code.mjs +++ b/tests/operations/tests/Code.mjs @@ -7,7 +7,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const JSON_TEST_DATA = { "store": { diff --git a/tests/operations/tests/Comment.mjs b/tests/operations/tests/Comment.mjs index 2c033f5692..2a90d5ed4c 100644 --- a/tests/operations/tests/Comment.mjs +++ b/tests/operations/tests/Comment.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const ALL_BYTES = [ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", diff --git a/tests/operations/tests/Compress.mjs b/tests/operations/tests/Compress.mjs index 877b7215d6..22e5a7211a 100644 --- a/tests/operations/tests/Compress.mjs +++ b/tests/operations/tests/Compress.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ConditionalJump.mjs b/tests/operations/tests/ConditionalJump.mjs index b38c0d1b95..a23693cb57 100644 --- a/tests/operations/tests/ConditionalJump.mjs +++ b/tests/operations/tests/ConditionalJump.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ConvertCoordinateFormat.mjs b/tests/operations/tests/ConvertCoordinateFormat.mjs index 1291aa4d53..80a336b7be 100644 --- a/tests/operations/tests/ConvertCoordinateFormat.mjs +++ b/tests/operations/tests/ConvertCoordinateFormat.mjs @@ -18,7 +18,7 @@ * UTM: 30N 699456 5709791, */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Crypt.mjs b/tests/operations/tests/Crypt.mjs index 87074f4bc0..2ff7f5b451 100644 --- a/tests/operations/tests/Crypt.mjs +++ b/tests/operations/tests/Crypt.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ /** diff --git a/tests/operations/tests/DateTime.mjs b/tests/operations/tests/DateTime.mjs index 3063ca6459..6c15315793 100644 --- a/tests/operations/tests/DateTime.mjs +++ b/tests/operations/tests/DateTime.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Enigma.mjs b/tests/operations/tests/Enigma.mjs index 5a3a8002fa..49ba6ba67d 100644 --- a/tests/operations/tests/Enigma.mjs +++ b/tests/operations/tests/Enigma.mjs @@ -4,7 +4,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ExtractEmailAddresses.mjs b/tests/operations/tests/ExtractEmailAddresses.mjs index 59365828d8..119d684368 100644 --- a/tests/operations/tests/ExtractEmailAddresses.mjs +++ b/tests/operations/tests/ExtractEmailAddresses.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Fork.mjs b/tests/operations/tests/Fork.mjs index 3752e340f3..9cfd7e9a19 100644 --- a/tests/operations/tests/Fork.mjs +++ b/tests/operations/tests/Fork.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/FromDecimal.mjs b/tests/operations/tests/FromDecimal.mjs index b9b4de058a..f7cf66a2ac 100644 --- a/tests/operations/tests/FromDecimal.mjs +++ b/tests/operations/tests/FromDecimal.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2018 * @licence Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/FromGeohash.mjs b/tests/operations/tests/FromGeohash.mjs new file mode 100644 index 0000000000..4c033dc09e --- /dev/null +++ b/tests/operations/tests/FromGeohash.mjs @@ -0,0 +1,55 @@ +/** + * To Geohash tests + * + * @author gchq77703 + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ +import TestRegister from "../../lib/TestRegister"; + +TestRegister.addTests([ + { + name: "From Geohash", + input: "ww8p1r4t8", + expectedOutput: "37.83238649368286,112.55838632583618", + recipeConfig: [ + { + op: "From Geohash", + args: [], + }, + ], + }, + { + name: "From Geohash", + input: "ww8p1r", + expectedOutput: "37.83416748046875,112.5604248046875", + recipeConfig: [ + { + op: "From Geohash", + args: [], + }, + ], + }, + { + name: "From Geohash", + input: "ww8", + expectedOutput: "37.265625,113.203125", + recipeConfig: [ + { + op: "From Geohash", + args: [], + }, + ], + }, + { + name: "From Geohash", + input: "w", + expectedOutput: "22.5,112.5", + recipeConfig: [ + { + op: "From Geohash", + args: [], + }, + ], + }, +]); diff --git a/tests/operations/tests/Hash.mjs b/tests/operations/tests/Hash.mjs index 1a4688c8d3..7b8d4138e5 100644 --- a/tests/operations/tests/Hash.mjs +++ b/tests/operations/tests/Hash.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/HaversineDistance.mjs b/tests/operations/tests/HaversineDistance.mjs index ef0a298e8f..0c9251203d 100644 --- a/tests/operations/tests/HaversineDistance.mjs +++ b/tests/operations/tests/HaversineDistance.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Hexdump.mjs b/tests/operations/tests/Hexdump.mjs index 6b5c50433a..009d5ff5a6 100644 --- a/tests/operations/tests/Hexdump.mjs +++ b/tests/operations/tests/Hexdump.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const ALL_BYTES = [ "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", diff --git a/tests/operations/tests/Image.mjs b/tests/operations/tests/Image.mjs index 44f0af71b6..e95678c8f5 100644 --- a/tests/operations/tests/Image.mjs +++ b/tests/operations/tests/Image.mjs @@ -7,7 +7,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/IndexOfCoincidence.mjs b/tests/operations/tests/IndexOfCoincidence.mjs index 3dc4cd3528..c3485c5ba0 100644 --- a/tests/operations/tests/IndexOfCoincidence.mjs +++ b/tests/operations/tests/IndexOfCoincidence.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/JSONBeautify.mjs b/tests/operations/tests/JSONBeautify.mjs index 4388f82b15..32a82ffd3b 100644 --- a/tests/operations/tests/JSONBeautify.mjs +++ b/tests/operations/tests/JSONBeautify.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/JSONMinify.mjs b/tests/operations/tests/JSONMinify.mjs index dab396f149..0fed776014 100644 --- a/tests/operations/tests/JSONMinify.mjs +++ b/tests/operations/tests/JSONMinify.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/JSONtoCSV.mjs b/tests/operations/tests/JSONtoCSV.mjs index 67d46e6459..3d66bb411e 100644 --- a/tests/operations/tests/JSONtoCSV.mjs +++ b/tests/operations/tests/JSONtoCSV.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const EXPECTED_CSV_SINGLE = "a,b,c\r\n1,2,3\r\n"; const EXPECTED_CSV_MULTIPLE = "a,b,c\r\n1,2,3\r\n1,2,3\r\n"; diff --git a/tests/operations/tests/JWTDecode.mjs b/tests/operations/tests/JWTDecode.mjs index df9b9bcca9..f1e0bd2414 100644 --- a/tests/operations/tests/JWTDecode.mjs +++ b/tests/operations/tests/JWTDecode.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const outputObject = JSON.stringify({ String: "SomeString", diff --git a/tests/operations/tests/JWTSign.mjs b/tests/operations/tests/JWTSign.mjs index 697877129b..d2a825fb5a 100644 --- a/tests/operations/tests/JWTSign.mjs +++ b/tests/operations/tests/JWTSign.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const inputObject = JSON.stringify({ String: "SomeString", diff --git a/tests/operations/tests/JWTVerify.mjs b/tests/operations/tests/JWTVerify.mjs index 52b8574bbf..86314eaba0 100644 --- a/tests/operations/tests/JWTVerify.mjs +++ b/tests/operations/tests/JWTVerify.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const outputObject = JSON.stringify({ String: "SomeString", diff --git a/tests/operations/tests/Jump.mjs b/tests/operations/tests/Jump.mjs index 9bc98f312f..e28a800779 100644 --- a/tests/operations/tests/Jump.mjs +++ b/tests/operations/tests/Jump.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/MS.mjs b/tests/operations/tests/MS.mjs index 01618d904d..324621799b 100644 --- a/tests/operations/tests/MS.mjs +++ b/tests/operations/tests/MS.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Magic.mjs b/tests/operations/tests/Magic.mjs index 8247c37695..894b5cd16b 100644 --- a/tests/operations/tests/Magic.mjs +++ b/tests/operations/tests/Magic.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ diff --git a/tests/operations/tests/Media.mjs b/tests/operations/tests/Media.mjs index 961161673b..bc8299139c 100644 --- a/tests/operations/tests/Media.mjs +++ b/tests/operations/tests/Media.mjs @@ -4,7 +4,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/MorseCode.mjs b/tests/operations/tests/MorseCode.mjs index 1da2cb7805..dee5a4c1a5 100644 --- a/tests/operations/tests/MorseCode.mjs +++ b/tests/operations/tests/MorseCode.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/MultipleBombe.mjs b/tests/operations/tests/MultipleBombe.mjs index 32d2db08e6..64d8dd5e73 100644 --- a/tests/operations/tests/MultipleBombe.mjs +++ b/tests/operations/tests/MultipleBombe.mjs @@ -4,7 +4,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/NetBIOS.mjs b/tests/operations/tests/NetBIOS.mjs index f721019679..c7da30ba7c 100644 --- a/tests/operations/tests/NetBIOS.mjs +++ b/tests/operations/tests/NetBIOS.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/OTP.mjs b/tests/operations/tests/OTP.mjs index a919879843..1599cfd121 100644 --- a/tests/operations/tests/OTP.mjs +++ b/tests/operations/tests/OTP.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/PGP.mjs b/tests/operations/tests/PGP.mjs index 8449add413..8b488396f9 100644 --- a/tests/operations/tests/PGP.mjs +++ b/tests/operations/tests/PGP.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; const ASCII_TEXT = "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."; diff --git a/tests/operations/tests/PHP.mjs b/tests/operations/tests/PHP.mjs index dabd4d3973..c7bd516eae 100644 --- a/tests/operations/tests/PHP.mjs +++ b/tests/operations/tests/PHP.mjs @@ -7,7 +7,7 @@ * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ParseIPRange.mjs b/tests/operations/tests/ParseIPRange.mjs index 83a8eea9af..3854bd3eab 100644 --- a/tests/operations/tests/ParseIPRange.mjs +++ b/tests/operations/tests/ParseIPRange.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ParseQRCode.mjs b/tests/operations/tests/ParseQRCode.mjs index 191699d4fc..df5ef1b1d9 100644 --- a/tests/operations/tests/ParseQRCode.mjs +++ b/tests/operations/tests/ParseQRCode.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ParseTLV.mjs b/tests/operations/tests/ParseTLV.mjs index 5617bf2b27..0fbdffa076 100644 --- a/tests/operations/tests/ParseTLV.mjs +++ b/tests/operations/tests/ParseTLV.mjs @@ -6,7 +6,7 @@ * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/PowerSet.mjs b/tests/operations/tests/PowerSet.mjs index c742b030b3..fbb59da8d5 100644 --- a/tests/operations/tests/PowerSet.mjs +++ b/tests/operations/tests/PowerSet.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Protobuf.mjs b/tests/operations/tests/Protobuf.mjs index 957e4d54a3..d818a7dc89 100644 --- a/tests/operations/tests/Protobuf.mjs +++ b/tests/operations/tests/Protobuf.mjs @@ -6,7 +6,7 @@ * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Regex.mjs b/tests/operations/tests/Regex.mjs index b48673dcb6..97637301c7 100644 --- a/tests/operations/tests/Regex.mjs +++ b/tests/operations/tests/Regex.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Register.mjs b/tests/operations/tests/Register.mjs index dec017dda3..c2a3738f7d 100644 --- a/tests/operations/tests/Register.mjs +++ b/tests/operations/tests/Register.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/RemoveDiacritics.mjs b/tests/operations/tests/RemoveDiacritics.mjs index 1b712ce3a4..63182ed5eb 100644 --- a/tests/operations/tests/RemoveDiacritics.mjs +++ b/tests/operations/tests/RemoveDiacritics.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Rotate.mjs b/tests/operations/tests/Rotate.mjs index 83e39ee884..9e57b9cf80 100644 --- a/tests/operations/tests/Rotate.mjs +++ b/tests/operations/tests/Rotate.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ diff --git a/tests/operations/tests/SeqUtils.mjs b/tests/operations/tests/SeqUtils.mjs index 6947928dd2..207c3802e4 100644 --- a/tests/operations/tests/SeqUtils.mjs +++ b/tests/operations/tests/SeqUtils.mjs @@ -5,7 +5,7 @@ * @copyright Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/SetDifference.mjs b/tests/operations/tests/SetDifference.mjs index 1990d19d96..f8075e680a 100644 --- a/tests/operations/tests/SetDifference.mjs +++ b/tests/operations/tests/SetDifference.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/SetIntersection.mjs b/tests/operations/tests/SetIntersection.mjs index 72d2529b6a..a44bc2b8a0 100644 --- a/tests/operations/tests/SetIntersection.mjs +++ b/tests/operations/tests/SetIntersection.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/SetUnion.mjs b/tests/operations/tests/SetUnion.mjs index 1593d20274..68d6b219d2 100644 --- a/tests/operations/tests/SetUnion.mjs +++ b/tests/operations/tests/SetUnion.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/SplitColourChannels.mjs b/tests/operations/tests/SplitColourChannels.mjs index 60788425e1..9a8c1c8124 100644 --- a/tests/operations/tests/SplitColourChannels.mjs +++ b/tests/operations/tests/SplitColourChannels.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; // Base 85 encoded const testCard = "/9j/4AAQSkZJRgABAQEAYABgAAD/4QCqRXhpZgAATU0AKgAAAAgACQEaAAUAAAABAAAAegEbAAUAAAABAAAAggEoAAMAAAABAAIAAAExAAIAAAAQAAAAigMBAAUAAAABAAAAmgMDAAEAAAABAAAAAFEQAAEAAAABAQAAAFERAAQAAAABAAAOxFESAAQAAAABAAAOxAAAAAAAAXcKAAAD6AABdwoAAAPocGFpbnQubmV0IDQuMS40AAABhqAAALGP/9sAQwACAQECAQECAgICAgICAgMFAwMDAwMGBAQDBQcGBwcHBgcHCAkLCQgICggHBwoNCgoLDAwMDAcJDg8NDA4LDAwM/9sAQwECAgIDAwMGAwMGDAgHCAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwM/8AAEQgAtAFAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eH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vHcuRXvwvGiblyktCDZt83mm14m2uWX4xcVt8WnlEMTvWzl8TUF8XfFbtPrZ4usov47y2xGUb0t5nfI6cfhc8cuL37Lhq4oWX1d8++LXVa7Fz1daoewK5XD4JQ2vVr4/QXxZ5dsVX1b5cuJweKnhmxXEy8WXUyjfh0I5HH6Phq8idvFtK4cP4rclDofXGr6a+Hzl96Mc/r84HH4Nw4tEC0orL1corbxe/DyllTa9XFAoLXbxekEQL1coLT5P2Q2vE5RdIb6MoLSgtOl1yrU4HJ4zHA6Hw3dqOHwH4nA4XBsOv3HlcDj8MobDdySIw+HQhsM3LF4uDofDpeHwOxeHw+G24fANKIfD4csbvoogdoVCeZnSChML4vWCQiEorVAoFAqlFaIVgum2QrlUWqG0QiEoFMpthYnSFsTLDQQDQSGIlynPK5RrhbIrFAqFQmmFiUJQXi920YbD4Tmrb0Lsyq5QWlwqu7hULsXHFYJyW1yLXRAtiFZatLhtIgiCeJ0gWhAE0YafZ7otLgWxi7ZohdLK4fA1rH62eF65Fi0+LSjXCmVXPq7sSisUgnJbUHallVaIVnbltoGhDZRdPK8wMBCtfFowMDAwEASFzfMKQTDtgsLiecOlaNEmCtGCwobN5ymHw0usfnFB2UWL14tWKJQWL1Na2S2eFxSilVYIhl25LSgsWLWBIHZxW7BgwYpohfi0FSuCoQWFk+cNvMUbbHbBwGYXu9IWl8qlgUIwEO2MN14mKNfK4fCc/wWQn0TduldZ/gAAAABJRU5ErkJggg=="; diff --git a/tests/operations/tests/StrUtils.mjs b/tests/operations/tests/StrUtils.mjs index 515b5005b9..5315371f61 100644 --- a/tests/operations/tests/StrUtils.mjs +++ b/tests/operations/tests/StrUtils.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/SymmetricDifference.mjs b/tests/operations/tests/SymmetricDifference.mjs index d99783a3b0..88d6f46c7a 100644 --- a/tests/operations/tests/SymmetricDifference.mjs +++ b/tests/operations/tests/SymmetricDifference.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/TextEncodingBruteForce.mjs b/tests/operations/tests/TextEncodingBruteForce.mjs index 74408576b6..05f40eeec3 100644 --- a/tests/operations/tests/TextEncodingBruteForce.mjs +++ b/tests/operations/tests/TextEncodingBruteForce.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ToFromInsensitiveRegex.mjs b/tests/operations/tests/ToFromInsensitiveRegex.mjs index fa191951a5..0aaf89e24b 100644 --- a/tests/operations/tests/ToFromInsensitiveRegex.mjs +++ b/tests/operations/tests/ToFromInsensitiveRegex.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/ToGeohash.mjs b/tests/operations/tests/ToGeohash.mjs new file mode 100644 index 0000000000..c850f7a328 --- /dev/null +++ b/tests/operations/tests/ToGeohash.mjs @@ -0,0 +1,55 @@ +/** + * To Geohash tests + * + * @author gchq77703 + * @copyright Crown Copyright 2018 + * @license Apache-2.0 + */ +import TestRegister from "../../lib/TestRegister"; + +TestRegister.addTests([ + { + name: "To Geohash", + input: "37.8324,112.5584", + expectedOutput: "ww8p1r4t8", + recipeConfig: [ + { + op: "To Geohash", + args: [9], + }, + ], + }, + { + name: "To Geohash", + input: "37.9324,-112.2584", + expectedOutput: "9w8pv3ruj", + recipeConfig: [ + { + op: "To Geohash", + args: [9], + }, + ], + }, + { + name: "To Geohash", + input: "37.8324,112.5584", + expectedOutput: "ww8", + recipeConfig: [ + { + op: "To Geohash", + args: [3], + }, + ], + }, + { + name: "To Geohash", + input: "37.9324,-112.2584", + expectedOutput: "9w8pv3rujxy5b99", + recipeConfig: [ + { + op: "To Geohash", + args: [15], + }, + ], + }, +]); diff --git a/tests/operations/tests/TranslateDateTimeFormat.mjs b/tests/operations/tests/TranslateDateTimeFormat.mjs index a60459fd34..f6a4c54dc2 100644 --- a/tests/operations/tests/TranslateDateTimeFormat.mjs +++ b/tests/operations/tests/TranslateDateTimeFormat.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/Typex.mjs b/tests/operations/tests/Typex.mjs index e3751e8a38..b722662a81 100644 --- a/tests/operations/tests/Typex.mjs +++ b/tests/operations/tests/Typex.mjs @@ -4,7 +4,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/tests/operations/tests/YARA.mjs b/tests/operations/tests/YARA.mjs index e3c28ef1e8..5495ca6993 100644 --- a/tests/operations/tests/YARA.mjs +++ b/tests/operations/tests/YARA.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2019 * @license Apache-2.0 */ -import TestRegister from "../TestRegister"; +import TestRegister from "../../lib/TestRegister"; TestRegister.addTests([ { diff --git a/webpack.config.js b/webpack.config.js index 75a3e8ed17..46878282cd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -53,8 +53,8 @@ module.exports = { ], resolve: { alias: { - jquery: "jquery/src/jquery" - } + jquery: "jquery/src/jquery", + }, }, module: { rules: [