diff --git a/__tests__/creator-spec.ts b/__tests__/creator-spec.ts index 14e3c2d..d27f25b 100644 --- a/__tests__/creator-spec.ts +++ b/__tests__/creator-spec.ts @@ -422,7 +422,7 @@ test('MSICreator create() shortcut name override', async () => { testIncludes('Custom shortcut name', ''); -testIncludes('Install RegistrySearch', ''); +testIncludes('Install RegistrySearch', ''); testIncludes('PurgeOnUninstall component', '= 1.43.0 < 2" - } - }, - "compression": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", - "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, - "requires": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.14", - "debug": "2.6.9", - "on-headers": "~1.0.1", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "cuint": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", @@ -546,12 +384,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -656,64 +488,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - } - } - }, "expect.js": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz", "integrity": "sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s=", "dev": true }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", - "dev": true, - "requires": { - "punycode": "^1.3.2" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -777,12 +557,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -871,12 +645,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -977,12 +745,6 @@ "esprima": "^4.0.0" } }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -1057,31 +819,12 @@ "chalk": "^2.0.1" } }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true }, - "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", - "dev": true, - "requires": { - "mime-db": "1.43.0" - } - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -1181,12 +924,6 @@ "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==", "dev": true }, - "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-environment-flags": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", @@ -1215,21 +952,23 @@ "shortid": "^2.2.14" } }, + "node-static": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/node-static/-/node-static-0.7.11.tgz", + "integrity": "sha512-zfWC/gICcqb74D9ndyvxZWaI1jzcoHmf4UTHWQchBNuNMxdBLJMDiUgZ1tjGLEIe/BMhj2DxKD8HOuc2062pDQ==", + "dev": true, + "requires": { + "colors": ">=0.6.0", + "mime": "^1.2.9", + "optimist": ">=0.3.4" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, "object-inspect": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", @@ -1264,12 +1003,6 @@ "es-abstract": "^1.17.0-next.1" } }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1279,11 +1012,15 @@ "wrappy": "1" } }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } }, "p-limit": { "version": "2.2.2", @@ -1321,30 +1058,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-to-regexp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", - "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", - "dev": true - }, "picomatch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", @@ -1357,44 +1076,6 @@ "integrity": "sha512-ZDhdxqb+kE895BAvqIdGnWwfvB43h7KHMIcJC0hw7xLbbiJoprS+bqZxuGZ0jWdDxZEvB3jpnfgJyOn3lmsH+Q==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", - "dev": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } - }, "rcinfo": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/rcinfo/-/rcinfo-0.1.3.tgz", @@ -1410,25 +1091,6 @@ "picomatch": "^2.0.4" } }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1468,102 +1130,18 @@ "tslib": "^1.9.0" } }, - "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 - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "serve": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/serve/-/serve-11.3.0.tgz", - "integrity": "sha512-AU0g50Q1y5EVFX56bl0YX5OtVjUX1N737/Htj93dQGKuHiuLvVB45PD8Muar70W6Kpdlz8aNJfoUqTyAq9EE/A==", - "dev": true, - "requires": { - "@zeit/schemas": "2.6.0", - "ajv": "6.5.3", - "arg": "2.0.0", - "boxen": "1.3.0", - "chalk": "2.4.1", - "clipboardy": "1.2.3", - "compression": "1.7.3", - "serve-handler": "6.1.2", - "update-check": "1.5.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - } - } - }, - "serve-handler": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.2.tgz", - "integrity": "sha512-RFh49wX7zJmmOVDcIjiDSJnMH+ItQEvyuYLYuDBVoA/xmQSCuj+uRmk1cmBB5QQlI3qOiWKp6p4DUGY+Z5AB2A==", - "dev": true, - "requires": { - "bytes": "3.0.0", - "content-disposition": "0.5.2", - "fast-url-parser": "1.1.3", - "mime-types": "2.1.18", - "minimatch": "3.0.4", - "path-is-inside": "1.0.2", - "path-to-regexp": "2.2.1", - "range-parser": "1.2.0" - }, - "dependencies": { - "mime-db": { - "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.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.33.0" - } - } - } - }, "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 }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, "shortid": { "version": "2.2.15", "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.15.tgz", @@ -1573,12 +1151,6 @@ "nanoid": "^2.1.0" } }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, "spawn-rx": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-3.0.0.tgz", @@ -1652,12 +1224,6 @@ "ansi-regex": "^3.0.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -1693,15 +1259,6 @@ } } }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - } - }, "tmp": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", @@ -1792,31 +1349,6 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "update-check": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", - "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", - "dev": true, - "requires": { - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -1841,14 +1373,11 @@ "string-width": "^1.0.2 || 2" } }, - "widest-line": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz", - "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true }, "wrap-ansi": { "version": "5.1.0", @@ -1901,12 +1430,6 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yargs": { "version": "13.3.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", diff --git a/e2e/package.json b/e2e/package.json index de301a5..817e64e 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -25,13 +25,12 @@ "@types/node-powershell": "^3.1.1", "@types/ps-list": "^6.2.1", "@types/semver": "^6.2.0", - "@types/serve-handler": "^6.1.0", + "@types/node-static": "^0.7.3", "fs-extra": "^8.1.0", "klaw": "^3.0.0", "lodash": "^4.17.15", "rcinfo": "^0.1.3", "semver": "^6.3.0", - "serve": "^11.3.0", "typescript": "^3.7.5", "expect.js": "^0.3.1", "hasha": "^5.2.0", @@ -40,6 +39,7 @@ "ps-list": "^7.0.0", "spawn-rx": "^3.0.0", "tslint": "^5.20.1", - "electron-winstaller": "4.0.0" + "electron-winstaller": "4.0.0", + "node-static": "^0.7.11" } } diff --git a/e2e/src/e2e-auto-launch.ts b/e2e/src/e2e-auto-launch.ts index 18a828c..8849a65 100644 --- a/e2e/src/e2e-auto-launch.ts +++ b/e2e/src/e2e-auto-launch.ts @@ -9,9 +9,12 @@ import { checkInstall, getInstallPaths, install, uninstall, uninstallViaPowershe import { createMsiPackage, defaultMsiOptions, HARNESS_APP_DIR, OUT_DIR } from './utils/msi-packager'; import { getRegistryKeyValue } from './utils/registry'; -const msiPath = path.join(OUT_DIR, 'HelloWix.msi'); +interface TestConfig { + arch: 'x86' | 'x64'; +} -const msiOptions = { +const msiPath = path.join(OUT_DIR, 'HelloWix.msi'); +const autoLaunchMsiOptions = { ...defaultMsiOptions, features: { autoUpdate: false, @@ -19,7 +22,6 @@ const msiOptions = { } }; -const msiPaths123beta = getInstallPaths(msiOptions); let autoLaunchRegistryKeyValue = ''; describe('MSI auto-launch', () => { @@ -29,54 +31,67 @@ describe('MSI auto-launch', () => { } }); - it('packages', async () => { - await createMsiPackage(msiOptions); - }); + const testConfigs: TestConfig[] = [ + {arch: 'x86'}, + {arch: 'x64'}, + ]; - it('installs', async () => { - await install(msiPath, 3); - const version = getWindowsCompliantVersion(msiOptions.version); - expect(await checkInstall(msiOptions.name, version)).ok(); - }); + testConfigs.forEach((testConfig) => { + const msiOptions = { + ...autoLaunchMsiOptions, + ...testConfig + }; + const msiPaths123beta = getInstallPaths(msiOptions); - it('has all files in program files', () => { - expect(fs.pathExistsSync(msiPaths123beta.stubExe)).ok(); - expect(fs.pathExistsSync(msiPaths123beta.appFolder)).ok(); - expectSameFolderContent(HARNESS_APP_DIR, msiPaths123beta.appFolder); - }); + it(`packages (${testConfig.arch})`, async () => { + await createMsiPackage(msiOptions); + }); - it('has shortcuts', () => { - expect(fs.pathExistsSync(msiPaths123beta.startMenuShortcut)).ok(); - expect(fs.pathExistsSync(msiPaths123beta.desktopShortcut)).ok(); - }); + it(`installs (${testConfig.arch})`, async () => { + await install(msiPath, 3); + const version = getWindowsCompliantVersion(msiOptions.version); + expect(await checkInstall(msiOptions.name, version)).ok(); + }); - it('has auto-launch registry key', async () => { - autoLaunchRegistryKeyValue = await getRegistryKeyValue(msiPaths123beta.registryRunKey, - msiPaths123beta.appUserModelId); - expect(autoLaunchRegistryKeyValue).to.be(msiPaths123beta.stubExe); - }); + it(`has all files in program files (${testConfig.arch})`, () => { + expect(fs.pathExistsSync(msiPaths123beta.stubExe)).ok(); + expect(fs.pathExistsSync(msiPaths123beta.appFolder)).ok(); + expectSameFolderContent(HARNESS_APP_DIR, msiPaths123beta.appFolder); + }); - const entryPoints = [ - { name: 'stubExe', path: msiPaths123beta.stubExe }, - { name: 'start menu shortcut', path: msiPaths123beta.startMenuShortcut }, - { name: 'desktop shortcut', path: msiPaths123beta.desktopShortcut }, - { name: 'auto-launch key', path: autoLaunchRegistryKeyValue }, - ]; + it(`has shortcuts (${testConfig.arch})`, () => { + expect(fs.pathExistsSync(msiPaths123beta.startMenuShortcut)).ok(); + expect(fs.pathExistsSync(msiPaths123beta.desktopShortcut)).ok(); + }); - entryPoints.forEach(async (entryPoint) => { - it(`runs the correct binary via ${entryPoint.name}`, async () => { - await launch(msiPaths123beta.startMenuShortcut); - expect(await runs(msiOptions.exe)).ok(); - expect(await getProcessPath(msiOptions.exe)).to.be(msiPaths123beta.appExe); - await kill(msiOptions.exe); - }); - }); + it(`has auto-launch registry key (${testConfig.arch})`, async () => { + autoLaunchRegistryKeyValue = await getRegistryKeyValue(msiPaths123beta.registryRunKey, + msiPaths123beta.appUserModelId); + expect(autoLaunchRegistryKeyValue).to.be(msiPaths123beta.stubExe); + }); + + const entryPoints = [ + { name: 'stubExe', path: msiPaths123beta.stubExe }, + { name: 'start menu shortcut', path: msiPaths123beta.startMenuShortcut }, + { name: 'desktop shortcut', path: msiPaths123beta.desktopShortcut }, + { name: 'auto-launch key', path: autoLaunchRegistryKeyValue }, + ]; + + entryPoints.forEach(async (entryPoint) => { + it(`runs the correct binary via ${entryPoint.name}`, async () => { + await launch(msiPaths123beta.startMenuShortcut); + expect(await runs(msiOptions.exe)).ok(); + expect(await getProcessPath(msiOptions.exe)).to.be(msiPaths123beta.appExe); + await kill(msiOptions.exe); + }); + }); - it('uninstalls', async () => { - await uninstall(msiPath); - expect(await checkInstall(msiOptions.name)).not.ok(); - expect(fs.pathExistsSync(msiPaths123beta.appRootFolder)).not.ok(); - expect(fs.pathExistsSync(msiPaths123beta.startMenuShortcut)).not.ok(); - expect(fs.pathExistsSync(msiPaths123beta.desktopShortcut)).not.ok(); + it(`uninstalls (${testConfig.arch})`, async () => { + await uninstall(msiPath); + expect(await checkInstall(msiOptions.name)).not.ok(); + expect(fs.pathExistsSync(msiPaths123beta.appRootFolder)).not.ok(); + expect(fs.pathExistsSync(msiPaths123beta.startMenuShortcut)).not.ok(); + expect(fs.pathExistsSync(msiPaths123beta.desktopShortcut)).not.ok(); + }); }); }); diff --git a/e2e/src/e2e-auto-updater.ts b/e2e/src/e2e-auto-updater.ts index 064d998..3a923f0 100644 --- a/e2e/src/e2e-auto-updater.ts +++ b/e2e/src/e2e-auto-updater.ts @@ -8,12 +8,16 @@ import { getProcessPath, kill, launch, runs } from './utils/app-process'; import { autoUpdate, checkInstall, getInstallPaths, install, uninstall, uninstallViaPowershell } from './utils/installer'; import { createMsiPackage, defaultMsiOptions, HARNESS_APP_DIR, OUT_DIR } from './utils/msi-packager'; import { hasAccessRights } from './utils/ntfs'; -import { createSquirrelPackage, defaultSquirrelOptions, OUT_SQRL_DIR } from './utils/squirrel-packager'; +import { cleanSquirrelOutDir, createSquirrelPackage, defaultSquirrelOptions, OUT_SQRL_DIR } from './utils/squirrel-packager'; import { serveSquirrel, stopServingSquirrel } from './utils/squirrel-server'; +interface TestConfig { + arch: 'x86' | 'x64'; +} + const msiPath = path.join(OUT_DIR, 'HelloWix.msi'); -const msiOptions = { +const autoUpdateMsiOptions = { ...defaultMsiOptions, features: { autoUpdate: true, @@ -22,71 +26,88 @@ const msiOptions = { }; const squirrelOptions130 = { ...defaultSquirrelOptions, - version: '1.3.0' + version: '1.3.0', }; -const msiPaths123beta = getInstallPaths(msiOptions); -const squirrelPaths130 = getInstallPaths(squirrelOptions130); - - -describe.only('MSI auto-updating', () => { +describe('MSI auto-updating', () => { before(async () => { if (await checkInstall(defaultMsiOptions.name)) { await uninstallViaPowershell(defaultMsiOptions.name); } }); - it('packages', async () => { - await createMsiPackage(msiOptions); - await createSquirrelPackage(defaultSquirrelOptions); - await createSquirrelPackage(squirrelOptions130); - - expect(fs.pathExistsSync(msiPath)).ok(); - expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'RELEASES'))).ok(); - expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.2.3-beta-full.nupkg'))).ok(); - expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.3.0-full.nupkg'))).ok(); - expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.3.0-delta.nupkg'))).ok(); - expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'Setup.exe'))).ok(); - }); - - const installConfigs = [ - { userGroup: undefined, effectiveUserGroup: 'Users' }, - { userGroup: 'Guests', effectiveUserGroup: 'Guests' }, + const testConfigs: TestConfig[] = [ + {arch: 'x86'}, + {arch: 'x64'}, ]; - installConfigs.forEach((config) => { - describe(`install config (userGroup: ${config.effectiveUserGroup})`, () => { - it(`installs`, async () => { + testConfigs.forEach((testConfig) => { + const msiOptions = { + ...autoUpdateMsiOptions, + ...testConfig + }; + + const squirrelOptions130Config = { + ...squirrelOptions130, + ...testConfig + }; + + const msiPaths123beta = getInstallPaths(msiOptions); + const squirrelPaths130 = getInstallPaths(squirrelOptions130Config); + + console.log(msiPaths123beta); + console.log(squirrelPaths130); + + it(`packages (${testConfig.arch})`, async () => { + await createMsiPackage(msiOptions); + cleanSquirrelOutDir(); + await createSquirrelPackage(defaultSquirrelOptions); + await createSquirrelPackage(squirrelOptions130Config); + expect(fs.pathExistsSync(msiPath)).ok(); + expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'RELEASES'))).ok(); + expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.2.3-beta-full.nupkg'))).ok(); + expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.3.0-full.nupkg'))).ok(); + expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'HelloWix-1.3.0-delta.nupkg'))).ok(); + expect(fs.pathExistsSync(path.join(OUT_SQRL_DIR, 'Setup.exe'))).ok(); + }); + + const installConfigs = [ + { userGroup: undefined, effectiveUserGroup: 'Users' }, + { userGroup: 'Guests', effectiveUserGroup: 'Guests' }, + ]; + + installConfigs.forEach((config) => { + it(`installs (userGroup: ${config.effectiveUserGroup})`, async () => { await install(msiPath, 3, config.userGroup); const version = getWindowsCompliantVersion(msiOptions.version); expect(await checkInstall(msiOptions.name, version)).ok(); }); - it('auto-updates', async () => { + it(`auto-updates (userGroup: ${config.effectiveUserGroup})`, async () => { const server = serveSquirrel(OUT_SQRL_DIR); await autoUpdate(msiPaths123beta.updateExe, server); stopServingSquirrel(); }); - it('has all files in program files', () => { + it(`has all files in program files (userGroup: ${config.effectiveUserGroup})`, () => { expect(fs.pathExistsSync(msiPaths123beta.stubExe)).ok(); expect(fs.pathExistsSync(squirrelPaths130.appFolder)).ok(); expectSameFolderContent(HARNESS_APP_DIR, squirrelPaths130.appFolder); }); - it(`has access rights`, async () => { + it(`has access rights (userGroup: ${config.effectiveUserGroup})`, async () => { const x = await hasAccessRights(squirrelPaths130.appRootFolder, config.effectiveUserGroup); expect(x).ok(); }); - it('has called MsiSquirrel self-update', () => { + it(`has called MsiSquirrel self-update (userGroup: ${config.effectiveUserGroup})`, () => { const selfUpdateLog = path.join(squirrelPaths130.appFolder, 'SquirrelSetup.log'); expect(fs.pathExistsSync(selfUpdateLog)).ok(); const logContent = fs.readFileSync(selfUpdateLog, 'utf-8'); expect(logContent.includes('--updateSelf')).ok(); }); - it('has shortcuts', () => { + it(`has shortcuts (userGroup: ${config.effectiveUserGroup})`, () => { expect(fs.pathExistsSync(msiPaths123beta.startMenuShortcut)).ok(); expect(fs.pathExistsSync(msiPaths123beta.desktopShortcut)).ok(); }); @@ -99,14 +120,14 @@ describe.only('MSI auto-updating', () => { entryPoints.forEach(async (entryPoint) => { it(`runs the correct binary via ${entryPoint.name}`, async () => { - await launch(msiPaths123beta.startMenuShortcut); + await launch(entryPoint.path); expect(await runs(msiOptions.exe)).ok(); expect(await getProcessPath(msiOptions.exe)).to.be(squirrelPaths130.appExe); await kill(msiOptions.exe); }); }); - it('uninstalls', async () => { + it(`uninstalls (userGroup: ${config.effectiveUserGroup})`, async () => { await uninstall(msiPath); expect(await checkInstall(msiOptions.name)).not.ok(); expect(fs.pathExistsSync(msiPaths123beta.appRootFolder)).not.ok(); diff --git a/e2e/src/utils/installer.ts b/e2e/src/utils/installer.ts index d0dcd7f..9262b11 100644 --- a/e2e/src/utils/installer.ts +++ b/e2e/src/utils/installer.ts @@ -4,6 +4,7 @@ import path from 'path'; import { spawnPromise } from 'spawn-rx'; import { MSICreatorOptions } from '../../../lib/index'; +import { SquirrelOptions } from './squirrel-packager'; function isMSICreatorOptions(toBeDetermined: MSICreatorOptions | Options): toBeDetermined is MSICreatorOptions { if ((toBeDetermined as MSICreatorOptions).ui) { @@ -60,23 +61,6 @@ export const uninstallViaPowershell = async (name: string) => { } }; -export const testXX = async (name: string) => { - const ps = new Shell({ - executionPolicy: 'Bypass', - noProfile: true - }); - let result = ''; - try { - ps.addCommand(`Get-ItemPropertyValue 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Run' -Name com.squirrel.HelloWix.HelloWix`); - result = await ps.invoke(); - } finally { - ps.dispose(); - } - - return result; -}; - - export const checkInstall = async (name: string, version?: string) => { const ps = new Shell({ executionPolicy: 'Bypass', @@ -101,9 +85,8 @@ export const checkInstall = async (name: string, version?: string) => { return installPackage === `${name}${!!version ? version : ''}`; }; -export const getInstallPaths = (options: MSICreatorOptions | Options): InstallPaths => { - const arch = isMSICreatorOptions(options) && - (options.arch === 'x64' || options.arch === 'ia64') ? options.arch : 'x86'; +export const getInstallPaths = (options: MSICreatorOptions | SquirrelOptions): InstallPaths => { + const arch = options.arch; const programFiles = arch === 'x86' ? process.env['ProgramFiles(x86)']! : process.env.ProgramFiles!; const appRootFolder = path.join(programFiles, options.name!); const shortName = isMSICreatorOptions(options) ? options.shortName || options.name : options.name; diff --git a/e2e/src/utils/squirrel-packager.ts b/e2e/src/utils/squirrel-packager.ts index ba562c2..b7f2d8b 100644 --- a/e2e/src/utils/squirrel-packager.ts +++ b/e2e/src/utils/squirrel-packager.ts @@ -2,11 +2,15 @@ import { createWindowsInstaller, Options} from 'electron-winstaller'; import fs from 'fs-extra'; import path from 'path'; +export interface SquirrelOptions extends Options { + arch: 'x64' | 'ia64' | 'x86'; +} + export const OUT_SQRL_DIR = path.join(__dirname, '../../outsqrl'); -export const defaultSquirrelOptions = { +export const defaultSquirrelOptions: SquirrelOptions = { appDirectory: path.join(__dirname, '../../../harness/app'), - outputDirectory: path.join(__dirname, '../../outsqrl'), + outputDirectory: OUT_SQRL_DIR, authors: 'Wix Technologies', exe: 'HelloWix.exe', noMsi: true, @@ -15,6 +19,11 @@ export const defaultSquirrelOptions = { version: '1.2.3-beta', title: 'HelloWix', description: 'A hello wix package', + arch: 'x86' +}; + +export const cleanSquirrelOutDir = () => { + fs.emptyDirSync(OUT_SQRL_DIR); }; export const createSquirrelPackage = async (options: Options) => { diff --git a/e2e/src/utils/squirrel-server.ts b/e2e/src/utils/squirrel-server.ts index 5795a23..09124bd 100644 --- a/e2e/src/utils/squirrel-server.ts +++ b/e2e/src/utils/squirrel-server.ts @@ -1,12 +1,13 @@ import http from 'http'; -import serve from 'serve-handler'; +import * as nodeStatic from 'node-static'; +let nodeStaticServer: nodeStatic.Server; let server: http.Server; export const serveSquirrel = (path: string) => { - process.chdir(path); - server = http.createServer((request, response) => { - return serve(request, response); + nodeStaticServer = nodeStaticServer || new nodeStatic.Server(path, {cache: false}); + server = server || http.createServer((request, response) => { + nodeStaticServer.serve(request, response); }); server.listen(3000); return 'http://localhost:3000'; diff --git a/static/updater-permissions.xml b/static/updater-permissions.xml index 4b2e1ff..aa546b4 100644 --- a/static/updater-permissions.xml +++ b/static/updater-permissions.xml @@ -1,5 +1,5 @@ - + diff --git a/static/wix.xml b/static/wix.xml index 9221b4f..ea1c298 100644 --- a/static/wix.xml +++ b/static/wix.xml @@ -34,7 +34,12 @@ must be part of that user group to be able to auto-update. --> - +