Update node_modules

This commit is contained in:
crazy-max 2020-01-17 09:09:47 +00:00
parent f01f181e25
commit e420bd79d3
21 changed files with 82 additions and 60 deletions

View File

@ -1,7 +0,0 @@
Copyright 2019 GitHub
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.

View File

@ -4,7 +4,7 @@
#### Basic #### Basic
You can use this package to execute your tools on the command line in a cross platform way: You can use this package to execute tools in a cross platform way:
```js ```js
const exec = require('@actions/exec'); const exec = require('@actions/exec');
@ -48,13 +48,10 @@ await exec.exec('node', ['index.js', 'foo=bar'], options);
#### Exec tools not in the PATH #### Exec tools not in the PATH
You can use it in conjunction with the `which` function from `@actions/io` to execute tools that are not in the PATH: You can specify the full path for tools not in the PATH:
```js ```js
const exec = require('@actions/exec'); const exec = require('@actions/exec');
const io = require('@actions/io');
const pythonPath: string = await io.which('python', true) await exec.exec('"/path/to/my-tool"', ['arg1']);
await exec.exec(`"${pythonPath}"`, ['main.py']);
``` ```

View File

@ -12,6 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
const os = require("os"); const os = require("os");
const events = require("events"); const events = require("events");
const child = require("child_process"); const child = require("child_process");
const path = require("path");
const io = require("@actions/io");
const ioUtil = require("@actions/io/lib/io-util");
/* eslint-disable @typescript-eslint/unbound-method */ /* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32'; const IS_WINDOWS = process.platform === 'win32';
/* /*
@ -357,6 +360,16 @@ class ToolRunner extends events.EventEmitter {
*/ */
exec() { exec() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
// root the tool path if it is unrooted and contains relative pathing
if (!ioUtil.isRooted(this.toolPath) &&
(this.toolPath.includes('/') ||
(IS_WINDOWS && this.toolPath.includes('\\')))) {
// prefer options.cwd if it is specified, however options.cwd may also need to be rooted
this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);
}
// if the tool is only a file name, then resolve it from the PATH
// otherwise verify it exists (add extension on Windows if necessary)
this.toolPath = yield io.which(this.toolPath, true);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this._debug(`exec tool: ${this.toolPath}`); this._debug(`exec tool: ${this.toolPath}`);
this._debug('arguments:'); this._debug('arguments:');

File diff suppressed because one or more lines are too long

View File

