Bump @actions/exec from 1.0.4 to 1.1.0 (#152)
* Bump @actions/exec from 1.0.4 to 1.1.0 Bumps [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec) from 1.0.4 to 1.1.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/@actions/core@1.1.0/packages/exec) --- updated-dependencies: - dependency-name: "@actions/exec" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update generated content Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
80513f63a6
commit
8e7a38741f
137
dist/index.js
generated
vendored
137
dist/index.js
generated
vendored
|
@ -903,6 +903,25 @@ exports.toCommandProperties = toCommandProperties;
|
|||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
|
@ -912,14 +931,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getExecOutput = exports.exec = void 0;
|
||||
const string_decoder_1 = __nccwpck_require__(4304);
|
||||
const tr = __importStar(__nccwpck_require__(8159));
|
||||
/**
|
||||
* Exec a command.
|
||||
|
@ -945,6 +959,51 @@ function exec(commandLine, args, options) {
|
|||
});
|
||||
}
|
||||
exports.exec = exec;
|
||||
/**
|
||||
* Exec a command and get the output.
|
||||
* Output will be streamed to the live console.
|
||||
* Returns promise with the exit code and collected stdout and stderr
|
||||
*
|
||||
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
|
||||
* @param args optional arguments for tool. Escaping is handled by the lib.
|
||||
* @param options optional exec options. See ExecOptions
|
||||
* @returns Promise<ExecOutput> exit code, stdout, and stderr
|
||||
*/
|
||||
function getExecOutput(commandLine, args, options) {
|
||||
var _a, _b;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
//Using string decoder covers the case where a mult-byte character is split
|
||||
const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');
|
||||
const stderrDecoder = new string_decoder_1.StringDecoder('utf8');
|
||||
const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;
|
||||
const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;
|
||||
const stdErrListener = (data) => {
|
||||
stderr += stderrDecoder.write(data);
|
||||
if (originalStdErrListener) {
|
||||
originalStdErrListener(data);
|
||||
}
|
||||
};
|
||||
const stdOutListener = (data) => {
|
||||
stdout += stdoutDecoder.write(data);
|
||||
if (originalStdoutListener) {
|
||||
originalStdoutListener(data);
|
||||
}
|
||||
};
|
||||
const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });
|
||||
const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));
|
||||
//flush any remaining characters
|
||||
stdout += stdoutDecoder.end();
|
||||
stderr += stderrDecoder.end();
|
||||
return {
|
||||
exitCode,
|
||||
stdout,
|
||||
stderr
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.getExecOutput = getExecOutput;
|
||||
//# sourceMappingURL=exec.js.map
|
||||
|
||||
/***/ }),
|
||||
|
@ -954,6 +1013,25 @@ exports.exec = exec;
|
|||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
|
@ -963,20 +1041,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.argStringToArray = exports.ToolRunner = void 0;
|
||||
const os = __importStar(__nccwpck_require__(2087));
|
||||
const events = __importStar(__nccwpck_require__(8614));
|
||||
const child = __importStar(__nccwpck_require__(3129));
|
||||
const path = __importStar(__nccwpck_require__(5622));
|
||||
const io = __importStar(__nccwpck_require__(7436));
|
||||
const ioUtil = __importStar(__nccwpck_require__(1962));
|
||||
const timers_1 = __nccwpck_require__(8213);
|
||||
/* eslint-disable @typescript-eslint/unbound-method */
|
||||
const IS_WINDOWS = process.platform === 'win32';
|
||||
/*
|
||||
|
@ -1046,11 +1119,12 @@ class ToolRunner extends events.EventEmitter {
|
|||
s = s.substring(n + os.EOL.length);
|
||||
n = s.indexOf(os.EOL);
|
||||
}
|
||||
strBuffer = s;
|
||||
return s;
|
||||
}
|
||||
catch (err) {
|
||||
// streaming lines to console is best effort. Don't fail a build.
|
||||
this._debug(`error processing line. Failed with error ${err}`);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
_getSpawnFileName() {
|
||||
|
@ -1332,7 +1406,7 @@ class ToolRunner extends events.EventEmitter {
|
|||
// 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) => __awaiter(this, void 0, void 0, function* () {
|
||||
this._debug(`exec tool: ${this.toolPath}`);
|
||||
this._debug('arguments:');
|
||||
for (const arg of this.args) {
|
||||
|
@ -1346,9 +1420,12 @@ class ToolRunner extends events.EventEmitter {
|
|||
state.on('debug', (message) => {
|
||||
this._debug(message);
|
||||
});
|
||||
if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {
|
||||
return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
|
||||
}
|
||||
const fileName = this._getSpawnFileName();
|
||||
const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
|
||||
const stdbuffer = '';
|
||||
let stdbuffer = '';
|
||||
if (cp.stdout) {
|
||||
cp.stdout.on('data', (data) => {
|
||||
if (this.options.listeners && this.options.listeners.stdout) {
|
||||
|
@ -1357,14 +1434,14 @@ class ToolRunner extends events.EventEmitter {
|
|||
if (!optionsNonNull.silent && optionsNonNull.outStream) {
|
||||
optionsNonNull.outStream.write(data);
|
||||
}
|
||||
this._processLineBuffer(data, stdbuffer, (line) => {
|
||||
stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
|
||||
if (this.options.listeners && this.options.listeners.stdline) {
|
||||
this.options.listeners.stdline(line);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
const errbuffer = '';
|
||||
let errbuffer = '';
|
||||
if (cp.stderr) {
|
||||
cp.stderr.on('data', (data) => {
|
||||
state.processStderr = true;
|
||||
|
@ -1379,7 +1456,7 @@ class ToolRunner extends events.EventEmitter {
|
|||
: optionsNonNull.outStream;
|
||||
s.write(data);
|
||||
}
|
||||
this._processLineBuffer(data, errbuffer, (line) => {
|
||||
errbuffer = this._processLineBuffer(data, errbuffer, (line) => {
|
||||
if (this.options.listeners && this.options.listeners.errline) {
|
||||
this.options.listeners.errline(line);
|
||||
}
|
||||
|
@ -1426,7 +1503,7 @@ class ToolRunner extends events.EventEmitter {
|
|||
}
|
||||
cp.stdin.end(this.options.input);
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1512,7 +1589,7 @@ class ExecState extends events.EventEmitter {
|
|||
this._setResult();
|
||||
}
|
||||
else if (this.processExited) {
|
||||
this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);
|
||||
this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
|
||||
}
|
||||
}
|
||||
_debug(message) {
|
||||
|
@ -5484,6 +5561,22 @@ module.exports = require("stream");;
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4304:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("string_decoder");;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8213:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("timers");;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 1669:
|
||||
/***/ ((module) => {
|
||||
|
||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
9
dist/licenses.txt
generated
vendored
9
dist/licenses.txt
generated
vendored
|
@ -12,6 +12,15 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
|
||||
@actions/exec
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
||||
|
||||
@actions/io
|
||||
MIT
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.5.0",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"@actions/exec": "^1.1.0",
|
||||
"addressparser": "^1.0.1",
|
||||
"fs-extra": "^10.0.0"
|
||||
},
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -12,12 +12,12 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/exec@npm:^1.0.4":
|
||||
version: 1.0.4
|
||||
resolution: "@actions/exec@npm:1.0.4"
|
||||
"@actions/exec@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "@actions/exec@npm:1.1.0"
|
||||
dependencies:
|
||||
"@actions/io": ^1.0.1
|
||||
checksum: 909d0b4b342ced9d9e754fee47f82eeb4fe52779baedf9651a392d684c9f141abe864b46a8f290e8a2bf52ca545d99d1300df93b6597d3fd788c7ea6a002a67d
|
||||
checksum: 1fad630ec2ca02438e0c05a9596f375edb3b04de50bf8cd712d6b79aec9f3cc3a175836d3ea610667e32431e7749cb93d8f4dec4947a48e29a720cfc3220216c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -356,7 +356,7 @@ __metadata:
|
|||
resolution: "github-pages@workspace:."
|
||||
dependencies:
|
||||
"@actions/core": ^1.5.0
|
||||
"@actions/exec": ^1.0.4
|
||||
"@actions/exec": ^1.1.0
|
||||
"@actions/io": ^1.1.0
|
||||
"@types/fs-extra": ^9.0.11
|
||||
"@types/node": ^15.3.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user