mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Add osRelease to BaseState
This commit is contained in:
144
lib/entry-points.js
generated
144
lib/entry-points.js
generated
@@ -117,11 +117,11 @@ var require_command = __commonJS({
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.issueCommand = issueCommand;
|
||||
exports2.issue = issue;
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var utils_1 = require_utils();
|
||||
function issueCommand(command, properties, message) {
|
||||
const cmd = new Command(command, properties, message);
|
||||
process.stdout.write(cmd.toString() + os7.EOL);
|
||||
process.stdout.write(cmd.toString() + os8.EOL);
|
||||
}
|
||||
function issue(name, message = "") {
|
||||
issueCommand(name, {}, message);
|
||||
@@ -214,7 +214,7 @@ var require_file_command = __commonJS({
|
||||
exports2.prepareKeyValueMessage = prepareKeyValueMessage;
|
||||
var crypto3 = __importStar2(require("crypto"));
|
||||
var fs33 = __importStar2(require("fs"));
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var utils_1 = require_utils();
|
||||
function issueFileCommand(command, message) {
|
||||
const filePath = process.env[`GITHUB_${command}`];
|
||||
@@ -224,7 +224,7 @@ var require_file_command = __commonJS({
|
||||
if (!fs33.existsSync(filePath)) {
|
||||
throw new Error(`Missing file at path: ${filePath}`);
|
||||
}
|
||||
fs33.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, {
|
||||
fs33.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os8.EOL}`, {
|
||||
encoding: "utf8"
|
||||
});
|
||||
}
|
||||
@@ -237,7 +237,7 @@ var require_file_command = __commonJS({
|
||||
if (convertedValue.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
return `${key}<<${delimiter}${os7.EOL}${convertedValue}${os7.EOL}${delimiter}`;
|
||||
return `${key}<<${delimiter}${os8.EOL}${convertedValue}${os8.EOL}${delimiter}`;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -20895,7 +20895,7 @@ var require_toolrunner = __commonJS({
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.ToolRunner = void 0;
|
||||
exports2.argStringToArray = argStringToArray;
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var events = __importStar2(require("events"));
|
||||
var child = __importStar2(require("child_process"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
@@ -20950,12 +20950,12 @@ var require_toolrunner = __commonJS({
|
||||
_processLineBuffer(data, strBuffer, onLine) {
|
||||
try {
|
||||
let s = strBuffer + data.toString();
|
||||
let n = s.indexOf(os7.EOL);
|
||||
let n = s.indexOf(os8.EOL);
|
||||
while (n > -1) {
|
||||
const line = s.substring(0, n);
|
||||
onLine(line);
|
||||
s = s.substring(n + os7.EOL.length);
|
||||
n = s.indexOf(os7.EOL);
|
||||
s = s.substring(n + os8.EOL.length);
|
||||
n = s.indexOf(os8.EOL);
|
||||
}
|
||||
return s;
|
||||
} catch (err) {
|
||||
@@ -21124,7 +21124,7 @@ var require_toolrunner = __commonJS({
|
||||
}
|
||||
const optionsNonNull = this._cloneExecOptions(this.options);
|
||||
if (!optionsNonNull.silent && optionsNonNull.outStream) {
|
||||
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os7.EOL);
|
||||
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os8.EOL);
|
||||
}
|
||||
const state = new ExecState(optionsNonNull, this.toolPath);
|
||||
state.on("debug", (message) => {
|
||||
@@ -21665,7 +21665,7 @@ var require_core = __commonJS({
|
||||
var command_1 = require_command();
|
||||
var file_command_1 = require_file_command();
|
||||
var utils_1 = require_utils();
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
var oidc_utils_1 = require_oidc_utils();
|
||||
var ExitCode;
|
||||
@@ -21727,7 +21727,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
if (filePath) {
|
||||
return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value));
|
||||
}
|
||||
process.stdout.write(os7.EOL);
|
||||
process.stdout.write(os8.EOL);
|
||||
(0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value));
|
||||
}
|
||||
function setCommandEcho(enabled) {
|
||||
@@ -21753,7 +21753,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
(0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
function info8(message) {
|
||||
process.stdout.write(message + os7.EOL);
|
||||
process.stdout.write(message + os8.EOL);
|
||||
}
|
||||
function startGroup3(name) {
|
||||
(0, command_1.issue)("group", name);
|
||||
@@ -26831,8 +26831,8 @@ var require_semver = __commonJS({
|
||||
}
|
||||
// preminor will bump the version up to the next minor release, and immediately
|
||||
// down to pre-release. premajor and prepatch work the same way.
|
||||
inc(release2, identifier, identifierBase) {
|
||||
if (release2.startsWith("pre")) {
|
||||
inc(release3, identifier, identifierBase) {
|
||||
if (release3.startsWith("pre")) {
|
||||
if (!identifier && identifierBase === false) {
|
||||
throw new Error("invalid increment argument: identifier is empty");
|
||||
}
|
||||
@@ -26843,7 +26843,7 @@ var require_semver = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (release2) {
|
||||
switch (release3) {
|
||||
case "premajor":
|
||||
this.prerelease.length = 0;
|
||||
this.patch = 0;
|
||||
@@ -26935,7 +26935,7 @@ var require_semver = __commonJS({
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new Error(`invalid increment argument: ${release2}`);
|
||||
throw new Error(`invalid increment argument: ${release3}`);
|
||||
}
|
||||
this.raw = this.format();
|
||||
if (this.build.length) {
|
||||
@@ -27001,7 +27001,7 @@ var require_inc = __commonJS({
|
||||
"node_modules/semver/functions/inc.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var SemVer = require_semver();
|
||||
var inc = (version, release2, options, identifier, identifierBase) => {
|
||||
var inc = (version, release3, options, identifier, identifierBase) => {
|
||||
if (typeof options === "string") {
|
||||
identifierBase = identifier;
|
||||
identifier = options;
|
||||
@@ -27011,7 +27011,7 @@ var require_inc = __commonJS({
|
||||
return new SemVer(
|
||||
version instanceof SemVer ? version.version : version,
|
||||
options
|
||||
).inc(release2, identifier, identifierBase).version;
|
||||
).inc(release3, identifier, identifierBase).version;
|
||||
} catch (er) {
|
||||
return null;
|
||||
}
|
||||
@@ -32746,7 +32746,7 @@ var require_internal_pattern = __commonJS({
|
||||
};
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.Pattern = void 0;
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
var pathHelper = __importStar2(require_internal_path_helper());
|
||||
var assert_1 = __importDefault2(require("assert"));
|
||||
@@ -32839,7 +32839,7 @@ var require_internal_pattern = __commonJS({
|
||||
if (pattern === "." || pattern.startsWith(`.${path30.sep}`)) {
|
||||
pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1);
|
||||
} else if (pattern === "~" || pattern.startsWith(`~${path30.sep}`)) {
|
||||
homedir2 = homedir2 || os7.homedir();
|
||||
homedir2 = homedir2 || os8.homedir();
|
||||
(0, assert_1.default)(homedir2, "Unable to determine HOME directory");
|
||||
(0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`);
|
||||
pattern = _Pattern.globEscape(homedir2) + pattern.substr(1);
|
||||
@@ -33731,8 +33731,8 @@ var require_semver3 = __commonJS({
|
||||
}
|
||||
} while (++i2);
|
||||
};
|
||||
SemVer.prototype.inc = function(release2, identifier) {
|
||||
switch (release2) {
|
||||
SemVer.prototype.inc = function(release3, identifier) {
|
||||
switch (release3) {
|
||||
case "premajor":
|
||||
this.prerelease.length = 0;
|
||||
this.patch = 0;
|
||||
@@ -33808,20 +33808,20 @@ var require_semver3 = __commonJS({
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error("invalid increment argument: " + release2);
|
||||
throw new Error("invalid increment argument: " + release3);
|
||||
}
|
||||
this.format();
|
||||
this.raw = this.version;
|
||||
return this;
|
||||
};
|
||||
exports2.inc = inc;
|
||||
function inc(version, release2, loose, identifier) {
|
||||
function inc(version, release3, loose, identifier) {
|
||||
if (typeof loose === "string") {
|
||||
identifier = loose;
|
||||
loose = void 0;
|
||||
}
|
||||
try {
|
||||
return new SemVer(version, loose).inc(release2, identifier).version;
|
||||
return new SemVer(version, loose).inc(release3, identifier).version;
|
||||
} catch (er) {
|
||||
return null;
|
||||
}
|
||||
@@ -37957,7 +37957,7 @@ var require_has_flag = __commonJS({
|
||||
var require_supports_color = __commonJS({
|
||||
"node_modules/supports-color/index.js"(exports2, module2) {
|
||||
"use strict";
|
||||
var os7 = require("os");
|
||||
var os8 = require("os");
|
||||
var tty = require("tty");
|
||||
var hasFlag = require_has_flag();
|
||||
var { env } = process;
|
||||
@@ -38005,7 +38005,7 @@ var require_supports_color = __commonJS({
|
||||
return min;
|
||||
}
|
||||
if (process.platform === "win32") {
|
||||
const osRelease = os7.release().split(".");
|
||||
const osRelease = os8.release().split(".");
|
||||
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
||||
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
||||
}
|
||||
@@ -106348,12 +106348,12 @@ var require_manifest = __commonJS({
|
||||
exports2._readLinuxVersionFile = _readLinuxVersionFile;
|
||||
var semver11 = __importStar2(require_semver2());
|
||||
var core_1 = require_core();
|
||||
var os7 = require("os");
|
||||
var os8 = require("os");
|
||||
var cp = require("child_process");
|
||||
var fs33 = require("fs");
|
||||
function _findMatch(versionSpec, stable, candidates, archFilter) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
const platFilter = os7.platform();
|
||||
const platFilter = os8.platform();
|
||||
let result;
|
||||
let match2;
|
||||
let file;
|
||||
@@ -106389,7 +106389,7 @@ var require_manifest = __commonJS({
|
||||
});
|
||||
}
|
||||
function _getOsVersion() {
|
||||
const plat = os7.platform();
|
||||
const plat = os8.platform();
|
||||
let version = "";
|
||||
if (plat === "darwin") {
|
||||
version = cp.execSync("sw_vers -productVersion").toString();
|
||||
@@ -106626,7 +106626,7 @@ var require_tool_cache = __commonJS({
|
||||
var crypto3 = __importStar2(require("crypto"));
|
||||
var fs33 = __importStar2(require("fs"));
|
||||
var mm = __importStar2(require_manifest());
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
var httpm = __importStar2(require_lib());
|
||||
var semver11 = __importStar2(require_semver2());
|
||||
@@ -106903,7 +106903,7 @@ var require_tool_cache = __commonJS({
|
||||
function cacheDir2(sourceDir, tool, version, arch2) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
version = semver11.clean(version) || version;
|
||||
arch2 = arch2 || os7.arch();
|
||||
arch2 = arch2 || os8.arch();
|
||||
core29.debug(`Caching tool ${tool} ${version} ${arch2}`);
|
||||
core29.debug(`source dir: ${sourceDir}`);
|
||||
if (!fs33.statSync(sourceDir).isDirectory()) {
|
||||
@@ -106921,7 +106921,7 @@ var require_tool_cache = __commonJS({
|
||||
function cacheFile(sourceFile, targetFile, tool, version, arch2) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
version = semver11.clean(version) || version;
|
||||
arch2 = arch2 || os7.arch();
|
||||
arch2 = arch2 || os8.arch();
|
||||
core29.debug(`Caching tool ${tool} ${version} ${arch2}`);
|
||||
core29.debug(`source file: ${sourceFile}`);
|
||||
if (!fs33.statSync(sourceFile).isFile()) {
|
||||
@@ -106942,7 +106942,7 @@ var require_tool_cache = __commonJS({
|
||||
if (!versionSpec) {
|
||||
throw new Error("versionSpec parameter is required");
|
||||
}
|
||||
arch2 = arch2 || os7.arch();
|
||||
arch2 = arch2 || os8.arch();
|
||||
if (!isExplicitVersion(versionSpec)) {
|
||||
const localVersions = findAllVersions2(toolName, arch2);
|
||||
const match2 = evaluateVersions(localVersions, versionSpec);
|
||||
@@ -106964,7 +106964,7 @@ var require_tool_cache = __commonJS({
|
||||
}
|
||||
function findAllVersions2(toolName, arch2) {
|
||||
const versions = [];
|
||||
arch2 = arch2 || os7.arch();
|
||||
arch2 = arch2 || os8.arch();
|
||||
const toolPath = path30.join(_getCacheDirectory(), toolName);
|
||||
if (fs33.existsSync(toolPath)) {
|
||||
const children = fs33.readdirSync(toolPath);
|
||||
@@ -107014,7 +107014,7 @@ var require_tool_cache = __commonJS({
|
||||
});
|
||||
}
|
||||
function findFromManifest(versionSpec_1, stable_1, manifest_1) {
|
||||
return __awaiter2(this, arguments, void 0, function* (versionSpec, stable, manifest, archFilter = os7.arch()) {
|
||||
return __awaiter2(this, arguments, void 0, function* (versionSpec, stable, manifest, archFilter = os8.arch()) {
|
||||
const match2 = yield mm._findMatch(versionSpec, stable, manifest, archFilter);
|
||||
return match2;
|
||||
});
|
||||
@@ -128052,9 +128052,9 @@ globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) retur
|
||||
Wt.LRUCache = void 0;
|
||||
var er = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, as = /* @__PURE__ */ new Set(), ge = typeof process == "object" && process ? process : {}, ls = (n, t, e, s) => {
|
||||
typeof ge.emitWarning == "function" ? ge.emitWarning(n, t, e, s) : console.error(`[${e}] ${t}: ${n}`);
|
||||
}, Lt = globalThis.AbortController, os7 = globalThis.AbortSignal;
|
||||
}, Lt = globalThis.AbortController, os8 = globalThis.AbortSignal;
|
||||
if (typeof Lt > "u") {
|
||||
os7 = class {
|
||||
os8 = class {
|
||||
onabort;
|
||||
_onabort = [];
|
||||
reason;
|
||||
@@ -128066,7 +128066,7 @@ globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) retur
|
||||
constructor() {
|
||||
t();
|
||||
}
|
||||
signal = new os7();
|
||||
signal = new os8();
|
||||
abort(e) {
|
||||
if (!this.signal.aborted) {
|
||||
this.signal.reason = e, this.signal.aborted = true;
|
||||
@@ -143023,11 +143023,11 @@ var require_command2 = __commonJS({
|
||||
};
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.issue = exports2.issueCommand = void 0;
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var utils_1 = require_utils11();
|
||||
function issueCommand(command, properties, message) {
|
||||
const cmd = new Command(command, properties, message);
|
||||
process.stdout.write(cmd.toString() + os7.EOL);
|
||||
process.stdout.write(cmd.toString() + os8.EOL);
|
||||
}
|
||||
exports2.issueCommand = issueCommand;
|
||||
function issue(name, message = "") {
|
||||
@@ -143111,7 +143111,7 @@ var require_file_command2 = __commonJS({
|
||||
exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0;
|
||||
var crypto3 = __importStar2(require("crypto"));
|
||||
var fs33 = __importStar2(require("fs"));
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var utils_1 = require_utils11();
|
||||
function issueFileCommand(command, message) {
|
||||
const filePath = process.env[`GITHUB_${command}`];
|
||||
@@ -143121,7 +143121,7 @@ var require_file_command2 = __commonJS({
|
||||
if (!fs33.existsSync(filePath)) {
|
||||
throw new Error(`Missing file at path: ${filePath}`);
|
||||
}
|
||||
fs33.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os7.EOL}`, {
|
||||
fs33.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os8.EOL}`, {
|
||||
encoding: "utf8"
|
||||
});
|
||||
}
|
||||
@@ -143135,7 +143135,7 @@ var require_file_command2 = __commonJS({
|
||||
if (convertedValue.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
return `${key}<<${delimiter}${os7.EOL}${convertedValue}${os7.EOL}${delimiter}`;
|
||||
return `${key}<<${delimiter}${os8.EOL}${convertedValue}${os8.EOL}${delimiter}`;
|
||||
}
|
||||
exports2.prepareKeyValueMessage = prepareKeyValueMessage;
|
||||
}
|
||||
@@ -144864,7 +144864,7 @@ var require_toolrunner2 = __commonJS({
|
||||
};
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.argStringToArray = exports2.ToolRunner = void 0;
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var events = __importStar2(require("events"));
|
||||
var child = __importStar2(require("child_process"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
@@ -144919,12 +144919,12 @@ var require_toolrunner2 = __commonJS({
|
||||
_processLineBuffer(data, strBuffer, onLine) {
|
||||
try {
|
||||
let s = strBuffer + data.toString();
|
||||
let n = s.indexOf(os7.EOL);
|
||||
let n = s.indexOf(os8.EOL);
|
||||
while (n > -1) {
|
||||
const line = s.substring(0, n);
|
||||
onLine(line);
|
||||
s = s.substring(n + os7.EOL.length);
|
||||
n = s.indexOf(os7.EOL);
|
||||
s = s.substring(n + os8.EOL.length);
|
||||
n = s.indexOf(os8.EOL);
|
||||
}
|
||||
return s;
|
||||
} catch (err) {
|
||||
@@ -145093,7 +145093,7 @@ var require_toolrunner2 = __commonJS({
|
||||
}
|
||||
const optionsNonNull = this._cloneExecOptions(this.options);
|
||||
if (!optionsNonNull.silent && optionsNonNull.outStream) {
|
||||
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os7.EOL);
|
||||
optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os8.EOL);
|
||||
}
|
||||
const state = new ExecState(optionsNonNull, this.toolPath);
|
||||
state.on("debug", (message) => {
|
||||
@@ -145581,7 +145581,7 @@ var require_core3 = __commonJS({
|
||||
var command_1 = require_command2();
|
||||
var file_command_1 = require_file_command2();
|
||||
var utils_1 = require_utils11();
|
||||
var os7 = __importStar2(require("os"));
|
||||
var os8 = __importStar2(require("os"));
|
||||
var path30 = __importStar2(require("path"));
|
||||
var oidc_utils_1 = require_oidc_utils2();
|
||||
var ExitCode;
|
||||
@@ -145649,7 +145649,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
if (filePath) {
|
||||
return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value));
|
||||
}
|
||||
process.stdout.write(os7.EOL);
|
||||
process.stdout.write(os8.EOL);
|
||||
(0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value));
|
||||
}
|
||||
exports2.setOutput = setOutput7;
|
||||
@@ -145683,7 +145683,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
}
|
||||
exports2.notice = notice;
|
||||
function info8(message) {
|
||||
process.stdout.write(message + os7.EOL);
|
||||
process.stdout.write(message + os8.EOL);
|
||||
}
|
||||
exports2.info = info8;
|
||||
function startGroup3(name) {
|
||||
@@ -145882,15 +145882,15 @@ var require_upload_specification = __commonJS({
|
||||
var require_tmp = __commonJS({
|
||||
"node_modules/tmp/lib/tmp.js"(exports2, module2) {
|
||||
var fs33 = require("fs");
|
||||
var os7 = require("os");
|
||||
var os8 = require("os");
|
||||
var path30 = require("path");
|
||||
var crypto3 = require("crypto");
|
||||
var _c2 = { fs: fs33.constants, os: os7.constants };
|
||||
var _c2 = { fs: fs33.constants, os: os8.constants };
|
||||
var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
var TEMPLATE_PATTERN = /XXXXXX/;
|
||||
var DEFAULT_TRIES = 3;
|
||||
var CREATE_FLAGS = (_c2.O_CREAT || _c2.fs.O_CREAT) | (_c2.O_EXCL || _c2.fs.O_EXCL) | (_c2.O_RDWR || _c2.fs.O_RDWR);
|
||||
var IS_WIN32 = os7.platform() === "win32";
|
||||
var IS_WIN32 = os8.platform() === "win32";
|
||||
var EBADF = _c2.EBADF || _c2.os.errno.EBADF;
|
||||
var ENOENT = _c2.ENOENT || _c2.os.errno.ENOENT;
|
||||
var DIR_MODE = 448;
|
||||
@@ -146229,10 +146229,10 @@ var require_tmp = __commonJS({
|
||||
_gracefulCleanup = true;
|
||||
}
|
||||
function _getTmpDir(options, cb) {
|
||||
return fs33.realpath(options && options.tmpdir || os7.tmpdir(), cb);
|
||||
return fs33.realpath(options && options.tmpdir || os8.tmpdir(), cb);
|
||||
}
|
||||
function _getTmpDirSync(options) {
|
||||
return fs33.realpathSync(options && options.tmpdir || os7.tmpdir());
|
||||
return fs33.realpathSync(options && options.tmpdir || os8.tmpdir());
|
||||
}
|
||||
process.addListener(EXIT, _garbageCollector);
|
||||
Object.defineProperty(module2.exports, "tmpdir", {
|
||||
@@ -166088,6 +166088,7 @@ var import_perf_hooks6 = require("perf_hooks");
|
||||
var core14 = __toESM(require_core());
|
||||
|
||||
// src/action-common.ts
|
||||
var os4 = __toESM(require("os"));
|
||||
var core9 = __toESM(require_core());
|
||||
|
||||
// src/actions-util.ts
|
||||
@@ -171759,6 +171760,7 @@ async function runInActions(action) {
|
||||
startedAt,
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
osRelease: os4.release(),
|
||||
logger: logger2,
|
||||
env,
|
||||
actions: actionsEnv
|
||||
@@ -175955,7 +175957,7 @@ function inferCompressionMethod(tarPath) {
|
||||
|
||||
// src/tools-download.ts
|
||||
var fs14 = __toESM(require("fs"));
|
||||
var os4 = __toESM(require("os"));
|
||||
var os5 = __toESM(require("os"));
|
||||
var path12 = __toESM(require("path"));
|
||||
var import_perf_hooks3 = require("perf_hooks");
|
||||
var core11 = __toESM(require_core());
|
||||
@@ -176094,7 +176096,7 @@ function getToolcacheDirectory(version) {
|
||||
return path12.join(
|
||||
getToolcacheToolDirectory(getEnv()),
|
||||
getToolcacheVersionDirectoryName(version),
|
||||
os4.arch() || ""
|
||||
os5.arch() || ""
|
||||
);
|
||||
}
|
||||
function isToolcacheOnWorkspaceFilesystem(logger2) {
|
||||
@@ -176221,12 +176223,12 @@ async function getCodeQLBundleDownloadURL(tagName, apiDetails, codeQLBundleName,
|
||||
}
|
||||
const [repositoryOwner, repositoryName] = repository.split("/");
|
||||
try {
|
||||
const release2 = await getApiClient().rest.repos.getReleaseByTag({
|
||||
const release3 = await getApiClient().rest.repos.getReleaseByTag({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
tag: tagName
|
||||
});
|
||||
for (const asset of release2.data.assets) {
|
||||
for (const asset of release3.data.assets) {
|
||||
if (asset.name === codeQLBundleName) {
|
||||
logger2.info(
|
||||
`Found CodeQL bundle ${codeQLBundleName} in ${repository} on ${apiURL} with URL ${asset.url}.`
|
||||
@@ -176896,14 +176898,14 @@ async function getLatestNightlyBundle(action, rawLanguages, otherLanguagePacksRe
|
||||
isLatestNightly: true
|
||||
});
|
||||
try {
|
||||
const release2 = await getApiClient().rest.repos.listReleases({
|
||||
const release3 = await getApiClient().rest.repos.listReleases({
|
||||
owner: CODEQL_NIGHTLIES_REPOSITORY_OWNER,
|
||||
repo: CODEQL_NIGHTLIES_REPOSITORY_NAME,
|
||||
per_page: 1,
|
||||
page: 1,
|
||||
prerelease: true
|
||||
});
|
||||
const latestRelease = release2.data[0];
|
||||
const latestRelease = release3.data[0];
|
||||
if (!latestRelease) {
|
||||
throw new Error("Could not find the latest nightly release.");
|
||||
}
|
||||
@@ -177702,7 +177704,7 @@ async function runAutobuild(config, language, logger2) {
|
||||
}
|
||||
|
||||
// src/dependency-caching.ts
|
||||
var os5 = __toESM(require("os"));
|
||||
var os6 = __toESM(require("os"));
|
||||
var import_path3 = require("path");
|
||||
var actionsCache4 = __toESM(require_cache4());
|
||||
var glob = __toESM(require_glob());
|
||||
@@ -177714,9 +177716,9 @@ function getJavaTempDependencyDir() {
|
||||
async function getJavaDependencyDirs() {
|
||||
return [
|
||||
// Maven
|
||||
(0, import_path3.join)(os5.homedir(), ".m2", "repository"),
|
||||
(0, import_path3.join)(os6.homedir(), ".m2", "repository"),
|
||||
// Gradle
|
||||
(0, import_path3.join)(os5.homedir(), ".gradle", "caches"),
|
||||
(0, import_path3.join)(os6.homedir(), ".gradle", "caches"),
|
||||
// CodeQL Java build-mode: none
|
||||
getJavaTempDependencyDir()
|
||||
];
|
||||
@@ -177727,7 +177729,7 @@ function getCsharpTempDependencyDir() {
|
||||
async function getCsharpDependencyDirs(codeql, features) {
|
||||
const dirs = [
|
||||
// Nuget
|
||||
(0, import_path3.join)(os5.homedir(), ".nuget", "packages")
|
||||
(0, import_path3.join)(os6.homedir(), ".nuget", "packages")
|
||||
];
|
||||
if (await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */, codeql)) {
|
||||
dirs.push(getCsharpTempDependencyDir());
|
||||
@@ -177782,7 +177784,7 @@ var defaultCacheConfigs = {
|
||||
getHashPatterns: getCsharpHashPatterns
|
||||
},
|
||||
go: {
|
||||
getDependencyPaths: async () => [(0, import_path3.join)(os5.homedir(), "go", "pkg", "mod")],
|
||||
getDependencyPaths: async () => [(0, import_path3.join)(os6.homedir(), "go", "pkg", "mod")],
|
||||
getHashPatterns: async () => internal.makePatternCheck(["**/go.sum"])
|
||||
}
|
||||
};
|
||||
@@ -185382,7 +185384,7 @@ var ZipArchive = class extends Archiver {
|
||||
|
||||
// src/artifact-scanner.ts
|
||||
var fs26 = __toESM(require("fs"));
|
||||
var os6 = __toESM(require("os"));
|
||||
var os7 = __toESM(require("os"));
|
||||
var path22 = __toESM(require("path"));
|
||||
var exec = __toESM(require_exec());
|
||||
var GITHUB_PAT_CLASSIC_PATTERN = {
|
||||
@@ -185586,7 +185588,7 @@ async function scanArtifactsForTokens(filesToScan, logger2) {
|
||||
scannedFiles: 0,
|
||||
findings: []
|
||||
};
|
||||
const tempScanDir = fs26.mkdtempSync(path22.join(os6.tmpdir(), "artifact-scan-"));
|
||||
const tempScanDir = fs26.mkdtempSync(path22.join(os7.tmpdir(), "artifact-scan-"));
|
||||
try {
|
||||
for (const filePath of filesToScan) {
|
||||
const stats = fs26.statSync(filePath);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import * as os from "os";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
|
||||
import { ActionsEnv, getActionsEnv } from "./actions-util";
|
||||
@@ -23,6 +25,8 @@ export interface BaseState {
|
||||
platform: NodeJS.Platform;
|
||||
/** The architecture of the host. */
|
||||
arch: NodeJS.Architecture;
|
||||
/** The version of the operating system. */
|
||||
osRelease: string;
|
||||
}
|
||||
|
||||
/** Describes different state features that an Action may have. */
|
||||
@@ -173,6 +177,7 @@ export async function runInActions(action: Action) {
|
||||
startedAt,
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
osRelease: os.release(),
|
||||
logger,
|
||||
env,
|
||||
actions: actionsEnv,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { TextDecoder } from "node:util";
|
||||
import * as os from "os";
|
||||
import path from "path";
|
||||
|
||||
import * as github from "@actions/github";
|
||||
@@ -232,6 +233,7 @@ export function initAllState(
|
||||
startedAt: new Date(),
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
osRelease: os.release(),
|
||||
logger: new RecordingLogger(),
|
||||
env,
|
||||
actions: getTestActionsEnv(env),
|
||||
|
||||
Reference in New Issue
Block a user