mirror of
https://github.com/github/codeql-action.git
synced 2026-05-31 19:04:43 +00:00
Add repo property to override codeql-cli version
This commit is contained in:
Generated
+278
-86
@@ -3842,18 +3842,18 @@ var require_webidl = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context3) {
|
||||
const plural = context3.types.length === 1 ? "" : " one of";
|
||||
const message = `${context3.argument} could not be converted to${plural}: ${context3.types.join(", ")}.`;
|
||||
webidl.errors.conversionFailed = function(context4) {
|
||||
const plural = context4.types.length === 1 ? "" : " one of";
|
||||
const message = `${context4.argument} could not be converted to${plural}: ${context4.types.join(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context3.prefix,
|
||||
header: context4.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
webidl.errors.invalidArgument = function(context4) {
|
||||
return webidl.errors.exception({
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
header: context4.prefix,
|
||||
message: `"${context4.value}" is an invalid ${context4.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -9849,17 +9849,17 @@ var require_api_request = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context4, responseHeaders, highWaterMark } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -9896,7 +9896,7 @@ var require_api_request = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body: res,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10065,17 +10065,17 @@ var require_api_stream = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context3, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context4, callback, responseHeaders } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -10103,7 +10103,7 @@ var require_api_stream = __commonJS({
|
||||
statusCode,
|
||||
headers,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
|
||||
throw new InvalidReturnValueError("expected Writable");
|
||||
@@ -10295,7 +10295,7 @@ var require_api_pipeline = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
const { ret, res } = this;
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
@@ -10304,10 +10304,10 @@ var require_api_pipeline = __commonJS({
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
assert(!ret.destroyed);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context3 } = this;
|
||||
const { opaque, handler: handler2, context: context4 } = this;
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -10325,7 +10325,7 @@ var require_api_pipeline = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -10409,7 +10409,7 @@ var require_api_upgrade = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
@@ -10423,7 +10423,7 @@ var require_api_upgrade = __commonJS({
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
assert(statusCode === 101);
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
const { callback, opaque, context: context4 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -10431,7 +10431,7 @@ var require_api_upgrade = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -10500,20 +10500,20 @@ var require_api_connect = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
const { callback, opaque, context: context4 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -10525,7 +10525,7 @@ var require_api_connect = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -24840,18 +24840,18 @@ var require_webidl2 = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context3) {
|
||||
const plural = context3.types.length === 1 ? "" : " one of";
|
||||
const message = `${context3.argument} could not be converted to${plural}: ${context3.types.join(", ")}.`;
|
||||
webidl.errors.conversionFailed = function(context4) {
|
||||
const plural = context4.types.length === 1 ? "" : " one of";
|
||||
const message = `${context4.argument} could not be converted to${plural}: ${context4.types.join(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context3.prefix,
|
||||
header: context4.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
webidl.errors.invalidArgument = function(context4) {
|
||||
return webidl.errors.exception({
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
header: context4.prefix,
|
||||
message: `"${context4.value}" is an invalid ${context4.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -30847,17 +30847,17 @@ var require_api_request2 = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context4, responseHeaders, highWaterMark } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -30894,7 +30894,7 @@ var require_api_request2 = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body: res,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -31063,17 +31063,17 @@ var require_api_stream2 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context3, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context4, callback, responseHeaders } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -31101,7 +31101,7 @@ var require_api_stream2 = __commonJS({
|
||||
statusCode,
|
||||
headers,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
|
||||
throw new InvalidReturnValueError("expected Writable");
|
||||
@@ -31293,7 +31293,7 @@ var require_api_pipeline2 = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
const { ret, res } = this;
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
@@ -31302,10 +31302,10 @@ var require_api_pipeline2 = __commonJS({
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
assert(!ret.destroyed);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context3 } = this;
|
||||
const { opaque, handler: handler2, context: context4 } = this;
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -31323,7 +31323,7 @@ var require_api_pipeline2 = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -31407,7 +31407,7 @@ var require_api_upgrade2 = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
@@ -31421,7 +31421,7 @@ var require_api_upgrade2 = __commonJS({
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
assert(statusCode === 101);
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
const { callback, opaque, context: context4 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -31429,7 +31429,7 @@ var require_api_upgrade2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -31498,20 +31498,20 @@ var require_api_connect2 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context3;
|
||||
this.context = context4;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
const { callback, opaque, context: context4 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -31523,7 +31523,7 @@ var require_api_connect2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -40178,8 +40178,8 @@ function isDefined(value) {
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
function getValues(context4, operator, key, modifier) {
|
||||
var value = context4[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
@@ -40243,7 +40243,7 @@ function parseUrl(template) {
|
||||
expand: expand.bind(null, template)
|
||||
};
|
||||
}
|
||||
function expand(template, context3) {
|
||||
function expand(template, context4) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -40257,7 +40257,7 @@ function expand(template, context3) {
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues(context4, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -52177,14 +52177,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context3 = {};
|
||||
for (var p in contextIn) context3[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context3.access[p] = contextIn.access[p];
|
||||
context3.addInitializer = function(f) {
|
||||
var context4 = {};
|
||||
for (var p in contextIn) context4[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context4.access[p] = contextIn.access[p];
|
||||
context4.addInitializer = function(f) {
|
||||
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
||||
extraInitializers.push(accept(f || null));
|
||||
};
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context4);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
@@ -52911,19 +52911,19 @@ var require_logger = __commonJS({
|
||||
logger: clientLogger
|
||||
};
|
||||
}
|
||||
var context3 = createLoggerContext({
|
||||
var context4 = createLoggerContext({
|
||||
logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL",
|
||||
namespace: "typeSpecRuntime"
|
||||
});
|
||||
exports2.TypeSpecRuntimeLogger = context3.logger;
|
||||
exports2.TypeSpecRuntimeLogger = context4.logger;
|
||||
function setLogLevel(logLevel) {
|
||||
context3.setLogLevel(logLevel);
|
||||
context4.setLogLevel(logLevel);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context3.getLogLevel();
|
||||
return context4.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context3.createClientLogger(namespace);
|
||||
return context4.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57169,19 +57169,19 @@ var require_commonjs2 = __commonJS({
|
||||
exports2.getLogLevel = getLogLevel;
|
||||
exports2.createClientLogger = createClientLogger;
|
||||
var logger_1 = require_internal();
|
||||
var context3 = (0, logger_1.createLoggerContext)({
|
||||
var context4 = (0, logger_1.createLoggerContext)({
|
||||
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
||||
namespace: "azure"
|
||||
});
|
||||
exports2.AzureLogger = context3.logger;
|
||||
exports2.AzureLogger = context4.logger;
|
||||
function setLogLevel(level) {
|
||||
context3.setLogLevel(level);
|
||||
context4.setLogLevel(level);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context3.getLogLevel();
|
||||
return context4.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context3.createClientLogger(namespace);
|
||||
return context4.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -58091,14 +58091,14 @@ var require_tracingContext = __commonJS({
|
||||
namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace")
|
||||
};
|
||||
function createTracingContext(options = {}) {
|
||||
let context3 = new TracingContextImpl(options.parentContext);
|
||||
let context4 = new TracingContextImpl(options.parentContext);
|
||||
if (options.span) {
|
||||
context3 = context3.setValue(exports2.knownContextKeys.span, options.span);
|
||||
context4 = context4.setValue(exports2.knownContextKeys.span, options.span);
|
||||
}
|
||||
if (options.namespace) {
|
||||
context3 = context3.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
context4 = context4.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
}
|
||||
return context3;
|
||||
return context4;
|
||||
}
|
||||
var TracingContextImpl = class _TracingContextImpl {
|
||||
_contextMap;
|
||||
@@ -58236,8 +58236,8 @@ var require_tracingClient = __commonJS({
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
function withContext(context3, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context3, callback, ...callbackArgs);
|
||||
function withContext(context4, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context4, callback, ...callbackArgs);
|
||||
}
|
||||
function parseTraceparentHeader(traceparentHeader) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader);
|
||||
@@ -100250,7 +100250,7 @@ var require_follow_redirects = __commonJS({
|
||||
if (this._ending) {
|
||||
throw new WriteAfterEndError();
|
||||
}
|
||||
if (!isString2(data) && !isBuffer(data)) {
|
||||
if (!isString3(data) && !isBuffer(data)) {
|
||||
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
||||
}
|
||||
if (isFunction(encoding)) {
|
||||
@@ -100508,7 +100508,7 @@ var require_follow_redirects = __commonJS({
|
||||
function request2(input, options, callback) {
|
||||
if (isURL(input)) {
|
||||
input = spreadUrlObject(input);
|
||||
} else if (isString2(input)) {
|
||||
} else if (isString3(input)) {
|
||||
input = spreadUrlObject(parseUrl2(input));
|
||||
} else {
|
||||
callback = options;
|
||||
@@ -100524,7 +100524,7 @@ var require_follow_redirects = __commonJS({
|
||||
maxBodyLength: exports3.maxBodyLength
|
||||
}, input, options);
|
||||
options.nativeProtocols = nativeProtocols;
|
||||
if (!isString2(options.host) && !isString2(options.hostname)) {
|
||||
if (!isString3(options.host) && !isString3(options.hostname)) {
|
||||
options.hostname = "::1";
|
||||
}
|
||||
assert.equal(options.protocol, protocol, "protocol mismatch");
|
||||
@@ -100551,7 +100551,7 @@ var require_follow_redirects = __commonJS({
|
||||
parsed = new URL2(input);
|
||||
} else {
|
||||
parsed = validateUrl(url.parse(input));
|
||||
if (!isString2(parsed.protocol)) {
|
||||
if (!isString3(parsed.protocol)) {
|
||||
throw new InvalidUrlError({ input });
|
||||
}
|
||||
}
|
||||
@@ -100623,14 +100623,14 @@ var require_follow_redirects = __commonJS({
|
||||
request2.destroy(error3);
|
||||
}
|
||||
function isSubdomain(subdomain, domain) {
|
||||
assert(isString2(subdomain) && isString2(domain));
|
||||
assert(isString3(subdomain) && isString3(domain));
|
||||
var dot = subdomain.length - domain.length - 1;
|
||||
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
||||
}
|
||||
function isArray(value) {
|
||||
return value instanceof Array;
|
||||
}
|
||||
function isString2(value) {
|
||||
function isString3(value) {
|
||||
return typeof value === "string" || value instanceof String;
|
||||
}
|
||||
function isFunction(value) {
|
||||
@@ -103631,6 +103631,36 @@ async function asyncSome(array, predicate) {
|
||||
const results = await Promise.all(array.map(predicate));
|
||||
return results.some((result) => result);
|
||||
}
|
||||
var Success = class {
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
value;
|
||||
isSuccess() {
|
||||
return true;
|
||||
}
|
||||
isFailure() {
|
||||
return false;
|
||||
}
|
||||
orElse(_defaultValue) {
|
||||
return this.value;
|
||||
}
|
||||
};
|
||||
var Failure = class {
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
value;
|
||||
isSuccess() {
|
||||
return false;
|
||||
}
|
||||
isFailure() {
|
||||
return true;
|
||||
}
|
||||
orElse(defaultValue) {
|
||||
return defaultValue;
|
||||
}
|
||||
};
|
||||
|
||||
// src/actions-util.ts
|
||||
var getRequiredInput = function(name) {
|
||||
@@ -103973,6 +104003,12 @@ async function getAnalysisKey() {
|
||||
core5.exportVariable("CODEQL_ACTION_ANALYSIS_KEY" /* ANALYSIS_KEY */, analysisKey);
|
||||
return analysisKey;
|
||||
}
|
||||
async function getRepositoryProperties(repositoryNwo) {
|
||||
return getApiClient().request("GET /repos/:owner/:repo/properties/values", {
|
||||
owner: repositoryNwo.owner,
|
||||
repo: repositoryNwo.repo
|
||||
});
|
||||
}
|
||||
function isEnablementError(msg) {
|
||||
return [
|
||||
/Code Security must be enabled/i,
|
||||
@@ -104869,7 +104905,7 @@ function initFeatures(gitHubVersion, repositoryNwo, tempDir, logger) {
|
||||
// src/init.ts
|
||||
var core12 = __toESM(require_core());
|
||||
var toolrunner4 = __toESM(require_toolrunner());
|
||||
var github2 = __toESM(require_github());
|
||||
var github3 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/codeql.ts
|
||||
@@ -105146,15 +105182,131 @@ var jsonschema = __toESM(require_lib2());
|
||||
var semver5 = __toESM(require_semver2());
|
||||
|
||||
// src/feature-flags/properties.ts
|
||||
var github2 = __toESM(require_github());
|
||||
var GITHUB_CODEQL_PROPERTY_PREFIX = "github-codeql-";
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
RepositoryPropertyName2["FILE_COVERAGE_ON_PRS"] = "github-codeql-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["TOOLS"] = "github-codeql-tools";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
function isString2(value) {
|
||||
return typeof value === "string";
|
||||
}
|
||||
var stringProperty = {
|
||||
validate: isString2,
|
||||
parse: parseStringRepositoryProperty
|
||||
};
|
||||
var booleanProperty = {
|
||||
// The value from the API should come as a string, which we then parse into a boolean.
|
||||
validate: isString2,
|
||||
parse: parseBooleanRepositoryProperty
|
||||
};
|
||||
var repositoryPropertyParsers = {
|
||||
["github-codeql-disable-overlay" /* DISABLE_OVERLAY */]: booleanProperty,
|
||||
["github-codeql-extra-queries" /* EXTRA_QUERIES */]: stringProperty,
|
||||
["github-codeql-file-coverage-on-prs" /* FILE_COVERAGE_ON_PRS */]: booleanProperty,
|
||||
["github-codeql-tools" /* TOOLS */]: stringProperty
|
||||
};
|
||||
async function loadPropertiesFromApi(logger, repositoryNwo) {
|
||||
try {
|
||||
const response = await getRepositoryProperties(repositoryNwo);
|
||||
const remoteProperties = response.data;
|
||||
if (!Array.isArray(remoteProperties)) {
|
||||
throw new Error(
|
||||
`Expected repository properties API to return an array, but got: ${JSON.stringify(response.data)}`
|
||||
);
|
||||
}
|
||||
logger.debug(
|
||||
`Retrieved ${remoteProperties.length} repository properties: ${remoteProperties.map((p) => p.property_name).join(", ")}`
|
||||
);
|
||||
const properties = {};
|
||||
const unrecognisedProperties = [];
|
||||
for (const property of remoteProperties) {
|
||||
if (property.property_name === void 0) {
|
||||
throw new Error(
|
||||
`Expected repository property object to have a 'property_name', but got: ${JSON.stringify(property)}`
|
||||
);
|
||||
}
|
||||
if (isKnownPropertyName(property.property_name)) {
|
||||
setProperty2(properties, property.property_name, property.value, logger);
|
||||
} else if (property.property_name.startsWith(GITHUB_CODEQL_PROPERTY_PREFIX) && !isDynamicWorkflow()) {
|
||||
unrecognisedProperties.push(property.property_name);
|
||||
}
|
||||
}
|
||||
if (Object.keys(properties).length === 0) {
|
||||
logger.debug("No known repository properties were found.");
|
||||
} else {
|
||||
logger.debug(
|
||||
"Loaded the following values for the repository properties:"
|
||||
);
|
||||
for (const [property, value] of Object.entries(properties).sort(
|
||||
([nameA], [nameB]) => nameA.localeCompare(nameB)
|
||||
)) {
|
||||
logger.debug(` ${property}: ${value}`);
|
||||
}
|
||||
}
|
||||
if (unrecognisedProperties.length > 0) {
|
||||
const unrecognisedPropertyList = unrecognisedProperties.map((name) => `'${name}'`).join(", ");
|
||||
logger.warning(
|
||||
`Found repository properties (${unrecognisedPropertyList}), which look like CodeQL Action repository properties, but which are not understood by this version of the CodeQL Action. Do you need to update to a newer version?`
|
||||
);
|
||||
}
|
||||
return properties;
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Encountered an error while trying to determine repository properties: ${e}`
|
||||
);
|
||||
}
|
||||
}
|
||||
async function loadRepositoryProperties(repositoryNwo, logger) {
|
||||
const repositoryOwnerType = github2.context.payload.repository?.owner.type;
|
||||
logger.debug(
|
||||
`Repository owner type is '${repositoryOwnerType ?? "unknown"}'.`
|
||||
);
|
||||
if (repositoryOwnerType === "User") {
|
||||
logger.debug(
|
||||
"Skipping loading repository properties because the repository is owned by a user and therefore cannot have repository properties."
|
||||
);
|
||||
return new Success({});
|
||||
}
|
||||
try {
|
||||
return new Success(await loadPropertiesFromApi(logger, repositoryNwo));
|
||||
} catch (error3) {
|
||||
logger.warning(
|
||||
`Failed to load repository properties: ${getErrorMessage(error3)}`
|
||||
);
|
||||
return new Failure(error3);
|
||||
}
|
||||
}
|
||||
function setProperty2(properties, name, value, logger) {
|
||||
const propertyOptions = repositoryPropertyParsers[name];
|
||||
if (propertyOptions.validate(value)) {
|
||||
properties[name] = propertyOptions.parse(name, value, logger);
|
||||
} else {
|
||||
throw new Error(
|
||||
`Unexpected value for repository property '${name}' (${typeof value}), got: ${JSON.stringify(value)}`
|
||||
);
|
||||
}
|
||||
}
|
||||
function parseBooleanRepositoryProperty(name, value, logger) {
|
||||
if (value !== "true" && value !== "false") {
|
||||
logger.warning(
|
||||
`Repository property '${name}' has unexpected value '${value}'. Expected 'true' or 'false'. Defaulting to false.`
|
||||
);
|
||||
}
|
||||
return value === "true";
|
||||
}
|
||||
function parseStringRepositoryProperty(_name, value) {
|
||||
return value;
|
||||
}
|
||||
var KNOWN_REPOSITORY_PROPERTY_NAMES = new Set(
|
||||
Object.values(RepositoryPropertyName)
|
||||
);
|
||||
function isKnownPropertyName(name) {
|
||||
return KNOWN_REPOSITORY_PROPERTY_NAMES.has(name);
|
||||
}
|
||||
|
||||
// src/config/db-config.ts
|
||||
var PACK_IDENTIFIER_PATTERN = (function() {
|
||||
@@ -106870,6 +107022,42 @@ async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVe
|
||||
};
|
||||
}
|
||||
|
||||
// src/resolve-tools-input.ts
|
||||
async function resolveToolsInput(repositoryNwo, logger) {
|
||||
const repositoryPropertiesResult = await loadRepositoryProperties(
|
||||
repositoryNwo,
|
||||
logger
|
||||
);
|
||||
const toolsWorkflowInput = getOptionalInput("tools");
|
||||
let toolsPropertyValue;
|
||||
if (repositoryPropertiesResult) {
|
||||
if (repositoryPropertiesResult.isSuccess()) {
|
||||
logger.debug(
|
||||
`Loaded repository properties: ${Object.keys(repositoryPropertiesResult.value).join(", ")}`
|
||||
);
|
||||
toolsPropertyValue = "github-codeql-tools" /* TOOLS */ in repositoryPropertiesResult.value ? repositoryPropertiesResult.value["github-codeql-tools" /* TOOLS */] : void 0;
|
||||
} else {
|
||||
logger.warning(
|
||||
`Failed to load repository properties: ${repositoryPropertiesResult.value}`
|
||||
);
|
||||
toolsPropertyValue = void 0;
|
||||
}
|
||||
}
|
||||
const effectiveToolsInput = toolsWorkflowInput || toolsPropertyValue;
|
||||
if (effectiveToolsInput) {
|
||||
if (toolsWorkflowInput) {
|
||||
logger.info(
|
||||
`Setting tools: ${effectiveToolsInput} based on workflow input.`
|
||||
);
|
||||
} else {
|
||||
logger.info(
|
||||
`Setting tools: ${effectiveToolsInput} based on the '${"github-codeql-tools" /* TOOLS */}' repository property.`
|
||||
);
|
||||
}
|
||||
}
|
||||
return effectiveToolsInput;
|
||||
}
|
||||
|
||||
// src/status-report.ts
|
||||
var os2 = __toESM(require("os"));
|
||||
var core13 = __toESM(require_core());
|
||||
@@ -107078,7 +107266,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error
|
||||
}
|
||||
|
||||
// src/setup-codeql-action.ts
|
||||
async function sendCompletedStatusReport(startedAt, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, logger, error3) {
|
||||
async function sendCompletedStatusReport(startedAt, toolsDownloadStatusReport, toolsFeatureFlagsValid, toolsSource, toolsVersion, effectiveToolsInput, logger, error3) {
|
||||
const statusReportBase = await createStatusReportBase(
|
||||
"setup-codeql" /* SetupCodeQL */,
|
||||
getActionsStatus(error3),
|
||||
@@ -107095,6 +107283,7 @@ async function sendCompletedStatusReport(startedAt, toolsDownloadStatusReport, t
|
||||
const initStatusReport = {
|
||||
...statusReportBase,
|
||||
tools_input: getOptionalInput("tools") || "",
|
||||
computed_tools_input: effectiveToolsInput || "",
|
||||
tools_resolved_version: toolsVersion,
|
||||
tools_source: toolsSource || "UNKNOWN" /* Unknown */,
|
||||
workflow_languages: ""
|
||||
@@ -107115,6 +107304,7 @@ async function run(startedAt) {
|
||||
let toolsFeatureFlagsValid;
|
||||
let toolsSource;
|
||||
let toolsVersion;
|
||||
let effectiveToolsInput;
|
||||
try {
|
||||
initializeEnvironment(getActionVersion());
|
||||
const apiDetails = {
|
||||
@@ -107151,8 +107341,9 @@ async function run(startedAt) {
|
||||
gitHubVersion.type
|
||||
);
|
||||
toolsFeatureFlagsValid = codeQLDefaultVersionInfo.toolsFeatureFlagsValid;
|
||||
effectiveToolsInput = await resolveToolsInput(repositoryNwo, logger);
|
||||
const initCodeQLResult = await initCodeQL(
|
||||
getOptionalInput("tools"),
|
||||
effectiveToolsInput,
|
||||
apiDetails,
|
||||
getTemporaryDirectory(),
|
||||
gitHubVersion.type,
|
||||
@@ -107191,6 +107382,7 @@ async function run(startedAt) {
|
||||
toolsFeatureFlagsValid,
|
||||
toolsSource,
|
||||
toolsVersion,
|
||||
effectiveToolsInput,
|
||||
logger
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user