diff --git a/.gitignore b/.gitignore index b512c09..513b20d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +node_modules +*.js \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..acd913c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Run cli", + "program": "${workspaceFolder}/src-cli/main.js", + "args": [ "-i", "testinputmedium.png", "-o", "testinput.svg"], + "cwd":"${workspaceFolder}/src-cli", + "outFiles": [ + "${workspaceFolder}/**/*.js" + ] + } + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4dfd298..23284b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,11 +26,27 @@ "@types/jquery": "*" } }, + "@types/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" + }, + "@types/node": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", + "integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==", + "dev": true + }, "@types/sizzle": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -50,8 +66,7 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", @@ -80,6 +95,20 @@ } } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -147,13 +176,21 @@ "dev": true }, "axios": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", - "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", + "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", "dev": true, "requires": { - "follow-redirects": "^1.2.5", - "is-buffer": "^1.1.5" + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "dev": true + } } }, "backo2": { @@ -165,8 +202,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -265,8 +301,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -302,12 +337,12 @@ } }, "browser-sync": { - "version": "2.26.5", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.5.tgz", - "integrity": "sha512-zVa6MmadAFgl5Uk53Yy5cw5tGTO7xSGAWK3Yx70GJ1t5jK+r6B4q3xq+1XbYfLt1SbeFg7WoNWneNhMT4B9jFw==", + "version": "2.26.7", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.26.7.tgz", + "integrity": "sha512-lY3emme0OyvA2ujEMpRmyRy9LY6gHLuTr2/ABxhIm3lADOiRXzP4dgekvnDrQqZ/Ec2Fz19lEjm6kglSG5766w==", "dev": true, "requires": { - "browser-sync-client": "^2.26.4", + "browser-sync-client": "^2.26.6", "browser-sync-ui": "^2.26.4", "bs-recipes": "1.3.4", "bs-snippet-injector": "^2.0.1", @@ -322,7 +357,7 @@ "fs-extra": "3.0.1", "http-proxy": "1.15.2", "immutable": "^3", - "localtunnel": "1.9.1", + "localtunnel": "1.9.2", "micromatch": "^3.1.10", "opn": "5.3.0", "portscanner": "2.1.1", @@ -370,9 +405,9 @@ } }, "browser-sync-client": { - "version": "2.26.4", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.4.tgz", - "integrity": "sha512-mQiDp5/tf79VezDS5j/EExU4Ze6f5DQYuL0Z7VdJgBbNLTHDfkYGi2R620qc6HkY9XZA0m4/UwihT7J42RBIJA==", + "version": "2.26.6", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.26.6.tgz", + "integrity": "sha512-mGrkZdNzttKdf/16I+y+2dTQxoMCIpKbVIMJ/uP8ZpnKu9f9qa/2CYVtLtbjZG8nsM14EwiCrjuFTGBEnT3Gjw==", "dev": true, "requires": { "etag": "1.8.1", @@ -442,6 +477,16 @@ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, + "canvas": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.5.0.tgz", + "integrity": "sha512-wwRz2cLMgb9d+rnotOJCoc04Bzj3aJMpWc6JxAD6lP7bYz0ldcn0sKddoZ0vhD5T8HBxrK+XmRDJb68/2VqARw==", + "requires": { + "nan": "^2.13.2", + "node-pre-gyp": "^0.11.0", + "simple-get": "^3.0.3" + } + }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", @@ -456,9 +501,9 @@ } }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -475,6 +520,11 @@ "upath": "^1.1.1" } }, + "chownr": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.2.tgz", + "integrity": "sha512-GkfeAQh+QNy3wquu9oIZr6SS5x7wGdSgNQvD10X3r+AZr1Oys22HW8kAmDMvNg2+Dm0TeGaEuO8gFwdBXxwO8A==" + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -512,8 +562,7 @@ "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "collection-visit": { "version": "1.0.0", @@ -552,8 +601,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "connect": { "version": "3.6.6", @@ -593,6 +641,11 @@ "moment": "*" } }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", @@ -608,8 +661,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "debug": { "version": "3.1.0", @@ -632,6 +684,19 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } + }, + "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==" + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -673,6 +738,11 @@ } } }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -685,6 +755,11 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "dev-ip": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz", @@ -1003,29 +1078,12 @@ } }, "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", "dev": true, "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } + "debug": "=3.1.0" } }, "for-in": { @@ -1060,6 +1118,19 @@ "universalify": "^0.1.0" } }, + "fs-minipass": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz", + "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==", + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, "fsevents": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", @@ -1608,6 +1679,21 @@ } } }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -1620,6 +1706,19 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -1642,9 +1741,9 @@ } }, "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.0.tgz", + "integrity": "sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==", "dev": true }, "has-ansi": { @@ -1671,6 +1770,11 @@ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", "dev": true }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -1710,18 +1814,24 @@ "dev": true }, "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", "dev": true, "requires": { "depd": "~1.1.2", - "inherits": "2.0.3", + "inherits": "2.0.4", "setprototypeof": "1.1.1", "statuses": ">= 1.5.0 < 2", "toidentifier": "1.0.0" }, "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -1744,11 +1854,18 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", @@ -1761,11 +1878,24 @@ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "invert-kv": { "version": "1.0.0", @@ -1869,7 +1999,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2007,26 +2136,32 @@ } }, "localtunnel": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.1.tgz", - "integrity": "sha512-HWrhOslklDvxgOGFLxi6fQVnvpl6XdX4sPscfqMZkzi3gtt9V7LKBWYvNUcpHSVvjwCQ6xzXacVvICNbNcyPnQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-1.9.2.tgz", + "integrity": "sha512-NEKF7bDJE9U3xzJu3kbayF0WTvng6Pww7tzqNb/XtEARYwqw7CKEX7BvOMg98FtE9es2CRizl61gkV3hS8dqYg==", "dev": true, "requires": { - "axios": "0.17.1", - "debug": "2.6.9", + "axios": "0.19.0", + "debug": "4.1.1", "openurl": "1.1.1", "yargs": "6.6.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", @@ -2051,9 +2186,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", "dev": true }, "lodash.isfinite": { @@ -2119,15 +2254,41 @@ "mime-db": "1.40.0" } }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "minipass": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "requires": { + "minipass": "^2.2.1" + } + }, "mitt": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/mitt/-/mitt-1.1.3.tgz", @@ -2135,9 +2296,9 @@ "dev": true }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -2155,6 +2316,21 @@ } } }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "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=" + } + } + }, "moment": { "version": "2.22.0", "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.0.tgz", @@ -2170,9 +2346,7 @@ "nan": { "version": "2.13.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==" }, "nanomatch": { "version": "1.2.13", @@ -2193,12 +2367,63 @@ "to-regex": "^3.0.1" } }, + "needle": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", "dev": true }, + "node-pre-gyp": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", + "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -2217,11 +2442,40 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "npm-bundled": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==" + }, + "npm-packlist": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", + "integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-component": { "version": "0.0.3", @@ -2293,6 +2547,14 @@ "ee-first": "1.1.1" } }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, "openurl": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", @@ -2308,6 +2570,11 @@ "is-wsl": "^1.1.0" } }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -2317,6 +2584,20 @@ "lcid": "^1.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -2374,8 +2655,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-parse": { "version": "1.0.6", @@ -2434,8 +2714,7 @@ "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=" }, "qs": { "version": "6.2.3", @@ -2444,23 +2723,34 @@ "dev": true }, "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true }, "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", + "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", "dev": true, "requires": { "bytes": "3.1.0", - "http-errors": "1.7.2", + "http-errors": "1.7.3", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -2486,7 +2776,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -2500,8 +2789,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" } } }, @@ -2563,9 +2851,9 @@ "dev": true }, "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", + "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -2604,6 +2892,14 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, "rx": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", @@ -2622,8 +2918,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -2637,14 +2932,17 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "send": { "version": "0.16.2", @@ -2773,13 +3071,12 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -2805,6 +3102,26 @@ "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", "dev": true }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.0.3.tgz", + "integrity": "sha512-Wvre/Jq5vgoz31Z9stYWPLn0PqRqmBDpFSdypAnHu5AvRVCYPRYGnvryNLiXu8GOBNDH82J2FRHUGMjjHUpXFw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -3091,9 +3408,9 @@ } }, "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, "split-string": { @@ -3146,7 +3463,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3157,7 +3473,6 @@ "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" } @@ -3166,7 +3481,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3180,6 +3494,11 @@ "is-utf8": "^0.2.0" } }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -3192,6 +3511,20 @@ "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", "dev": true }, + "tar": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", + "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, "tfunk": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/tfunk/-/tfunk-3.1.0.tgz", @@ -3269,38 +3602,15 @@ "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "universalify": { @@ -3382,8 +3692,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "utils-merge": { "version": "1.0.1", @@ -3407,6 +3716,14 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -3423,6 +3740,11 @@ "strip-ansi": "^3.0.1" } }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, "ws": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", @@ -3444,6 +3766,11 @@ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "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==" + }, "yargs": { "version": "3.32.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", diff --git a/package.json b/package.json index 4df82b5..cfe6bf5 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,14 @@ }, "author": "drake7707", "devDependencies": { + "@types/node": "^12.6.2", "lite-server": "^1.3.1" }, "dependencies": { "@types/jquery": "^3.3.29", - "@types/materialize-css": "^1.0.6" + "@types/materialize-css": "^1.0.6", + "@types/minimist": "^1.2.0", + "canvas": "^2.5.0", + "minimist": "^1.2.0" } } diff --git a/src-cli/main.js.map b/src-cli/main.js.map new file mode 100644 index 0000000..9f0de05 --- /dev/null +++ b/src-cli/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,mCAAqC;AACrC,iCAAmC;AAEnC,uBAAyB;AACzB,4EAA+D;AAE/D,0DAA4I;AAC5I,4CAA2C;AAC3C,8CAA6C;AAE7C;IAA0B,+BAAQ;IAAlC;QAAA,qEAMC;QALU,uBAAiB,GAAW,CAAC,CAAC;QAC9B,mBAAa,GAAY,IAAI,CAAC;QAC9B,mBAAa,GAAY,IAAI,CAAC;QAC9B,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IAAI,cAAc,CAAC;qBAC/B;iBACJ;aACJ;YAED,SAAS,IAAI,QAAQ,CAAC;YAEtB,sBAAO,SAAS,EAAC;;;CACpB;AAED,IAAI,EAAE,CAAC,IAAI,CAAC;IACR,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG;IACT,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/src-cli/main.ts b/src-cli/main.ts new file mode 100644 index 0000000..e4eaeb5 --- /dev/null +++ b/src-cli/main.ts @@ -0,0 +1,213 @@ +import * as canvas from "canvas"; +import * as minimist from "minimist"; +import * as process from "process"; + +import * as fs from "fs"; +import { ColorReducer } from "../src/colorreductionmanagement"; +import { RGB } from "../src/common"; +import { FacetBorderSegmenter, FacetBorderTracer, FacetCreator, FacetLabelPlacer, FacetReducer, FacetResult } from "../src/facetmanagement"; +import { Settings } from "../src/settings"; +import { Point } from "../src/structs/point"; + +class CLISettings extends Settings { + public svgSizeMultiplier: number = 3; + public svgShowLabels: boolean = true; + public svgFillFacets: boolean = true; + public svgShowBorders: boolean = true; + public svgFontSize: number = 6; +} + +async function main() { + const args = minimist(process.argv.slice(2)); + const imagePath = args["i"]; + const svgPath = args["o"]; + + let configPath = args["c"]; + if (typeof configPath === "undefined") { + configPath = "./settings.json"; + } + + const settings: CLISettings = require(configPath); + + const img = await canvas.loadImage(imagePath); + const c = canvas.createCanvas(img.width, img.height); + const ctx = c.getContext("2d"); + ctx.drawImage(img, 0, 0, c.width, c.height); + let imgData = ctx.getImageData(0, 0, c.width, c.height); + + // resize if required + if (settings.resizeImageIfTooLarge && (c.width > settings.resizeImageWidth || c.height > settings.resizeImageHeight)) { + let width = c.width; + let height = c.height; + if (width > settings.resizeImageWidth) { + const newWidth = settings.resizeImageWidth; + const newHeight = c.height / c.width * settings.resizeImageWidth; + width = newWidth; + height = newHeight; + } + if (height > settings.resizeImageHeight) { + const newHeight = settings.resizeImageHeight; + const newWidth = width / height * newHeight; + width = newWidth; + height = newHeight; + } + + const tempCanvas = canvas.createCanvas(width, height); + tempCanvas.width = width; + tempCanvas.height = height; + tempCanvas.getContext("2d")!.drawImage(c, 0, 0, width, height); + c.width = width; + c.height = height; + ctx.drawImage(tempCanvas, 0, 0, width, height); + imgData = ctx.getImageData(0, 0, c.width, c.height); + + console.log(`Resized image to ${width}x${height}`); + } + + console.log("Running k-means clustering"); + const cKmeans = canvas.createCanvas(imgData.width, imgData.height); + const ctxKmeans = cKmeans.getContext("2d")!; + ctxKmeans.fillStyle = "white"; + ctxKmeans.fillRect(0, 0, cKmeans.width, cKmeans.height); + + const kmeansImgData = ctxKmeans.getImageData(0, 0, cKmeans.width, cKmeans.height); + await ColorReducer.applyKMeansClustering(imgData, kmeansImgData, ctx, settings, (kmeans) => { + const progress = (100 - (kmeans.currentDeltaDistanceDifference > 100 ? 100 : kmeans.currentDeltaDistanceDifference)) / 100; + ctxKmeans.putImageData(kmeansImgData, 0, 0); + }); + + const colormapResult = ColorReducer.createColorMap(kmeansImgData); + + console.log("Creating facets"); + const facetResult = await FacetCreator.getFacets(imgData.width, imgData.height, colormapResult.imgColorIndices, (progress) => { + // progress + }); + + console.log("Reducing facets"); + await FacetReducer.reduceFacets(settings.removeFacetsSmallerThanNrOfPoints, settings.removeFacetsFromLargeToSmall, colormapResult.colorsByIndex, facetResult, colormapResult.imgColorIndices, (progress) => { + // progress + }); + + console.log("Build border paths"); + await FacetBorderTracer.buildFacetBorderPaths(facetResult, (progress) => { + // progress + }); + + console.log("Build border path segments"); + await FacetBorderSegmenter.buildFacetBorderSegments(facetResult, settings.nrOfTimesToHalveBorderSegments, (progress) => { + // progress + }); + + console.log("Determine label placement"); + await FacetLabelPlacer.buildFacetLabelBounds(facetResult, (progress) => { + // progress + }); + + console.log("Generating svg"); + const svgString = await createSVG(facetResult, colormapResult.colorsByIndex, settings.svgSizeMultiplier, settings.svgFillFacets, settings.svgShowBorders, settings.svgShowLabels, settings.svgFontSize); + + fs.writeFileSync(svgPath, svgString); +} + +async function createSVG(facetResult: FacetResult, colorsByIndex: RGB[], sizeMultiplier: number, fill: boolean, stroke: boolean, addColorLabels: boolean, fontSize: number = 6, onUpdate: ((progress: number) => void) | null = null) { + + let svgString = ""; + const xmlns = "http://www.w3.org/2000/svg"; + + const svgWidth = sizeMultiplier * facetResult.width; + const svgHeight = sizeMultiplier * facetResult.height; + svgString += ` + `; + + for (const f of facetResult.facets) { + + if (f != null && f.borderSegments.length > 0) { + let newpath: Point[] = []; + const useSegments = true; + if (useSegments) { + newpath = f.getFullPathFromBorderSegments(); + } else { + for (let i: number = 0; i < f.borderPath.length; i++) { + newpath.push(new Point(f.borderPath[i].getWallX(), f.borderPath[i].getWallY())); + } + } + if (newpath[0].x !== newpath[newpath.length - 1].x || newpath[0].y !== newpath[newpath.length - 1].y) { + newpath.push(newpath[0]); + } // close loop if necessary + + // Create a path in SVG's namespace + // using quadratic curve absolute positions + + let svgPathString = ""; + + let data = "M "; + data += newpath[0].x * sizeMultiplier + " " + newpath[0].y * sizeMultiplier + " "; + for (let i: number = 1; i < newpath.length; i++) { + const midpointX = (newpath[i].x + newpath[i - 1].x) / 2; + const midpointY = (newpath[i].y + newpath[i - 1].y) / 2; + data += "Q " + (midpointX * sizeMultiplier) + " " + (midpointY * sizeMultiplier) + " " + (newpath[i].x * sizeMultiplier) + " " + (newpath[i].y * sizeMultiplier) + " "; + } + + let svgStroke = ""; + if (stroke) { + svgStroke = "#000"; + } else { + // make the border the same color as the fill color if there is no border stroke + // to not have gaps in between facets + if (fill) { + svgStroke = `rgb(${colorsByIndex[f.color][0]},${colorsByIndex[f.color][1]},${colorsByIndex[f.color][2]})`; + } + } + + let svgFill = ""; + if (fill) { + svgFill = `rgb(${colorsByIndex[f.color][0]},${colorsByIndex[f.color][1]},${colorsByIndex[f.color][2]})`; + } else { + svgFill = "none"; + } + + svgPathString = ``; + + svgPathString += ``; + + svgString += svgPathString; + + // add the color labels if necessary. I mean, this is the whole idea behind the paint by numbers part + // so I don't know why you would hide them + if (addColorLabels) { + + const labelOffsetX = f.labelBounds.minX * sizeMultiplier; + const labelOffsetY = f.labelBounds.minY * sizeMultiplier; + const labelWidth = f.labelBounds.width * sizeMultiplier; + const labelHeight = f.labelBounds.height * sizeMultiplier; + + const svgLabelString = ` + + ${f.color} + + `; + + svgString += svgLabelString; + } + } + } + + svgString += ``; + + return svgString; +} + +main().then(() => { + console.log("Finished"); +}).catch((err) => { + console.error("Error: " + err.name + " " + err.message + " " + err.stack); +}); diff --git a/src-cli/settings.json b/src-cli/settings.json new file mode 100644 index 0000000..3705925 --- /dev/null +++ b/src-cli/settings.json @@ -0,0 +1,17 @@ +{ + "kMeansNrOfClusters": 16, + "kMeansMinDeltaDifference": 1, + "kMeansClusteringColorSpace": 0, + "removeFacetsSmallerThanNrOfPoints": 20, + "removeFacetsFromLargeToSmall": true, + "nrOfTimesToHalveBorderSegments": 2, + "resizeImageIfTooLarge": true, + "resizeImageWidth": 1024, + "resizeImageHeight": 1024, + + "svgSizeMultiplier": 3, + "svgShowLabels": true, + "svgFillFacets": true, + "svgShowBorders": true, + "svgFontSize": 6 +} \ No newline at end of file diff --git a/src-cli/testinput.png b/src-cli/testinput.png new file mode 100644 index 0000000..db25320 Binary files /dev/null and b/src-cli/testinput.png differ diff --git a/src-cli/testinput.svg b/src-cli/testinput.svg new file mode 100644 index 0000000..83397e4 --- /dev/null +++ b/src-cli/testinput.svg @@ -0,0 +1,5070 @@ + + + + 0 + + + + 1 + + + + 2 + + + + 1 + + + + 2 + + + + 3 + + + + 5 + + + + 6 + + + + 7 + + + + 8 + + + + 10 + + + + 11 + + + + 10 + + + + 12 + + + + 0 + + + + 1 + + + + 2 + + + + 1 + + + + 1 + + + + 0 + + + + 6 + + + + 5 + + + + 3 + + + + 2 + + + + 2 + + + + 1 + + + + 0 + + + + 0 + + + + 1 + + + + 5 + + + + 13 + + + + 4 + + + + 5 + + + + 1 + + + + 1 + + + + 4 + + + + 6 + + + + 11 + + + + 0 + + + + 8 + + + + 1 + + + + 2 + + + + 1 + + + + 3 + + + + 5 + + + + 4 + + + + 1 + + + + 3 + + + + 9 + + + + 3 + + + + 1 + + + + 6 + + + + 2 + + + + 0 + + + + 10 + + + + 2 + + + + 3 + + + + 5 + + + + 6 + + + + 5 + + + + 13 + + + + 3 + + + + 10 + + + + 4 + + + + 7 + + + + 9 + + + + 4 + + + + 6 + + + + 3 + + + + 1 + + + + 10 + + + + 6 + + + + 8 + + + + 5 + + + + 0 + + + + 6 + + + + 10 + + + + 2 + + + + 6 + + + + 7 + + + + 2 + + + + 5 + + + + 7 + + + + 1 + + + + 8 + + + + 8 + + + + 6 + + + + 10 + + + + 5 + + + + 10 + + + + 6 + + + + 11 + + + + 2 + + + + 6 + + + + 1 + + + + 9 + + + + 3 + + + + 7 + + + + 4 + + + + 9 + + + + 1 + + + + 6 + + + + 4 + + + + 11 + + + + 5 + + + + 6 + + + + 1 + + + + 1 + + + + 3 + + + + 4 + + + + 8 + + + + 14 + + + + 8 + + + + 6 + + + + 8 + + + + 5 + + + + 2 + + + + 3 + + + + 10 + + + + 1 + + + + 7 + + + + 5 + + + + 3 + + + + 4 + + + + 10 + + + + 4 + + + + 2 + + + + 7 + + + + 14 + + + + 3 + + + + 6 + + + + 4 + + + + 5 + + + + 2 + + + + 0 + + + + 9 + + + + 4 + + + + 5 + + + + 10 + + + + 10 + + + + 6 + + + + 12 + + + + 9 + + + + 2 + + + + 6 + + + + 1 + + + + 0 + + + + 8 + + + + 6 + + + + 11 + + + + 3 + + + + 3 + + + + 8 + + + + 5 + + + + 4 + + + + 1 + + + + 3 + + + + 7 + + + + 4 + + + + 6 + + + + 2 + + + + 9 + + + + 6 + + + + 11 + + + + 1 + + + + 3 + + + + 10 + + + + 2 + + + + 10 + + + + 13 + + + + 7 + + + + 13 + + + + 4 + + + + 3 + + + + 3 + + + + 1 + + + + 3 + + + + 8 + + + + 2 + + + + 12 + + + + 9 + + + + 13 + + + + 6 + + + + 7 + + + + 2 + + + + 3 + + + + 6 + + + + 14 + + + + 9 + + + + 5 + + + + 8 + + + + 11 + + + + 6 + + + + 11 + + + + 5 + + + + 7 + + + + 3 + + + + 5 + + + + 12 + + + + 3 + + + + 2 + + + + 6 + + + + 3 + + + + 5 + + + + 2 + + + + 8 + + + + 2 + + + + 10 + + + + 4 + + + + 4 + + + + 11 + + + + 14 + + + + 15 + + + + 11 + + + + 13 + + + + 9 + + + + 1 + + + + 1 + + + + 12 + + + + 3 + + + + 8 + + + + 14 + + + + 6 + + + + 3 + + + + 3 + + + + 10 + + + + 4 + + + + 11 + + + + 14 + + + + 4 + + + + 5 + + + + 13 + + + + 0 + + + + 3 + + + + 14 + + + + 13 + + + + 4 + + + + 4 + + + + 2 + + + + 4 + + + + 11 + + + + 13 + + + + 5 + + + + 14 + + + + 13 + + + + 4 + + + + 4 + + + + 3 + + + + 13 + + + + 13 + + + + 4 + + + + 3 + + + + 3 + + + + 7 + + + + 4 + + + + 14 + + + + 15 + + + + 3 + + + + 5 + + + + 3 + + + + 2 + + + + 13 + + + + 4 + + + + 8 + + + + 3 + + + + 13 + + + + 14 + + + + 0 + + + + 6 + + + + 4 + + + + 13 + + + + 2 + + + + 2 + + + + 3 + + + + 7 + + + + 6 + + + + 7 + + + + 1 + + + + 3 + + + + 4 + + + + 3 + + + + 8 + + + + 10 + + + + 3 + + + + 5 + + + + 4 + + + + 5 + + + + 4 + + + + 6 + + + + 12 + + + + 12 + + + + 11 + + + + 13 + + + + 2 + + + + 15 + + + + 10 + + + + 1 + + + + 3 + + + + 11 + + + + 13 + + + + 3 + + + + 8 + + + + 6 + + + + 5 + + + + 2 + + + + 1 + + + + 7 + + + + 6 + + + + 14 + + + + 3 + + + + 3 + + + + 4 + + + + 2 + + + + 4 + + + + 0 + + + + 13 + + + + 13 + + + + 14 + + + + 3 + + + + 4 + + + + 6 + + + + 13 + + + + 2 + + + + 14 + + + + 2 + + + + 13 + + + + 2 + + + + 6 + + + + 6 + + + + 0 + + + + 7 + + + + 2 + + + + 4 + + + + 6 + + + + 14 + + + + 15 + + + + 14 + + + + 4 + + + + 1 + + + + 15 + + + + 14 + + + + 1 + + + + 0 + + + + 2 + + + + 3 + + + + 13 + + + + 7 + + + + 1 + + + + 13 + + + + 2 + + + + 11 + + + + 7 + + + + 2 + + + + 8 + + + + 3 + + + + 8 + + + + 13 + + + + 5 + + + + 0 + + + + 9 + + + + 6 + + + + 1 + + + + 4 + + + + 13 + + + + 14 + + + + 13 + + + + 12 + + + + 4 + + + + 5 + + + + 2 + + + + 8 + + + + 1 + + + + 5 + + + + 1 + + + + 4 + + + + 13 + + + + 4 + + + + 6 + + + + 3 + + + + 6 + + + + 8 + + + + 1 + + + + 11 + + + + 10 + + + + 5 + + + + 12 + + + + 13 + + + + 5 + + + + 9 + + + + 6 + + + + 6 + + + + 12 + + + + 6 + + + + 14 + + + + 12 + + + + 5 + + + + 9 + + + + 14 + + + + 15 + + + + 12 + + + + 15 + + + + 4 + + + + 6 + + + + 14 + + + + 1 + + + + 2 + + + + 1 + + + + 5 + + + + 8 + + + + 8 + + + + 15 + + + + 4 + + + + 6 + + + + 12 + + + + 3 + + + + 3 + + + + 14 + + + + 5 + + + + 0 + + + + 5 + + + + 14 + + + + 7 + + + + 0 + + + + 13 + + + + 6 + + + + 13 + + + + 6 + + + + 6 + + + + 13 + + + + 7 + + + + 4 + + + + 4 + + + + 6 + + + + 8 + + + + 2 + + + + 6 + + + + 15 + + + + 4 + + + + 9 + + + + 6 + + + + 13 + + + + 14 + + + + 13 + + + + 12 + + + + 1 + + + + 6 + + + + 6 + + + + 8 + + + + 13 + + + + 3 + + + + 8 + + + + 14 + + + + 8 + + + + 15 + + + + 11 + + + + 5 + + + + 14 + + + + 1 + + + + 11 + + + + 2 + + + + 14 + + + + 10 + + + + 14 + + + + 2 + + + + 1 + + + + 12 + + + + 5 + + + + 8 + + + + 14 + + + + 13 + + + + 1 + + + + 4 + + + + 4 + + + + 0 + + + + 4 + + + + 15 + + + + 12 + + + + 0 + + + + 2 + + + + 13 + + + + 6 + + + + 9 + + + + 12 + + + + 3 + + + + 8 + + + + 4 + + + + 3 + + + + 2 + + + + 13 + + + + 1 + + + + 2 + + + + 13 + + + + 4 + + + + 11 + + + + 12 + + + + 9 + + + + 5 + + + + 12 + + + + 1 + + + + 5 + + + + 13 + + + + 5 + + + + 13 + + + + 10 + + + + 3 + + + + 5 + + + + 13 + + + + 1 + + + + 5 + + + + 10 + + + + 1 + + + + 14 + + + + 11 + + + + 13 + + + + 14 + + + + 2 + + + + 4 + + + + 6 + + + + 12 + + + + 9 + + + + 1 + + + + 6 + + + + 4 + + + + 4 + + + + 13 + + + + 5 + + + + 8 + + + + 1 + + + + 13 + + + + 14 + + + + 14 + + + + 5 + + + + 1 + + + + 1 + + + + 6 + + + + 4 + + + + 3 + + + + 7 + + + + 14 + + + + 8 + + + + 13 + + + + 6 + + + + 4 + + + + 11 + + + + 1 + + + + 5 + + + + 10 + + + + 7 + + + + 7 + + + + 1 + + + + 15 + + + + 0 + + + + 11 + + + + 2 + + + + 9 + + + + 5 + + + + 0 + + + + 15 + + + + 13 + + + + 3 + + + + 6 + + + + 11 + + + + 8 + + + + 2 + + + + 10 + + + + 0 + + + + 10 + + + + 8 + + + + 15 + + + + 13 + + + + 8 + + + + 2 + + + + 10 + + + + 8 + + + + 6 + + + + 1 + + + + 4 + + + + 1 + + + + 15 + + + + 11 + + + + 6 + + + + 8 + + + + 9 + + + + 12 + + + + 9 + + + + 9 + + + + 4 + + + + 2 + + + + 1 + + + + 0 + + + + 3 + + + + 8 + + + + 0 + + + + 15 + + + + 6 + + + + 10 + + + + 13 + + + + 4 + + + + 5 + + + + 2 + + + + 2 + + + + 14 + + + + 14 + + + + 14 + + + + 8 + + + + 6 + + + + 4 + + + + 9 + + + + 3 + + + + 7 + + + + 6 + + + + 12 + + + + 1 + + + + 3 + + + + 0 + + + + 11 + + + + 4 + + + + 10 + + + + 3 + + + + 14 + + + + 9 + + + + 9 + + + + 5 + + + + 3 + + + + 5 + + + + 8 + + + + 15 + + + + 8 + + + + 4 + + + + 2 + + + + 15 + + + + 7 + + + + 7 + + + + 7 + + + + 3 + + + + 13 + + + + 10 + + + + 7 + + + + 0 + + + + 6 + + + + 10 + + + + 11 + + + + 4 + + + + 10 + + + + 3 + + + + 12 + + + + 3 + + + + 13 + + + + 10 + + + + 9 + + + + 5 + + + + 6 + + + + 8 + + + + 8 + + + + 12 + + + + 6 + + + + 3 + + + + 10 + + + + 10 + + + + 1 + + + + 10 + + + + 8 + + + + 6 + + + + 15 + + + + 4 + + + + 4 + + + + 9 + + + + 8 + + + + 1 + + + + 5 + + + + 12 + + + + 1 + + + + 6 + + + + 13 + + + + 6 + + + + 5 + + + + 6 + + + + 10 + + + + 7 + + + + 2 + + + + 6 + + + + 11 + + + + 13 + + + + 2 + + + + 12 + + + + 8 + + + + 11 + + + + 7 + + + + 12 + + + + 2 + + + + 6 + + + + 10 + + + + 10 + + + + 4 + + + + 9 + + + + 4 + + + + 6 + + + + 4 + + + + 6 + + + + 4 + + + + 0 + + + + 5 + + + + 5 + + + + 3 + + + + 5 + + + + 5 + + + + 6 + + + + 3 + + + + 13 + + + + 14 + + + + 8 + + + + 7 + + + + 10 + + + + 1 + + + + 9 + + + + 8 + + + + 14 + + + + 12 + + + + 5 + + + + 2 + + + + 6 + + + + 4 + + + + 0 + + + + 6 + + + + 11 + + + + 6 + + + + 8 + + + + 8 + + + + 10 + + + + 4 + + + + 15 + + + + 5 + + + + 2 + + + + 10 + + + + 8 + + + + 3 + + + + 7 + + + + 12 + + + + 7 + + + + 9 + + + + 5 + + + + 4 + + + + 12 + + + + 7 + + + + 4 + + + + 4 + + + + 3 + + + + 4 + + + + 9 + + + + 4 + + + + 3 + + + + 0 + + + + 11 + + + + 5 + + + + 12 + + + + 7 + + + + 12 + + + + 6 + + + + 4 + + + + 7 + + + + 9 + + + + 8 + + + + 6 + + + + 9 + + + + 9 + + + + 10 + + + + 5 + + + + 10 + + + + 2 + + + + 6 + + + + 12 + + + + 10 + + + + 3 + + + + 8 + + + + 7 + + + + 9 + + + + 12 + + + + 4 + + + + 8 + + + + 6 + + + + 10 + + + + 2 + + + + 1 + + + + 1 + + + + 3 + + + + 9 + + + + 4 + + + + 2 + + + + 12 + + + + 13 + + + + 9 + + + + 12 + + + + 1 + + + + 9 + + + + 3 + + + + 4 + + + + 3 + + + + 4 + + + + 9 + + + + 6 + + + + 0 + + + + 1 + + + + 2 + + + + 2 + + + + 3 + + + + 5 + + + + 8 + + + + 9 + + + + 7 + + + + 1 + + + + 4 + + + + 3 + + + + 9 + + + + 8 + + + + 10 + + + + 10 + + + + 2 + + + + 0 + + + + 6 + + + + 8 + + + + 3 + + + + 1 + + + + 4 + + + + 8 + + + + 10 + + + + 8 + + + + 5 + + + + 3 + + + + 4 + + + + 9 + + + + 6 + + + + 8 + + + + 7 + + + + 8 + + + + 11 + + + + 10 + + + + 10 + + + + 8 + + + + 10 + + + + 8 + + + + 8 + + + + 11 + + + + 11 + + + + 10 + + + + 9 + + + + 4 + + + + 1 + + + + 3 + + + + 11 + + + + 8 + + + + 8 + + + + 8 + + + + 8 + + + + 10 + + + + 8 + + + + 11 + + + + 12 + + + + 13 + + + + 8 + + + + 6 + + + + 11 + + + + 0 + + + + 5 + + + + 1 + + + + 11 + + + + 2 + + + + 8 + + + + 12 + + + + 3 + + + + 2 + + + + 11 + + + + 10 + + + + 5 + + + + 1 + + + + 3 + + + + 4 + + + + 12 + + + + 8 + + + + 4 + + + + 1 + + + + 4 + + + + 12 + + + + 13 + + + + 10 + + + + 6 + + + + 4 + + + + 6 + + + + 1 + + + + 12 + + + + 6 + + + + 6 + + + + 2 + + + + 4 + + + + 12 + + + + 1 + + + + 1 + + + + 3 + + + + 12 + + + + 6 + + + + 3 + + + + 3 + + + + 6 + + + + 6 + + + + 2 + + + + 4 + + + + 6 + + + + 0 + + + + 6 + + + + 3 + + + + 5 + + + + 2 + + + + 5 + + + + 5 + + + + 5 + + + + 12 + + + + 12 + + + + 0 + + + + 0 + + + + 6 + + + + 8 + + + + 2 + + + + 2 + + + + 4 + + + + 5 + + + + 5 + + + + 6 + + + + 5 + + + + 5 + + + + 12 + + + + 6 + + + + 2 + + + + 3 + + + + 5 + + + + 5 + + + + 5 + + + + 6 + + + + 4 + + + + 4 + + + + 5 + + + + 6 + + + + 4 + + + + 5 + + + + 6 + + + + 5 + + + + 6 + + + + 5 + + + + 12 + + + + 1 + + + + 4 + + + + 5 + + + + 2 + + + + 3 + + + + 12 + + + + 6 + + + + 5 + + + + 5 + + + + 13 + + + + 13 + + + + 3 + + + + 0 + + + + 6 + + + + 13 + + + + 2 + + + + 2 + + + + 3 + + + + 3 + + + + 4 + + + + 1 + + + + 6 + + + + 2 + + + + 2 + + + + 5 + + + + 4 + + + + 3 + + + + 5 + + + + 6 + + + + 3 + + + + 1 + + + + 2 + + + + 6 + + + + 5 + + + + 6 + + + + 4 + + + + 13 + + + + 1 + + + + 2 + + + + 4 + + + + 6 + + + + 6 + + + + 5 + + + + 3 + + + + 2 + + + + 13 + + + + 2 + + + + 6 + + + + 6 + + + + 2 + + + + 4 + + + + 2 + + + + 4 + + + + 13 + + + + 3 + + + + 13 + + + + 1 + + + + 0 + + + + 1 + + + + 1 + + + + 13 + + + + 4 + + + + 3 + + + + 4 + + + + 5 + + + + 3 + + + + 4 + + + + 0 + + + + 4 + + + + 3 + + + + 2 + + + + 0 + + + + 2 + + + + 13 + + + + 1 + + + + 2 + + + + 4 + + + + 3 + + + + 13 + + + + 1 + + + + 2 + + + + 13 + + + + 13 + + + + 2 + + + + 13 + + + + 13 + + + + 1 + + + + 13 + + + + 0 + + + + 4 + + + + 4 + + + + 2 + + + + 2 + + + + 1 + + + + 13 + + + + 1 + + + + 13 + + + + 2 + + + + 13 + + + + 1 + + + + 4 + + + + 4 + + + + 2 + + + + 2 + + + + 14 + + + + 13 + + + + 1 + + + + 2 + + + + 2 + + + + 2 + + + + 13 + + + + 1 + + + + 2 + + + + 1 + + + + 14 + + + + 1 + + + + 1 + + + + 13 + + + + 1 + + + + 13 + + + + 13 + + + + 2 + + + + 2 + + + + 13 + + + + 1 + + + + 0 + + + + 2 + + + + 1 + + + + 14 + + + + 14 + + + + 1 + + + + 1 + + + + 1 + + + + 0 + + + + 2 + + + + 1 + + + + 2 + + + + 13 + + + + 1 + + + + 2 + + + + 1 + + + + 2 + + + + 2 + + + + 1 + + + + 2 + + + + 2 + + + + 1 + + + + 1 + + + + 2 + + + + 13 + + + + 2 + + + + 2 + + + + 13 + + + + 13 + + + + 14 + + + + 1 + + + + 14 + + + + 1 + + + + 1 + + + + 2 + + + + 13 + + + + 1 + + + + 0 + + + + 14 + + + + 14 + + + + 13 + + + + 14 + + + + 1 + + + + 13 + + + + 2 + + + + 1 + + + + 13 + + + + 0 + + + + 13 + + + + 1 + + + + 13 + + + + 13 + + + + 13 + + + + 13 + + + + 13 + + + + 13 + + + + 0 + + + + 13 + + + + 1 + + + + 2 + + + + 1 + + + + 1 + + + + 13 + + + + 1 + + + + 1 + + + + 1 + + + + 2 + + + + 1 + + + + 1 + + + + 0 + + + + 2 + + + + 2 + + + + 13 + + + + 13 + + + + 13 + + + + 1 + + + + 13 + + + + 1 + + + + 13 + + + + 13 + + + + 0 + + + + 0 + + + + 1 + + + + 1 + + + + 2 + + + + 14 + + + + 14 + + + + 2 + + + + 13 + + + + 0 + + + + 1 + + + + 0 + + + + 13 + + + + 1 + + + + 13 + + + + 13 + + + + 13 + + + + 1 + + + + 1 + + + + 2 + + + + 13 + + + + 0 + + + + 14 + + + + 14 + + + + 0 + + + + 2 + + + + 0 + + + + 2 + + + + 0 + + + + 0 + + + + 13 + + + + 0 + + + + 14 + + + + 1 + + + + 13 + + + + 2 + + + + 0 + + + + 0 + + + + 2 + + + + 2 + + + + 0 + + + + 2 + + + + 13 + + + + 2 + + + + 2 + + + + 14 + + + + 2 + + + + 2 + + + + 2 + + + + 13 + + + + 2 + + + + 13 + + + + 13 + + + + 1 + + + + 2 + + + + 0 + + + + 0 + + + + 2 + + + + 0 + + + + 13 + + + + 2 + + + + 0 + + + + 0 + + + + 2 + + + + 14 + + + + 0 + + + + 0 + + + + 0 + + + + 2 + + + + 2 + + + + 2 + + + + 0 + + + + 0 + + + + 14 + + + + 2 + + + + 2 + + + + 2 + + + + 0 + + + + 0 + + + + 2 + + + + 2 + + + + 2 + + + + 2 + + + + 2 + + + + 0 + + + + 2 + + + + 0 + + + + 0 + + + + 15 + + + + 4 + + + + 2 + + + + 14 + + + + 2 + + + + 0 + + + + 2 + + + + 1 + + + + 0 + + + + 14 + + + + 1 + + + + 1 + + + + 0 + + + + 1 + + + + 2 + + + + 1 + + + + 2 + + + + 0 + + + + 0 + + + + 2 + + + + 1 + + + + 2 + + + + 2 + + + + 0 + + + + 0 + + + + 1 + + + + 1 + + \ No newline at end of file diff --git a/src-cli/testinputmedium.png b/src-cli/testinputmedium.png new file mode 100644 index 0000000..e321f9d Binary files /dev/null and b/src-cli/testinputmedium.png differ diff --git a/src-cli/tsconfig.json b/src-cli/tsconfig.json new file mode 100644 index 0000000..242d278 --- /dev/null +++ b/src-cli/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "noImplicitAny": true, + "strict": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "strictNullChecks": true, + "removeComments": false, + "sourceMap": true, + "target": "es5", + "lib": [ + "dom", + "es2015", + "es2015.promise" + ], + } +} \ No newline at end of file diff --git a/src-cli/tslint.json b/src-cli/tslint.json new file mode 100644 index 0000000..94c3224 --- /dev/null +++ b/src-cli/tslint.json @@ -0,0 +1,20 @@ +{ + "extends": "tslint:recommended", + "rulesDirectory": [], + "rules": { + "max-classes-per-file":false, + "max-line-length":false, + "no-console":false, + "no-bitwise":false, + "member-ordering":false, + "promise-function-async":true, + "await-promise":true, + "only-arrow-functions":false, + "variable-name": [ false ], + "no-angle-bracket-type-assertion": false, + "space-before-function-paren": false + }, + "jsRules": { + + } +} \ No newline at end of file diff --git a/src/common.ts b/src/common.ts index 8fdabf4..6416d1d 100644 --- a/src/common.ts +++ b/src/common.ts @@ -6,7 +6,11 @@ export interface IMap { } export async function delay(ms: number) { - return new Promise((exec) => window.setTimeout(exec, ms)); + if (typeof window !== "undefined") { + return new Promise((exec) => ( window).setTimeout(exec, ms)); + } else { + return new Promise((exec) => exec()); + } } export class CancellationToken {