Compare commits

...
4 Commits
Author SHA1 Message Date
khai96_ 9979c3d928 Use node-fetch 2020-05-08 21:34:25 +07:00
khai96_ 738fb9213f Fix README.md 2020-05-08 21:23:23 +07:00
khai96_ 8925cc44da v1.1.0 2020-05-08 21:18:35 +07:00
khai96_ 7574328996 Forgot to update dist/index.js 2020-05-08 21:17:30 +07:00
6 changed files with 43 additions and 746 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ Expanded path of inputs#dest.
### `bin_dest`
Expanded path of inputs@bin_dest.
Expanded path of inputs#bin_dest.
## Usage example
@@ -43,7 +43,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v1
- uses: pnpm/action-setup@v1.1.0
with:
version: 4.11.1
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -6,11 +6,11 @@
"start": "pnpm run build && sh ./run.sh"
},
"dependencies": {
"download": "^8.0.0",
"node-fetch": "^2.6.0",
"expand-tilde": "^2.0.2",
"@actions/core": "^1.2.4",
"@types/download": "^6.2.4",
"@types/expand-tilde": "^2.0.0",
"@types/node-fetch": "^2.5.7",
"@types/node": "^13.13.5"
},
"devDependencies": {
+33 -737
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -3,7 +3,7 @@ import { execPath } from 'process'
import { downloadSelfInstaller } from '../self-installer'
import { Inputs } from '../inputs'
export function runSelfInstaller(inputs: Inputs): Promise<number> {
export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const cp = spawn(execPath, {
env: {
PNPM_VERSION: inputs.version,
@@ -14,7 +14,8 @@ export function runSelfInstaller(inputs: Inputs): Promise<number> {
stdio: ['pipe', 'inherit', 'inherit'],
})
downloadSelfInstaller().pipe(cp.stdin)
const response = await downloadSelfInstaller()
response.body.pipe(cp.stdin)
return new Promise((resolve, reject) => {
cp.on('error', reject)
+2 -2
View File
@@ -1,4 +1,4 @@
import download from 'download'
import fetch from 'node-fetch'
import url from './url'
export const downloadSelfInstaller = () => download(url)
export const downloadSelfInstaller = () => fetch(url)
export default downloadSelfInstaller