Use node-fetch

This commit is contained in:
khai96_ 2020-05-08 21:34:25 +07:00
parent 738fb9213f
commit 9979c3d928
5 changed files with 40 additions and 743 deletions

BIN
dist/index.js vendored

Binary file not shown.

View File

@ -6,11 +6,11 @@
"start": "pnpm run build && sh ./run.sh" "start": "pnpm run build && sh ./run.sh"
}, },
"dependencies": { "dependencies": {
"download": "^8.0.0", "node-fetch": "^2.6.0",
"expand-tilde": "^2.0.2", "expand-tilde": "^2.0.2",
"@actions/core": "^1.2.4", "@actions/core": "^1.2.4",
"@types/download": "^6.2.4",
"@types/expand-tilde": "^2.0.0", "@types/expand-tilde": "^2.0.0",
"@types/node-fetch": "^2.5.7",
"@types/node": "^13.13.5" "@types/node": "^13.13.5"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,10 +1,10 @@
dependencies: dependencies:
'@actions/core': 1.2.4 '@actions/core': 1.2.4
'@types/download': 6.2.4
'@types/expand-tilde': 2.0.0 '@types/expand-tilde': 2.0.0
'@types/node': 13.13.5 '@types/node': 13.13.5
download: 8.0.0 '@types/node-fetch': 2.5.7
expand-tilde: 2.0.2 expand-tilde: 2.0.2
node-fetch: 2.6.0
devDependencies: devDependencies:
'@zeit/ncc': 0.22.1 '@zeit/ncc': 0.22.1
typescript: 3.8.3 typescript: 3.8.3
@ -14,36 +14,17 @@ packages:
dev: false dev: false
resolution: resolution:
integrity: sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg== integrity: sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg==
/@sindresorhus/is/0.7.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==
/@types/decompress/4.2.3:
dependencies:
'@types/node': 13.13.5
dev: false
resolution:
integrity: sha512-W24e3Ycz1UZPgr1ZEDHlK4XnvOr+CpJH3qNsFeqXwwlW/9END9gxn3oJSsp7gYdiQxrXUHwUUd3xuzVz37MrZQ==
/@types/download/6.2.4:
dependencies:
'@types/decompress': 4.2.3
'@types/got': 8.3.5
'@types/node': 13.13.5
dev: false
resolution:
integrity: sha512-Lo5dy3ai6LNnbL663sgdzqL1eib11u1yKH6w3v3IXEOO4kRfQpMn1qWUTaumcHLACjFp1RcBx9tUXEvJoR3vcA==
/@types/expand-tilde/2.0.0: /@types/expand-tilde/2.0.0:
dev: false dev: false
resolution: resolution:
integrity: sha512-17h/6MRHoetV2QVUVnUfrmaFCXNIFJ3uDJmXlklX2xDtlEb1W0OXLgP+qwND2Ibg/PtQfQi0vx19KGuPayjLiw== integrity: sha512-17h/6MRHoetV2QVUVnUfrmaFCXNIFJ3uDJmXlklX2xDtlEb1W0OXLgP+qwND2Ibg/PtQfQi0vx19KGuPayjLiw==
/@types/got/8.3.5: /@types/node-fetch/2.5.7:
dependencies: dependencies:
'@types/node': 13.13.5 '@types/node': 13.13.5
form-data: 3.0.0
dev: false dev: false
resolution: resolution:
integrity: sha512-AaXSrIF99SjjtPVNmCmYb388HML+PKEJb/xmj4SbL2ZO0hHuETZZzyDIKfOqaEoAHZEuX4sC+FRFrHYJoIby6A== integrity: sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==
/@types/node/13.13.5: /@types/node/13.13.5:
dev: false dev: false
resolution: resolution:
@ -53,198 +34,24 @@ packages:
hasBin: true hasBin: true
resolution: resolution:
integrity: sha512-Qq3bMuonkcnV/96jhy9SQYdh39NXHxNMJ1O31ZFzWG9n52fR2DLtgrNzhj/ahlEjnBziMLGVWDbaS9sf03/fEw== integrity: sha512-Qq3bMuonkcnV/96jhy9SQYdh39NXHxNMJ1O31ZFzWG9n52fR2DLtgrNzhj/ahlEjnBziMLGVWDbaS9sf03/fEw==
/archive-type/4.0.0: /asynckit/0.4.0:
dev: false
resolution:
integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=
/combined-stream/1.0.8:
dependencies: dependencies:
file-type: 4.4.0 delayed-stream: 1.0.0
dev: false dev: false
engines: engines:
node: '>=4' node: '>= 0.8'
resolution: resolution:
integrity: sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA= integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
/base64-js/0.0.8: /delayed-stream/1.0.0:
dev: false dev: false
engines: engines:
node: '>= 0.4' node: '>=0.4.0'
resolution: resolution:
integrity: sha1-EQHpVE9KdrG8OybUUsqW16NeeXg= integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
/bl/1.2.2:
dependencies:
readable-stream: 2.3.7
safe-buffer: 5.2.0
dev: false
resolution:
integrity: sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
/buffer-alloc-unsafe/1.1.0:
dev: false
resolution:
integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==
/buffer-alloc/1.2.0:
dependencies:
buffer-alloc-unsafe: 1.1.0
buffer-fill: 1.0.0
dev: false
resolution:
integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==
/buffer-crc32/0.2.13:
dev: false
resolution:
integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
/buffer-fill/1.0.0:
dev: false
resolution:
integrity: sha1-+PeLdniYiO858gXNY39o5wISKyw=
/buffer/3.6.2:
dependencies:
base64-js: 0.0.8
ieee754: 1.1.13
isarray: 1.0.0
dev: false
resolution:
integrity: sha512-c3M77NkHJxS0zx/ErxXhDLr1v3y2MDXPeTJPvLNOaIYJ4ymHBUFQ9EXzt9HYuqAJllMoNb/EZ8hIiulnQFAUuQ==
/cacheable-request/2.1.4:
dependencies:
clone-response: 1.0.2
get-stream: 3.0.0
http-cache-semantics: 3.8.1
keyv: 3.0.0
lowercase-keys: 1.0.0
normalize-url: 2.0.1
responselike: 1.0.2
dev: false
resolution:
integrity: sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=
/clone-response/1.0.2:
dependencies:
mimic-response: 1.0.1
dev: false
resolution:
integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
/commander/2.8.1:
dependencies:
graceful-readlink: 1.0.1
dev: false
engines:
node: '>= 0.6.x'
resolution:
integrity: sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=
/content-disposition/0.5.3:
dependencies:
safe-buffer: 5.1.2
dev: false
engines:
node: '>= 0.6'
resolution:
integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
/core-util-is/1.0.2:
dev: false
resolution:
integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
/decode-uri-component/0.2.0:
dev: false
engines:
node: '>=0.10'
resolution:
integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
/decompress-response/3.3.0:
dependencies:
mimic-response: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
/decompress-tar/4.1.1:
dependencies:
file-type: 5.2.0
is-stream: 1.1.0
tar-stream: 1.6.2
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==
/decompress-tarbz2/4.1.1:
dependencies:
decompress-tar: 4.1.1
file-type: 6.2.0
is-stream: 1.1.0
seek-bzip: 1.0.5
unbzip2-stream: 1.3.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==
/decompress-targz/4.1.1:
dependencies:
decompress-tar: 4.1.1
file-type: 5.2.0
is-stream: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==
/decompress-unzip/4.0.1:
dependencies:
file-type: 3.9.0
get-stream: 2.3.1
pify: 2.3.0
yauzl: 2.10.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-3qrM39FK6vhVePczroIQ+bSEj2k=
/decompress/4.2.1:
dependencies:
decompress-tar: 4.1.1
decompress-tarbz2: 4.1.1
decompress-targz: 4.1.1
decompress-unzip: 4.0.1
graceful-fs: 4.2.3
make-dir: 1.3.0
pify: 2.3.0
strip-dirs: 2.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==
/download/8.0.0:
dependencies:
archive-type: 4.0.0
content-disposition: 0.5.3
decompress: 4.2.1
ext-name: 5.0.0
file-type: 11.1.0
filenamify: 3.0.0
get-stream: 4.1.0
got: 8.3.2
make-dir: 2.1.0
p-event: 2.3.1
pify: 4.0.1
dev: false
engines:
node: '>=10'
resolution:
integrity: sha512-ASRY5QhDk7FK+XrQtQyvhpDKanLluEEQtWl/J7Lxuf/b+i8RYh997QeXvL85xitrmRKVlx9c7eTrcRdq2GS4eA==
/duplexer3/0.1.4:
dev: false
resolution:
integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
/end-of-stream/1.4.4:
dependencies:
once: 1.4.0
dev: false
resolution:
integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
/escape-string-regexp/1.0.5:
dev: false
engines:
node: '>=0.8.0'
resolution:
integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
/expand-tilde/2.0.2: /expand-tilde/2.0.2:
dependencies: dependencies:
homedir-polyfill: 1.0.3 homedir-polyfill: 1.0.3
@ -253,151 +60,16 @@ packages:
node: '>=0.10.0' node: '>=0.10.0'
resolution: resolution:
integrity: sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= integrity: sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=
/ext-list/2.2.2: /form-data/3.0.0:
dependencies: dependencies:
mime-db: 1.43.0 asynckit: 0.4.0
dev: false combined-stream: 1.0.8
engines: mime-types: 2.1.27
node: '>=0.10.0'
resolution:
integrity: sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==
/ext-name/5.0.0:
dependencies:
ext-list: 2.2.2
sort-keys-length: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==
/fd-slicer/1.1.0:
dependencies:
pend: 1.2.0
dev: false
resolution:
integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
/file-type/11.1.0:
dev: false dev: false
engines: engines:
node: '>= 6' node: '>= 6'
resolution: resolution:
integrity: sha512-rM0UO7Qm9K7TWTtA6AShI/t7H5BPjDeGVDaNyg9BjHAj3PysKy7+8C8D137R88jnR3rFJZQB/tFgydl5sN5m7g== integrity: sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==
/file-type/3.9.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-JXoHg4TR24CHvESdEH1SpSZyuek=
/file-type/4.4.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-G2AOX8ofvcboDApwxxyNul95BsU=
/file-type/5.2.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-LdvqfHP/42No365J3DOMBYwritY=
/file-type/6.2.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==
/filename-reserved-regex/2.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-q/c9+rc10EVECr/qLZHzieu/oik=
/filenamify/3.0.0:
dependencies:
filename-reserved-regex: 2.0.0
strip-outer: 1.0.1
trim-repeated: 1.0.0
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==
/from2/2.3.0:
dependencies:
inherits: 2.0.4
readable-stream: 2.3.7
dev: false
resolution:
integrity: sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
/fs-constants/1.0.0:
dev: false
resolution:
integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
/get-stream/2.3.1:
dependencies:
object-assign: 4.1.1
pinkie-promise: 2.0.1
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=
/get-stream/3.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
/get-stream/4.1.0:
dependencies:
pump: 3.0.0
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
/got/8.3.2:
dependencies:
'@sindresorhus/is': 0.7.0
cacheable-request: 2.1.4
decompress-response: 3.3.0
duplexer3: 0.1.4
get-stream: 3.0.0
into-stream: 3.1.0
is-retry-allowed: 1.2.0
isurl: 1.0.0
lowercase-keys: 1.0.1
mimic-response: 1.0.1
p-cancelable: 0.4.1
p-timeout: 2.0.1
pify: 3.0.0
safe-buffer: 5.2.0
timed-out: 4.0.1
url-parse-lax: 3.0.0
url-to-options: 1.0.1
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==
/graceful-fs/4.2.3:
dev: false
resolution:
integrity: sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
/graceful-readlink/1.0.1:
dev: false
resolution:
integrity: sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
/has-symbol-support-x/1.4.2:
dev: false
resolution:
integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==
/has-to-string-tag-x/1.4.1:
dependencies:
has-symbol-support-x: 1.4.2
dev: false
resolution:
integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==
/homedir-polyfill/1.0.3: /homedir-polyfill/1.0.3:
dependencies: dependencies:
parse-passwd: 1.0.0 parse-passwd: 1.0.0
@ -406,366 +78,32 @@ packages:
node: '>=0.10.0' node: '>=0.10.0'
resolution: resolution:
integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==
/http-cache-semantics/3.8.1: /mime-db/1.44.0:
dev: false
resolution:
integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
/ieee754/1.1.13:
dev: false
resolution:
integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
/inherits/2.0.4:
dev: false
resolution:
integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
/into-stream/3.1.0:
dependencies:
from2: 2.3.0
p-is-promise: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=
/is-natural-number/4.0.1:
dev: false
resolution:
integrity: sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
/is-object/1.0.1:
dev: false
resolution:
integrity: sha1-iVJojF7C/9awPsyF52ngKQMINHA=
/is-plain-obj/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
/is-retry-allowed/1.2.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==
/is-stream/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
/isarray/1.0.0:
dev: false
resolution:
integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
/isurl/1.0.0:
dependencies:
has-to-string-tag-x: 1.4.1
is-object: 1.0.1
dev: false
engines:
node: '>= 4'
resolution:
integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==
/json-buffer/3.0.0:
dev: false
resolution:
integrity: sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
/keyv/3.0.0:
dependencies:
json-buffer: 3.0.0
dev: false
resolution:
integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==
/lowercase-keys/1.0.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=
/lowercase-keys/1.0.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
/make-dir/1.3.0:
dependencies:
pify: 3.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
/make-dir/2.1.0:
dependencies:
pify: 4.0.1
semver: 5.7.1
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
/mime-db/1.43.0:
dev: false dev: false
engines: engines:
node: '>= 0.6' node: '>= 0.6'
resolution: resolution:
integrity: sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== integrity: sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
/mimic-response/1.0.1: /mime-types/2.1.27:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
/normalize-url/2.0.1:
dependencies: dependencies:
prepend-http: 2.0.0 mime-db: 1.44.0
query-string: 5.1.1
sort-keys: 2.0.0
dev: false dev: false
engines: engines:
node: '>=4' node: '>= 0.6'
resolution: resolution:
integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== integrity: sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
/object-assign/4.1.1: /node-fetch/2.6.0:
dev: false dev: false
engines: engines:
node: '>=0.10.0' node: 4.x || >=6.0.0
resolution: resolution:
integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= integrity: sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
/once/1.4.0:
dependencies:
wrappy: 1.0.2
dev: false
resolution:
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
/p-cancelable/0.4.1:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==
/p-event/2.3.1:
dependencies:
p-timeout: 2.0.1
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==
/p-finally/1.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
/p-is-promise/1.1.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=
/p-timeout/2.0.1:
dependencies:
p-finally: 1.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==
/parse-passwd/1.0.0: /parse-passwd/1.0.0:
dev: false dev: false
engines: engines:
node: '>=0.10.0' node: '>=0.10.0'
resolution: resolution:
integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= integrity: sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=
/pend/1.2.0:
dev: false
resolution:
integrity: sha1-elfrVQpng/kRUzH89GY9XI4AelA=
/pify/2.3.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
/pify/3.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
/pify/4.0.1:
dev: false
engines:
node: '>=6'
resolution:
integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
/pinkie-promise/2.0.1:
dependencies:
pinkie: 2.0.4
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-ITXW36ejWMBprJsXh3YogihFD/o=
/pinkie/2.0.4:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
/prepend-http/2.0.0:
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
/process-nextick-args/2.0.1:
dev: false
resolution:
integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
/pump/3.0.0:
dependencies:
end-of-stream: 1.4.4
once: 1.4.0
dev: false
resolution:
integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
/query-string/5.1.1:
dependencies:
decode-uri-component: 0.2.0
object-assign: 4.1.1
strict-uri-encode: 1.1.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
/readable-stream/2.3.7:
dependencies:
core-util-is: 1.0.2
inherits: 2.0.4
isarray: 1.0.0
process-nextick-args: 2.0.1
safe-buffer: 5.1.2
string_decoder: 1.1.1
util-deprecate: 1.0.2
dev: false
resolution:
integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
/responselike/1.0.2:
dependencies:
lowercase-keys: 1.0.0
dev: false
resolution:
integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
/safe-buffer/5.1.2:
dev: false
resolution:
integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
/safe-buffer/5.2.0:
dev: false
resolution:
integrity: sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
/seek-bzip/1.0.5:
dependencies:
commander: 2.8.1
dev: false
hasBin: true
resolution:
integrity: sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=
/semver/5.7.1:
dev: false
hasBin: true
resolution:
integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
/sort-keys-length/1.0.1:
dependencies:
sort-keys: 1.1.2
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=
/sort-keys/1.1.2:
dependencies:
is-plain-obj: 1.1.0
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
/sort-keys/2.0.0:
dependencies:
is-plain-obj: 1.1.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
/strict-uri-encode/1.1.0:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=
/string_decoder/1.1.1:
dependencies:
safe-buffer: 5.1.2
dev: false
resolution:
integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
/strip-dirs/2.1.0:
dependencies:
is-natural-number: 4.0.1
dev: false
resolution:
integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==
/strip-outer/1.0.1:
dependencies:
escape-string-regexp: 1.0.5
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
/tar-stream/1.6.2:
dependencies:
bl: 1.2.2
buffer-alloc: 1.2.0
end-of-stream: 1.4.4
fs-constants: 1.0.0
readable-stream: 2.3.7
to-buffer: 1.1.1
xtend: 4.0.2
dev: false
engines:
node: '>= 0.8.0'
resolution:
integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==
/through/2.3.8:
dev: false
resolution:
integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
/timed-out/4.0.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
/to-buffer/1.1.1:
dev: false
resolution:
integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==
/trim-repeated/1.0.0:
dependencies:
escape-string-regexp: 1.0.5
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-42RqLqTokTEr9+rObPsFOAvAHCE=
/typescript/3.8.3: /typescript/3.8.3:
dev: true dev: true
engines: engines:
@ -773,54 +111,12 @@ packages:
hasBin: true hasBin: true
resolution: resolution:
integrity: sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== integrity: sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
/unbzip2-stream/1.3.0:
dependencies:
buffer: 3.6.2
through: 2.3.8
dev: false
resolution:
integrity: sha512-kE2WkurNnPUMcryNioS68DDbhoPB8Qxsd8btHSj+sd5Pjh2GsjmeHLzMSqV9HHziAo8FzVxVCJl9ZYhk7yY1pA==
/url-parse-lax/3.0.0:
dependencies:
prepend-http: 2.0.0
dev: false
engines:
node: '>=4'
resolution:
integrity: sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
/url-to-options/1.0.1:
dev: false
engines:
node: '>= 4'
resolution:
integrity: sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=
/util-deprecate/1.0.2:
dev: false
resolution:
integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
/wrappy/1.0.2:
dev: false
resolution:
integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
/xtend/4.0.2:
dev: false
engines:
node: '>=0.4'
resolution:
integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
/yauzl/2.10.0:
dependencies:
buffer-crc32: 0.2.13
fd-slicer: 1.1.0
dev: false
resolution:
integrity: sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
specifiers: specifiers:
'@actions/core': ^1.2.4 '@actions/core': ^1.2.4
'@types/download': ^6.2.4
'@types/expand-tilde': ^2.0.0 '@types/expand-tilde': ^2.0.0
'@types/node': ^13.13.5 '@types/node': ^13.13.5
'@types/node-fetch': ^2.5.7
'@zeit/ncc': ^0.22.1 '@zeit/ncc': ^0.22.1
download: ^8.0.0
expand-tilde: ^2.0.2 expand-tilde: ^2.0.2
node-fetch: ^2.6.0
typescript: ^3.8.3 typescript: ^3.8.3

View File

@ -3,7 +3,7 @@ import { execPath } from 'process'
import { downloadSelfInstaller } from '../self-installer' import { downloadSelfInstaller } from '../self-installer'
import { Inputs } from '../inputs' import { Inputs } from '../inputs'
export function runSelfInstaller(inputs: Inputs): Promise<number> { export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const cp = spawn(execPath, { const cp = spawn(execPath, {
env: { env: {
PNPM_VERSION: inputs.version, PNPM_VERSION: inputs.version,
@ -14,7 +14,8 @@ export function runSelfInstaller(inputs: Inputs): Promise<number> {
stdio: ['pipe', 'inherit', 'inherit'], stdio: ['pipe', 'inherit', 'inherit'],
}) })
downloadSelfInstaller().pipe(cp.stdin) const response = await downloadSelfInstaller()
response.body.pipe(cp.stdin)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
cp.on('error', reject) cp.on('error', reject)

View File

@ -1,4 +1,4 @@
import download from 'download' import fetch from 'node-fetch'
import url from './url' import url from './url'
export const downloadSelfInstaller = () => download(url) export const downloadSelfInstaller = () => fetch(url)
export default downloadSelfInstaller export default downloadSelfInstaller