@ -1,41 +1,41 @@
{ {
"_args": [ "_args": [
[ [
"@actions/exec@1.0.1", "@actions/exec@1.0.3",
"/home/runner/work/ghaction-upx/ghaction-upx" "/home/runner/work/ghaction-upx/ghaction-upx"
] ]
], ],
"_from": "@actions/exec@1.0.1", "_from": "@actions/exec@1.0.3",
"_id": "@actions/exec@1.0.1", "_id": "@actions/exec@1.0.3",
"_inBundle": false, "_inBundle": false,
"_integrity": "sha512-nvFkxwiicvpzNiCBF4wFBDfnBvi7xp/as7LE1hBxBxKG2L29+gkIPBiLKMVORL+Hg3JNf07AKRfl0V5djoypjQ==", "_integrity": "sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==",
"_location": "/@actions/exec", "_location": "/@actions/exec",
"_phantomChildren": {}, "_phantomChildren": {},
"_requested": { "_requested": {
"type": "version", "type": "version",
"registry": true, "registry": true,
"raw": "@actions/exec@1.0.1", "raw": "@actions/exec@1.0.3",
"name": "@actions/exec", "name": "@actions/exec",
"escapedName": "@actions%2fexec", "escapedName": "@actions%2fexec",
"scope": "@actions", "scope": "@actions",
"rawSpec": "1.0.1", "rawSpec": "1.0.3",
"saveSpec": null, "saveSpec": null,
"fetchSpec": "1.0.1" "fetchSpec": "1.0.3"
}, },
"_requiredBy": [ "_requiredBy": [
"/", "/",
"/@actions/tool-cache" "/@actions/tool-cache"
], ],
"_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.1.tgz", "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.3.tgz",
"_spec": "1.0.1", "_spec": "1.0.3",
"_where": "/home/runner/work/ghaction-upx/ghaction-upx", "_where": "/home/runner/work/ghaction-upx/ghaction-upx",
"bugs": { "bugs": {
"url": "https://github.com/actions/toolkit/issues" "url": "https://github.com/actions/toolkit/issues"
}, },
"description": "Actions exec lib", "dependencies": {
"devDependencies": {
"@actions/io": "^1.0.1" "@actions/io": "^1.0.1"
}, },
"description": "Actions exec lib",
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@ -43,7 +43,6 @@
"files": [ "files": [
"lib" "lib"
], ],
"gitHead": "a2ab4bcf78e4f7080f0d45856e6eeba16f0bbc52",
"homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec",
"keywords": [ "keywords": [
"github", "github",
@ -58,11 +57,14 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/actions/toolkit.git" "url": "git+https://github.com/actions/toolkit.git",
"directory": "packages/exec"
}, },
"scripts": { "scripts": {
"audit-moderate": "npm install && npm audit --audit-level=moderate",
"test": "echo \"Error: run tests from root\" && exit 1", "test": "echo \"Error: run tests from root\" && exit 1",
"tsc": "tsc" "tsc": "tsc"
}, },
"version": "1.0.1" "types": "lib/exec.d.ts",
"version": "1.0.3"
} }

View File

@ -23,6 +23,7 @@
"fetchSpec": "1.0.2" "fetchSpec": "1.0.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/@actions/exec",
"/@actions/tool-cache" "/@actions/tool-cache"
], ],
"_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz",

View File

@ -22,8 +22,8 @@
"fetchSpec": "1.0.2" "fetchSpec": "1.0.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/readable-stream", "/jest/verror",
"/verror" "/readable-stream"
], ],
"_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"_spec": "1.0.2", "_spec": "1.0.2",

View File

@ -22,8 +22,9 @@
"fetchSpec": "0.2.0" "fetchSpec": "0.2.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/query-string", "/jest-circus/source-map-resolve",
"/source-map-resolve" "/jest/source-map-resolve",
"/query-string"
], ],
"_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"_spec": "0.2.0", "_spec": "0.2.0",

View File

@ -22,7 +22,8 @@
"fetchSpec": "1.4.1" "fetchSpec": "1.4.1"
}, },
"_requiredBy": [ "_requiredBy": [
"/pump", "/jest-circus/pump",
"/jest/pump",
"/tar-stream" "/tar-stream"
], ],
"_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",

View File

@ -22,7 +22,9 @@
"fetchSpec": "1.0.5" "fetchSpec": "1.0.5"
}, },
"_requiredBy": [ "_requiredBy": [
"/chalk", "/@types/jest/chalk",
"/jest-circus/chalk",
"/jest/chalk",
"/strip-outer", "/strip-outer",
"/trim-repeated" "/trim-repeated"
], ],

View File

@ -22,16 +22,22 @@
"fetchSpec": "4.2.2" "fetchSpec": "4.2.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/@jest/core",
"/@jest/source-map",
"/@jest/transform",
"/decompress", "/decompress",
"/jest-haste-map", "/jest-circus/@jest/source-map",
"/jest-runner", "/jest-circus/@jest/transform",
"/jest-runtime", "/jest-circus/jest-haste-map",
"/jest-util", "/jest-circus/jest-util",
"/load-json-file", "/jest-circus/load-json-file",
"/write-file-atomic" "/jest-circus/write-file-atomic",
"/jest/@jest/core",
"/jest/@jest/source-map",
"/jest/@jest/transform",
"/jest/jest-haste-map",
"/jest/jest-runner",
"/jest/jest-runtime",
"/jest/jest-util",
"/jest/load-json-file",
"/jest/write-file-atomic"
], ],
"_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz",
"_spec": "4.2.2", "_spec": "4.2.2",

