From d53eb13eb5d92d856a47d794e62cecc87894ecdf Mon Sep 17 00:00:00 2001 From: Till Salinger Date: Thu, 5 Apr 2018 13:52:37 +0200 Subject: [PATCH] replaced HTML UI with multipicker --- package-lock.json | 890 ++++++++++++++-------------- package.json | 4 +- src/browser/settingsPageFrontend.ts | 236 -------- src/extension.ts | 8 +- src/fsWrapper.ts | 2 +- src/htmlPreview.ts | 178 ++---- src/importer.ts | 35 +- src/settings.ts | 4 +- src/sublimeFolderFinder.ts | 33 +- src/test/extension.test.ts | 10 +- tsconfig.json | 2 +- tslint.json | 3 +- 12 files changed, 539 insertions(+), 866 deletions(-) delete mode 100644 src/browser/settingsPageFrontend.ts diff --git a/package-lock.json b/package-lock.json index 4399c69..e5542d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,25 +22,43 @@ "integrity": "sha1-jeIlvDyVknqeWyRyWpMHZumMwTg=", "dev": true }, - "@types/temp": { - "version": "0.8.31", - "resolved": "https://registry.npmjs.org/@types/temp/-/temp-0.8.31.tgz", - "integrity": "sha512-zlQRhRYRTuO1lNF0WIYshou/BaVPslf6Rg6jm6sykKn9G/8gOKtlAXtWAZzyQl762XBtpdhsoP5WuN902OQ6RQ==", - "dev": true, - "requires": { - "@types/node": "7.0.55" - } - }, "ajv": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", - "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", - "json-schema-traverse": "0.3.1", - "json-stable-stringify": "1.0.1" + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" } }, "ansi-regex": { @@ -53,13 +71,20 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "1.1.0", + "array-slice": "0.2.3" } }, "arr-flatten": { @@ -68,12 +93,24 @@ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, "array-differ": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", "dev": true }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -172,9 +209,9 @@ } }, "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "1.0.0", @@ -223,9 +260,9 @@ } }, "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", "dev": true }, "clone-buffer": { @@ -241,14 +278,14 @@ "dev": true }, "cloneable-readable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.0.0.tgz", - "integrity": "sha1-pikNQT8hemEjL5XkWP84QYz7ARc=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", "dev": true, "requires": { "inherits": "2.0.3", - "process-nextick-args": "1.0.7", - "through2": "2.0.3" + "process-nextick-args": "2.0.0", + "readable-stream": "2.3.6" } }, "co": { @@ -257,10 +294,16 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, "combined-stream": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { "delayed-stream": "1.0.0" @@ -278,9 +321,9 @@ "dev": true }, "convert-source-map": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", - "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, "core-util-is": { @@ -322,9 +365,9 @@ "dev": true }, "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.0.0" @@ -346,9 +389,9 @@ "dev": true }, "diff": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz", - "integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k=", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", "dev": true }, "duplexer": { @@ -393,14 +436,14 @@ } }, "duplexify": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.1.tgz", - "integrity": "sha512-j5goxHTwVED1Fpe5hh3q9R93Kip0Bg2KVAt4f8CEYM3UEwYcPSvWbXaUQOzdX/HtiNomipv+gU7ASQPDbV7pGQ==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "dev": true, "requires": { - "end-of-stream": "1.4.0", + "end-of-stream": "1.4.1", "inherits": "2.0.3", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "stream-shift": "1.0.0" } }, @@ -415,9 +458,9 @@ } }, "end-of-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { "once": "1.4.0" @@ -468,12 +511,12 @@ "dev": true }, "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "kind-of": "1.1.0" } }, "extglob": { @@ -500,19 +543,26 @@ "dev": true }, "fancy-log": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", "dev": true, "requires": { - "chalk": "1.1.3", + "ansi-gray": "0.1.1", + "color-support": "1.1.3", "time-stamp": "1.1.0" } }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, "fd-slicer": { @@ -577,8 +627,8 @@ "dev": true, "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "from": { @@ -763,9 +813,9 @@ } }, "glogg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", "dev": true, "requires": { "sparkles": "1.0.0" @@ -777,16 +827,10 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "growl": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", - "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", "dev": true }, "gulp-chmod": { @@ -801,32 +845,26 @@ } }, "gulp-filter": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.0.1.tgz", - "integrity": "sha512-5olRzAhFdXB2klCu1lnazP65aO9YdA/5WfC9VdInIc8PrUeDIoZfaA3Edb0yUBGhVdHv4eHKL9Fg5tUoEJ9z5A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", + "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM=", "dev": true, "requires": { - "gulp-util": "3.0.8", "multimatch": "2.1.0", - "streamfilter": "1.0.5" + "plugin-error": "0.1.2", + "streamfilter": "1.0.7" } }, "gulp-gunzip": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-0.0.3.tgz", - "integrity": "sha1-e24HsPWP09QlFcSOrVpj3wVy9i8=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-1.0.0.tgz", + "integrity": "sha1-FbdBFF6Dqcb1CIYkG1fMWHHxUak=", "dev": true, "requires": { "through2": "0.6.5", "vinyl": "0.4.6" }, "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -860,16 +898,6 @@ "readable-stream": "1.0.34", "xtend": "4.0.1" } - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" - } } } }, @@ -886,18 +914,18 @@ "vinyl": "2.0.2" }, "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, "clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", "dev": true }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, "request": { "version": "2.79.0", "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", @@ -907,7 +935,7 @@ "aws-sign2": "0.6.0", "aws4": "1.6.0", "caseless": "0.11.0", - "combined-stream": "1.0.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", "form-data": "2.1.4", @@ -917,13 +945,13 @@ "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", + "mime-types": "2.1.18", "oauth-sign": "0.8.2", "qs": "6.3.2", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.4.3", - "uuid": "3.1.0" + "uuid": "3.2.1" } }, "vinyl": { @@ -932,10 +960,10 @@ "integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw=", "dev": true, "requires": { - "clone": "1.0.2", + "clone": "1.0.4", "clone-buffer": "1.0.0", "clone-stats": "1.0.0", - "cloneable-readable": "1.0.0", + "cloneable-readable": "1.1.2", "is-stream": "1.1.0", "remove-trailing-separator": "1.1.0", "replace-ext": "1.0.0" @@ -949,20 +977,32 @@ "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", "dev": true, "requires": { - "convert-source-map": "1.5.0", + "convert-source-map": "1.5.1", "graceful-fs": "4.1.11", "strip-bom": "2.0.0", "through2": "2.0.3", "vinyl": "1.2.0" }, "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, "vinyl": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", "dev": true, "requires": { - "clone": "1.0.2", + "clone": "1.0.4", "clone-stats": "0.0.1", "replace-ext": "0.0.1" } @@ -1005,7 +1045,7 @@ "beeper": "1.1.1", "chalk": "1.1.3", "dateformat": "2.2.0", - "fancy-log": "1.3.0", + "fancy-log": "1.3.2", "gulplog": "1.0.0", "has-gulplog": "0.1.0", "lodash._reescape": "3.0.0", @@ -1018,71 +1058,93 @@ "replace-ext": "0.0.1", "through2": "2.0.3", "vinyl": "0.5.3" - } - }, - "gulp-vinyl-zip": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-1.4.0.tgz", - "integrity": "sha1-VjgvLMtXIxuwR4x4c3zNVylzvuE=", - "dev": true, - "requires": { - "event-stream": "3.3.4", - "queue": "3.1.0", - "through2": "0.6.5", - "vinyl": "0.4.6", - "vinyl-fs": "2.4.4", - "yauzl": "2.8.0", - "yazl": "2.4.2" }, "dependencies": { "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, - "isarray": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + }, + "replace-ext": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", "dev": true }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" + "clone": "1.0.4", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + } + } + }, + "gulp-vinyl-zip": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.0.tgz", + "integrity": "sha1-JOQGhdwFtxSZlSRQmeBZAmO+ja0=", + "dev": true, + "requires": { + "event-stream": "3.3.4", + "queue": "4.4.2", + "through2": "2.0.3", + "vinyl": "2.1.0", + "vinyl-fs": "2.4.4", + "yauzl": "2.9.1", + "yazl": "2.4.3" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "queue": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-4.4.2.tgz", + "integrity": "sha512-fSMRXbwhMwipcDZ08enW2vl+YDmAmhcNcr43sCJL8DIg+CFOsoRLG23ctxA+fwNk1w55SePSiS7oqQQSgQoVJQ==", "dev": true, "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" + "inherits": "2.0.3" } }, "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", + "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw=", "dev": true, "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" + "clone": "2.1.2", + "clone-buffer": "1.0.0", + "clone-stats": "1.0.0", + "cloneable-readable": "1.1.2", + "remove-trailing-separator": "1.1.0", + "replace-ext": "1.0.0" } } } @@ -1093,7 +1155,7 @@ "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { - "glogg": "1.0.0" + "glogg": "1.0.1" } }, "har-schema": { @@ -1110,7 +1172,7 @@ "requires": { "chalk": "1.1.3", "commander": "2.11.0", - "is-my-json-valid": "2.16.1", + "is-my-json-valid": "2.17.2", "pinkie-promise": "2.0.1" } }, @@ -1123,9 +1185,9 @@ } }, "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, "has-gulplog": { @@ -1169,7 +1231,7 @@ "requires": { "assert-plus": "0.2.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "inflight": { @@ -1195,9 +1257,9 @@ "dev": true }, "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, "is-dotfile": { @@ -1236,14 +1298,21 @@ "is-extglob": "2.1.1" } }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true + }, "is-my-json-valid": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", - "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "dev": true, "requires": { "generate-function": "2.0.0", "generate-object-property": "1.2.0", + "is-my-ip-valid": "1.0.0", "jsonpointer": "4.0.1", "xtend": "4.0.1" } @@ -1255,6 +1324,17 @@ "dev": true, "requires": { "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } } }, "is-obj": { @@ -1360,12 +1440,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json3": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", - "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", - "dev": true - }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -1399,13 +1473,10 @@ } }, "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.5" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true }, "lazystream": { "version": "1.0.0", @@ -1413,17 +1484,7 @@ "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", "dev": true, "requires": { - "readable-stream": "2.3.3" - } - }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "dev": true, - "requires": { - "lodash._basecopy": "3.0.1", - "lodash.keys": "3.1.2" + "readable-stream": "2.3.6" } }, "lodash._basecopy": { @@ -1432,12 +1493,6 @@ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", "dev": true }, - "lodash._basecreate": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", - "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", - "dev": true - }, "lodash._basetostring": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", @@ -1486,17 +1541,6 @@ "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", "dev": true }, - "lodash.create": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", - "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", - "dev": true, - "requires": { - "lodash._baseassign": "3.2.0", - "lodash._basecreate": "3.0.3", - "lodash._isiterateecall": "3.0.9" - } - }, "lodash.escape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", @@ -1580,7 +1624,7 @@ "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "micromatch": { @@ -1604,6 +1648,15 @@ "regex-cache": "0.4.4" }, "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, "is-extglob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", @@ -1618,22 +1671,31 @@ "requires": { "is-extglob": "1.0.0" } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } } } }, "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", "dev": true }, "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "dev": true, "requires": { - "mime-db": "1.30.0" + "mime-db": "1.33.0" } }, "minimatch": { @@ -1642,13 +1704,13 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.8" + "brace-expansion": "1.1.11" } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "mkdirp": { @@ -1658,66 +1720,33 @@ "dev": true, "requires": { "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } } }, "mocha": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz", - "integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", "dev": true, "requires": { "browser-stdout": "1.3.0", - "commander": "2.9.0", - "debug": "2.6.8", - "diff": "3.2.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", "escape-string-regexp": "1.0.5", - "glob": "7.1.1", - "growl": "1.9.2", + "glob": "7.1.2", + "growl": "1.10.3", "he": "1.1.1", - "json3": "3.3.2", - "lodash.create": "3.1.1", "mkdirp": "0.5.1", - "supports-color": "3.1.2" + "supports-color": "4.4.0" }, "dependencies": { - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "dev": true, - "requires": { - "graceful-readlink": "1.0.1" - } - }, - "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, "supports-color": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", - "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", "dev": true, "requires": { - "has-flag": "1.0.0" + "has-flag": "2.0.0" } } } @@ -1774,9 +1803,9 @@ "dev": true }, "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object.omit": { @@ -1805,15 +1834,9 @@ "dev": true, "requires": { "is-stream": "1.1.0", - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", @@ -1891,6 +1914,19 @@ "pinkie": "2.0.4" } }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "0.1.1", + "ansi-red": "0.1.1", + "arr-diff": "1.1.0", + "arr-union": "2.1.0", + "extend-shallow": "1.1.4" + } + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -1898,9 +1934,9 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "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 }, "punycode": { @@ -1955,7 +1991,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "1.1.6" } } } @@ -1966,23 +2002,23 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.5" + "is-buffer": "1.1.6" } } } }, "readable-stream": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "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.2", "inherits": "2.0.3", "isarray": "1.0.0", - "process-nextick-args": "1.0.7", + "process-nextick-args": "2.0.0", "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", + "string_decoder": "1.1.1", "util-deprecate": "1.0.2" } }, @@ -2023,39 +2059,39 @@ "dev": true }, "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", "dev": true }, "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", "dev": true, "requires": { "aws-sign2": "0.7.0", "aws4": "1.6.0", "caseless": "0.12.0", - "combined-stream": "1.0.5", + "combined-stream": "1.0.6", "extend": "3.0.1", "forever-agent": "0.6.1", - "form-data": "2.3.1", + "form-data": "2.3.2", "har-validator": "5.0.3", "hawk": "6.0.2", "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", + "mime-types": "2.1.18", "oauth-sign": "0.8.2", "performance-now": "2.1.0", "qs": "6.5.1", "safe-buffer": "5.1.1", "stringstream": "0.0.5", - "tough-cookie": "2.3.3", + "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", - "uuid": "3.1.0" + "uuid": "3.2.1" }, "dependencies": { "assert-plus": { @@ -2076,7 +2112,7 @@ "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "dev": true, "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "caseless": { @@ -2100,20 +2136,20 @@ "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "dev": true, "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } } } }, "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "dev": true, "requires": { "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" + "combined-stream": "1.0.6", + "mime-types": "2.1.18" } }, "har-validator": { @@ -2122,7 +2158,7 @@ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, "requires": { - "ajv": "5.2.3", + "ajv": "5.5.2", "har-schema": "2.0.0" } }, @@ -2134,14 +2170,14 @@ "requires": { "boom": "4.3.1", "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.0.2" + "hoek": "4.2.1", + "sntp": "2.1.0" } }, "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", "dev": true }, "http-signature": { @@ -2152,7 +2188,7 @@ "requires": { "assert-plus": "1.0.0", "jsprim": "1.4.1", - "sshpk": "1.13.1" + "sshpk": "1.14.1" } }, "qs": { @@ -2162,12 +2198,12 @@ "dev": true }, "sntp": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", - "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "dev": true, "requires": { - "hoek": "4.2.0" + "hoek": "4.2.1" } }, "tunnel-agent": { @@ -2203,9 +2239,9 @@ "dev": true }, "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "sntp": { @@ -2218,18 +2254,18 @@ } }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.4.tgz", + "integrity": "sha512-PETSPG6BjY1AHs2t64vS2aqAgu6dMIMXJULWFBGbh2Gr8nVLbCFDo6i/RMMvviIQ2h1Z8+5gQhVKSn2je9nmdg==", "dev": true, "requires": { - "source-map": "0.5.7" + "source-map": "0.6.1" } }, "sparkles": { @@ -2248,9 +2284,9 @@ } }, "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "dev": true, "requires": { "asn1": "0.2.3", @@ -2293,12 +2329,12 @@ "dev": true }, "streamfilter": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz", - "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.7.tgz", + "integrity": "sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ==", "dev": true, "requires": { - "readable-stream": "2.3.3" + "readable-stream": "2.3.6" } }, "streamifier": { @@ -2308,9 +2344,9 @@ "dev": true }, "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "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.1" @@ -2365,24 +2401,6 @@ "inherits": "2.0.3" } }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", - "dev": true, - "requires": { - "os-tmpdir": "1.0.2", - "rimraf": "2.2.8" - }, - "dependencies": { - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - } - } - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -2395,7 +2413,7 @@ "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "xtend": "4.0.1" } }, @@ -2422,12 +2440,23 @@ "dev": true, "requires": { "extend-shallow": "2.0.1" + }, + "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.1" + } + } } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "dev": true, "requires": { "punycode": "1.4.1" @@ -2463,9 +2492,9 @@ } }, "url-parse": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.1.9.tgz", - "integrity": "sha1-xn8dd11R8KGJEd17P/rSe7nlvRk=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz", + "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==", "dev": true, "requires": { "querystringify": "1.0.0", @@ -2479,9 +2508,9 @@ "dev": true }, "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", "dev": true }, "vali-date": { @@ -2510,14 +2539,13 @@ } }, "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", "dev": true, "requires": { - "clone": "1.0.2", - "clone-stats": "0.0.1", - "replace-ext": "0.0.1" + "clone": "0.2.0", + "clone-stats": "0.0.1" } }, "vinyl-fs": { @@ -2526,7 +2554,7 @@ "integrity": "sha1-vm/zJwy1Xf19MGNkDegfJddTIjk=", "dev": true, "requires": { - "duplexify": "3.5.1", + "duplexify": "3.5.4", "glob-stream": "5.3.5", "graceful-fs": "4.1.11", "gulp-sourcemaps": "1.6.0", @@ -2536,7 +2564,7 @@ "merge-stream": "1.0.1", "mkdirp": "0.5.1", "object-assign": "4.1.1", - "readable-stream": "2.3.3", + "readable-stream": "2.3.6", "strip-bom": "2.0.0", "strip-bom-stream": "1.0.0", "through2": "2.0.3", @@ -2545,10 +2573,16 @@ "vinyl": "1.2.0" }, "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", "dev": true }, "vinyl": { @@ -2557,7 +2591,7 @@ "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", "dev": true, "requires": { - "clone": "1.0.2", + "clone": "1.0.4", "clone-stats": "0.0.1", "replace-ext": "0.0.1" } @@ -2565,87 +2599,35 @@ } }, "vinyl-source-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.0.tgz", - "integrity": "sha1-RMvlEIIFJ53rDFZTwJSiiHk4sas=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vinyl-source-stream/-/vinyl-source-stream-1.1.2.tgz", + "integrity": "sha1-YrU6E1YQqJbpjKlr7jqH8Aio54A=", "dev": true, "requires": { - "through2": "0.6.5", + "through2": "2.0.3", "vinyl": "0.4.6" - }, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "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.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.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "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 - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true, - "requires": { - "readable-stream": "1.0.34", - "xtend": "4.0.1" - } - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true, - "requires": { - "clone": "0.2.0", - "clone-stats": "0.0.1" - } - } } }, "vscode": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.5.tgz", - "integrity": "sha1-EOsQQAGEDD3QgTgV/UoF+PyILRQ=", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.14.tgz", + "integrity": "sha512-acfn3fzGtTm7UjChAN7/YjsC0qIyJeuSrJwvm6qb7tLN6Geq1FmCz1JnBOc3kaY+HCLjQBAfwG/CsgnasOdXMw==", "dev": true, "requires": { "glob": "7.1.2", "gulp-chmod": "2.0.0", - "gulp-filter": "5.0.1", - "gulp-gunzip": "0.0.3", + "gulp-filter": "5.1.0", + "gulp-gunzip": "1.0.0", "gulp-remote-src": "0.4.3", "gulp-symdest": "1.1.0", "gulp-untar": "0.0.6", - "gulp-vinyl-zip": "1.4.0", - "mocha": "3.5.3", - "request": "2.83.0", - "semver": "5.4.1", - "source-map-support": "0.4.18", - "url-parse": "1.1.9", - "vinyl-source-stream": "1.1.0" + "gulp-vinyl-zip": "2.1.0", + "mocha": "4.1.0", + "request": "2.85.0", + "semver": "5.5.0", + "source-map-support": "0.5.4", + "url-parse": "1.2.0", + "vinyl-source-stream": "1.1.2" } }, "wrappy": { @@ -2661,9 +2643,9 @@ "dev": true }, "yauzl": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", - "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha1-qBmB6nCleUYTOIPwKcWCGok1mn8=", "dev": true, "requires": { "buffer-crc32": "0.2.13", @@ -2671,9 +2653,9 @@ } }, "yazl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.2.tgz", - "integrity": "sha1-FMsZCD4eJacAksFYiqvg9OTdTYg=", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", + "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE=", "dev": true, "requires": { "buffer-crc32": "0.2.13" diff --git a/package.json b/package.json index 04c2790..7f621a4 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "version": "1.0.1", "publisher": "auchenberg", "engines": { - "vscode": "^1.18.0" + "vscode": "^1.22.0" }, "categories": [ "Other" @@ -62,7 +62,7 @@ "@types/node": "^7.0.43", "@types/relaxed-json": "^1.0.0", "typescript": "^2.0.3", - "vscode": "^1.1.5" + "vscode": "^1.1.14" }, "dependencies": { "relaxed-json": "^1.0.1" diff --git a/src/browser/settingsPageFrontend.ts b/src/browser/settingsPageFrontend.ts deleted file mode 100644 index 8413cc0..0000000 --- a/src/browser/settingsPageFrontend.ts +++ /dev/null @@ -1,236 +0,0 @@ -function addClasses(el: HTMLElement, classesWhiteSpaceSeparated: string): void { - classesWhiteSpaceSeparated.split(' ').forEach(cls => el.classList.add(cls)); -} -class Setting { - constructor(readonly name: string, readonly value: any) { } -} - -class MappedSetting { - public static hasNoMatch(setting: MappedSetting): boolean { - if (setting && setting.vscode) { - return setting.vscode.name === MappedSetting.NO_MATCH; - } - return true; - } - - private static readonly NO_MATCH: string = "--No Match--"; - public sublime: Setting; - public vscode: Setting; - public isDuplicate: boolean = false; - public duplicateVscodeSetting: Setting; - - constructor(sublimeSetting: Setting, vscodeSetting?: Setting) { - this.sublime = sublimeSetting; - this.vscode = vscodeSetting || new Setting(MappedSetting.NO_MATCH, MappedSetting.NO_MATCH); - } - - public setVscode(setting: Setting): void { - this.vscode = setting; - } - - public markAsDuplicate(vscodeSetting: Setting) { - this.isDuplicate = true; - this.duplicateVscodeSetting = vscodeSetting; - } -} - -class SettingsTable { - - public renderMappedSettings(mappedSettings: MappedSetting[]): HTMLElement[] { - return mappedSettings.filter(m => !MappedSetting.hasNoMatch(m)).map((m, index) => this.renderMappedSetting(m, index)); - } - - private renderMappedSetting(setting: MappedSetting, index: number): HTMLElement { - let settingRow = document.createElement('div'); - addClasses(settingRow, 'settingRow clickable_parent'); - if (index % 2 === 0) { - addClasses(settingRow, 'odd'); - } - settingRow.dataset.sublimename = setting.sublime.name; - settingRow.dataset.sublimevalue = JSON.stringify(setting.sublime.value); - settingRow.dataset.vscodename = setting.vscode.name; - settingRow.dataset.vscodevalue = JSON.stringify(setting.vscode.value); - - settingRow.appendChild(this.renderCheckbox(setting)); - settingRow.appendChild(this.renderSetting(setting)); - return settingRow; - } - - private renderCheckbox(setting: MappedSetting) { - const checkbox: HTMLInputElement = document.createElement('input') as HTMLInputElement; - checkbox.type = 'checkbox'; - if (!setting.isDuplicate) { - checkbox.setAttribute('checked', ''); - } - addClasses(checkbox, 'ui checkbox matching_setting_checkbox'); - const td = document.createElement('div'); - td.appendChild(checkbox); - return td; - } - - private renderSetting(setting: MappedSetting): HTMLElement { - const mappedSetting = document.createElement('div'); - addClasses(mappedSetting, 'mappedSetting'); - mappedSetting.appendChild(this.renderSublimeSetting(setting.sublime)); - mappedSetting.appendChild(this.renderVscodeSetting(setting.vscode, setting.duplicateVscodeSetting)); - return mappedSetting; - } - - private renderSublimeSetting(sublime: Setting): HTMLElement { - const setting = document.createElement('div'); - addClasses(setting, 'sublimeSetting'); - setting.appendChild(this.renderSettingNameAndValue(sublime.name, sublime.value)); - return setting; - } - - private renderVscodeSetting(vscode: Setting, existingSetting?: Setting): HTMLElement { - const setting = document.createElement('div'); - addClasses(setting, 'vscodeSetting'); - setting.appendChild(this.renderSettingNameAndValue(vscode.name, vscode.value, existingSetting ? existingSetting.value : undefined)); - return setting; - } - - private renderSettingNameAndValue(name: string, value: string | boolean | number, currVal?: string | boolean | number): HTMLElement { - const setting = document.createElement('div'); - addClasses(setting, 'setting-name-value'); - const nameContainer = document.createElement('div'); - addClasses(nameContainer, 'setting-name'); - nameContainer.textContent = name; - nameContainer.title = name; - setting.appendChild(nameContainer); - const valueContainer = document.createElement('div'); - addClasses(valueContainer, 'setting-value'); - valueContainer.textContent = value.toString(); - valueContainer.title = value.toString(); - setting.appendChild(valueContainer); - if (currVal !== undefined) { - const warningIcon = document.createElement('div'); - addClasses(warningIcon, 'warning'); - warningIcon.title = `Overwrites current value: ${currVal}`; - valueContainer.appendChild(warningIcon); - } - - return setting; - } -} - -class Frontend { - private selectAllCheckbox: HTMLInputElement = document.querySelector('#selectAllCheckbox input') as HTMLInputElement; - private checkboxes: HTMLInputElement[] = Array.from(document.querySelectorAll('input.matching_setting_checkbox') as NodeListOf); - private submitButton: HTMLButtonElement = document.querySelector('#add-settings-button') as HTMLButtonElement; - private browseButton: HTMLButtonElement = document.querySelector('.browseButton') as HTMLButtonElement; - private reloadIcon: HTMLDivElement = document.querySelector('.reloadIcon') as HTMLDivElement; - private settingsPathContainer: HTMLInputElement = document.getElementById('settingsPathContainer') as HTMLInputElement; - - constructor() { - this.registerEventListeners(); - this.initUI(); - } - - private registerEventListeners(): void { - this.selectAllCheckbox.addEventListener('click', () => this.onDidClickSelectAllCheckbox()); - - this.checkboxes.forEach(box => box.addEventListener('change', () => this.refreshStates())); - - this.submitButton.addEventListener('click', () => this.sendSettings(this.checkboxes.filter(chkbox => chkbox.checked))); - - this.browseButton.addEventListener('click', () => this.executeCommand('command:extension.onBrowseButtonClicked')); - - this.reloadIcon.addEventListener('click', () => this.executeCommand('command:extension.reload?' + JSON.stringify(this.settingsPathContainer.value))); - } - - private onDidClickSelectAllCheckbox() { - for (const chkbox of this.checkboxes) { - chkbox.checked = this.selectAllCheckbox.checked; - } - this.refreshStates(); - } - - private initUI() { - this.refreshStates(); - const { total, numChecked } = this.numCheckboxesChecked(); - this.selectAllCheckbox.checked = total === numChecked; - } - - private numCheckboxesChecked() { - const numChecked = this.checkboxes.filter((box) => box.checked).length; - return { total: this.checkboxes.length, numChecked }; - } - - private refreshStates() { - const chkboxStates = this.numCheckboxesChecked(); - this.setImportButtonState(chkboxStates.numChecked > 0); - this.selectAllCheckbox.checked = chkboxStates.numChecked === chkboxStates.total; - } - - private setImportButtonState(on: boolean) { - if (on) { - this.submitButton.removeAttribute('disabled'); - this.submitButton.classList.remove('disabled'); - } else { - this.submitButton.setAttribute('disabled', ''); - this.submitButton.classList.add('disabled'); - } - } - - private getVscodeSettingsFromParentTR(td: HTMLElement): Setting { - return { name: td.parentElement.parentElement.dataset.vscodename, value: td.parentElement.parentElement.dataset.vscodevalue }; - } - - private sendSettings(selectedCheckboxes: HTMLInputElement[]): void { - const settings = selectedCheckboxes.map(chbox => this.getVscodeSettingsFromParentTR(chbox as HTMLElement)); - this.sendSelectedSettingsToExtension(settings); - } - - private sendSelectedSettingsToExtension(settings: Setting[]) { - const obj = { - data: settings - }; - this.executeCommand('command:extension.onImportSelectedSettings?' + JSON.stringify(obj)); - } - - private executeCommand(cmd: string): void { - const command = encodeURI(cmd); - var anchor = document.createElement('a'); - anchor.href = command; - document.body.appendChild(anchor); - anchor.click(); - document.body.removeChild(anchor); - } -} - -function onNewSettings(settingsTable: SettingsTable) { - const { mappedSettings, sublimeSettingsPath, isValid } = JSON.parse(decodeURI(document.getElementById('frontendData').dataset.frontend)); - if (sublimeSettingsPath) { - const sublimeSettingsPathContainer = document.getElementById('settingsPathContainer'); - sublimeSettingsPathContainer.title = sublimeSettingsPath; - sublimeSettingsPathContainer.setAttribute('value', sublimeSettingsPath); - - if (isValid && mappedSettings.length) { - const mappedSettingsContainer = document.querySelector('#mappedSettings'); - const mappedSettingsEls = settingsTable.renderMappedSettings(mappedSettings); - for (const mappedSetting of mappedSettingsEls) { - mappedSettingsContainer.appendChild(mappedSetting); - } - } else { - const settingsImporter = document.querySelector('#sublimeSettingsImporter'); - const noSettingsFoundContainer = document.createElement('h4'); - addClasses(noSettingsFoundContainer, 'noSettingsFound'); - if (mappedSettings.length === 0) { - noSettingsFoundContainer.textContent = `No settings to import`; - } else { - noSettingsFoundContainer.textContent = `No Sublime settings folder found`; - } - - settingsImporter.appendChild(noSettingsFoundContainer); - const settingsTable = document.querySelector('#settingsTableMapper'); - settingsTable.classList.add('hidden'); - } - } else { - const settingsTable = document.querySelector('#settingsTableMapper'); - settingsTable.classList.add('hidden'); - } -} - -onNewSettings(new SettingsTable()); -new Frontend(); \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 1499504..b6aa35c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -1,6 +1,10 @@ +import {resolve} from 'path'; import * as vscode from 'vscode'; +import { readFileAsync } from './fsWrapper'; import { HTMLPreviewEditor } from './htmlPreview'; +import { Importer } from './importer'; -export function activate(context: vscode.ExtensionContext) { - new HTMLPreviewEditor(context); +export async function activate(context: vscode.ExtensionContext): Promise { + const mappingsFile: string = await readFileAsync(resolve(__dirname, '..', 'mappings/settings.json'), 'utf-8'); + new HTMLPreviewEditor(context, new Importer(mappingsFile)); } diff --git a/src/fsWrapper.ts b/src/fsWrapper.ts index 9087660..ffb0d4e 100644 --- a/src/fsWrapper.ts +++ b/src/fsWrapper.ts @@ -16,7 +16,7 @@ function fsAccess(stringPath: string, checks: number): Promise { // adapted from vs/base/common/async export function promisifier(fn: Function, ...args: any[]): Promise { - return new Promise((c, e) => fn(...args, (err, result) => err ? e(err) : c(result))); + return new Promise((c, e) => fn(...args, (err: any, result: any) => err ? e(err) : c(result))); } export async function getFilenamesInFolderAsync(folderPath: string): Promise { diff --git a/src/htmlPreview.ts b/src/htmlPreview.ts index db4057e..c0e4bad 100644 --- a/src/htmlPreview.ts +++ b/src/htmlPreview.ts @@ -1,81 +1,78 @@ import * as vscode from 'vscode'; +import { readFileAsync } from './fsWrapper'; import { Importer } from './importer'; -import { MappedSetting, Setting } from './settings'; +import { MappedSetting } from './settings'; import * as sublimeFolderFinder from './sublimeFolderFinder'; -import { ISublimeSettingsPickerResult } from './sublimeFolderFinder'; -import { resolve } from 'path'; -import { readFileAsync} from './fsWrapper'; -export const scheme = 'vs-code-html-preview'; -const previewUri = vscode.Uri.parse(`${scheme}://authority/vs-code-html-preview`); - -interface ISettingsPacket { - data: [{ name: string, value: string }]; -} - -interface IFrontendData { - mappedSettings: MappedSetting[]; - sublimeSettingsPath: string; - isValid: boolean; -} export class HTMLPreviewEditor { - private _onDidChange: vscode.EventEmitter = new vscode.EventEmitter(); - public readonly onDidChange: vscode.Event = this._onDidChange.event; - private userSelectedPath: vscode.Uri; - private isValid: boolean = true; - - private _importer: Importer; - - constructor(private context: vscode.ExtensionContext) { - context.subscriptions.push(this._onDidChange); + constructor(context: vscode.ExtensionContext, private importer: Importer) { context.subscriptions.push(vscode.commands.registerCommand('extension.importFromSublime', () => this.open())); - context.subscriptions.push(vscode.workspace.registerTextDocumentContentProvider(scheme, this)); - context.subscriptions.push(vscode.commands.registerCommand('extension.onBrowseButtonClicked', () => this.pickFolder())); - context.subscriptions.push(vscode.commands.registerCommand('extension.onImportSelectedSettings', (packet: ISettingsPacket) => this.onImportSelectedSettings(packet))); - context.subscriptions.push(vscode.commands.registerCommand('extension.reload', () => this._onDidChange.fire(previewUri))); } - public async provideTextDocumentContent(): Promise { - const path = await this.getSettingsPath(); - const settings: MappedSetting[] | undefined = this.isValid && path ? await this.getSettings(path.fsPath) : []; - return this.getHTML({ - mappedSettings: settings, - sublimeSettingsPath: path.fsPath, - isValid: this.isValid, - }); - } + private async open(sublimeSettingsPath?: vscode.Uri): Promise { + sublimeSettingsPath = sublimeSettingsPath || await sublimeFolderFinder.getExistingDefaultPaths(); + if (!sublimeSettingsPath) { + return this.showBrowseButtonAsync({ + label: '$(issue-opened) No Sublime settings folder found. It\'s usually located here:', + detail: sublimeFolderFinder.getOSDefaultPaths().join(' '), + }); + } - private open() { - vscode.commands.executeCommand('vscode.previewHtml', previewUri, vscode.ViewColumn.Active, 'Sublime Settings Importer'); - } + const mappedSettings: MappedSetting[] = await this.getSettings(sublimeSettingsPath.fsPath); + if (!mappedSettings.length) { + return await this.showBrowseButtonAsync({ + label: '$(issue-opened) No new settings to import from', + detail: sublimeSettingsPath.fsPath, + }); + } - private async pickFolder() { - const folderPickerResult: ISublimeSettingsPickerResult = await sublimeFolderFinder.pickSublimeSettings(); - if (folderPickerResult) { - if (folderPickerResult.sublimeSettingsPath) { - this.userSelectedPath = folderPickerResult.sublimeSettingsPath; - } else { - vscode.window.showWarningMessage('No settings folder found'); - } - this.isValid = !!folderPickerResult.sublimeSettingsPath; - this._onDidChange.fire(previewUri); + const pickedSettingNames: vscode.QuickPickItem[] | undefined = await vscode.window.showQuickPick(mappedSettings + .map(this.setting2QuickPickItem), { canPickMany: true }); + if (pickedSettingNames) { + const selSettings = pickedSettingNames.map(name => mappedSettings.find(set => this.setting2QuickPickItem(set).label === name.label)) as MappedSetting[]; + this.importSelectedSettings(selSettings); } } - private async onImportSelectedSettings(packet: ISettingsPacket): Promise { - if (packet.data) { - const settings: Setting[] = packet.data.map((setting) => new Setting(setting.name, JSON.parse(setting.value))); - const importer = await this.getImporter(); - await importer.updateSettingsAsync(settings); + private async showBrowseButtonAsync(msgItem: vscode.QuickPickItem): Promise { + const browseString = 'Browse...'; + const browseItem: vscode.QuickPickItem = { label: browseString }; + const selectedItem: vscode.QuickPickItem | undefined = await vscode.window.showQuickPick([msgItem, browseItem]); + if (!selectedItem) { + return undefined; + } + + if (selectedItem.label === browseString) { + this.pickFolder(); + } + } + + private setting2QuickPickItem(setting: MappedSetting): vscode.QuickPickItem { + return { + detail: setting.isDuplicate + ? `$(issue-opened) Overwrites existing value: ${setting.duplicateVscodeSetting && setting.duplicateVscodeSetting.value}` + : '', + label: `${setting.sublime.name} $(arrow-right) ${setting.vscode.name}`, + picked: !setting.isDuplicate, + }; + } + private async pickFolder(): Promise { + const sublimeSettingsPath: vscode.Uri | undefined = await sublimeFolderFinder.pickSublimeSettings(); + if (sublimeSettingsPath) { + this.open(sublimeSettingsPath); + } + } + + private async importSelectedSettings(selectedSettings: MappedSetting[]): Promise { + if (selectedSettings.length) { + await this.importer.updateSettingsAsync(selectedSettings.map(selSettings => selSettings.vscode)); await vscode.commands.executeCommand('workbench.action.openGlobalSettings'); - } else { - console.error(`Unhandled message: ${JSON.stringify(packet.data)}`); } } private async getSettings(sublimeSettingsPath: string): Promise { - const importer = await this.getImporter(); + const importer = await this.importer; let settings: MappedSetting[] | undefined = await importer.getMappedSettingsAsync(await readFileAsync(sublimeSettingsPath, 'utf-8')); settings = settings.filter((s) => !MappedSetting.hasNoMatch(s)); settings.sort((a, b) => { @@ -90,67 +87,4 @@ export class HTMLPreviewEditor { }); return settings; } - - private async getSettingsPath(): Promise { - if (this.userSelectedPath) { - return this.userSelectedPath; - } - const defaultSublimePaths = await sublimeFolderFinder.getExistingDefaultPaths(); - return defaultSublimePaths && defaultSublimePaths.length ? defaultSublimePaths[0].settings : null; - } - - private async getImporter(): Promise { - if (!this._importer) { - const mappingsFilePath = resolve(__dirname, '..', 'mappings/settings.json'); - this._importer = new Importer(await readFileAsync(mappingsFilePath, 'utf-8')); - } - return this._importer; - } - - private getHTML(frontendData: IFrontendData): string { - const projectRoot: string = vscode.Uri.file(this.context.asAbsolutePath('')).fsPath; - - return ` - - - - - - - -
-
- -

Import Settings from Sublime Text

-
-
- - -
- - -
-
-
-
- -
-
Sublime
-
- -
-
VS Code
-
-
-
-
- -
-
- - - - - `; - } } diff --git a/src/importer.ts b/src/importer.ts index 05ce8c2..f2b1293 100644 --- a/src/importer.ts +++ b/src/importer.ts @@ -8,7 +8,7 @@ export class Importer { this.settingsMappings = this.json2Map(mappings); } - public async getMappedSettingsAsync(sublimeSettings: string): Promise { + public async getMappedSettingsAsync(sublimeSettings: string): Promise { return this.mapAllSettings(this.json2Map(sublimeSettings)); } @@ -25,36 +25,37 @@ export class Importer { private json2Map(toParse: string): Map { const map = new Map(); - const parsed = rjson.parse(toParse); + const parsed: any = rjson.parse(toParse); Object.keys(parsed).forEach(key => map.set(key, parsed[key])); return map; } - private getExistingValue(setting: Setting): any | undefined { - const config = vscode.workspace.getConfiguration(); - const info = config.inspect(setting.name); - return info.globalValue === undefined ? undefined : info.globalValue; - } private mapAllSettings(sublimeSettings: Map): MappedSetting[] { const mappedSettings: MappedSetting[] = []; - sublimeSettings.forEach((value, key) => { - const ms: MappedSetting = new MappedSetting(new Setting(key, value)); + const config = vscode.workspace.getConfiguration(); + + for (const [key, value] of sublimeSettings.entries()) { + const mappedSetting: MappedSetting = new MappedSetting(new Setting(key, value)); const vscodeMapping = this.mapSetting(key, value); if (vscodeMapping) { - ms.setVscode(vscodeMapping); - const existingValue = this.getExistingValue(vscodeMapping); - if (existingValue) { - ms.markAsDuplicate(new Setting(vscodeMapping.name, existingValue.toString())); + mappedSetting.setVscode(vscodeMapping); + + const info = config.inspect(vscodeMapping.name); + if (info && info.globalValue) { + if (info.globalValue === vscodeMapping.value) { + continue; // skip settings that already exist with the exact same value + } + mappedSetting.markAsDuplicate(new Setting(vscodeMapping.name, info.globalValue.toString())); } } - mappedSettings.push(ms); - }); + mappedSettings.push(mappedSetting); + } return mappedSettings; } private mapSetting(key: string, value: string): Setting | undefined { - const mappedSetting: string | object = this.settingsMappings.get(key); + const mappedSetting: any = this.settingsMappings.get(key); if (mappedSetting) { if (typeof mappedSetting === 'string') { return new Setting(mappedSetting, value); @@ -71,6 +72,6 @@ export class Importer { } } - return null; + return undefined; } } diff --git a/src/settings.ts b/src/settings.ts index 2fd41bc..a34f0b7 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -14,7 +14,7 @@ export class MappedSetting { public sublime: Setting; public vscode: Setting; public isDuplicate: boolean = false; - public duplicateVscodeSetting: Setting; + public duplicateVscodeSetting?: Setting; constructor(sublimeSetting: Setting, vscodeSetting?: Setting) { this.sublime = sublimeSetting; @@ -29,4 +29,4 @@ export class MappedSetting { this.isDuplicate = true; this.duplicateVscodeSetting = vscodeSetting; } -} \ No newline at end of file +} diff --git a/src/sublimeFolderFinder.ts b/src/sublimeFolderFinder.ts index d185529..0d7859a 100644 --- a/src/sublimeFolderFinder.ts +++ b/src/sublimeFolderFinder.ts @@ -3,11 +3,6 @@ import * as path from 'path'; import * as vscode from 'vscode'; import * as fileSystem from './fsWrapper'; -interface ISublimeFolders { - main: vscode.Uri; - settings: vscode.Uri; -} - export const sublimeSettingsFilename = 'Preferences.sublime-settings'; const defaultSublimeSettingsPaths: Map = new Map([ @@ -18,13 +13,12 @@ const defaultSublimeSettingsPaths: Map = new Map([ const settingsSubfoldersPath = path.join('Packages', 'User', 'Preferences.sublime-settings'); -export async function getExistingDefaultPaths(): Promise { +export async function getExistingDefaultPaths(): Promise { const foundPaths = await getOSDefaultPaths(); if (!foundPaths.length) { - return []; + return undefined; } - const existingDefaultPaths: ISublimeFolders[] = await filterForExistingDirsAsync(foundPaths); - return existingDefaultPaths; + return filterForExistingDirsAsync(foundPaths); } export function getOSDefaultPaths(): string[] { @@ -37,16 +31,15 @@ export function getOSDefaultPaths(): string[] { return foundPaths; } -async function filterForExistingDirsAsync(paths: string[]): Promise { - const existingDirs: ISublimeFolders[] = []; +async function filterForExistingDirsAsync(paths: string[]): Promise { for (const p of paths) { const settingsPath: string = path.resolve(p, settingsSubfoldersPath); if (await fileSystem.pathExists(settingsPath)) { - existingDirs.push({ main: vscode.Uri.file(p), settings: vscode.Uri.file(settingsPath) }); + return vscode.Uri.file(settingsPath); } } - return existingDirs; + return undefined; } export interface ISublimeSettingsPickerResult { @@ -54,21 +47,11 @@ export interface ISublimeSettingsPickerResult { sublimeSettingsPath?: vscode.Uri; } -export async function pickSublimeSettings(): Promise { +export async function pickSublimeSettings(): Promise { const folderPaths = await vscode.window.showOpenDialog({ canSelectFolders: true }); if (!folderPaths) { return undefined; } - const sublimeSettingsFolders: ISublimeFolders[] = await filterForExistingDirsAsync([folderPaths[0].fsPath]); - if (!sublimeSettingsFolders.length) { - return { - path: folderPaths[0], - }; - } - - return { - path: folderPaths[0], - sublimeSettingsPath: sublimeSettingsFolders[0].settings, - }; + return await filterForExistingDirsAsync([folderPaths[0].fsPath]); } diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index f875b2f..a775c5c 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -2,7 +2,7 @@ import * as assert from 'assert'; import { resolve } from 'path'; import { readFileAsync } from '../fsWrapper'; import { Importer } from '../importer'; -import {MappedSetting, Setting} from '../settings'; +import { MappedSetting, Setting } from '../settings'; import * as testData from './testData'; suite('Importer Tests', async () => { @@ -20,8 +20,12 @@ suite('Importer Tests', async () => { assert.ok(mappedSettings.length === 4); expected.forEach((expSetting) => { const setting = mappedSettings.find(m => m.sublime.name === expSetting.sublime.name); - assert.ok(setting.vscode.name === expSetting.vscode.name - && setting.vscode.value === expSetting.vscode.value); + if (!setting) { + assert.fail(setting, 'A setting'); + } else { + assert.ok(setting.vscode.name === expSetting.vscode.name + && setting.vscode.value === expSetting.vscode.value); + } }); }); }); diff --git a/tsconfig.json b/tsconfig.json index 29516cc..e0470bb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ /* Strict Type-Checking Options */ - "strict": false, /* Enable all strict type-checking options. */ + "strict": true, /* Enable all strict type-checking options. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ diff --git a/tslint.json b/tslint.json index 7617655..521bceb 100644 --- a/tslint.json +++ b/tslint.json @@ -14,6 +14,7 @@ "class-name": true, "arrow-parens": false, "max-classes-per-file": false, + "object-literal-sort-keys": false, "typedef": [ true, "call-signature", @@ -22,7 +23,7 @@ ], "max-line-length": [ true, - 150 + 170 ], "no-console": [ true,