|
|
|
@@ -1544,7 +1544,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
|
|
|
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
|
|
|
|
const command_1 = __nccwpck_require__(7351);
|
|
|
|
|
const file_command_1 = __nccwpck_require__(717);
|
|
|
|
|
const utils_1 = __nccwpck_require__(5278);
|
|
|
|
@@ -1630,6 +1630,21 @@ function getInput(name, options) {
|
|
|
|
|
return val.trim();
|
|
|
|
|
}
|
|
|
|
|
exports.getInput = getInput;
|
|
|
|
|
/**
|
|
|
|
|
* Gets the values of an multiline input. Each value is also trimmed.
|
|
|
|
|
*
|
|
|
|
|
* @param name name of the input to get
|
|
|
|
|
* @param options optional. See InputOptions.
|
|
|
|
|
* @returns string[]
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
function getMultilineInput(name, options) {
|
|
|
|
|
const inputs = getInput(name, options)
|
|
|
|
|
.split('\n')
|
|
|
|
|
.filter(x => x !== '');
|
|
|
|
|
return inputs;
|
|
|
|
|
}
|
|
|
|
|
exports.getMultilineInput = getMultilineInput;
|
|
|
|
|
/**
|
|
|
|
|
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
|
|
|
|
|
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
|
|
|
|
@@ -1877,6 +1892,25 @@ exports.toCommandValue = toCommandValue;
|
|
|
|
|
|
|
|
|
|
"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) {
|
|
|
|
@@ -1886,14 +1920,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.
|
|
|
|
@@ -1919,6 +1948,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
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
@@ -1928,6 +2002,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) {
|
|
|
|
@@ -1937,20 +2030,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';
|
|
|
|
|
/*
|
|
|
|
@@ -2020,11 +2108,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() {
|
|
|
|
@@ -2306,7 +2395,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) {
|
|
|
|
@@ -2320,9 +2409,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) {
|
|
|
|
@@ -2331,14 +2423,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;
|
|
|
|
@@ -2353,7 +2445,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);
|
|
|
|
|
}
|
|
|
|
@@ -2400,7 +2492,7 @@ class ToolRunner extends events.EventEmitter {
|
|
|
|
|
}
|
|
|
|
|
cp.stdin.end(this.options.input);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -2486,7 +2578,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) {
|
|
|
|
@@ -3360,6 +3452,25 @@ exports.checkBypass = checkBypass;
|
|
|
|
|
|
|
|
|
|
"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) {
|
|
|
|
@@ -3369,16 +3480,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;
|
|
|
|
|
};
|
|
|
|
|
var _a;
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
const assert_1 = __nccwpck_require__(2357);
|
|
|
|
|
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
|
|
|
|
const fs = __importStar(__nccwpck_require__(5747));
|
|
|
|
|
const path = __importStar(__nccwpck_require__(5622));
|
|
|
|
|
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
|
|
|
@@ -3421,49 +3525,6 @@ function isRooted(p) {
|
|
|
|
|
return p.startsWith('/');
|
|
|
|
|
}
|
|
|
|
|
exports.isRooted = isRooted;
|
|
|
|
|
/**
|
|
|
|
|
* Recursively create a directory at `fsPath`.
|
|
|
|
|
*
|
|
|
|
|
* This implementation is optimistic, meaning it attempts to create the full
|
|
|
|
|
* path first, and backs up the path stack from there.
|
|
|
|
|
*
|
|
|
|
|
* @param fsPath The path to create
|
|
|
|
|
* @param maxDepth The maximum recursion depth
|
|
|
|
|
* @param depth The current recursion depth
|
|
|
|
|
*/
|
|
|
|
|
function mkdirP(fsPath, maxDepth = 1000, depth = 1) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
assert_1.ok(fsPath, 'a path argument must be provided');
|
|
|
|
|
fsPath = path.resolve(fsPath);
|
|
|
|
|
if (depth >= maxDepth)
|
|
|
|
|
return exports.mkdir(fsPath);
|
|
|
|
|
try {
|
|
|
|
|
yield exports.mkdir(fsPath);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
catch (err) {
|
|
|
|
|
switch (err.code) {
|
|
|
|
|
case 'ENOENT': {
|
|
|
|
|
yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);
|
|
|
|
|
yield exports.mkdir(fsPath);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
default: {
|
|
|
|
|
let stats;
|
|
|
|
|
try {
|
|
|
|
|
stats = yield exports.stat(fsPath);
|
|
|
|
|
}
|
|
|
|
|
catch (err2) {
|
|
|
|
|
throw err;
|
|
|
|
|
}
|
|
|
|
|
if (!stats.isDirectory())
|
|
|
|
|
throw err;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.mkdirP = mkdirP;
|
|
|
|
|
/**
|
|
|
|
|
* Best effort attempt to determine whether a file exists and is executable.
|
|
|
|
|
* @param filePath file path to check
|
|
|
|
@@ -3560,6 +3621,12 @@ function isUnixExecutable(stats) {
|
|
|
|
|
((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||
|
|
|
|
|
((stats.mode & 64) > 0 && stats.uid === process.getuid()));
|
|
|
|
|
}
|
|
|
|
|
// Get the path of cmd.exe in windows
|
|
|
|
|
function getCmdPath() {
|
|
|
|
|
var _a;
|
|
|
|
|
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
|
|
|
|
|
}
|
|
|
|
|
exports.getCmdPath = getCmdPath;
|
|
|
|
|
//# sourceMappingURL=io-util.js.map
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
@@ -3569,6 +3636,25 @@ function isUnixExecutable(stats) {
|
|
|
|
|
|
|
|
|
|
"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) {
|
|
|
|
@@ -3578,19 +3664,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.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
|
|
|
|
|
const assert_1 = __nccwpck_require__(2357);
|
|
|
|
|
const childProcess = __importStar(__nccwpck_require__(3129));
|
|
|
|
|
const path = __importStar(__nccwpck_require__(5622));
|
|
|
|
|
const util_1 = __nccwpck_require__(1669);
|
|
|
|
|
const ioUtil = __importStar(__nccwpck_require__(1962));
|
|
|
|
|
const exec = util_1.promisify(childProcess.exec);
|
|
|
|
|
const execFile = util_1.promisify(childProcess.execFile);
|
|
|
|
|
/**
|
|
|
|
|
* Copies a file or folder.
|
|
|
|
|
* Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
|
|
|
|
@@ -3601,14 +3683,14 @@ const exec = util_1.promisify(childProcess.exec);
|
|
|
|
|
*/
|
|
|
|
|
function cp(source, dest, options = {}) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
const { force, recursive } = readCopyOptions(options);
|
|
|
|
|
const { force, recursive, copySourceDirectory } = readCopyOptions(options);
|
|
|
|
|
const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;
|
|
|
|
|
// Dest is an existing file, but not forcing
|
|
|
|
|
if (destStat && destStat.isFile() && !force) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// If dest is an existing directory, should copy inside.
|
|
|
|
|
const newDest = destStat && destStat.isDirectory()
|
|
|
|
|
const newDest = destStat && destStat.isDirectory() && copySourceDirectory
|
|
|
|
|
? path.join(dest, path.basename(source))
|
|
|
|
|
: dest;
|
|
|
|
|
if (!(yield ioUtil.exists(source))) {
|
|
|
|
@@ -3673,12 +3755,22 @@ function rmRF(inputPath) {
|
|
|
|
|
if (ioUtil.IS_WINDOWS) {
|
|
|
|
|
// Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
|
|
|
|
|
// program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
|
|
|
|
|
// Check for invalid characters
|
|
|
|
|
// https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
|
|
|
|
|
if (/[*"<>|]/.test(inputPath)) {
|
|
|
|
|
throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const cmdPath = ioUtil.getCmdPath();
|
|
|
|
|
if (yield ioUtil.isDirectory(inputPath, true)) {
|
|
|
|
|
yield exec(`rd /s /q "${inputPath}"`);
|
|
|
|
|
yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
|
|
|
|
|
env: { inputPath }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
yield exec(`del /f /a "${inputPath}"`);
|
|
|
|
|
yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
|
|
|
|
|
env: { inputPath }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (err) {
|
|
|
|
@@ -3711,7 +3803,7 @@ function rmRF(inputPath) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isDir) {
|
|
|
|
|
yield exec(`rm -rf "${inputPath}"`);
|
|
|
|
|
yield execFile(`rm`, [`-rf`, `${inputPath}`]);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
yield ioUtil.unlink(inputPath);
|
|
|
|
@@ -3729,7 +3821,8 @@ exports.rmRF = rmRF;
|
|
|
|
|
*/
|
|
|
|
|
function mkdirP(fsPath) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
yield ioUtil.mkdirP(fsPath);
|
|
|
|
|
assert_1.ok(fsPath, 'a path argument must be provided');
|
|
|
|
|
yield ioUtil.mkdir(fsPath, { recursive: true });
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.mkdirP = mkdirP;
|
|
|
|
@@ -3827,7 +3920,10 @@ exports.findInPath = findInPath;
|
|
|
|
|
function readCopyOptions(options) {
|
|
|
|
|
const force = options.force == null ? true : options.force;
|
|
|
|
|
const recursive = Boolean(options.recursive);
|
|
|
|
|
return { force, recursive };
|
|
|
|
|
const copySourceDirectory = options.copySourceDirectory == null
|
|
|
|
|
? true
|
|
|
|
|
: Boolean(options.copySourceDirectory);
|
|
|
|
|
return { force, recursive, copySourceDirectory };
|
|
|
|
|
}
|
|
|
|
|
function cpDirRecursive(sourceDir, destDir, currentDepth, force) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
@@ -3990,8 +4086,9 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const VERSION = "3.4.0";
|
|
|
|
|
const VERSION = "3.5.1";
|
|
|
|
|
|
|
|
|
|
const _excluded = ["authStrategy"];
|
|
|
|
|
class Octokit {
|
|
|
|
|
constructor(options = {}) {
|
|
|
|
|
const hook = new beforeAfterHook.Collection();
|
|
|
|
@@ -4053,7 +4150,7 @@ class Octokit {
|
|
|
|
|
const {
|
|
|
|
|
authStrategy
|
|
|
|
|
} = options,
|
|
|
|
|
otherOptions = _objectWithoutProperties(options, ["authStrategy"]);
|
|
|
|
|
otherOptions = _objectWithoutProperties(options, _excluded);
|
|
|
|
|
|
|
|
|
|
const auth = authStrategy(Object.assign({
|
|
|
|
|
request: this.request,
|
|
|
|
@@ -4495,7 +4592,7 @@ function withDefaults(oldDefaults, newDefaults) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const VERSION = "6.0.11";
|
|
|
|
|
const VERSION = "6.0.12";
|
|
|
|
|
|
|
|
|
|
const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
|
|
|
|
|
// So we use RequestParameters and add method as additional required property.
|
|
|
|
@@ -4532,7 +4629,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
var request = __nccwpck_require__(6234);
|
|
|
|
|
var universalUserAgent = __nccwpck_require__(5030);
|
|
|
|
|
|
|
|
|
|
const VERSION = "4.6.1";
|
|
|
|
|
const VERSION = "4.6.4";
|
|
|
|
|
|
|
|
|
|
class GraphqlError extends Error {
|
|
|
|
|
constructor(request, response) {
|
|
|
|
@@ -4653,7 +4750,60 @@ exports.withCustomRequest = withCustomRequest;
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
|
|
|
|
|
const VERSION = "2.13.3";
|
|
|
|
|
const VERSION = "2.13.5";
|
|
|
|
|
|
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
|
|
|
var keys = Object.keys(object);
|
|
|
|
|
|
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
|
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
|
|
|
|
|
|
|
|
if (enumerableOnly) {
|
|
|
|
|
symbols = symbols.filter(function (sym) {
|
|
|
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
keys.push.apply(keys, symbols);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return keys;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function _objectSpread2(target) {
|
|
|
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
|
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
|
|
|
|
|
|
|
|
if (i % 2) {
|
|
|
|
|
ownKeys(Object(source), true).forEach(function (key) {
|
|
|
|
|
_defineProperty(target, key, source[key]);
|
|
|
|
|
});
|
|
|
|
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
|
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
|
|
|
} else {
|
|
|
|
|
ownKeys(Object(source)).forEach(function (key) {
|
|
|
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return target;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
|
|
|
if (key in obj) {
|
|
|
|
|
Object.defineProperty(obj, key, {
|
|
|
|
|
value: value,
|
|
|
|
|
enumerable: true,
|
|
|
|
|
configurable: true,
|
|
|
|
|
writable: true
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
obj[key] = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Some “list” response that can be paginated have a different response structure
|
|
|
|
@@ -4672,6 +4822,13 @@ const VERSION = "2.13.3";
|
|
|
|
|
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
|
|
|
|
*/
|
|
|
|
|
function normalizePaginatedListResponse(response) {
|
|
|
|
|
// endpoints can respond with 204 if repository is empty
|
|
|
|
|
if (!response.data) {
|
|
|
|
|
return _objectSpread2(_objectSpread2({}, response), {}, {
|
|
|
|
|
data: []
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
|
|
|
|
if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way
|
|
|
|
|
// to retrieve the same information.
|
|
|
|
@@ -4710,6 +4867,8 @@ function iterator(octokit, route, parameters) {
|
|
|
|
|
if (!url) return {
|
|
|
|
|
done: true
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const response = await requestMethod({
|
|
|
|
|
method,
|
|
|
|
|
url,
|
|
|
|
@@ -4723,6 +4882,17 @@ function iterator(octokit, route, parameters) {
|
|
|
|
|
return {
|
|
|
|
|
value: normalizedResponse
|
|
|
|
|
};
|
|
|
|
|
} catch (error) {
|
|
|
|
|
if (error.status !== 409) throw error;
|
|
|
|
|
url = "";
|
|
|
|
|
return {
|
|
|
|
|
value: {
|
|
|
|
|
status: 200,
|
|
|
|
|
headers: {},
|
|
|
|
|
data: []
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
@@ -4805,7 +4975,7 @@ exports.paginatingEndpoints = paginatingEndpoints;
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
|
|
|
|
|
|
const VERSION = "1.0.3";
|
|
|
|
|
const VERSION = "1.0.4";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param octokit Octokit instance
|
|
|
|
@@ -5995,7 +6165,7 @@ const Endpoints = {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const VERSION = "5.3.0";
|
|
|
|
|
const VERSION = "5.3.1";
|
|
|
|
|
|
|
|
|
|
function endpointsToMethods(octokit, endpointsMap) {
|
|
|
|
|
const newMethods = {};
|
|
|
|
@@ -6113,7 +6283,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
|
|
var deprecation = __nccwpck_require__(8932);
|
|
|
|
|
var once = _interopDefault(__nccwpck_require__(1223));
|
|
|
|
|
|
|
|
|
|
const logOnce = once(deprecation => console.warn(deprecation));
|
|
|
|
|
const logOnceCode = once(deprecation => console.warn(deprecation));
|
|
|
|
|
const logOnceHeaders = once(deprecation => console.warn(deprecation));
|
|
|
|
|
/**
|
|
|
|
|
* Error with extra properties to help with debugging
|
|
|
|
|
*/
|
|
|
|
@@ -6130,14 +6301,17 @@ class RequestError extends Error {
|
|
|
|
|
|
|
|
|
|
this.name = "HttpError";
|
|
|
|
|
this.status = statusCode;
|
|
|
|
|
Object.defineProperty(this, "code", {
|
|
|
|
|
get() {
|
|
|
|
|
logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
|
|
|
|
|
return statusCode;
|
|
|
|
|
let headers;
|
|
|
|
|
|
|
|
|
|
if ("headers" in options && typeof options.headers !== "undefined") {
|
|
|
|
|
headers = options.headers;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
this.headers = options.headers || {}; // redact request credentials without mutating original request options
|
|
|
|
|
if ("response" in options) {
|
|
|
|
|
this.response = options.response;
|
|
|
|
|
headers = options.response.headers;
|
|
|
|
|
} // redact request credentials without mutating original request options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const requestCopy = Object.assign({}, options.request);
|
|
|
|
|
|
|
|
|
@@ -6152,7 +6326,22 @@ class RequestError extends Error {
|
|
|
|
|
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
|
|
|
|
|
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
|
|
|
|
|
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
|
|
|
|
|
this.request = requestCopy;
|
|
|
|
|
this.request = requestCopy; // deprecations
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(this, "code", {
|
|
|
|
|
get() {
|
|
|
|
|
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
|
|
|
|
|
return statusCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
Object.defineProperty(this, "headers", {
|
|
|
|
|
get() {
|
|
|
|
|
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
|
|
|
|
|
return headers || {};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -6179,13 +6368,15 @@ var isPlainObject = __nccwpck_require__(3287);
|
|
|
|
|
var nodeFetch = _interopDefault(__nccwpck_require__(467));
|
|
|
|
|
var requestError = __nccwpck_require__(537);
|
|
|
|
|
|
|
|
|
|
const VERSION = "5.4.15";
|
|
|
|
|
const VERSION = "5.6.0";
|
|
|
|
|
|
|
|
|
|
function getBufferResponse(response) {
|
|
|
|
|
return response.arrayBuffer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fetchWrapper(requestOptions) {
|
|
|
|
|
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
|
|
|
|
|
|
|
|
|
|
if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
|
|
|
|
|
requestOptions.body = JSON.stringify(requestOptions.body);
|
|
|
|
|
}
|
|
|
|
@@ -6201,7 +6392,7 @@ function fetchWrapper(requestOptions) {
|
|
|
|
|
redirect: requestOptions.redirect
|
|
|
|
|
}, // `requestOptions.request.agent` type is incompatible
|
|
|
|
|
// see https://github.com/octokit/types.ts/pull/264
|
|
|
|
|
requestOptions.request)).then(response => {
|
|
|
|
|
requestOptions.request)).then(async response => {
|
|
|
|
|
url = response.url;
|
|
|
|
|
status = response.status;
|
|
|
|
|
|
|
|
|
@@ -6209,6 +6400,12 @@ function fetchWrapper(requestOptions) {
|
|
|
|
|
headers[keyAndValue[0]] = keyAndValue[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ("deprecation" in headers) {
|
|
|
|
|
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
|
|
|
|
|
const deprecationLink = matches && matches.pop();
|
|
|
|
|
log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status === 204 || status === 205) {
|
|
|
|
|
return;
|
|
|
|
|
} // GitHub API returns 200 for HEAD requests
|
|
|
|
@@ -6220,38 +6417,59 @@ function fetchWrapper(requestOptions) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw new requestError.RequestError(response.statusText, status, {
|
|
|
|
|
response: {
|
|
|
|
|
url,
|
|
|
|
|
status,
|
|
|
|
|
headers,
|
|
|
|
|
data: undefined
|
|
|
|
|
},
|
|
|
|
|
request: requestOptions
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status === 304) {
|
|
|
|
|
throw new requestError.RequestError("Not modified", status, {
|
|
|
|
|
response: {
|
|
|
|
|
url,
|
|
|
|
|
status,
|
|
|
|
|
headers,
|
|
|
|
|
data: await getResponseData(response)
|
|
|
|
|
},
|
|
|
|
|
request: requestOptions
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (status >= 400) {
|
|
|
|
|
return response.text().then(message => {
|
|
|
|
|
const error = new requestError.RequestError(message, status, {
|
|
|
|
|
const data = await getResponseData(response);
|
|
|
|
|
const error = new requestError.RequestError(toErrorMessage(data), status, {
|
|
|
|
|
response: {
|
|
|
|
|
url,
|
|
|
|
|
status,
|
|
|
|
|
headers,
|
|
|
|
|
data
|
|
|
|
|
},
|
|
|
|
|
request: requestOptions
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
let responseBody = JSON.parse(error.message);
|
|
|
|
|
Object.assign(error, responseBody);
|
|
|
|
|
let errors = responseBody.errors; // Assumption `errors` would always be in Array format
|
|
|
|
|
|
|
|
|
|
error.message = error.message + ": " + errors.map(JSON.stringify).join(", ");
|
|
|
|
|
} catch (e) {// ignore, see octokit/rest.js#684
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw error;
|
|
|
|
|
return getResponseData(response);
|
|
|
|
|
}).then(data => {
|
|
|
|
|
return {
|
|
|
|
|
status,
|
|
|
|
|
url,
|
|
|
|
|
headers,
|
|
|
|
|
data
|
|
|
|
|
};
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
if (error instanceof requestError.RequestError) throw error;
|
|
|
|
|
throw new requestError.RequestError(error.message, 500, {
|
|
|
|
|
request: requestOptions
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function getResponseData(response) {
|
|
|
|
|
const contentType = response.headers.get("content-type");
|
|
|
|
|
|
|
|
|
|
if (/application\/json/.test(contentType)) {
|
|
|
|
@@ -6263,23 +6481,21 @@ function fetchWrapper(requestOptions) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return getBufferResponse(response);
|
|
|
|
|
}).then(data => {
|
|
|
|
|
return {
|
|
|
|
|
status,
|
|
|
|
|
url,
|
|
|
|
|
headers,
|
|
|
|
|
data
|
|
|
|
|
};
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
if (error instanceof requestError.RequestError) {
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
throw new requestError.RequestError(error.message, 500, {
|
|
|
|
|
headers,
|
|
|
|
|
request: requestOptions
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function toErrorMessage(data) {
|
|
|
|
|
if (typeof data === "string") return data; // istanbul ignore else - just in case
|
|
|
|
|
|
|
|
|
|
if ("message" in data) {
|
|
|
|
|
if (Array.isArray(data.errors)) {
|
|
|
|
|
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return data.message;
|
|
|
|
|
} // istanbul ignore next - just in case
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return `Unknown error: ${JSON.stringify(data)}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function withDefaults(oldEndpoint, newDefaults) {
|
|
|
|
@@ -6334,7 +6550,7 @@ var pluginRequestLog = __nccwpck_require__(8883);
|
|
|
|
|
var pluginPaginateRest = __nccwpck_require__(4193);
|
|
|
|
|
var pluginRestEndpointMethods = __nccwpck_require__(3044);
|
|
|
|
|
|
|
|
|
|
const VERSION = "18.5.4";
|
|
|
|
|
const VERSION = "18.6.0";
|
|
|
|
|
|
|
|
|
|
const Octokit = core.Octokit.plugin(pluginRequestLog.requestLog, pluginRestEndpointMethods.legacyRestEndpointMethods, pluginPaginateRest.paginateRest).defaults({
|
|
|
|
|
userAgent: `octokit-rest.js/${VERSION}`
|
|
|
|
@@ -17474,6 +17690,22 @@ module.exports = require("stream");;
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4304:
|
|
|
|
|
/***/ ((module) => {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
module.exports = require("string_decoder");;
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 8213:
|
|
|
|
|
/***/ ((module) => {
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
module.exports = require("timers");;
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 4016:
|
|
|
|
|
/***/ ((module) => {
|
|
|
|
|
|
|
|
|
|