3
node_modules/inherits/package.json generated vendored
View File

@ -23,7 +23,8 @@
}, },
"_requiredBy": [ "_requiredBy": [
"/from2", "/from2",
"/glob", "/jest-circus/glob",
"/jest/glob",
"/readable-stream" "/readable-stream"
], ],
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",

5
node_modules/isarray/package.json generated vendored
View File

@ -22,8 +22,9 @@
"fetchSpec": "1.0.0" "fetchSpec": "1.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/readable-stream", "/jest-circus/unset-value/has-value/isobject",
"/unset-value/has-value/isobject" "/jest/unset-value/has-value/isobject",
"/readable-stream"
], ],
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"_spec": "1.0.0", "_spec": "1.0.0",

9
node_modules/once/package.json generated vendored
View File

@ -23,9 +23,12 @@
}, },
"_requiredBy": [ "_requiredBy": [
"/end-of-stream", "/end-of-stream",
"/glob", "/jest-circus/glob",
"/inflight", "/jest-circus/inflight",
"/pump" "/jest-circus/pump",
"/jest/glob",
"/jest/inflight",
"/jest/pump"
], ],
"_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"_spec": "1.4.0", "_spec": "1.4.0",

View File

@ -22,7 +22,8 @@
"fetchSpec": "1.0.0" "fetchSpec": "1.0.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/execa", "/jest-circus/execa",
"/jest/execa",
"/p-timeout" "/p-timeout"
], ],
"_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "_resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",

8
node_modules/pify/package.json generated vendored
View File

@ -24,10 +24,12 @@
"_requiredBy": [ "_requiredBy": [
"/download", "/download",
"/got", "/got",
"/load-json-file", "/jest-circus/load-json-file",
"/jest-circus/path-type",
"/jest/load-json-file",
"/jest/path-type",
"/make-dir", "/make-dir",
"/npm-conf", "/npm-conf"
"/path-type"
], ],
"_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"_spec": "3.0.0", "_spec": "3.0.0",

View File

@ -24,7 +24,6 @@
"_requiredBy": [ "_requiredBy": [
"/bl", "/bl",
"/got", "/got",
"/request",
"/tunnel-agent" "/tunnel-agent"
], ],
"_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",

4
node_modules/semver/package.json generated vendored
View File

@ -22,9 +22,7 @@
"fetchSpec": "6.3.0" "fetchSpec": "6.3.0"
}, },
"_requiredBy": [ "_requiredBy": [
"/@actions/tool-cache", "/@actions/tool-cache"
"/istanbul-lib-instrument",
"/jest-snapshot"
], ],
"_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "_resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"_spec": "6.3.0", "_spec": "6.3.0",

View File

@ -23,7 +23,7 @@
}, },
"_requiredBy": [ "_requiredBy": [
"/caw", "/caw",
"/request" "/jest/request"
], ],
"_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"_spec": "0.6.0", "_spec": "0.6.0",

2
node_modules/uuid/package.json generated vendored
View File

@ -23,7 +23,7 @@
}, },
"_requiredBy": [ "_requiredBy": [
"/@actions/tool-cache", "/@actions/tool-cache",
"/request" "/jest/request"
], ],
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
"_spec": "3.3.3", "_spec": "3.3.3",

3
node_modules/wrappy/package.json generated vendored
View File

@ -22,7 +22,8 @@
"fetchSpec": "1.0.2" "fetchSpec": "1.0.2"
}, },
"_requiredBy": [ "_requiredBy": [
"/inflight", "/jest-circus/inflight",
"/jest/inflight",
"/once" "/once"
], ],
"_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",