mirror of
https://github.com/deployphp/action.git
synced 2024-11-23 04:19:02 +00:00
Mark job as failed on error (#14)
* fix: set failed on subprocess error * chore: update dependencies
This commit is contained in:
parent
1f9078ddea
commit
9eab20634f
8
index.js
8
index.js
@ -55,5 +55,11 @@ function dep() {
|
|||||||
dep = 'deployer.phar'
|
dep = 'deployer.phar'
|
||||||
}
|
}
|
||||||
|
|
||||||
execa(dep, split(core.getInput('dep'))).stdout.pipe(process.stdout);
|
const subprocess = execa(dep, split(core.getInput('dep')))
|
||||||
|
|
||||||
|
subprocess.stdout.pipe(process.stdout);
|
||||||
|
|
||||||
|
subprocess.catch(err => {
|
||||||
|
core.setFailed(err.shortMessage)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
57
node_modules/@actions/core/README.md
generated
vendored
57
node_modules/@actions/core/README.md
generated
vendored
@ -62,10 +62,10 @@ catch (err) {
|
|||||||
// setFailed logs the message and sets a failing exit code
|
// setFailed logs the message and sets a failing exit code
|
||||||
core.setFailed(`Action failed with error ${err}`);
|
core.setFailed(`Action failed with error ${err}`);
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned.
|
Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned.
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Logging
|
#### Logging
|
||||||
|
|
||||||
@ -113,6 +113,61 @@ const result = await core.group('Do something async', async () => {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Styling output
|
||||||
|
|
||||||
|
Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported.
|
||||||
|
|
||||||
|
Foreground colors:
|
||||||
|
```js
|
||||||
|
// 3/4 bit
|
||||||
|
core.info('\u001b[35mThis foreground will be magenta')
|
||||||
|
|
||||||
|
// 8 bit
|
||||||
|
core.info('\u001b[38;5;6mThis foreground will be cyan')
|
||||||
|
|
||||||
|
// 24 bit
|
||||||
|
core.info('\u001b[38;2;255;0;0mThis foreground will be bright red')
|
||||||
|
```
|
||||||
|
|
||||||
|
Background colors:
|
||||||
|
```js
|
||||||
|
// 3/4 bit
|
||||||
|
core.info('\u001b[43mThis background will be yellow');
|
||||||
|
|
||||||
|
// 8 bit
|
||||||
|
core.info('\u001b[48;5;6mThis background will be cyan')
|
||||||
|
|
||||||
|
// 24 bit
|
||||||
|
core.info('\u001b[48;2;255;0;0mThis background will be bright red')
|
||||||
|
```
|
||||||
|
|
||||||
|
Special styles:
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.info('\u001b[1mBold text')
|
||||||
|
core.info('\u001b[3mItalic text')
|
||||||
|
core.info('\u001b[4mUnderlined text')
|
||||||
|
```
|
||||||
|
|
||||||
|
ANSI escape codes can be combined with one another:
|
||||||
|
|
||||||
|
```js
|
||||||
|
core.info('\u001b[31;46mRed foreground with a cyan background and \u001b[1mbold text at the end');
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: Escape codes reset at the start of each line
|
||||||
|
```js
|
||||||
|
core.info('\u001b[35mThis foreground will be magenta')
|
||||||
|
core.info('This foreground will reset to the default')
|
||||||
|
```
|
||||||
|
|
||||||
|
Manually typing escape codes can be a little difficult, but you can use third party modules such as [ansi-styles](https://github.com/chalk/ansi-styles).
|
||||||
|
|
||||||
|
```js
|
||||||
|
const style = require('ansi-styles');
|
||||||
|
core.info(style.color.ansi16m.hex('#abcdef') + 'Hello world!')
|
||||||
|
```
|
||||||
|
|
||||||
#### Action state
|
#### Action state
|
||||||
|
|
||||||
You can use this library to save state and get state for sharing information between a given wrapper action:
|
You can use this library to save state and get state for sharing information between a given wrapper action:
|
||||||
|
1
node_modules/@actions/core/lib/core.js
generated
vendored
1
node_modules/@actions/core/lib/core.js
generated
vendored
@ -104,6 +104,7 @@ exports.getInput = getInput;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
|
process.stdout.write(os.EOL);
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, value);
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
|
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
2
node_modules/@actions/core/lib/core.js.map
generated
vendored
@ -1 +1 @@
|
|||||||
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAAsC;AAEtC,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAED,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,MAAM,SAAS,GAAG,qCAAqC,CAAA;QACvD,MAAM,YAAY,GAAG,GAAG,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;QACzF,2BAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;KACtC;SAAM;QACL,s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AAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC"}
|
24
node_modules/@actions/core/package.json
generated
vendored
24
node_modules/@actions/core/package.json
generated
vendored
@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"_from": "@actions/core",
|
"_from": "@actions/core@1.2.7",
|
||||||
"_id": "@actions/core@1.2.6",
|
"_id": "@actions/core@1.2.7",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==",
|
"_integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig==",
|
||||||
"_location": "/@actions/core",
|
"_location": "/@actions/core",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "tag",
|
"type": "version",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "@actions/core",
|
"raw": "@actions/core@1.2.7",
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"escapedName": "@actions%2fcore",
|
"escapedName": "@actions%2fcore",
|
||||||
"scope": "@actions",
|
"scope": "@actions",
|
||||||
"rawSpec": "",
|
"rawSpec": "1.2.7",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "latest"
|
"fetchSpec": "1.2.7"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
"#USER",
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
"_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
|
||||||
"_shasum": "a78d49f41a4def18e88ce47c2cac615d5694bf09",
|
"_shasum": "594f8c45b213f0146e4be7eda8ae5cf4e198e5ab",
|
||||||
"_spec": "@actions/core",
|
"_spec": "@actions/core@1.2.7",
|
||||||
"_where": "/Users/anton/dev/action",
|
"_where": "/Users/andrei/Projects/forks/deployphp-action",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
@ -64,5 +64,5 @@
|
|||||||
"tsc": "tsc"
|
"tsc": "tsc"
|
||||||
},
|
},
|
||||||
"types": "lib/core.d.ts",
|
"types": "lib/core.d.ts",
|
||||||
"version": "1.2.6"
|
"version": "1.2.7"
|
||||||
}
|
}
|
||||||
|
21
node_modules/end-of-stream/LICENSE
generated
vendored
21
node_modules/end-of-stream/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Mathias Buus
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
54
node_modules/end-of-stream/README.md
generated
vendored
54
node_modules/end-of-stream/README.md
generated
vendored
@ -1,54 +0,0 @@
|
|||||||
# end-of-stream
|
|
||||||
|
|
||||||
A node module that calls a callback when a readable/writable/duplex stream has completed or failed.
|
|
||||||
|
|
||||||
npm install end-of-stream
|
|
||||||
|
|
||||||
[![Build status](https://travis-ci.org/mafintosh/end-of-stream.svg?branch=master)](https://travis-ci.org/mafintosh/end-of-stream)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Simply pass a stream and a callback to the `eos`.
|
|
||||||
Both legacy streams, streams2 and stream3 are supported.
|
|
||||||
|
|
||||||
``` js
|
|
||||||
var eos = require('end-of-stream');
|
|
||||||
|
|
||||||
eos(readableStream, function(err) {
|
|
||||||
// this will be set to the stream instance
|
|
||||||
if (err) return console.log('stream had an error or closed early');
|
|
||||||
console.log('stream has ended', this === readableStream);
|
|
||||||
});
|
|
||||||
|
|
||||||
eos(writableStream, function(err) {
|
|
||||||
if (err) return console.log('stream had an error or closed early');
|
|
||||||
console.log('stream has finished', this === writableStream);
|
|
||||||
});
|
|
||||||
|
|
||||||
eos(duplexStream, function(err) {
|
|
||||||
if (err) return console.log('stream had an error or closed early');
|
|
||||||
console.log('stream has ended and finished', this === duplexStream);
|
|
||||||
});
|
|
||||||
|
|
||||||
eos(duplexStream, {readable:false}, function(err) {
|
|
||||||
if (err) return console.log('stream had an error or closed early');
|
|
||||||
console.log('stream has finished but might still be readable');
|
|
||||||
});
|
|
||||||
|
|
||||||
eos(duplexStream, {writable:false}, function(err) {
|
|
||||||
if (err) return console.log('stream had an error or closed early');
|
|
||||||
console.log('stream has ended but might still be writable');
|
|
||||||
});
|
|
||||||
|
|
||||||
eos(readableStream, {error:false}, function(err) {
|
|
||||||
// do not treat emit('error', err) as a end-of-stream
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
|
|
||||||
## Related
|
|
||||||
|
|
||||||
`end-of-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
|
|
94
node_modules/end-of-stream/index.js
generated
vendored
94
node_modules/end-of-stream/index.js
generated
vendored
@ -1,94 +0,0 @@
|
|||||||
var once = require('once');
|
|
||||||
|
|
||||||
var noop = function() {};
|
|
||||||
|
|
||||||
var isRequest = function(stream) {
|
|
||||||
return stream.setHeader && typeof stream.abort === 'function';
|
|
||||||
};
|
|
||||||
|
|
||||||
var isChildProcess = function(stream) {
|
|
||||||
return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
|
|
||||||
};
|
|
||||||
|
|
||||||
var eos = function(stream, opts, callback) {
|
|
||||||
if (typeof opts === 'function') return eos(stream, null, opts);
|
|
||||||
if (!opts) opts = {};
|
|
||||||
|
|
||||||
callback = once(callback || noop);
|
|
||||||
|
|
||||||
var ws = stream._writableState;
|
|
||||||
var rs = stream._readableState;
|
|
||||||
var readable = opts.readable || (opts.readable !== false && stream.readable);
|
|
||||||
var writable = opts.writable || (opts.writable !== false && stream.writable);
|
|
||||||
var cancelled = false;
|
|
||||||
|
|
||||||
var onlegacyfinish = function() {
|
|
||||||
if (!stream.writable) onfinish();
|
|
||||||
};
|
|
||||||
|
|
||||||
var onfinish = function() {
|
|
||||||
writable = false;
|
|
||||||
if (!readable) callback.call(stream);
|
|
||||||
};
|
|
||||||
|
|
||||||
var onend = function() {
|
|
||||||
readable = false;
|
|
||||||
if (!writable) callback.call(stream);
|
|
||||||
};
|
|
||||||
|
|
||||||
var onexit = function(exitCode) {
|
|
||||||
callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
|
|
||||||
};
|
|
||||||
|
|
||||||
var onerror = function(err) {
|
|
||||||
callback.call(stream, err);
|
|
||||||
};
|
|
||||||
|
|
||||||
var onclose = function() {
|
|
||||||
process.nextTick(onclosenexttick);
|
|
||||||
};
|
|
||||||
|
|
||||||
var onclosenexttick = function() {
|
|
||||||
if (cancelled) return;
|
|
||||||
if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
|
|
||||||
if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
|
|
||||||
};
|
|
||||||
|
|
||||||
var onrequest = function() {
|
|
||||||
stream.req.on('finish', onfinish);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (isRequest(stream)) {
|
|
||||||
stream.on('complete', onfinish);
|
|
||||||
stream.on('abort', onclose);
|
|
||||||
if (stream.req) onrequest();
|
|
||||||
else stream.on('request', onrequest);
|
|
||||||
} else if (writable && !ws) { // legacy streams
|
|
||||||
stream.on('end', onlegacyfinish);
|
|
||||||
stream.on('close', onlegacyfinish);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isChildProcess(stream)) stream.on('exit', onexit);
|
|
||||||
|
|
||||||
stream.on('end', onend);
|
|
||||||
stream.on('finish', onfinish);
|
|
||||||
if (opts.error !== false) stream.on('error', onerror);
|
|
||||||
stream.on('close', onclose);
|
|
||||||
|
|
||||||
return function() {
|
|
||||||
cancelled = true;
|
|
||||||
stream.removeListener('complete', onfinish);
|
|
||||||
stream.removeListener('abort', onclose);
|
|
||||||
stream.removeListener('request', onrequest);
|
|
||||||
if (stream.req) stream.req.removeListener('finish', onfinish);
|
|
||||||
stream.removeListener('end', onlegacyfinish);
|
|
||||||
stream.removeListener('close', onlegacyfinish);
|
|
||||||
stream.removeListener('finish', onfinish);
|
|
||||||
stream.removeListener('exit', onexit);
|
|
||||||
stream.removeListener('end', onend);
|
|
||||||
stream.removeListener('error', onerror);
|
|
||||||
stream.removeListener('close', onclose);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = eos;
|
|
65
node_modules/end-of-stream/package.json
generated
vendored
65
node_modules/end-of-stream/package.json
generated
vendored
@ -1,65 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "end-of-stream@^1.1.0",
|
|
||||||
"_id": "end-of-stream@1.4.4",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
|
||||||
"_location": "/end-of-stream",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "end-of-stream@^1.1.0",
|
|
||||||
"name": "end-of-stream",
|
|
||||||
"escapedName": "end-of-stream",
|
|
||||||
"rawSpec": "^1.1.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.1.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/pump"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
|
||||||
"_shasum": "5ae64a5f45057baf3626ec14da0ca5e4b2431eb0",
|
|
||||||
"_spec": "end-of-stream@^1.1.0",
|
|
||||||
"_where": "/Users/anton/dev/action/node_modules/pump",
|
|
||||||
"author": {
|
|
||||||
"name": "Mathias Buus",
|
|
||||||
"email": "mathiasbuus@gmail.com"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/mafintosh/end-of-stream/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Call a callback when a readable/writable/duplex stream has completed or failed.",
|
|
||||||
"devDependencies": {
|
|
||||||
"tape": "^4.11.0"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/mafintosh/end-of-stream",
|
|
||||||
"keywords": [
|
|
||||||
"stream",
|
|
||||||
"streams",
|
|
||||||
"callback",
|
|
||||||
"finish",
|
|
||||||
"close",
|
|
||||||
"end",
|
|
||||||
"wait"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "index.js",
|
|
||||||
"name": "end-of-stream",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/mafintosh/end-of-stream.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "node test.js"
|
|
||||||
},
|
|
||||||
"version": "1.4.4"
|
|
||||||
}
|
|
35
node_modules/execa/index.d.ts
generated
vendored
35
node_modules/execa/index.d.ts
generated
vendored
@ -384,20 +384,6 @@ declare namespace execa {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ExecaChildPromise<StdoutErrorType> {
|
interface ExecaChildPromise<StdoutErrorType> {
|
||||||
catch<ResultType = never>(
|
|
||||||
onRejected?: (reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>
|
|
||||||
): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.
|
|
||||||
*/
|
|
||||||
kill(signal?: string, options?: execa.KillOptions): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This is preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`.
|
|
||||||
*/
|
|
||||||
cancel(): void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Stream combining/interleaving [`stdout`](https://nodejs.org/api/child_process.html#child_process_subprocess_stdout) and [`stderr`](https://nodejs.org/api/child_process.html#child_process_subprocess_stderr).
|
Stream combining/interleaving [`stdout`](https://nodejs.org/api/child_process.html#child_process_subprocess_stdout) and [`stderr`](https://nodejs.org/api/child_process.html#child_process_subprocess_stderr).
|
||||||
|
|
||||||
@ -406,6 +392,20 @@ declare namespace execa {
|
|||||||
- both `stdout` and `stderr` options are set to [`'inherit'`, `'ipc'`, `Stream` or `integer`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio)
|
- both `stdout` and `stderr` options are set to [`'inherit'`, `'ipc'`, `Stream` or `integer`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio)
|
||||||
*/
|
*/
|
||||||
all?: ReadableStream;
|
all?: ReadableStream;
|
||||||
|
|
||||||
|
catch<ResultType = never>(
|
||||||
|
onRejected?: (reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>
|
||||||
|
): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.
|
||||||
|
*/
|
||||||
|
kill(signal?: string, options?: KillOptions): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This is preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`.
|
||||||
|
*/
|
||||||
|
cancel(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &
|
type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &
|
||||||
@ -433,8 +433,13 @@ declare const execa: {
|
|||||||
//=> 'unicorns'
|
//=> 'unicorns'
|
||||||
|
|
||||||
// Cancelling a spawned process
|
// Cancelling a spawned process
|
||||||
|
|
||||||
const subprocess = execa('node');
|
const subprocess = execa('node');
|
||||||
setTimeout(() => { spawned.cancel() }, 1000);
|
|
||||||
|
setTimeout(() => {
|
||||||
|
subprocess.cancel()
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await subprocess;
|
await subprocess;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
2
node_modules/execa/index.js
generated
vendored
2
node_modules/execa/index.js
generated
vendored
@ -147,8 +147,6 @@ const execa = (file, args, options) => {
|
|||||||
|
|
||||||
const handlePromiseOnce = onetime(handlePromise);
|
const handlePromiseOnce = onetime(handlePromise);
|
||||||
|
|
||||||
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
|
|
||||||
|
|
||||||
handleInput(spawned, parsed.options.input);
|
handleInput(spawned, parsed.options.input);
|
||||||
|
|
||||||
spawned.all = makeAllStream(spawned, parsed.options);
|
spawned.all = makeAllStream(spawned, parsed.options);
|
||||||
|
16
node_modules/execa/lib/stdio.js
generated
vendored
16
node_modules/execa/lib/stdio.js
generated
vendored
@ -1,20 +1,20 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const aliases = ['stdin', 'stdout', 'stderr'];
|
const aliases = ['stdin', 'stdout', 'stderr'];
|
||||||
|
|
||||||
const hasAlias = opts => aliases.some(alias => opts[alias] !== undefined);
|
const hasAlias = options => aliases.some(alias => options[alias] !== undefined);
|
||||||
|
|
||||||
const normalizeStdio = opts => {
|
const normalizeStdio = options => {
|
||||||
if (!opts) {
|
if (!options) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {stdio} = opts;
|
const {stdio} = options;
|
||||||
|
|
||||||
if (stdio === undefined) {
|
if (stdio === undefined) {
|
||||||
return aliases.map(alias => opts[alias]);
|
return aliases.map(alias => options[alias]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasAlias(opts)) {
|
if (hasAlias(options)) {
|
||||||
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
|
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,8 +33,8 @@ const normalizeStdio = opts => {
|
|||||||
module.exports = normalizeStdio;
|
module.exports = normalizeStdio;
|
||||||
|
|
||||||
// `ipc` is pushed unless it is already present
|
// `ipc` is pushed unless it is already present
|
||||||
module.exports.node = opts => {
|
module.exports.node = options => {
|
||||||
const stdio = normalizeStdio(opts);
|
const stdio = normalizeStdio(options);
|
||||||
|
|
||||||
if (stdio === 'ipc') {
|
if (stdio === 'ipc') {
|
||||||
return 'ipc';
|
return 'ipc';
|
||||||
|
51
node_modules/execa/package.json
generated
vendored
51
node_modules/execa/package.json
generated
vendored
@ -1,28 +1,28 @@
|
|||||||
{
|
{
|
||||||
"_from": "execa",
|
"_from": "execa@5.0.0",
|
||||||
"_id": "execa@4.1.0",
|
"_id": "execa@5.0.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
|
"_integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
|
||||||
"_location": "/execa",
|
"_location": "/execa",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "tag",
|
"type": "version",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "execa",
|
"raw": "execa@5.0.0",
|
||||||
"name": "execa",
|
"name": "execa",
|
||||||
"escapedName": "execa",
|
"escapedName": "execa",
|
||||||
"rawSpec": "",
|
"rawSpec": "5.0.0",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "latest"
|
"fetchSpec": "5.0.0"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"#USER",
|
"#USER",
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
|
"_resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
|
||||||
"_shasum": "4e5491ad1572f2f17a77d388c6c857135b22847a",
|
"_shasum": "4029b0007998a841fbd1032e5f4de86a3c1e3376",
|
||||||
"_spec": "execa",
|
"_spec": "execa@5.0.0",
|
||||||
"_where": "/Users/anton/dev/action",
|
"_where": "/Users/andrei/Projects/forks/deployphp-action",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
@ -33,29 +33,28 @@
|
|||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
"bundleDependencies": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cross-spawn": "^7.0.0",
|
"cross-spawn": "^7.0.3",
|
||||||
"get-stream": "^5.0.0",
|
"get-stream": "^6.0.0",
|
||||||
"human-signals": "^1.1.1",
|
"human-signals": "^2.1.0",
|
||||||
"is-stream": "^2.0.0",
|
"is-stream": "^2.0.0",
|
||||||
"merge-stream": "^2.0.0",
|
"merge-stream": "^2.0.0",
|
||||||
"npm-run-path": "^4.0.0",
|
"npm-run-path": "^4.0.1",
|
||||||
"onetime": "^5.1.0",
|
"onetime": "^5.1.2",
|
||||||
"signal-exit": "^3.0.2",
|
"signal-exit": "^3.0.3",
|
||||||
"strip-final-newline": "^2.0.0"
|
"strip-final-newline": "^2.0.0"
|
||||||
},
|
},
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "Process execution for humans",
|
"description": "Process execution for humans",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.12.18",
|
"@types/node": "^14.14.10",
|
||||||
"ava": "^2.1.0",
|
"ava": "^2.4.0",
|
||||||
"coveralls": "^3.0.9",
|
"get-node": "^11.0.1",
|
||||||
"get-node": "^6.6.0",
|
|
||||||
"is-running": "^2.1.0",
|
"is-running": "^2.1.0",
|
||||||
"nyc": "^14.1.1",
|
"nyc": "^15.1.0",
|
||||||
"p-event": "^4.1.0",
|
"p-event": "^4.2.0",
|
||||||
"tempfile": "^3.0.0",
|
"tempfile": "^3.0.0",
|
||||||
"tsd": "^0.11.0",
|
"tsd": "^0.13.1",
|
||||||
"xo": "^0.25.3"
|
"xo": "^0.35.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
@ -100,5 +99,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "xo && nyc ava && tsd"
|
"test": "xo && nyc ava && tsd"
|
||||||
},
|
},
|
||||||
"version": "4.1.0"
|
"version": "5.0.0"
|
||||||
}
|
}
|
||||||
|
8
node_modules/execa/readme.md
generated
vendored
8
node_modules/execa/readme.md
generated
vendored
@ -1,16 +1,10 @@
|
|||||||
<img src="media/logo.svg" width="400">
|
<img src="media/logo.svg" width="400">
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.com/sindresorhus/execa.svg?branch=master)](https://travis-ci.com/github/sindresorhus/execa) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master)
|
[![Coverage Status](https://codecov.io/gh/sindresorhus/execa/branch/master/graph/badge.svg)](https://codecov.io/gh/sindresorhus/execa)
|
||||||
|
|
||||||
> Process execution for humans
|
> Process execution for humans
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Netlify is looking for a senior/expert Node.js backend engineer to join a fully remote, international, diverse (44% women and non-binary) and friendly team. This is for the team where one of the co-maintainers [@ehmicky](https://github.com/ehmicky) is working. The job description is [here](https://boards.greenhouse.io/netlify/jobs/4832483002).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Why
|
## Why
|
||||||
|
|
||||||
This package improves [`child_process`](https://nodejs.org/api/child_process.html) methods with:
|
This package improves [`child_process`](https://nodejs.org/api/child_process.html) methods with:
|
||||||
|
5
node_modules/get-stream/index.d.ts
generated
vendored
5
node_modules/get-stream/index.d.ts
generated
vendored
@ -74,7 +74,7 @@ declare const getStream: {
|
|||||||
*/
|
*/
|
||||||
buffer(
|
buffer(
|
||||||
stream: Stream,
|
stream: Stream,
|
||||||
options?: getStream.OptionsWithEncoding
|
options?: getStream.Options
|
||||||
): Promise<Buffer>;
|
): Promise<Buffer>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,9 +100,6 @@ declare const getStream: {
|
|||||||
): Promise<string[]>;
|
): Promise<string[]>;
|
||||||
|
|
||||||
MaxBufferError: typeof MaxBufferErrorClass;
|
MaxBufferError: typeof MaxBufferErrorClass;
|
||||||
|
|
||||||
// TODO: Remove this for the next major release
|
|
||||||
default: typeof getStream;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export = getStream;
|
export = getStream;
|
||||||
|
25
node_modules/get-stream/index.js
generated
vendored
25
node_modules/get-stream/index.js
generated
vendored
@ -1,8 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
const {constants: BufferConstants} = require('buffer');
|
const {constants: BufferConstants} = require('buffer');
|
||||||
const pump = require('pump');
|
const stream = require('stream');
|
||||||
|
const {promisify} = require('util');
|
||||||
const bufferStream = require('./buffer-stream');
|
const bufferStream = require('./buffer-stream');
|
||||||
|
|
||||||
|
const streamPipelinePromisified = promisify(stream.pipeline);
|
||||||
|
|
||||||
class MaxBufferError extends Error {
|
class MaxBufferError extends Error {
|
||||||
constructor() {
|
constructor() {
|
||||||
super('maxBuffer exceeded');
|
super('maxBuffer exceeded');
|
||||||
@ -12,7 +15,7 @@ class MaxBufferError extends Error {
|
|||||||
|
|
||||||
async function getStream(inputStream, options) {
|
async function getStream(inputStream, options) {
|
||||||
if (!inputStream) {
|
if (!inputStream) {
|
||||||
return Promise.reject(new Error('Expected a stream'));
|
throw new Error('Expected a stream');
|
||||||
}
|
}
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
@ -21,8 +24,8 @@ async function getStream(inputStream, options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const {maxBuffer} = options;
|
const {maxBuffer} = options;
|
||||||
|
const stream = bufferStream(options);
|
||||||
|
|
||||||
let stream;
|
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
const rejectPromise = error => {
|
const rejectPromise = error => {
|
||||||
// Don't retrieve an oversized buffer.
|
// Don't retrieve an oversized buffer.
|
||||||
@ -33,14 +36,14 @@ async function getStream(inputStream, options) {
|
|||||||
reject(error);
|
reject(error);
|
||||||
};
|
};
|
||||||
|
|
||||||
stream = pump(inputStream, bufferStream(options), error => {
|
(async () => {
|
||||||
if (error) {
|
try {
|
||||||
rejectPromise(error);
|
await streamPipelinePromisified(inputStream, stream);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
} catch (error) {
|
||||||
|
rejectPromise(error);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
stream.on('data', () => {
|
stream.on('data', () => {
|
||||||
if (stream.getBufferedLength() > maxBuffer) {
|
if (stream.getBufferedLength() > maxBuffer) {
|
||||||
@ -53,8 +56,6 @@ async function getStream(inputStream, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = getStream;
|
module.exports = getStream;
|
||||||
// TODO: Remove this for the next major release
|
|
||||||
module.exports.default = getStream;
|
|
||||||
module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
|
module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});
|
||||||
module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
|
module.exports.array = (stream, options) => getStream(stream, {...options, array: true});
|
||||||
module.exports.MaxBufferError = MaxBufferError;
|
module.exports.MaxBufferError = MaxBufferError;
|
||||||
|
33
node_modules/get-stream/package.json
generated
vendored
33
node_modules/get-stream/package.json
generated
vendored
@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"_from": "get-stream@^5.0.0",
|
"_from": "get-stream@^6.0.0",
|
||||||
"_id": "get-stream@5.2.0",
|
"_id": "get-stream@6.0.1",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
|
"_integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
|
||||||
"_location": "/get-stream",
|
"_location": "/get-stream",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "range",
|
"type": "range",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "get-stream@^5.0.0",
|
"raw": "get-stream@^6.0.0",
|
||||||
"name": "get-stream",
|
"name": "get-stream",
|
||||||
"escapedName": "get-stream",
|
"escapedName": "get-stream",
|
||||||
"rawSpec": "^5.0.0",
|
"rawSpec": "^6.0.0",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "^5.0.0"
|
"fetchSpec": "^6.0.0"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/execa"
|
"/execa"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
"_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||||
"_shasum": "4966a1795ee5ace65e706c4b7beb71257d6e22d3",
|
"_shasum": "a262d8eef67aced57c2852ad6167526a43cbf7b7",
|
||||||
"_spec": "get-stream@^5.0.0",
|
"_spec": "get-stream@^6.0.0",
|
||||||
"_where": "/Users/anton/dev/action/node_modules/execa",
|
"_where": "/Users/andrei/Projects/forks/deployphp-action/node_modules/execa",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Sindre Sorhus",
|
"name": "Sindre Sorhus",
|
||||||
"email": "sindresorhus@gmail.com",
|
"email": "sindresorhus@gmail.com",
|
||||||
@ -31,20 +31,17 @@
|
|||||||
"url": "https://github.com/sindresorhus/get-stream/issues"
|
"url": "https://github.com/sindresorhus/get-stream/issues"
|
||||||
},
|
},
|
||||||
"bundleDependencies": false,
|
"bundleDependencies": false,
|
||||||
"dependencies": {
|
|
||||||
"pump": "^3.0.0"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "Get a stream as a string, buffer, or array",
|
"description": "Get a stream as a string, buffer, or array",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.0.7",
|
"@types/node": "^14.0.27",
|
||||||
"ava": "^2.0.0",
|
"ava": "^2.4.0",
|
||||||
"into-stream": "^5.0.0",
|
"into-stream": "^5.0.0",
|
||||||
"tsd": "^0.7.2",
|
"tsd": "^0.13.1",
|
||||||
"xo": "^0.24.0"
|
"xo": "^0.24.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.js",
|
"index.js",
|
||||||
@ -78,5 +75,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "xo && ava && tsd"
|
"test": "xo && ava && tsd"
|
||||||
},
|
},
|
||||||
"version": "5.2.0"
|
"version": "6.0.1"
|
||||||
}
|
}
|
||||||
|
2
node_modules/get-stream/readme.md
generated
vendored
2
node_modules/get-stream/readme.md
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
# get-stream [![Build Status](https://travis-ci.com/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.com/github/sindresorhus/get-stream)
|
# get-stream
|
||||||
|
|
||||||
> Get a stream as a string, buffer, or array
|
> Get a stream as a string, buffer, or array
|
||||||
|
|
||||||
|
11
node_modules/human-signals/CHANGELOG.md
generated
vendored
11
node_modules/human-signals/CHANGELOG.md
generated
vendored
@ -0,0 +1,11 @@
|
|||||||
|
# 2.1.0
|
||||||
|
|
||||||
|
## TypeScript types
|
||||||
|
|
||||||
|
- Add [TypeScript definitions](src/main.d.ts)
|
||||||
|
|
||||||
|
# 2.0.0
|
||||||
|
|
||||||
|
## Breaking changes
|
||||||
|
|
||||||
|
- Minimal supported Node.js version is now `10.17.0`
|
22
node_modules/human-signals/README.md
generated
vendored
22
node_modules/human-signals/README.md
generated
vendored
@ -105,8 +105,8 @@ The list of supported signals
|
|||||||
|
|
||||||
### action
|
### action
|
||||||
|
|
||||||
_Type_: `string`<br>_Enum_: `'terminate'`, `'core'`, `'ignore'`, `'pause'`,
|
_Type_: `string`\
|
||||||
`'unpause'`
|
_Enum_: `'terminate'`, `'core'`, `'ignore'`, `'pause'`, `'unpause'`
|
||||||
|
|
||||||
What is the default action for this signal when it is not handled.
|
What is the default action for this signal when it is not handled.
|
||||||
|
|
||||||
@ -119,7 +119,8 @@ Whether the signal's default action cannot be prevented. This is `true` for
|
|||||||
|
|
||||||
### standard
|
### standard
|
||||||
|
|
||||||
_Type_: `string`<br>_Enum_: `'ansi'`, `'posix'`, `'bsd'`, `'systemv'`, `'other'`
|
_Type_: `string`\
|
||||||
|
_Enum_: `'ansi'`, `'posix'`, `'bsd'`, `'systemv'`, `'other'`
|
||||||
|
|
||||||
Which standard defined that signal.
|
Which standard defined that signal.
|
||||||
|
|
||||||
@ -146,10 +147,19 @@ button (pencil icon) and suggest a correction.
|
|||||||
If you would like to help us fix a bug or add a new feature, please check our
|
If you would like to help us fix a bug or add a new feature, please check our
|
||||||
[guidelines](CONTRIBUTING.md). Pull requests are welcome!
|
[guidelines](CONTRIBUTING.md). Pull requests are welcome!
|
||||||
|
|
||||||
<!-- Thanks go to our wonderful contributors: -->
|
Thanks go to our wonderful contributors:
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-LIST:START -->
|
<!-- ALL-CONTRIBUTORS-LIST:START -->
|
||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore-start -->
|
||||||
<table><tr><td align="center"><a href="https://twitter.com/ehmicky"><img src="https://avatars2.githubusercontent.com/u/8136211?v=4" width="100px;" alt="ehmicky"/><br /><sub><b>ehmicky</b></sub></a><br /><a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Code">💻</a> <a href="#design-ehmicky" title="Design">🎨</a> <a href="#ideas-ehmicky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Documentation">📖</a></td></tr></table>
|
<!-- markdownlint-disable -->
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://twitter.com/ehmicky"><img src="https://avatars2.githubusercontent.com/u/8136211?v=4" width="100px;" alt=""/><br /><sub><b>ehmicky</b></sub></a><br /><a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Code">💻</a> <a href="#design-ehmicky" title="Design">🎨</a> <a href="#ideas-ehmicky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="http://www.electrovir.com"><img src="https://avatars0.githubusercontent.com/u/1205860?v=4" width="100px;" alt=""/><br /><sub><b>electrovir</b></sub></a><br /><a href="https://github.com/ehmicky/human-signals/commits?author=electrovir" title="Code">💻</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- markdownlint-enable -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
52
node_modules/human-signals/build/src/main.d.ts
generated
vendored
Normal file
52
node_modules/human-signals/build/src/main.d.ts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/**
|
||||||
|
* Object whose keys are signal names and values are signal objects.
|
||||||
|
*/
|
||||||
|
export declare const signalsByName: { [signalName: string]: Signal }
|
||||||
|
/**
|
||||||
|
* Object whose keys are signal numbers and values are signal objects.
|
||||||
|
*/
|
||||||
|
export declare const signalsByNumber: { [signalNumber: string]: Signal }
|
||||||
|
|
||||||
|
export declare type SignalAction =
|
||||||
|
| 'terminate'
|
||||||
|
| 'core'
|
||||||
|
| 'ignore'
|
||||||
|
| 'pause'
|
||||||
|
| 'unpause'
|
||||||
|
export declare type SignalStandard =
|
||||||
|
| 'ansi'
|
||||||
|
| 'posix'
|
||||||
|
| 'bsd'
|
||||||
|
| 'systemv'
|
||||||
|
| 'other'
|
||||||
|
|
||||||
|
export declare type Signal = {
|
||||||
|
/**
|
||||||
|
* Standard name of the signal, for example 'SIGINT'.
|
||||||
|
*/
|
||||||
|
name: string
|
||||||
|
/**
|
||||||
|
* Code number of the signal, for example 2. While most number are cross-platform, some are different between different OS.
|
||||||
|
*/
|
||||||
|
number: number
|
||||||
|
/**
|
||||||
|
* Human-friendly description for the signal, for example 'User interruption with CTRL-C'.
|
||||||
|
*/
|
||||||
|
description: string
|
||||||
|
/**
|
||||||
|
* Whether the current OS can handle this signal in Node.js using process.on(name, handler). The list of supported signals is OS-specific.
|
||||||
|
*/
|
||||||
|
supported: boolean
|
||||||
|
/**
|
||||||
|
* What is the default action for this signal when it is not handled.
|
||||||
|
*/
|
||||||
|
action: SignalAction
|
||||||
|
/**
|
||||||
|
* Whether the signal's default action cannot be prevented. This is true for SIGTERM, SIGKILL and SIGSTOP.
|
||||||
|
*/
|
||||||
|
forced: boolean
|
||||||
|
/**
|
||||||
|
* Which standard defined that signal.
|
||||||
|
*/
|
||||||
|
standard: SignalStandard
|
||||||
|
}
|
36
node_modules/human-signals/package.json
generated
vendored
36
node_modules/human-signals/package.json
generated
vendored
@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"_from": "human-signals@^1.1.1",
|
"_from": "human-signals@^2.1.0",
|
||||||
"_id": "human-signals@1.1.1",
|
"_id": "human-signals@2.1.0",
|
||||||
"_inBundle": false,
|
"_inBundle": false,
|
||||||
"_integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==",
|
"_integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
|
||||||
"_location": "/human-signals",
|
"_location": "/human-signals",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"type": "range",
|
"type": "range",
|
||||||
"registry": true,
|
"registry": true,
|
||||||
"raw": "human-signals@^1.1.1",
|
"raw": "human-signals@^2.1.0",
|
||||||
"name": "human-signals",
|
"name": "human-signals",
|
||||||
"escapedName": "human-signals",
|
"escapedName": "human-signals",
|
||||||
"rawSpec": "^1.1.1",
|
"rawSpec": "^2.1.0",
|
||||||
"saveSpec": null,
|
"saveSpec": null,
|
||||||
"fetchSpec": "^1.1.1"
|
"fetchSpec": "^2.1.0"
|
||||||
},
|
},
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/execa"
|
"/execa"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
|
"_resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
||||||
"_shasum": "c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3",
|
"_shasum": "dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0",
|
||||||
"_spec": "human-signals@^1.1.1",
|
"_spec": "human-signals@^2.1.0",
|
||||||
"_where": "/Users/anton/dev/action/node_modules/execa",
|
"_where": "/Users/andrei/Projects/forks/deployphp-action/node_modules/execa",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "ehmicky",
|
"name": "ehmicky",
|
||||||
"email": "ehmicky@gmail.com",
|
"email": "ehmicky@gmail.com",
|
||||||
@ -35,20 +35,19 @@
|
|||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"description": "Human-friendly process signals",
|
"description": "Human-friendly process signals",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ehmicky/dev-tasks": "^0.30.48",
|
"@ehmicky/dev-tasks": "^0.31.9",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.12.0",
|
||||||
"ava": "^2.4.0",
|
"ava": "^3.5.0",
|
||||||
"fast-deep-equal": "^2.0.1",
|
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"husky": "^3.0.9",
|
"husky": "^4.2.3",
|
||||||
"test-each": "^1.7.2"
|
"test-each": "^2.0.0"
|
||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "src",
|
"lib": "src",
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.12.0"
|
"node": ">=10.17.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"build/src",
|
"build/src",
|
||||||
@ -92,5 +91,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "gulp test"
|
"test": "gulp test"
|
||||||
},
|
},
|
||||||
"version": "1.1.1"
|
"types": "build/src/main.d.ts",
|
||||||
|
"version": "2.1.0"
|
||||||
}
|
}
|
||||||
|
15
node_modules/once/LICENSE
generated
vendored
15
node_modules/once/LICENSE
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
79
node_modules/once/README.md
generated
vendored
79
node_modules/once/README.md
generated
vendored
@ -1,79 +0,0 @@
|
|||||||
# once
|
|
||||||
|
|
||||||
Only call a function once.
|
|
||||||
|
|
||||||
## usage
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var once = require('once')
|
|
||||||
|
|
||||||
function load (file, cb) {
|
|
||||||
cb = once(cb)
|
|
||||||
loader.load('file')
|
|
||||||
loader.once('load', cb)
|
|
||||||
loader.once('error', cb)
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Or add to the Function.prototype in a responsible way:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// only has to be done once
|
|
||||||
require('once').proto()
|
|
||||||
|
|
||||||
function load (file, cb) {
|
|
||||||
cb = cb.once()
|
|
||||||
loader.load('file')
|
|
||||||
loader.once('load', cb)
|
|
||||||
loader.once('error', cb)
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Ironically, the prototype feature makes this module twice as
|
|
||||||
complicated as necessary.
|
|
||||||
|
|
||||||
To check whether you function has been called, use `fn.called`. Once the
|
|
||||||
function is called for the first time the return value of the original
|
|
||||||
function is saved in `fn.value` and subsequent calls will continue to
|
|
||||||
return this value.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var once = require('once')
|
|
||||||
|
|
||||||
function load (cb) {
|
|
||||||
cb = once(cb)
|
|
||||||
var stream = createStream()
|
|
||||||
stream.once('data', cb)
|
|
||||||
stream.once('end', function () {
|
|
||||||
if (!cb.called) cb(new Error('not found'))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## `once.strict(func)`
|
|
||||||
|
|
||||||
Throw an error if the function is called twice.
|
|
||||||
|
|
||||||
Some functions are expected to be called only once. Using `once` for them would
|
|
||||||
potentially hide logical errors.
|
|
||||||
|
|
||||||
In the example below, the `greet` function has to call the callback only once:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
function greet (name, cb) {
|
|
||||||
// return is missing from the if statement
|
|
||||||
// when no name is passed, the callback is called twice
|
|
||||||
if (!name) cb('Hello anonymous')
|
|
||||||
cb('Hello ' + name)
|
|
||||||
}
|
|
||||||
|
|
||||||
function log (msg) {
|
|
||||||
console.log(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
// this will print 'Hello anonymous' but the logical error will be missed
|
|
||||||
greet(null, once(msg))
|
|
||||||
|
|
||||||
// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
|
|
||||||
greet(null, once.strict(msg))
|
|
||||||
```
|
|
42
node_modules/once/once.js
generated
vendored
42
node_modules/once/once.js
generated
vendored
@ -1,42 +0,0 @@
|
|||||||
var wrappy = require('wrappy')
|
|
||||||
module.exports = wrappy(once)
|
|
||||||
module.exports.strict = wrappy(onceStrict)
|
|
||||||
|
|
||||||
once.proto = once(function () {
|
|
||||||
Object.defineProperty(Function.prototype, 'once', {
|
|
||||||
value: function () {
|
|
||||||
return once(this)
|
|
||||||
},
|
|
||||||
configurable: true
|
|
||||||
})
|
|
||||||
|
|
||||||
Object.defineProperty(Function.prototype, 'onceStrict', {
|
|
||||||
value: function () {
|
|
||||||
return onceStrict(this)
|
|
||||||
},
|
|
||||||
configurable: true
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
function once (fn) {
|
|
||||||
var f = function () {
|
|
||||||
if (f.called) return f.value
|
|
||||||
f.called = true
|
|
||||||
return f.value = fn.apply(this, arguments)
|
|
||||||
}
|
|
||||||
f.called = false
|
|
||||||
return f
|
|
||||||
}
|
|
||||||
|
|
||||||
function onceStrict (fn) {
|
|
||||||
var f = function () {
|
|
||||||
if (f.called)
|
|
||||||
throw new Error(f.onceError)
|
|
||||||
f.called = true
|
|
||||||
return f.value = fn.apply(this, arguments)
|
|
||||||
}
|
|
||||||
var name = fn.name || 'Function wrapped with `once`'
|
|
||||||
f.onceError = name + " shouldn't be called more than once"
|
|
||||||
f.called = false
|
|
||||||
return f
|
|
||||||
}
|
|
67
node_modules/once/package.json
generated
vendored
67
node_modules/once/package.json
generated
vendored
@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "once@^1.3.1",
|
|
||||||
"_id": "once@1.4.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
|
||||||
"_location": "/once",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "once@^1.3.1",
|
|
||||||
"name": "once",
|
|
||||||
"escapedName": "once",
|
|
||||||
"rawSpec": "^1.3.1",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^1.3.1"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/end-of-stream",
|
|
||||||
"/pump"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
|
||||||
"_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1",
|
|
||||||
"_spec": "once@^1.3.1",
|
|
||||||
"_where": "/Users/anton/dev/action/node_modules/pump",
|
|
||||||
"author": {
|
|
||||||
"name": "Isaac Z. Schlueter",
|
|
||||||
"email": "i@izs.me",
|
|
||||||
"url": "http://blog.izs.me/"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/isaacs/once/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"wrappy": "1"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Run a function exactly one time",
|
|
||||||
"devDependencies": {
|
|
||||||
"tap": "^7.0.1"
|
|
||||||
},
|
|
||||||
"directories": {
|
|
||||||
"test": "test"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"once.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/isaacs/once#readme",
|
|
||||||
"keywords": [
|
|
||||||
"once",
|
|
||||||
"function",
|
|
||||||
"one",
|
|
||||||
"single"
|
|
||||||
],
|
|
||||||
"license": "ISC",
|
|
||||||
"main": "once.js",
|
|
||||||
"name": "once",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/isaacs/once.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "tap test/*.js"
|
|
||||||
},
|
|
||||||
"version": "1.4.0"
|
|
||||||
}
|
|
5
node_modules/pump/.travis.yml
generated
vendored
5
node_modules/pump/.travis.yml
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "0.10"
|
|
||||||
|
|
||||||
script: "npm test"
|
|
21
node_modules/pump/LICENSE
generated
vendored
21
node_modules/pump/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014 Mathias Buus
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
65
node_modules/pump/README.md
generated
vendored
65
node_modules/pump/README.md
generated
vendored
@ -1,65 +0,0 @@
|
|||||||
# pump
|
|
||||||
|
|
||||||
pump is a small node module that pipes streams together and destroys all of them if one of them closes.
|
|
||||||
|
|
||||||
```
|
|
||||||
npm install pump
|
|
||||||
```
|
|
||||||
|
|
||||||
[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump)
|
|
||||||
|
|
||||||
## What problem does it solve?
|
|
||||||
|
|
||||||
When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error.
|
|
||||||
You are also not able to provide a callback to tell when then pipe has finished.
|
|
||||||
|
|
||||||
pump does these two things for you
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Simply pass the streams you want to pipe together to pump and add an optional callback
|
|
||||||
|
|
||||||
``` js
|
|
||||||
var pump = require('pump')
|
|
||||||
var fs = require('fs')
|
|
||||||
|
|
||||||
var source = fs.createReadStream('/dev/random')
|
|
||||||
var dest = fs.createWriteStream('/dev/null')
|
|
||||||
|
|
||||||
pump(source, dest, function(err) {
|
|
||||||
console.log('pipe finished', err)
|
|
||||||
})
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
dest.destroy() // when dest is closed pump will destroy source
|
|
||||||
}, 1000)
|
|
||||||
```
|
|
||||||
|
|
||||||
You can use pump to pipe more than two streams together as well
|
|
||||||
|
|
||||||
``` js
|
|
||||||
var transform = someTransformStream()
|
|
||||||
|
|
||||||
pump(source, transform, anotherTransform, dest, function(err) {
|
|
||||||
console.log('pipe finished', err)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed.
|
|
||||||
|
|
||||||
Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do:
|
|
||||||
|
|
||||||
```
|
|
||||||
return pump(s1, s2) // returns s2
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to return a stream that combines *both* s1 and s2 to a single stream use
|
|
||||||
[pumpify](https://github.com/mafintosh/pumpify) instead.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
|
|
||||||
## Related
|
|
||||||
|
|
||||||
`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
|
|
82
node_modules/pump/index.js
generated
vendored
82
node_modules/pump/index.js
generated
vendored
@ -1,82 +0,0 @@
|
|||||||
var once = require('once')
|
|
||||||
var eos = require('end-of-stream')
|
|
||||||
var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes
|
|
||||||
|
|
||||||
var noop = function () {}
|
|
||||||
var ancient = /^v?\.0/.test(process.version)
|
|
||||||
|
|
||||||
var isFn = function (fn) {
|
|
||||||
return typeof fn === 'function'
|
|
||||||
}
|
|
||||||
|
|
||||||
var isFS = function (stream) {
|
|
||||||
if (!ancient) return false // newer node version do not need to care about fs is a special way
|
|
||||||
if (!fs) return false // browser
|
|
||||||
return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
|
|
||||||
}
|
|
||||||
|
|
||||||
var isRequest = function (stream) {
|
|
||||||
return stream.setHeader && isFn(stream.abort)
|
|
||||||
}
|
|
||||||
|
|
||||||
var destroyer = function (stream, reading, writing, callback) {
|
|
||||||
callback = once(callback)
|
|
||||||
|
|
||||||
var closed = false
|
|
||||||
stream.on('close', function () {
|
|
||||||
closed = true
|
|
||||||
})
|
|
||||||
|
|
||||||
eos(stream, {readable: reading, writable: writing}, function (err) {
|
|
||||||
if (err) return callback(err)
|
|
||||||
closed = true
|
|
||||||
callback()
|
|
||||||
})
|
|
||||||
|
|
||||||
var destroyed = false
|
|
||||||
return function (err) {
|
|
||||||
if (closed) return
|
|
||||||
if (destroyed) return
|
|
||||||
destroyed = true
|
|
||||||
|
|
||||||
if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
|
|
||||||
if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
|
|
||||||
|
|
||||||
if (isFn(stream.destroy)) return stream.destroy()
|
|
||||||
|
|
||||||
callback(err || new Error('stream was destroyed'))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var call = function (fn) {
|
|
||||||
fn()
|
|
||||||
}
|
|
||||||
|
|
||||||
var pipe = function (from, to) {
|
|
||||||
return from.pipe(to)
|
|
||||||
}
|
|
||||||
|
|
||||||
var pump = function () {
|
|
||||||
var streams = Array.prototype.slice.call(arguments)
|
|
||||||
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
|
|
||||||
|
|
||||||
if (Array.isArray(streams[0])) streams = streams[0]
|
|
||||||
if (streams.length < 2) throw new Error('pump requires two streams per minimum')
|
|
||||||
|
|
||||||
var error
|
|
||||||
var destroys = streams.map(function (stream, i) {
|
|
||||||
var reading = i < streams.length - 1
|
|
||||||
var writing = i > 0
|
|
||||||
return destroyer(stream, reading, writing, function (err) {
|
|
||||||
if (!error) error = err
|
|
||||||
if (err) destroys.forEach(call)
|
|
||||||
if (reading) return
|
|
||||||
destroys.forEach(call)
|
|
||||||
callback(error)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return streams.reduce(pipe)
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = pump
|
|
59
node_modules/pump/package.json
generated
vendored
59
node_modules/pump/package.json
generated
vendored
@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "pump@^3.0.0",
|
|
||||||
"_id": "pump@3.0.0",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
|
||||||
"_location": "/pump",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "pump@^3.0.0",
|
|
||||||
"name": "pump",
|
|
||||||
"escapedName": "pump",
|
|
||||||
"rawSpec": "^3.0.0",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "^3.0.0"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/get-stream"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
|
||||||
"_shasum": "b4a2116815bde2f4e1ea602354e8c75565107a64",
|
|
||||||
"_spec": "pump@^3.0.0",
|
|
||||||
"_where": "/Users/anton/dev/action/node_modules/get-stream",
|
|
||||||
"author": {
|
|
||||||
"name": "Mathias Buus Madsen",
|
|
||||||
"email": "mathiasbuus@gmail.com"
|
|
||||||
},
|
|
||||||
"browser": {
|
|
||||||
"fs": false
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/mafintosh/pump/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {
|
|
||||||
"end-of-stream": "^1.1.0",
|
|
||||||
"once": "^1.3.1"
|
|
||||||
},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "pipe streams together and close all of them if one of them closes",
|
|
||||||
"homepage": "https://github.com/mafintosh/pump#readme",
|
|
||||||
"keywords": [
|
|
||||||
"streams",
|
|
||||||
"pipe",
|
|
||||||
"destroy",
|
|
||||||
"callback"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"name": "pump",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git://github.com/mafintosh/pump.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "node test-browser.js && node test-node.js"
|
|
||||||
},
|
|
||||||
"version": "3.0.0"
|
|
||||||
}
|
|
66
node_modules/pump/test-browser.js
generated
vendored
66
node_modules/pump/test-browser.js
generated
vendored
@ -1,66 +0,0 @@
|
|||||||
var stream = require('stream')
|
|
||||||
var pump = require('./index')
|
|
||||||
|
|
||||||
var rs = new stream.Readable()
|
|
||||||
var ws = new stream.Writable()
|
|
||||||
|
|
||||||
rs._read = function (size) {
|
|
||||||
this.push(Buffer(size).fill('abc'))
|
|
||||||
}
|
|
||||||
|
|
||||||
ws._write = function (chunk, encoding, cb) {
|
|
||||||
setTimeout(function () {
|
|
||||||
cb()
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
|
|
||||||
var toHex = function () {
|
|
||||||
var reverse = new (require('stream').Transform)()
|
|
||||||
|
|
||||||
reverse._transform = function (chunk, enc, callback) {
|
|
||||||
reverse.push(chunk.toString('hex'))
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
|
|
||||||
return reverse
|
|
||||||
}
|
|
||||||
|
|
||||||
var wsClosed = false
|
|
||||||
var rsClosed = false
|
|
||||||
var callbackCalled = false
|
|
||||||
|
|
||||||
var check = function () {
|
|
||||||
if (wsClosed && rsClosed && callbackCalled) {
|
|
||||||
console.log('test-browser.js passes')
|
|
||||||
clearTimeout(timeout)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.on('finish', function () {
|
|
||||||
wsClosed = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
rs.on('end', function () {
|
|
||||||
rsClosed = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
|
|
||||||
callbackCalled = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
if (res !== ws) {
|
|
||||||
throw new Error('should return last stream')
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
rs.push(null)
|
|
||||||
rs.emit('close')
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
var timeout = setTimeout(function () {
|
|
||||||
check()
|
|
||||||
throw new Error('timeout')
|
|
||||||
}, 5000)
|
|
53
node_modules/pump/test-node.js
generated
vendored
53
node_modules/pump/test-node.js
generated
vendored
@ -1,53 +0,0 @@
|
|||||||
var pump = require('./index')
|
|
||||||
|
|
||||||
var rs = require('fs').createReadStream('/dev/random')
|
|
||||||
var ws = require('fs').createWriteStream('/dev/null')
|
|
||||||
|
|
||||||
var toHex = function () {
|
|
||||||
var reverse = new (require('stream').Transform)()
|
|
||||||
|
|
||||||
reverse._transform = function (chunk, enc, callback) {
|
|
||||||
reverse.push(chunk.toString('hex'))
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
|
|
||||||
return reverse
|
|
||||||
}
|
|
||||||
|
|
||||||
var wsClosed = false
|
|
||||||
var rsClosed = false
|
|
||||||
var callbackCalled = false
|
|
||||||
|
|
||||||
var check = function () {
|
|
||||||
if (wsClosed && rsClosed && callbackCalled) {
|
|
||||||
console.log('test-node.js passes')
|
|
||||||
clearTimeout(timeout)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ws.on('close', function () {
|
|
||||||
wsClosed = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
rs.on('close', function () {
|
|
||||||
rsClosed = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
var res = pump(rs, toHex(), toHex(), toHex(), ws, function () {
|
|
||||||
callbackCalled = true
|
|
||||||
check()
|
|
||||||
})
|
|
||||||
|
|
||||||
if (res !== ws) {
|
|
||||||
throw new Error('should return last stream')
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
rs.destroy()
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
var timeout = setTimeout(function () {
|
|
||||||
throw new Error('timeout')
|
|
||||||
}, 5000)
|
|
15
node_modules/wrappy/LICENSE
generated
vendored
15
node_modules/wrappy/LICENSE
generated
vendored
@ -1,15 +0,0 @@
|
|||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
36
node_modules/wrappy/README.md
generated
vendored
36
node_modules/wrappy/README.md
generated
vendored
@ -1,36 +0,0 @@
|
|||||||
# wrappy
|
|
||||||
|
|
||||||
Callback wrapping utility
|
|
||||||
|
|
||||||
## USAGE
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
var wrappy = require("wrappy")
|
|
||||||
|
|
||||||
// var wrapper = wrappy(wrapperFunction)
|
|
||||||
|
|
||||||
// make sure a cb is called only once
|
|
||||||
// See also: http://npm.im/once for this specific use case
|
|
||||||
var once = wrappy(function (cb) {
|
|
||||||
var called = false
|
|
||||||
return function () {
|
|
||||||
if (called) return
|
|
||||||
called = true
|
|
||||||
return cb.apply(this, arguments)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function printBoo () {
|
|
||||||
console.log('boo')
|
|
||||||
}
|
|
||||||
// has some rando property
|
|
||||||
printBoo.iAmBooPrinter = true
|
|
||||||
|
|
||||||
var onlyPrintOnce = once(printBoo)
|
|
||||||
|
|
||||||
onlyPrintOnce() // prints 'boo'
|
|
||||||
onlyPrintOnce() // does nothing
|
|
||||||
|
|
||||||
// random property is retained!
|
|
||||||
assert.equal(onlyPrintOnce.iAmBooPrinter, true)
|
|
||||||
```
|
|
58
node_modules/wrappy/package.json
generated
vendored
58
node_modules/wrappy/package.json
generated
vendored
@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"_from": "wrappy@1",
|
|
||||||
"_id": "wrappy@1.0.2",
|
|
||||||
"_inBundle": false,
|
|
||||||
"_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
|
||||||
"_location": "/wrappy",
|
|
||||||
"_phantomChildren": {},
|
|
||||||
"_requested": {
|
|
||||||
"type": "range",
|
|
||||||
"registry": true,
|
|
||||||
"raw": "wrappy@1",
|
|
||||||
"name": "wrappy",
|
|
||||||
"escapedName": "wrappy",
|
|
||||||
"rawSpec": "1",
|
|
||||||
"saveSpec": null,
|
|
||||||
"fetchSpec": "1"
|
|
||||||
},
|
|
||||||
"_requiredBy": [
|
|
||||||
"/once"
|
|
||||||
],
|
|
||||||
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
|
||||||
"_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
|
|
||||||
"_spec": "wrappy@1",
|
|
||||||
"_where": "/Users/anton/dev/action/node_modules/once",
|
|
||||||
"author": {
|
|
||||||
"name": "Isaac Z. Schlueter",
|
|
||||||
"email": "i@izs.me",
|
|
||||||
"url": "http://blog.izs.me/"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/npm/wrappy/issues"
|
|
||||||
},
|
|
||||||
"bundleDependencies": false,
|
|
||||||
"dependencies": {},
|
|
||||||
"deprecated": false,
|
|
||||||
"description": "Callback wrapping utility",
|
|
||||||
"devDependencies": {
|
|
||||||
"tap": "^2.3.1"
|
|
||||||
},
|
|
||||||
"directories": {
|
|
||||||
"test": "test"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"wrappy.js"
|
|
||||||
],
|
|
||||||
"homepage": "https://github.com/npm/wrappy",
|
|
||||||
"license": "ISC",
|
|
||||||
"main": "wrappy.js",
|
|
||||||
"name": "wrappy",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/npm/wrappy.git"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "tap --coverage test/*.js"
|
|
||||||
},
|
|
||||||
"version": "1.0.2"
|
|
||||||
}
|
|
33
node_modules/wrappy/wrappy.js
generated
vendored
33
node_modules/wrappy/wrappy.js
generated
vendored
@ -1,33 +0,0 @@
|
|||||||
// Returns a wrapper function that returns a wrapped callback
|
|
||||||
// The wrapper function should do some stuff, and return a
|
|
||||||
// presumably different callback function.
|
|
||||||
// This makes sure that own properties are retained, so that
|
|
||||||
// decorations and such are not lost along the way.
|
|
||||||
module.exports = wrappy
|
|
||||||
function wrappy (fn, cb) {
|
|
||||||
if (fn && cb) return wrappy(fn)(cb)
|
|
||||||
|
|
||||||
if (typeof fn !== 'function')
|
|
||||||
throw new TypeError('need wrapper function')
|
|
||||||
|
|
||||||
Object.keys(fn).forEach(function (k) {
|
|
||||||
wrapper[k] = fn[k]
|
|
||||||
})
|
|
||||||
|
|
||||||
return wrapper
|
|
||||||
|
|
||||||
function wrapper() {
|
|
||||||
var args = new Array(arguments.length)
|
|
||||||
for (var i = 0; i < args.length; i++) {
|
|
||||||
args[i] = arguments[i]
|
|
||||||
}
|
|
||||||
var ret = fn.apply(this, args)
|
|
||||||
var cb = args[args.length-1]
|
|
||||||
if (typeof ret === 'function' && ret !== cb) {
|
|
||||||
Object.keys(cb).forEach(function (k) {
|
|
||||||
ret[k] = cb[k]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
}
|
|
69
package-lock.json
generated
69
package-lock.json
generated
@ -3,9 +3,9 @@
|
|||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": {
|
"@actions/core": {
|
||||||
"version": "1.2.6",
|
"version": "1.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
|
||||||
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
|
"integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig=="
|
||||||
},
|
},
|
||||||
"argv-split": {
|
"argv-split": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
@ -22,42 +22,31 @@
|
|||||||
"which": "^2.0.1"
|
"which": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"end-of-stream": {
|
|
||||||
"version": "1.4.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
|
|
||||||
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
|
|
||||||
"requires": {
|
|
||||||
"once": "^1.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"execa": {
|
"execa": {
|
||||||
"version": "4.1.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz",
|
||||||
"integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
|
"integrity": "sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cross-spawn": "^7.0.0",
|
"cross-spawn": "^7.0.3",
|
||||||
"get-stream": "^5.0.0",
|
"get-stream": "^6.0.0",
|
||||||
"human-signals": "^1.1.1",
|
"human-signals": "^2.1.0",
|
||||||
"is-stream": "^2.0.0",
|
"is-stream": "^2.0.0",
|
||||||
"merge-stream": "^2.0.0",
|
"merge-stream": "^2.0.0",
|
||||||
"npm-run-path": "^4.0.0",
|
"npm-run-path": "^4.0.1",
|
||||||
"onetime": "^5.1.0",
|
"onetime": "^5.1.2",
|
||||||
"signal-exit": "^3.0.2",
|
"signal-exit": "^3.0.3",
|
||||||
"strip-final-newline": "^2.0.0"
|
"strip-final-newline": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"get-stream": {
|
"get-stream": {
|
||||||
"version": "5.2.0",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||||
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
|
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
|
||||||
"requires": {
|
|
||||||
"pump": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"human-signals": {
|
"human-signals": {
|
||||||
"version": "1.1.1",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
|
||||||
"integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw=="
|
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
|
||||||
},
|
},
|
||||||
"is-stream": {
|
"is-stream": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@ -87,14 +76,6 @@
|
|||||||
"path-key": "^3.0.0"
|
"path-key": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"once": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
|
||||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
|
||||||
"requires": {
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"onetime": {
|
"onetime": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
||||||
@ -108,15 +89,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
||||||
},
|
},
|
||||||
"pump": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
|
||||||
"requires": {
|
|
||||||
"end-of-stream": "^1.1.0",
|
|
||||||
"once": "^1.3.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"shebang-command": {
|
"shebang-command": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||||
@ -147,11 +119,6 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"isexe": "^2.0.0"
|
"isexe": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"wrappy": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.7",
|
||||||
"argv-split": "^2.0.1",
|
"argv-split": "^2.0.1",
|
||||||
"execa": "^4.1.0"
|
"execa": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user