diff --git a/examples/s3-update-example-cli/package.json b/examples/s3-update-example-cli/package.json index d599bdda..551bd163 100644 --- a/examples/s3-update-example-cli/package.json +++ b/examples/s3-update-example-cli/package.json @@ -1,25 +1,21 @@ { - "private": true, "name": "s3-update-example-cli", "version": "0.0.0", "author": "Jeff Dickey @jdxcode", "bin": { - "s3-update-example-cli": "./bin/run" + "s3-example": "./bin/run" }, "bugs": "https://github.com/jdxcode/s3-update-example-cli/issues", "dependencies": { "@oclif/command": "^1.4.9", - "@oclif/config": "^1.4.3", + "@oclif/config": "^1.4.7", "@oclif/plugin-help": "^1.2.3" }, "devDependencies": { - "@oclif/dev-cli": "^1.9.1", - "@oclif/test": "^1.0.4", - "@oclif/tslint": "^1.1.0", - "@types/chai": "^4.1.2", - "@types/mocha": "^5.0.0", + "@oclif/dev-cli": "^1.9.5", "@types/node": "^9.6.2", "globby": "^8.0.1", + "pkg": "^4.3.1", "ts-node": "5", "tslib": "^1.9.0", "typescript": "^2.8.1" @@ -40,11 +36,27 @@ "main": "lib/index.js", "oclif": { "commands": "./lib/commands", - "bin": "s3-update-example-cli", + "bin": "example-cli", + "dirname": "oclif-example-s3-cli", + "update": { + "s3": { + "bucket": "oclif-staging" + }, + "node": { + "version": "8.11.1", + "xtargets": [ "darwin-x64", "linux-x64", "win32-x64" ], + "targets": [ "darwin-x64" ] + } + }, "plugins": [ + "@oclif/plugin-update", "@oclif/plugin-help" ] }, + "pkg": { + "scripts": "./lib/**/*.js" + }, + "private": true, "repository": "jdxcode/s3-update-example-cli", "scripts": { "postpack": "rm -f .oclif.manifest.json", diff --git a/examples/s3-update-example-cli/yarn.lock b/examples/s3-update-example-cli/yarn.lock index bbab6214..d6c957ac 100644 --- a/examples/s3-update-example-cli/yarn.lock +++ b/examples/s3-update-example-cli/yarn.lock @@ -2,22 +2,6 @@ # yarn lockfile v1 -"@fimbul/bifrost@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@fimbul/bifrost/-/bifrost-0.6.0.tgz#5150302b63e1bd37ff95f561c3605949cb7e3770" - dependencies: - "@fimbul/ymir" "^0.6.0" - get-caller-file "^1.0.2" - tslib "^1.8.1" - -"@fimbul/ymir@^0.6.0": - version "0.6.0" - resolved "https://registry.yarnpkg.com/@fimbul/ymir/-/ymir-0.6.0.tgz#537cb15d361b7c993fe953b48c898ecdf4f671b8" - dependencies: - inversify "^4.10.0" - reflect-metadata "^0.1.12" - tslib "^1.8.1" - "@heroku-cli/color@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@heroku-cli/color/-/color-1.1.3.tgz#f5f3bb043c3c5c78888135a89633227cfca04b2b" @@ -47,19 +31,25 @@ debug "^3.1.0" semver "^5.5.0" -"@oclif/config@^1.4.0", "@oclif/config@^1.4.3": +"@oclif/config@^1.4.0": version "1.4.3" resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.3.tgz#38b3423c5ed09bc7e4d01bca10f59939c4168482" dependencies: debug "^3.1.0" -"@oclif/dev-cli@^1.9.1": - version "1.9.1" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.1.tgz#c1bbfd933dcf07c7e540f06b397f103d4e6f2c9f" +"@oclif/config@^1.4.6", "@oclif/config@^1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.7.tgz#31edcbffa0f47ca14985cd0da31bf8a11cd9b540" + dependencies: + debug "^3.1.0" + +"@oclif/dev-cli@^1.9.5": + version "1.9.5" + resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.5.tgz#63beb2ce60e4db291152b1932734518dbee62d9d" dependencies: "@heroku-cli/color" "^1.1.3" "@oclif/command" "^1.4.9" - "@oclif/config" "^1.4.3" + "@oclif/config" "^1.4.6" "@oclif/errors" "^1.0.4" "@oclif/plugin-help" "^1.2.3" "@oclif/plugin-warn-if-update-available" "^1.3.0" @@ -69,7 +59,7 @@ lodash "^4.17.5" lodash.template "^4.4.0" normalize-package-data "^2.4.0" - qqjs "^0.3.2" + qqjs "^0.3.4" require-resolve "^0.0.2" tslib "^1.9.0" @@ -119,29 +109,30 @@ version "1.0.2" resolved "https://registry.yarnpkg.com/@oclif/screen/-/screen-1.0.2.tgz#c9d7c84b0ea60ecec8dd7a9b22c012ba9967aed8" -"@oclif/test@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@oclif/test/-/test-1.0.4.tgz#07c28c18f959a6b860b5781465884773f893fafb" - dependencies: - fancy-test "^1.0.3" +"@types/node@^9.6.2": + version "9.6.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.2.tgz#e49ac1adb458835e95ca6487bc20f916b37aff23" -"@oclif/tslint@^1.1.0": +acorn-object-rest-spread@1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/@oclif/tslint/-/tslint-1.1.0.tgz#a2d494a61afa882a685fe5f4d866dafd18990728" + resolved "https://registry.yarnpkg.com/acorn-object-rest-spread/-/acorn-object-rest-spread-1.1.0.tgz#78699aefdd18ec3182caadadf52e2697c048f476" dependencies: - tslint-xo "^0.7.0" + acorn "^5.0.3" -"@types/chai@^4.1.2": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21" +acorn@5.5.3, acorn@^5.0.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" -"@types/mocha@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.0.0.tgz#a3014921991066193f6c8e47290d4d598dfd19e6" +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" -"@types/node@^9.6.2": - version "9.6.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.2.tgz#e49ac1adb458835e95ca6487bc20f916b37aff23" +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" ansi-escapes@^3.0.0: version "3.1.0" @@ -151,7 +142,7 @@ ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" -ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: @@ -191,14 +182,45 @@ arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + atob@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + +babel-runtime@6.25.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -215,6 +237,12 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + bl@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" @@ -222,6 +250,12 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -248,6 +282,10 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +byline@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -273,6 +311,18 @@ cardinal@^1.0.0: ansicolors "~0.2.1" redeyed "~1.0.0" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +chalk@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chalk@^2.3.0, chalk@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" @@ -317,6 +367,10 @@ cli-ux@^3.3.27: strip-ansi "^4.0.0" supports-color "^5.3.0" +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -334,6 +388,12 @@ color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" @@ -350,7 +410,11 @@ copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" -core-util-is@~1.0.0: +core-js@^2.4.0: + version "2.5.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.4.tgz#f2c8bf181f2a80b92f360121429ce63a2f0aeae0" + +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -372,6 +436,18 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -388,6 +464,10 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -407,6 +487,10 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -422,12 +506,11 @@ dir-glob@^2.0.0: arrify "^1.0.1" path-type "^3.0.0" -doctrine@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: - esutils "^1.1.6" - isarray "0.0.1" + jsbn "~0.1.0" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" @@ -445,13 +528,32 @@ escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +escodegen@1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + esprima@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" -esutils@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" execa@^0.10.0: version "0.10.0" @@ -477,6 +579,10 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" +expand-template@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.0.3.tgz#6c303323177a62b1b22c070279f7861287b69b1a" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -490,6 +596,10 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -507,12 +617,13 @@ extract-stack@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/extract-stack/-/extract-stack-1.0.0.tgz#b97acaf9441eea2332529624b732fc5a1c8165fa" -fancy-test@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-1.0.4.tgz#fa689cfc98abec74a0b2f4386d92c58f1ef20f11" - dependencies: - lodash "^4.17.5" - stdout-stderr "^0.1.8" +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" fast-glob@^2.0.2: version "2.2.0" @@ -524,6 +635,10 @@ fast-glob@^2.0.2: merge2 "^1.2.1" micromatch "^3.1.8" +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -543,12 +658,32 @@ for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" dependencies: map-cache "^0.2.2" +fs-extra@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.1.tgz#7fc0c6c8957f983f57f306a24e5b9ddd8d0dd880" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" @@ -561,10 +696,6 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -get-caller-file@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -573,6 +704,12 @@ get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -584,7 +721,7 @@ glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" -glob@^7.1.2: +glob@^7.0.3, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -595,6 +732,16 @@ glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" +globby@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + globby@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" @@ -611,6 +758,21 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -642,6 +804,19 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + hosted-git-info@^2.1.4: version "2.6.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" @@ -657,6 +832,14 @@ http-call@^5.1.0: tslib "^1.9.0" tunnel-agent "^0.6.0" +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + ignore@^3.3.5: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" @@ -665,6 +848,10 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +in-publish@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" + indent-string@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" @@ -676,14 +863,10 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -inversify@^4.10.0: - version "4.11.1" - resolved "https://registry.yarnpkg.com/inversify/-/inversify-4.11.1.tgz#9a10635d1fd347da11da96475b3608babd5945a6" - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -802,14 +985,14 @@ is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -828,16 +1011,57 @@ isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" optionalDependencies: graceful-fs "^4.1.6" +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -858,6 +1082,13 @@ kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -944,6 +1175,16 @@ micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -954,7 +1195,7 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.2.0: +minimist@1.2.0, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -975,6 +1216,13 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +multistream@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-2.1.0.tgz#625c267d5c44424ad6294788b5bb4da3dcb32f1d" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.5" + nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" @@ -1011,6 +1259,14 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -1037,7 +1293,18 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -os-tmpdir@~1.0.2: +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -1099,30 +1366,96 @@ path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" dependencies: pify "^3.0.0" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" dependencies: find-up "^2.1.0" +pkg-fetch@2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-2.5.4.tgz#0573550050f38d2d5f91131c1bd718f9b39faf06" + dependencies: + babel-runtime "6.25.0" + byline "5.0.0" + chalk "2.1.0" + expand-template "1.0.3" + fs-extra "4.0.1" + in-publish "2.0.0" + minimist "1.2.0" + progress "2.0.0" + request "2.81.0" + request-progress "3.0.0" + semver "5.4.1" + unique-temp-dir "1.0.0" + +pkg@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-4.3.1.tgz#1a161a53f1e3222c3dd3ca5705c738d419395a24" + dependencies: + acorn "5.5.3" + acorn-object-rest-spread "1.1.0" + babel-runtime "6.25.0" + chalk "2.1.0" + escodegen "1.8.1" + fs-extra "4.0.1" + globby "6.1.0" + minimist "1.2.0" + multistream "2.1.0" + pkg-fetch "2.5.4" + progress "2.0.0" + resolve "1.4.0" + simple-bufferstream "1.0.0" + stream-meter "1.0.4" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" +progress@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -1134,25 +1467,33 @@ pump@^1.0.0: end-of-stream "^1.1.0" once "^1.3.1" -qqjs@^0.3.2: - version "0.3.3" - resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.3.tgz#5e03d5eb6293a2dad479172c1ae2bd7e241baca7" +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qqjs@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.4.tgz#60581f655e980f41c6e57fcd7522dd5179f00add" dependencies: chalk "^2.3.2" debug "^3.1.0" execa "^0.10.0" fs-extra "^5.0.0" + get-stream "^3.0.0" glob "^7.1.2" globby "^8.0.1" http-call "^5.1.0" load-json-file "^4.0.0" - lodash "^4.17.5" pkg-dir "^2.0.0" tar-fs "^1.16.0" tmp "^0.0.33" write-json-file "^2.3.0" -readable-stream@^2.0.0, readable-stream@^2.3.5: +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -1170,9 +1511,9 @@ redeyed@~1.0.0: dependencies: esprima "~3.0.0" -reflect-metadata@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2" +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -1189,6 +1530,39 @@ repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" +request-progress@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" + dependencies: + throttleit "^1.0.0" + +request@2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + require-resolve@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/require-resolve/-/require-resolve-0.0.2.tgz#bab410ab1aee2f3f55b79317451dd3428764e6f3" @@ -1199,6 +1573,12 @@ resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" +resolve@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -1217,6 +1597,10 @@ safe-regex@^1.1.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -1249,6 +1633,10 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +simple-bufferstream@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/simple-bufferstream/-/simple-bufferstream-1.0.0.tgz#5cab10e851aa71c667b77b61fe1bb1d90a60baa4" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -1280,6 +1668,12 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -1314,6 +1708,12 @@ source-map@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" @@ -1342,6 +1742,20 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" +sshpk@^1.7.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -1349,12 +1763,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -stdout-stderr@^0.1.8: - version "0.1.9" - resolved "https://registry.yarnpkg.com/stdout-stderr/-/stdout-stderr-0.1.9.tgz#9b48ee04eff955ee07776e27125d5524d9d02f57" +stream-meter@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" dependencies: - debug "^3.1.0" - strip-ansi "^4.0.0" + readable-stream "^2.1.4" string-width@^2.1.1: version "2.1.1" @@ -1369,6 +1782,10 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -1383,6 +1800,12 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" +supports-color@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + supports-color@^5.1.0, supports-color@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" @@ -1407,6 +1830,10 @@ tar-stream@^1.1.2: readable-stream "^2.0.0" xtend "^4.0.0" +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -1435,6 +1862,12 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +tough-cookie@~2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + ts-node@5: version "5.0.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-5.0.1.tgz#78e5d1cb3f704de1b641e43b76be2d4094f06f81" @@ -1448,62 +1881,34 @@ ts-node@5: source-map-support "^0.5.3" yn "^2.0.0" -tslib@1.9.0, tslib@^1.7.1, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" -tslint-consistent-codestyle@^1.11.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/tslint-consistent-codestyle/-/tslint-consistent-codestyle-1.13.0.tgz#82abf230bf39e01159b4e9af721d489dd5ae0e6c" - dependencies: - "@fimbul/bifrost" "^0.6.0" - tslib "^1.7.1" - tsutils "^2.24.0" - -tslint-eslint-rules@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.1.0.tgz#3232b318da55dbb5a83e3f5d657c1ddbb27b9ff2" - dependencies: - doctrine "0.7.2" - tslib "1.9.0" - tsutils "2.8.0" - -tslint-microsoft-contrib@^5.0.2: - version "5.0.3" - resolved "https://registry.yarnpkg.com/tslint-microsoft-contrib/-/tslint-microsoft-contrib-5.0.3.tgz#6fc3e238179cd72045c2b422e4d655f4183a8d5c" - dependencies: - tsutils "^2.12.1" - -tslint-xo@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/tslint-xo/-/tslint-xo-0.7.0.tgz#be5a1d67f8ade5d92aa8c0a21d9cfdcbaf06f3e0" - dependencies: - tslint-consistent-codestyle "^1.11.0" - tslint-eslint-rules "^5.1.0" - tslint-microsoft-contrib "^5.0.2" - -tsutils@2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.8.0.tgz#0160173729b3bf138628dd14a1537e00851d814a" - dependencies: - tslib "^1.7.1" - -tsutils@^2.12.1, tsutils@^2.24.0: - version "2.26.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.26.1.tgz#9e4a0cb9ff173863f34c22a961969081270d1878" - dependencies: - tslib "^1.8.1" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" dependencies: safe-buffer "^5.0.1" +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + typescript@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.8.1.tgz#6160e4f8f195d5ba81d4876f9c0cc1fbc0820624" +uid2@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82" + union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -1513,6 +1918,14 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" +unique-temp-dir@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz#6dce95b2681ca003eebfb304a415f9cbabcc5385" + dependencies: + mkdirp "^0.5.1" + os-tmpdir "^1.0.1" + uid2 "0.0.3" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -1538,6 +1951,10 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" +uuid@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + validate-npm-package-license@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" @@ -1545,6 +1962,14 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + which@^1.2.9: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" @@ -1557,6 +1982,10 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + wrap-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" diff --git a/package.json b/package.json index 133dc99d..6cb08898 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,12 @@ "bugs": "https://github.com/oclif/plugin-update/issues", "dependencies": { "@heroku-cli/color": "^1.1.3", - "@oclif/command": "^1.4.7", - "@oclif/config": "^1.3.67", - "@oclif/errors": "^1.0.3", + "@oclif/command": "^1.4.9", + "@oclif/config": "^1.4.7", + "@oclif/errors": "^1.0.4", "@types/semver": "^5.5.0", "cli-ux": "^3.3.27", "cross-spawn": "^6.0.5", - "date-fns": "^1.29.0", "debug": "^3.1.0", "filesize": "^3.6.1", "fs-extra": "^5.0.0", @@ -22,7 +21,7 @@ "tar-fs": "^1.16.0" }, "devDependencies": { - "@oclif/dev-cli": "^1.7.3", + "@oclif/dev-cli": "^1.9.7", "@oclif/plugin-help": "^1.2.3", "@oclif/test": "^1.0.4", "@oclif/tslint": "^1.1.0", diff --git a/src/commands/update.ts b/src/commands/update.ts index dce82990..50658a8b 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -1,12 +1,15 @@ +import color from '@heroku-cli/color' import Command, {flags} from '@oclif/command' +import {ITargetManifest} from '@oclif/dev-cli' import cli from 'cli-ux' -import * as dateAddHours from 'date-fns/add_hours' -import * as dateIsAfter from 'date-fns/is_after' +import * as spawn from 'cross-spawn' import * as fs from 'fs-extra' +import HTTP from 'http-call' +import * as Lodash from 'lodash' import * as path from 'path' -import {fetchUpdater, Updater} from '..' -import {wait} from '../util' +import {extract} from '../tar' +import {ls, wait} from '../util' export default class UpdateCommand extends Command { static description = 'update the <%= config.bin %> CLI' @@ -15,8 +18,11 @@ export default class UpdateCommand extends Command { autoupdate: flags.boolean({hidden: true}), } - updater: Updater = fetchUpdater(this.config) - autoupdate!: boolean + private autoupdate!: boolean + private channel!: string + private clientRoot = path.join(this.config.dataDir, 'client') + private clientBin = path.join(this.clientRoot, 'bin', this.config.windows ? `${this.config.bin}.cmd` : this.config.bin) + private s3Host = this.config.pjson.oclif.update.s3.host async run() { const {args, flags} = this.parse(UpdateCommand) @@ -30,25 +36,88 @@ export default class UpdateCommand extends Command { } cli.action.start(`${this.config.name}: Updating CLI`) - let channel = args.channel || this.updater.channel - if (!await this.updater.needsUpdate(channel)) { - if (!process.env.OCLIF_HIDE_UPDATED_MESSAGE) { + this.channel = args.channel || this.config.channel || 'stable' + const manifest = await this.fetchManifest() + if (!await this.needsUpdate()) { + if (!this.config.scopedEnvVar('HIDE_UPDATED_MESSAGE')) { cli.action.stop(`already on latest version: ${this.config.version}`) } } else { - await this.updater.update({channel} as any) + await this.update(manifest) } - this.debug('log chop') - await this.logChop() this.debug('tidy') - await this.updater.tidy() - await this.config.runHook('update', {channel}) + await this.tidy() + await this.config.runHook('update', {channel: this.channel}) this.debug('done') cli.action.stop() } - async logChop() { + private s3url(p: string): string { + if (!this.s3Host) throw new Error('S3 host not defined') + // TODO: handle s3Prefix + return `${this.s3Host}/${this.config.name}/channels/${this.channel}/${p}` + } + + private async fetchManifest(): Promise { + const http: typeof HTTP = require('http-call').HTTP try { + let {body} = await http.get(this.s3url(`${this.config.platform}-${this.config.arch}`)) + return body + } catch (err) { + if (err.statusCode === 403) throw new Error(`HTTP 403: Invalid channel ${this.channel}`) + throw err + } + } + + private base(version: string): string { + return `${this.config.bin}-v${version}-${this.config.platform}-${this.config.arch}` + } + + private async update(manifest: ITargetManifest) { + const {version, channel} = manifest + cli.action.start(`${this.config.name}: Updating CLI from ${color.green(this.config.version)} to ${color.green(version)}${channel === 'stable' ? '' : ' (' + color.yellow(channel) + ')'}`) + const _: typeof Lodash = require('lodash') + const http: typeof HTTP = require('http-call').HTTP + const filesize = require('filesize') + const output = path.join(this.clientRoot, version) + + const {response: stream} = await http.stream(manifest.gz) + + let extraction = extract(stream, this.config.bin, output, manifest.sha256gz) + + // TODO: use cli.action.type + if ((cli.action as any).frames) { + // if spinner action + let total = stream.headers['content-length'] + let current = 0 + const updateStatus = _.throttle( + (newStatus: string) => { + cli.action.status = newStatus + }, + 500, + {leading: true, trailing: false}, + ) + stream.on('data', data => { + current += data.length + updateStatus(`${filesize(current)}/${filesize(total)}`) + }) + } + + await extraction + + await this.createBin(version) + await this.reexec() + } + + private async needsUpdate() { + if (this.channel !== this.config.channel) return true + let manifest = await this.fetchManifest() + return this.config.version !== manifest.version + } + + private async logChop() { + try { + this.debug('log chop') const logChopper = require('log-chopper').default await logChopper.chop(this.config.errlog) } catch (e) { @@ -61,15 +130,90 @@ export default class UpdateCommand extends Command { return mtime } + // when autoupdating, wait until the CLI isn't active private async debounce(): Promise { const lastrunfile = path.join(this.config.cacheDir, 'lastrun') const m = await this.mtime(lastrunfile) - const waitUntil = dateAddHours(m, 1) - if (dateIsAfter(waitUntil, new Date())) { - await cli.log(`waiting until ${waitUntil.toISOString()} to update`) + m.setHours(m.getHours() + 1) + if (m < new Date()) { + await cli.log(`waiting until ${m.toISOString()} to update`) await wait(60 * 1000) // wait 1 minute return this.debounce() } cli.log('time to update') } + + // removes any unused CLIs + private async tidy() { + try { + if (!this.config.binPath) return + if (!this.config.binPath.includes(this.config.version)) return + let root = this.clientRoot + if (!await fs.pathExists(root)) return + let files = await ls(root) + let promises = files.map(async f => { + if (['bin', this.config.version].includes(path.basename(f.path))) return + const mtime = f.stat.mtime + mtime.setHours(mtime.getHours() + 7 * 24) + if (mtime < new Date()) { + await fs.remove(f.path) + } + }) + for (let p of promises) await p + await this.logChop() + } catch (err) { + cli.warn(err) + } + } + + private async reexec() { + cli.action.stop() + return new Promise((_, reject) => { + this.debug('restarting CLI after update', this.clientBin) + spawn(this.clientBin, ['update'], { + stdio: 'inherit', + env: {...process.env, [this.config.scopedEnvVarKey('HIDE_UPDATED_MESSAGE')]: '1'}, + }) + .on('error', reject) + .on('close', (status: number) => { + try { + cli.exit(status) + } catch (err) { + reject(err) + } + }) + }) + } + + private async createBin(version: string) { + let dst = this.clientBin + if (this.config.windows) { + let body = `@echo off +"%~dp0\\..\\${version}\\bin\\${this.config.bin}.cmd" %* +` + await fs.outputFile(dst, body) + } else { + let body = `#!/usr/bin/env bash +set -e +get_script_dir () { + SOURCE="\${BASH_SOURCE[0]}" + # While $SOURCE is a symlink, resolve it + while [ -h "$SOURCE" ]; do + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$( readlink "$SOURCE" )" + # If $SOURCE was a relative symlink (so no "/" as prefix, need to resolve it relative to the symlink base directory + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" + done + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + echo "$DIR" +} +DIR=$(get_script_dir) +HEROKU_CLI_REDIRECTED=1 "$DIR/../${version}/bin/${this.config.bin}" "$@" +` + + await fs.remove(dst) + await fs.outputFile(dst, body) + await fs.chmod(dst, 0o755) + } + } } diff --git a/src/github.ts b/src/github.ts index 7e004dcf..2ad23ae6 100644 --- a/src/github.ts +++ b/src/github.ts @@ -1,27 +1,27 @@ -import HTTP from 'http-call' +// import HTTP from 'http-call' -import {Updater} from '.' +// import {Updater} from '.' -export class GithubUpdater extends Updater { - release?: {tag_name: string} +// export class GithubUpdater extends Updater { +// release?: {tag_name: string} - async update() { - const release = await this.fetchRelease() - const version = release.tag_name.split('v')[1] - const base = this.base(version) - const asset = release.assets.find((a: any) => a.name === `${base}.tar.gz`) - if (!asset) throw new Error('release not found') - return super.update({url: asset.browser_download_url, version}) - } +// async update() { +// const release = await this.fetchRelease() +// const version = release.tag_name.split('v')[1] +// const base = this.base(version) +// const asset = release.assets.find((a: any) => a.name === `${base}.tar.gz`) +// if (!asset) throw new Error('release not found') +// return super.update({url: asset.browser_download_url, version}) +// } - async needsUpdate() { - const version = (await this.fetchRelease()).tag_name.split('v')[1] - return this.config.version !== version - } +// async needsUpdate() { +// const version = (await this.fetchRelease()).tag_name.split('v')[1] +// return this.config.version !== version +// } - private async fetchRelease() { - const [owner, repo] = this.config.pjson.repository.split('/') - const {body} = await HTTP.get(`https://api.github.com/repos/${owner}/${repo}/releases/latest`) - return this.release = body - } -} +// private async fetchRelease() { +// const [owner, repo] = this.config.pjson.repository.split('/') +// const {body} = await HTTP.get(`https://api.github.com/repos/${owner}/${repo}/releases/latest`) +// return this.release = body +// } +// } diff --git a/src/hooks/init.ts b/src/hooks/init.ts index 13282144..22ddfad0 100644 --- a/src/hooks/init.ts +++ b/src/hooks/init.ts @@ -1,8 +1,6 @@ import * as Config from '@oclif/config' import cli from 'cli-ux' import * as spawn from 'cross-spawn' -import * as dateIsAfter from 'date-fns/is_after' -import * as dateSubHours from 'date-fns/sub_hours' import * as fs from 'fs-extra' import * as path from 'path' @@ -22,7 +20,8 @@ async function mtime(f: string) { export const init: Config.Hook<'init'> = async function (opts) { if (opts.id === 'update') return cli.config.errlog = opts.config.errlog - const binPath = this.config.scopedEnvVar('CLI_BINPATH') || this.config.bin + const binPath = this.config.binPath + if (!binPath) return this.debug('no binpath set') const lastrunfile = path.join(this.config.cacheDir, 'lastrun') const autoupdatefile = path.join(this.config.cacheDir, 'autoupdate') const autoupdatelogfile = path.join(this.config.cacheDir, 'autoupdate.log') @@ -37,7 +36,8 @@ export const init: Config.Hook<'init'> = async function (opts) { async function autoupdateNeeded(): Promise { try { const m = await mtime(autoupdatefile) - return dateIsAfter(m, dateSubHours(new Date(), 5)) + m.setHours(m.getHours() + 5) + return m < new Date() } catch (err) { if (err.code !== 'ENOENT') cli.error(err.stack) if ((global as any).testing) return false @@ -48,9 +48,7 @@ export const init: Config.Hook<'init'> = async function (opts) { await touch(lastrunfile) const clientDir = path.join(clientRoot, this.config.version) - if (await fs.pathExists(clientDir)) { - await touch(clientDir) - } + if (await fs.pathExists(clientDir)) await touch(clientDir) if (!await autoupdateNeeded()) return debug('autoupdate running') diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index dabc6905..00000000 --- a/src/index.ts +++ /dev/null @@ -1,231 +0,0 @@ -import color from '@heroku-cli/color' -import * as Config from '@oclif/config' -import {cli} from 'cli-ux' -import * as spawn from 'cross-spawn' -import * as dateIsAfter from 'date-fns/is_after' -import * as dateSubDays from 'date-fns/sub_days' -import * as fs from 'fs-extra' -import HTTP from 'http-call' -import * as Lodash from 'lodash' -import * as path from 'path' - -import {ls, touch} from './util' - -const debug = require('debug')('cli:updater') - -export function fetchUpdater(config: Config.IConfig): Updater { - switch (config.pjson.oclif.autoupdate) { - case 'github': - return new (require('./github').GithubUpdater)(config) - case 's3': - return new (require('./s3').S3Updater)(config) - } - throw new Error('oclif.autoupdate must be set to "github" or "s3"') -} - -export abstract class Updater { - constructor(public config: Config.IConfig) {} - - get channel(): string { - let pjson = this.config.pjson.oclif as any - if (pjson.channel) return pjson.channel - return 'stable' - } - - get reexecBin(): string | undefined { - return this.config.scopedEnvVar('CLI_BINPATH') - } - - private get clientRoot(): string { - return path.join(this.config.dataDir, 'client') - } - private get clientBin(): string { - let b = path.join(this.clientRoot, 'bin', this.config.bin) - return this.config.windows ? `${b}.cmd` : b - } - - async update({version, url, sha256, channel}: {url: string, version: string, sha256?: string, channel?: string}) { - if (!channel) channel = 'stable' - cli.action.start(`${this.config.name}: Updating CLI from ${color.green(this.config.version)} to ${color.green(version)}${channel === 'stable' ? '' : ' (' + color.yellow(channel) + ')'}`) - const _: typeof Lodash = require('lodash') - const http: typeof HTTP = require('http-call').HTTP - const filesize = require('filesize') - const output = path.join(this.clientRoot, version) - const tmp = path.join(this.clientRoot, this.config.bin) - - let {response: stream} = await http.stream(url) - - await fs.emptyDir(tmp) - let extraction = this.extract(stream, this.clientRoot, sha256) - - // TODO: use cli.action.type - if ((cli.action as any).frames) { - // if spinner action - let total = stream.headers['content-length'] - let current = 0 - const updateStatus = _.throttle( - (newStatus: string) => { - cli.action.status = newStatus - }, - 500, - {leading: true, trailing: false}, - ) - stream.on('data', data => { - current += data.length - updateStatus(`${filesize(current)}/${filesize(total)}`) - }) - } - - await extraction - if (await fs.pathExists(output)) { - const old = `${output}.old` - await fs.remove(old) - await fs.rename(output, old) - } - await fs.rename(tmp, output) - await touch(output) - - await this._createBin(version) - await this.reexec() - } - - public async tidy() { - try { - if (!this.reexecBin) return - if (!this.reexecBin.includes(this.config.version)) return - let root = this.clientRoot - if (!await fs.pathExists(root)) return - let files = await ls(root) - let promises = files.map(async f => { - if (['bin', this.config.version].includes(path.basename(f.path))) return - if (dateIsAfter(f.stat.mtime, dateSubDays(new Date(), 7))) { - await fs.remove(f.path) - } - }) - for (let p of promises) await p - } catch (err) { - cli.warn(err) - } - } - - public abstract needsUpdate(channel: string): Promise - - protected base(version: string): string { - return `${this.config.bin}-v${version}-${this.config.platform}-${this.config.arch}` - } - - private extract(stream: NodeJS.ReadableStream, dir: string, sha?: string): Promise { - const zlib = require('zlib') - const tar = require('tar-fs') - const crypto = require('crypto') - - return new Promise((resolve, reject) => { - let shaValidated = false - let extracted = false - - let check = () => { - if (shaValidated && extracted) { - resolve() - } - } - - let fail = (err: Error) => { - fs.remove(dir) - .then(() => reject(err)) - .catch(reject) - } - - if (sha) { - let hasher = crypto.createHash('sha256') - stream.on('error', fail) - stream.on('data', d => hasher.update(d)) - stream.on('end', () => { - let shasum = hasher.digest('hex') - if (sha === shasum) { - shaValidated = true - check() - } else { - reject(new Error(`SHA mismatch: expected ${shasum} to be ${sha}`)) - } - }) - } else { - shaValidated = true - } - - let ignore = (_: any, header: any) => { - switch (header.type) { - case 'directory': - case 'file': - if (process.env.OCLIF_DEBUG_UPDATE_FILES) debug(header.name) - return false - case 'symlink': - return true - default: - throw new Error(header.type) - } - } - let extract = tar.extract(dir, {ignore}) - extract.on('error', fail) - extract.on('finish', () => { - extracted = true - check() - }) - - let gunzip = zlib.createGunzip() - gunzip.on('error', fail) - - stream.pipe(gunzip).pipe(extract) - }) - } - - private async reexec() { - cli.action.stop() - return new Promise((_, reject) => { - debug('restarting CLI after update', this.clientBin) - spawn(this.clientBin, ['update'], { - stdio: 'inherit', - env: {...process.env, CLI_ENGINE_HIDE_UPDATED_MESSAGE: '1'}, - }) - .on('error', reject) - .on('close', (status: number) => { - try { - cli.exit(status) - } catch (err) { - reject(err) - } - }) - }) - } - - private async _createBin(version: string) { - let dst = this.clientBin - if (this.config.windows) { - let body = `@echo off -"%~dp0\\..\\${version}\\bin\\${this.config.bin}.cmd" %* -` - await fs.outputFile(dst, body) - } else { - let body = `#!/usr/bin/env bash -set -e -get_script_dir () { - SOURCE="\${BASH_SOURCE[0]}" - # While $SOURCE is a symlink, resolve it - while [ -h "$SOURCE" ]; do - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$( readlink "$SOURCE" )" - # If $SOURCE was a relative symlink (so no "/" as prefix, need to resolve it relative to the symlink base directory - [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" - done - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - echo "$DIR" -} -DIR=$(get_script_dir) -HEROKU_CLI_REDIRECTED=1 "$DIR/../${version}/bin/${this.config.bin}" "$@" -` - - await fs.remove(dst) - await fs.outputFile(dst, body) - await fs.chmod(dst, 0o755) - } - } -} diff --git a/src/s3.ts b/src/s3.ts deleted file mode 100644 index 08db2320..00000000 --- a/src/s3.ts +++ /dev/null @@ -1,47 +0,0 @@ -import HTTP from 'http-call' - -import {Updater} from '.' - -export interface IManifest { - version: string - channel: string - sha256gz: string - priority?: number -} - -export class S3Updater extends Updater { - async update({channel}: {channel?: string}) { - channel = channel || 'stable' - const manifest = await this.fetchManifest(channel) - const base = this.base(manifest.version) - const url = `https://${this.s3Host}/${this.config.bin}/channels/${manifest.channel}/${base}.tar.gz` - return super.update({url, version: manifest.version, sha256: manifest.sha256gz, channel}) - } - - async needsUpdate(channel: string) { - if (channel !== this.channel) return true - let manifest = await this.fetchManifest(channel) - return this.config.version !== manifest.version - } - - private get s3Host(): string | undefined { - return this.config.pjson.oclif.s3Host || this.config.scopedEnvVar('S3_HOST') - } - - private s3url(channel: string, p: string): string { - if (!this.s3Host) throw new Error('S3 host not defined') - // TODO: handle s3Prefix - return `https://${this.s3Host}/${this.config.bin}/channels/${channel}/${p}` - } - - private async fetchManifest(channel: string): Promise { - const http: typeof HTTP = require('http-call').HTTP - try { - let {body} = await http.get(this.s3url(channel, `${this.config.platform}-${this.config.arch}`)) - return body - } catch (err) { - if (err.statusCode === 403) throw new Error(`HTTP 403: Invalid channel ${channel}`) - throw err - } - } -} diff --git a/src/tar.ts b/src/tar.ts new file mode 100644 index 00000000..b58df7cc --- /dev/null +++ b/src/tar.ts @@ -0,0 +1,82 @@ +import * as fs from 'fs-extra' +import * as path from 'path' + +import {touch} from './util' + +const debug = require('debug')('oclif-update') + +export async function extract(stream: NodeJS.ReadableStream, basename: string, output: string, sha?: string) { + const getTmp = () => `${output}.partial.${Math.random().toString().split('.')[1].slice(0, 5)}` + let tmp = getTmp() + if (await fs.pathExists(tmp)) tmp = getTmp() + debug(`extracting to ${tmp}`) + try { + await new Promise((resolve, reject) => { + const zlib = require('zlib') + const tar = require('tar-fs') + const crypto = require('crypto') + let shaValidated = false + let extracted = false + const check = () => shaValidated && extracted && resolve() + + if (sha) { + let hasher = crypto.createHash('sha256') + stream.on('error', reject) + stream.on('data', d => hasher.update(d)) + stream.on('end', () => { + let shasum = hasher.digest('hex') + if (sha === shasum) { + shaValidated = true + check() + } else { + reject(new Error(`SHA mismatch: expected ${shasum} to be ${sha}`)) + } + }) + } else shaValidated = true + + let ignore = (_: any, header: any) => { + switch (header.type) { + case 'directory': + case 'file': + if (process.env.OCLIF_DEBUG_UPDATE_FILES) debug(header.name) + return false + case 'symlink': + return true + default: + throw new Error(header.type) + } + } + let extract = tar.extract(tmp, {ignore}) + extract.on('error', reject) + extract.on('finish', () => { + extracted = true + check() + }) + + let gunzip = zlib.createGunzip() + gunzip.on('error', reject) + + stream.pipe(gunzip).pipe(extract) + }) + + if (await fs.pathExists(output)) { + try { + const tmp = getTmp() + await fs.move(output, tmp) + await fs.remove(tmp).catch(debug) + } catch (err) { + debug(err) + await fs.remove(output) + } + } + const from = path.join(tmp, basename) + debug('moving %s to %s', from, output) + await fs.move(from, output) + await fs.remove(tmp).catch(debug) + await touch(output) + debug('done extracting') + } catch (err) { + await fs.remove(tmp).catch(process.emitWarning) + throw err + } +} diff --git a/yarn.lock b/yarn.lock index 2589db65..a2b2d227 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,7 +15,7 @@ version "1.0.0" resolved "https://registry.yarnpkg.com/@heroku/linewrap/-/linewrap-1.0.0.tgz#a9d4e99f0a3e423a899b775f5f3d6747a1ff15c6" -"@oclif/command@^1.4.5", "@oclif/command@^1.4.7": +"@oclif/command@^1.4.7": version "1.4.7" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.7.tgz#32423fcb3317c1e9fd5b864c728ddd5e4f8fd361" dependencies: @@ -24,38 +24,46 @@ debug "^3.1.0" semver "^5.5.0" -"@oclif/config@^1.3.60", "@oclif/config@^1.3.66": - version "1.3.66" - resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.3.66.tgz#f62483a7c5ba0b72d705091ec67abdf7ea88fdf8" +"@oclif/command@^1.4.9": + version "1.4.9" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.4.9.tgz#009bd5bb717ceb445bb81f08767c17cd4e7c7f02" dependencies: + "@oclif/errors" "^1.0.4" + "@oclif/parser" "^3.2.11" debug "^3.1.0" + semver "^5.5.0" -"@oclif/config@^1.3.67": - version "1.3.67" - resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.3.67.tgz#b5f3c3f72af5db369e13cf1ce677a1f7e04cd258" +"@oclif/config@^1.4.0": + version "1.4.6" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.6.tgz#cb7adde8398ea6aec669b70a8a6e7b8903cc9b45" + dependencies: + debug "^3.1.0" + +"@oclif/config@^1.4.7": + version "1.4.7" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.4.7.tgz#31edcbffa0f47ca14985cd0da31bf8a11cd9b540" dependencies: debug "^3.1.0" -"@oclif/dev-cli@^1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.7.3.tgz#cc1d7108289b63164ee9a64452b63d7f9b7808c8" +"@oclif/dev-cli@^1.9.7": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.9.7.tgz#e575574264b77f2b7fe92731507e40ef71daf110" dependencies: "@heroku-cli/color" "^1.1.3" - "@oclif/command" "^1.4.7" - "@oclif/config" "^1.3.66" - "@oclif/errors" "^1.0.3" + "@oclif/command" "^1.4.9" + "@oclif/config" "^1.4.7" + "@oclif/errors" "^1.0.4" "@oclif/plugin-help" "^1.2.3" - "@oclif/plugin-warn-if-update-available" "^1.2.4" - "@octokit/rest" "^15.2.6" - aws-sdk "^2.222.1" + "@oclif/plugin-warn-if-update-available" "^1.3.0" cli-ux "^3.3.27" debug "^3.1.0" fs-extra "^5.0.0" lodash "^4.17.5" lodash.template "^4.4.0" normalize-package-data "^2.4.0" - qqjs "^0.2.0" + qqjs "^0.3.4" require-resolve "^0.0.2" + tslib "^1.9.0" "@oclif/errors@^1.0.3": version "1.0.3" @@ -67,6 +75,23 @@ strip-ansi "^4.0.0" wrap-ansi "^3.0.1" +"@oclif/errors@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.0.4.tgz#8e34386ede530484ae3c98bc21d818c416214c66" + dependencies: + clean-stack "^1.3.0" + fs-extra "^5.0.0" + indent-string "^3.2.0" + strip-ansi "^4.0.0" + wrap-ansi "^3.0.1" + +"@oclif/parser@^3.2.11": + version "3.2.12" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.12.tgz#1ff34a98fa73b2ecb8b2b11daf139b9e151b52c6" + dependencies: + "@heroku/linewrap" "^1.0.0" + chalk "^2.3.2" + "@oclif/parser@^3.2.9": version "3.2.9" resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.2.9.tgz#76d01106971e20dfcfec5be276c4e6e9edfee9ec" @@ -85,13 +110,13 @@ widest-line "^2.0.0" wrap-ansi "^3.0.1" -"@oclif/plugin-warn-if-update-available@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.2.4.tgz#6792d2296bf044c1e4583c458c65d73e071b3fc1" +"@oclif/plugin-warn-if-update-available@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-1.3.0.tgz#f332eee1560cdeed1b4f4857cb54260fe1ca2582" dependencies: - "@oclif/command" "^1.4.5" - "@oclif/config" "^1.3.60" - "@oclif/errors" "^1.0.3" + "@oclif/command" "^1.4.7" + "@oclif/config" "^1.4.0" + "@oclif/errors" "^1.0.4" chalk "^2.3.2" debug "^3.1.0" fs-extra "^5.0.0" @@ -114,19 +139,6 @@ dependencies: tslint-xo "^0.7.0" -"@octokit/rest@^15.2.6": - version "15.2.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.2.6.tgz#16226f58fbf0ba88f631848fb622dfe0ad410c0c" - dependencies: - before-after-hook "^1.1.0" - btoa-lite "^1.0.0" - debug "^3.1.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.0" - lodash "^4.17.4" - node-fetch "^2.1.1" - url-template "^2.0.8" - "@types/chai@^4.1.2": version "4.1.2" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21" @@ -167,12 +179,6 @@ version "3.1.0" resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-3.1.0.tgz#3584b6b54f45333e988da2c29e6797eff5a20f8c" -agent-base@4, agent-base@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" - dependencies: - es6-promisify "^5.0.0" - ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" @@ -253,21 +259,6 @@ atob@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" -aws-sdk@^2.222.1: - version "2.222.1" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.222.1.tgz#d84c34003bb882d1fec17c41c74cb817bda84914" - dependencies: - buffer "4.9.1" - events "1.1.1" - ieee754 "1.1.8" - jmespath "0.15.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - uuid "3.1.0" - xml2js "0.4.17" - xmlbuilder "4.2.1" - babel-code-frame@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -280,10 +271,6 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -base64-js@^1.0.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -296,10 +283,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -before-after-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.1.0.tgz#83165e15a59460d13702cb8febd6a1807896db5a" - bl@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" @@ -333,18 +316,6 @@ browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" -btoa-lite@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" - -buffer@4.9.1: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-modules@^1.0.0, builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -518,10 +489,6 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -date-fns@^1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" - debug@3.1.0, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -594,16 +561,6 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es6-promise@^4.0.3: - version "4.2.4" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" - -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - dependencies: - es6-promise "^4.0.3" - escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -624,10 +581,6 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -events@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - execa@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" @@ -853,28 +806,6 @@ http-call@^5.1.0: tslib "^1.9.0" tunnel-agent "^0.6.0" -http-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" - dependencies: - agent-base "4" - debug "3.1.0" - -https-proxy-agent@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" - dependencies: - agent-base "^4.1.0" - debug "^3.1.0" - -ieee754@1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -ieee754@^1.1.4: - version "1.1.11" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" - ignore@^3.3.5: version "3.3.7" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" @@ -1010,7 +941,7 @@ isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1028,10 +959,6 @@ isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" -jmespath@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" - js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -1112,7 +1039,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.0.0, lodash@^4.17.4, lodash@^4.17.5: +lodash@^4.17.5: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" @@ -1237,10 +1164,6 @@ nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" -node-fetch@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" - normalize-package-data@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" @@ -1387,30 +1310,24 @@ pump@^1.0.0: end-of-stream "^1.1.0" once "^1.3.1" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -qqjs@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.2.0.tgz#c63d04a2ccb1aa2ec7589f8b7474b01a6b54475b" +qqjs@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/qqjs/-/qqjs-0.3.4.tgz#60581f655e980f41c6e57fcd7522dd5179f00add" dependencies: chalk "^2.3.2" debug "^3.1.0" execa "^0.10.0" fs-extra "^5.0.0" + get-stream "^3.0.0" glob "^7.1.2" globby "^8.0.1" + http-call "^5.1.0" load-json-file "^4.0.0" - lodash "^4.17.5" pkg-dir "^2.0.0" + tar-fs "^1.16.0" tmp "^0.0.33" write-json-file "^2.3.0" -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - readable-stream@^2.0.0, readable-stream@^2.0.5: version "2.3.4" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071" @@ -1470,14 +1387,6 @@ safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -sax@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" - -sax@>=0.6.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -1836,17 +1745,6 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - -url@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" @@ -1859,10 +1757,6 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -uuid@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" @@ -1918,19 +1812,6 @@ x-path@^0.0.2: dependencies: path-extra "^1.0.2" -xml2js@0.4.17: - version "0.4.17" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" - dependencies: - sax ">=0.6.0" - xmlbuilder "^4.1.0" - -xmlbuilder@4.2.1, xmlbuilder@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" - dependencies: - lodash "^4.0.0" - xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"