mirror of
https://github.com/github/codeql-action.git
synced 2026-05-09 23:30:28 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 99fa33b653 | |||
| e0af356cbc | |||
| 9e1b38bcc6 | |||
| 2a4d1eca6b | |||
| 003c59c557 | |||
| b2fff91823 |
+4
-1
@@ -4,7 +4,10 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
||||
|
||||
## [UNRELEASED]
|
||||
|
||||
No user facing changes.
|
||||
- Added an experimental change which disables file coverage information on pull requests to speed up analysis.
|
||||
- If your repository is owned by an organization, you can opt out of this change by setting up the `github-codeql-enable-file-coverage-on-prs` custom repository property as follows. First, create a custom repository property with the name `github-codeql-enable-file-coverage-on-prs` and the type "True/false" in the organization's settings. Then in the repository's settings, set this property to `true`. For more information, see [Managing custom properties for repositories in your organization](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization).
|
||||
- If you are using Advanced Setup, you can opt out of this change by setting the `CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS` environment variable to `true` in your workflow.
|
||||
- If you are using Default Setup to analyze a repository owned by a personal account, you will need to switch to Advanced Setup to opt out of this change. For more information, see [Configuring advanced setup for code scanning](https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning).
|
||||
|
||||
## 4.32.5 - 02 Mar 2026
|
||||
|
||||
|
||||
Generated
+128
-126
@@ -3842,18 +3842,18 @@ var require_webidl = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -9849,17 +9849,17 @@ var require_api_request = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10065,17 +10065,17 @@ var require_api_stream = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -10500,20 +10500,20 @@ var require_api_connect = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -10525,7 +10525,7 @@ var require_api_connect = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
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(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -30847,17 +30847,17 @@ var require_api_request2 = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -31063,17 +31063,17 @@ var require_api_stream2 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -31498,20 +31498,20 @@ var require_api_connect2 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -31523,7 +31523,7 @@ var require_api_connect2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -40178,8 +40178,8 @@ function isDefined(value) {
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[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, context2) {
|
||||
function expand(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -40257,7 +40257,7 @@ function expand(template, context2) {
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -52275,14 +52275,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _2, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context2 = {};
|
||||
for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
|
||||
context2.addInitializer = function(f) {
|
||||
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) {
|
||||
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], context2);
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
@@ -53009,19 +53009,19 @@ var require_logger = __commonJS({
|
||||
logger: clientLogger
|
||||
};
|
||||
}
|
||||
var context2 = createLoggerContext({
|
||||
var context3 = createLoggerContext({
|
||||
logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL",
|
||||
namespace: "typeSpecRuntime"
|
||||
});
|
||||
exports2.TypeSpecRuntimeLogger = context2.logger;
|
||||
exports2.TypeSpecRuntimeLogger = context3.logger;
|
||||
function setLogLevel(logLevel) {
|
||||
context2.setLogLevel(logLevel);
|
||||
context3.setLogLevel(logLevel);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57267,19 +57267,19 @@ var require_commonjs2 = __commonJS({
|
||||
exports2.getLogLevel = getLogLevel;
|
||||
exports2.createClientLogger = createClientLogger;
|
||||
var logger_1 = require_internal();
|
||||
var context2 = (0, logger_1.createLoggerContext)({
|
||||
var context3 = (0, logger_1.createLoggerContext)({
|
||||
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
||||
namespace: "azure"
|
||||
});
|
||||
exports2.AzureLogger = context2.logger;
|
||||
exports2.AzureLogger = context3.logger;
|
||||
function setLogLevel(level) {
|
||||
context2.setLogLevel(level);
|
||||
context3.setLogLevel(level);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -58189,14 +58189,14 @@ var require_tracingContext = __commonJS({
|
||||
namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace")
|
||||
};
|
||||
function createTracingContext(options = {}) {
|
||||
let context2 = new TracingContextImpl(options.parentContext);
|
||||
let context3 = new TracingContextImpl(options.parentContext);
|
||||
if (options.span) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.span, options.span);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.span, options.span);
|
||||
}
|
||||
if (options.namespace) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
}
|
||||
return context2;
|
||||
return context3;
|
||||
}
|
||||
var TracingContextImpl = class _TracingContextImpl {
|
||||
_contextMap;
|
||||
@@ -58334,8 +58334,8 @@ var require_tracingClient = __commonJS({
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
function withContext(context2, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context2, callback, ...callbackArgs);
|
||||
function withContext(context3, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context3, callback, ...callbackArgs);
|
||||
}
|
||||
function parseTraceparentHeader(traceparentHeader) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader);
|
||||
@@ -106562,8 +106562,8 @@ var require_graceful_fs = __commonJS({
|
||||
}
|
||||
function noop3() {
|
||||
}
|
||||
function publishQueue(context2, queue2) {
|
||||
Object.defineProperty(context2, gracefulQueue, {
|
||||
function publishQueue(context3, queue2) {
|
||||
Object.defineProperty(context3, gracefulQueue, {
|
||||
get: function() {
|
||||
return queue2;
|
||||
}
|
||||
@@ -118729,7 +118729,7 @@ var require_commonjs21 = __commonJS({
|
||||
free: c.#free,
|
||||
// methods
|
||||
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
||||
backgroundFetch: (k, index, options, context2) => c.#backgroundFetch(k, index, options, context2),
|
||||
backgroundFetch: (k, index, options, context3) => c.#backgroundFetch(k, index, options, context3),
|
||||
moveToTail: (index) => c.#moveToTail(index),
|
||||
indexes: (options) => c.#indexes(options),
|
||||
rindexes: (options) => c.#rindexes(options),
|
||||
@@ -119532,7 +119532,7 @@ var require_commonjs21 = __commonJS({
|
||||
const v = this.#valList[index];
|
||||
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
||||
}
|
||||
#backgroundFetch(k, index, options, context2) {
|
||||
#backgroundFetch(k, index, options, context3) {
|
||||
const v = index === void 0 ? void 0 : this.#valList[index];
|
||||
if (this.#isBackgroundFetch(v)) {
|
||||
return v;
|
||||
@@ -119545,7 +119545,7 @@ var require_commonjs21 = __commonJS({
|
||||
const fetchOpts = {
|
||||
signal: ac.signal,
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
};
|
||||
const cb = (v2, updateCache = false) => {
|
||||
const { aborted } = ac.signal;
|
||||
@@ -119662,7 +119662,7 @@ var require_commonjs21 = __commonJS({
|
||||
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
||||
ignoreFetchAbort = this.ignoreFetchAbort,
|
||||
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
||||
context: context2,
|
||||
context: context3,
|
||||
forceRefresh = false,
|
||||
status,
|
||||
signal
|
||||
@@ -119697,7 +119697,7 @@ var require_commonjs21 = __commonJS({
|
||||
if (index === void 0) {
|
||||
if (status)
|
||||
status.fetch = "miss";
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
return p.__returned = p;
|
||||
} else {
|
||||
const v = this.#valList[index];
|
||||
@@ -119722,7 +119722,7 @@ var require_commonjs21 = __commonJS({
|
||||
this.#statusTTL(status, index);
|
||||
return v;
|
||||
}
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
const hasStale = p.__staleWhileFetching !== void 0;
|
||||
const staleVal = hasStale && allowStale;
|
||||
if (status) {
|
||||
@@ -119744,13 +119744,13 @@ var require_commonjs21 = __commonJS({
|
||||
if (!memoMethod) {
|
||||
throw new Error("no memoMethod provided to constructor");
|
||||
}
|
||||
const { context: context2, forceRefresh, ...options } = memoOptions;
|
||||
const { context: context3, forceRefresh, ...options } = memoOptions;
|
||||
const v = this.get(k, options);
|
||||
if (!forceRefresh && v !== void 0)
|
||||
return v;
|
||||
const vv = memoMethod(k, v, {
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
this.set(k, vv, options);
|
||||
return vv;
|
||||
@@ -132644,18 +132644,18 @@ var require_webidl3 = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts = void 0) {
|
||||
@@ -137981,15 +137981,15 @@ var require_api_request3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -138016,7 +138016,7 @@ var require_api_request3 = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -138136,15 +138136,15 @@ var require_api_stream3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, callback, responseHeaders } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -138172,7 +138172,7 @@ var require_api_stream3 = __commonJS({
|
||||
statusCode,
|
||||
headers,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
|
||||
throw new InvalidReturnValueError("expected Writable");
|
||||
@@ -138364,17 +138364,17 @@ var require_api_pipeline3 = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
const { ret, res } = this;
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
if (ret.destroyed) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = this;
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -138392,7 +138392,7 @@ var require_api_pipeline3 = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -138476,7 +138476,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
@@ -138487,7 +138487,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
throw new SocketError("bad upgrade", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
assert.strictEqual(statusCode, 101);
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
@@ -138496,7 +138496,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -138564,18 +138564,18 @@ var require_api_connect3 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -138587,7 +138587,7 @@ var require_api_connect3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -146706,8 +146706,8 @@ var require_dist_node2 = __commonJS({
|
||||
function isKeyOperator2(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues2(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues2(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined3(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
@@ -146771,7 +146771,7 @@ var require_dist_node2 = __commonJS({
|
||||
expand: expand2.bind(null, template)
|
||||
};
|
||||
}
|
||||
function expand2(template, context2) {
|
||||
function expand2(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -146785,7 +146785,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues2(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -152237,7 +152237,7 @@ var require_download_artifact = __commonJS({
|
||||
var promises_1 = __importDefault2(require("fs/promises"));
|
||||
var crypto2 = __importStar2(require("crypto"));
|
||||
var stream = __importStar2(require("stream"));
|
||||
var github2 = __importStar2(require_github2());
|
||||
var github3 = __importStar2(require_github2());
|
||||
var core14 = __importStar2(require_core());
|
||||
var httpClient = __importStar2(require_lib());
|
||||
var unzip_stream_1 = __importDefault2(require_unzip());
|
||||
@@ -152325,7 +152325,7 @@ var require_download_artifact = __commonJS({
|
||||
function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
|
||||
const api = github2.getOctokit(token);
|
||||
const api = github3.getOctokit(token);
|
||||
let digestMismatch = false;
|
||||
core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`);
|
||||
const { headers, status } = yield api.rest.actions.downloadArtifact({
|
||||
@@ -152646,8 +152646,8 @@ var require_get_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -152770,9 +152770,9 @@ var require_delete_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
|
||||
const deleteArtifactResp = yield github2.rest.actions.deleteArtifact({
|
||||
const deleteArtifactResp = yield github3.rest.actions.deleteArtifact({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
artifact_id: getArtifactResp.artifact.id
|
||||
@@ -152879,9 +152879,9 @@ var require_list_artifacts = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
let currentPageNumber = 1;
|
||||
const { data: listArtifactResponse } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -152906,7 +152906,7 @@ var require_list_artifacts = __commonJS({
|
||||
currentPageNumber++;
|
||||
for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) {
|
||||
(0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
|
||||
const { data: listArtifactResponse2 } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse2 } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -161731,6 +161731,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
@@ -162939,6 +162940,7 @@ var core12 = __toESM(require_core());
|
||||
var import_archiver = __toESM(require_archiver());
|
||||
|
||||
// src/analyze.ts
|
||||
var github2 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/autobuild.ts
|
||||
|
||||
Generated
+89
-78
@@ -3842,18 +3842,18 @@ var require_webidl = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -9849,17 +9849,17 @@ var require_api_request = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10065,17 +10065,17 @@ var require_api_stream = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -10500,20 +10500,20 @@ var require_api_connect = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -10525,7 +10525,7 @@ var require_api_connect = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
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(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -30847,17 +30847,17 @@ var require_api_request2 = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -31063,17 +31063,17 @@ var require_api_stream2 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -31498,20 +31498,20 @@ var require_api_connect2 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -31523,7 +31523,7 @@ var require_api_connect2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -40178,8 +40178,8 @@ function isDefined(value) {
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[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, context2) {
|
||||
function expand(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -40257,7 +40257,7 @@ function expand(template, context2) {
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -52275,14 +52275,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 context2 = {};
|
||||
for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
|
||||
context2.addInitializer = function(f) {
|
||||
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) {
|
||||
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], context2);
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
@@ -53009,19 +53009,19 @@ var require_logger = __commonJS({
|
||||
logger: clientLogger
|
||||
};
|
||||
}
|
||||
var context2 = createLoggerContext({
|
||||
var context3 = createLoggerContext({
|
||||
logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL",
|
||||
namespace: "typeSpecRuntime"
|
||||
});
|
||||
exports2.TypeSpecRuntimeLogger = context2.logger;
|
||||
exports2.TypeSpecRuntimeLogger = context3.logger;
|
||||
function setLogLevel(logLevel) {
|
||||
context2.setLogLevel(logLevel);
|
||||
context3.setLogLevel(logLevel);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57267,19 +57267,19 @@ var require_commonjs2 = __commonJS({
|
||||
exports2.getLogLevel = getLogLevel;
|
||||
exports2.createClientLogger = createClientLogger;
|
||||
var logger_1 = require_internal();
|
||||
var context2 = (0, logger_1.createLoggerContext)({
|
||||
var context3 = (0, logger_1.createLoggerContext)({
|
||||
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
||||
namespace: "azure"
|
||||
});
|
||||
exports2.AzureLogger = context2.logger;
|
||||
exports2.AzureLogger = context3.logger;
|
||||
function setLogLevel(level) {
|
||||
context2.setLogLevel(level);
|
||||
context3.setLogLevel(level);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -58189,14 +58189,14 @@ var require_tracingContext = __commonJS({
|
||||
namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace")
|
||||
};
|
||||
function createTracingContext(options = {}) {
|
||||
let context2 = new TracingContextImpl(options.parentContext);
|
||||
let context3 = new TracingContextImpl(options.parentContext);
|
||||
if (options.span) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.span, options.span);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.span, options.span);
|
||||
}
|
||||
if (options.namespace) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
}
|
||||
return context2;
|
||||
return context3;
|
||||
}
|
||||
var TracingContextImpl = class _TracingContextImpl {
|
||||
_contextMap;
|
||||
@@ -58334,8 +58334,8 @@ var require_tracingClient = __commonJS({
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
function withContext(context2, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context2, callback, ...callbackArgs);
|
||||
function withContext(context3, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context3, callback, ...callbackArgs);
|
||||
}
|
||||
function parseTraceparentHeader(traceparentHeader) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader);
|
||||
@@ -106686,6 +106686,7 @@ var SarifScanOrder = [
|
||||
var fs12 = __toESM(require("fs"));
|
||||
var path12 = __toESM(require("path"));
|
||||
var import_perf_hooks2 = require("perf_hooks");
|
||||
var github2 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/autobuild.ts
|
||||
@@ -107241,6 +107242,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
@@ -110804,8 +110806,17 @@ async function runQueries(sarifFolder, memoryFlag, threadsFlag, diffRangePackDir
|
||||
logger.info(qualityAnalysisSummary);
|
||||
}
|
||||
if (!config.enableFileCoverageInformation) {
|
||||
const isOrgOwned = github2.context.payload.repository?.owner.type === "Organization";
|
||||
let reenableMessage;
|
||||
if (isOrgOwned) {
|
||||
reenableMessage = ` To enable file coverage information on pull requests, set the '${"github-codeql-enable-file-coverage-on-prs" /* ENABLE_FILE_COVERAGE_ON_PRS */}' repository property to 'true'.`;
|
||||
} else if (!isDefaultSetup()) {
|
||||
reenableMessage = ` To enable file coverage information on pull requests, set the '${"CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS" /* ENABLE_FILE_COVERAGE_ON_PRS */}' environment variable to 'true'.`;
|
||||
} else {
|
||||
reenableMessage = "";
|
||||
}
|
||||
logger.info(
|
||||
"To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches."
|
||||
`To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches.${reenableMessage}`
|
||||
);
|
||||
}
|
||||
if (await features.getValue("qa_telemetry_enabled" /* QaTelemetryEnabled */)) {
|
||||
|
||||
Generated
+1
@@ -103784,6 +103784,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+130
-128
@@ -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 = ",";
|
||||
@@ -52275,14 +52275,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _2, 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");
|
||||
@@ -53009,19 +53009,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);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57267,19 +57267,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);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -58189,14 +58189,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;
|
||||
@@ -58334,8 +58334,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);
|
||||
@@ -106562,8 +106562,8 @@ var require_graceful_fs = __commonJS({
|
||||
}
|
||||
function noop3() {
|
||||
}
|
||||
function publishQueue(context3, queue2) {
|
||||
Object.defineProperty(context3, gracefulQueue, {
|
||||
function publishQueue(context4, queue2) {
|
||||
Object.defineProperty(context4, gracefulQueue, {
|
||||
get: function() {
|
||||
return queue2;
|
||||
}
|
||||
@@ -118729,7 +118729,7 @@ var require_commonjs21 = __commonJS({
|
||||
free: c.#free,
|
||||
// methods
|
||||
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
||||
backgroundFetch: (k, index, options, context3) => c.#backgroundFetch(k, index, options, context3),
|
||||
backgroundFetch: (k, index, options, context4) => c.#backgroundFetch(k, index, options, context4),
|
||||
moveToTail: (index) => c.#moveToTail(index),
|
||||
indexes: (options) => c.#indexes(options),
|
||||
rindexes: (options) => c.#rindexes(options),
|
||||
@@ -119532,7 +119532,7 @@ var require_commonjs21 = __commonJS({
|
||||
const v = this.#valList[index];
|
||||
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
||||
}
|
||||
#backgroundFetch(k, index, options, context3) {
|
||||
#backgroundFetch(k, index, options, context4) {
|
||||
const v = index === void 0 ? void 0 : this.#valList[index];
|
||||
if (this.#isBackgroundFetch(v)) {
|
||||
return v;
|
||||
@@ -119545,7 +119545,7 @@ var require_commonjs21 = __commonJS({
|
||||
const fetchOpts = {
|
||||
signal: ac.signal,
|
||||
options,
|
||||
context: context3
|
||||
context: context4
|
||||
};
|
||||
const cb = (v2, updateCache = false) => {
|
||||
const { aborted } = ac.signal;
|
||||
@@ -119662,7 +119662,7 @@ var require_commonjs21 = __commonJS({
|
||||
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
||||
ignoreFetchAbort = this.ignoreFetchAbort,
|
||||
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
||||
context: context3,
|
||||
context: context4,
|
||||
forceRefresh = false,
|
||||
status,
|
||||
signal
|
||||
@@ -119697,7 +119697,7 @@ var require_commonjs21 = __commonJS({
|
||||
if (index === void 0) {
|
||||
if (status)
|
||||
status.fetch = "miss";
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
const p = this.#backgroundFetch(k, index, options, context4);
|
||||
return p.__returned = p;
|
||||
} else {
|
||||
const v = this.#valList[index];
|
||||
@@ -119722,7 +119722,7 @@ var require_commonjs21 = __commonJS({
|
||||
this.#statusTTL(status, index);
|
||||
return v;
|
||||
}
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
const p = this.#backgroundFetch(k, index, options, context4);
|
||||
const hasStale = p.__staleWhileFetching !== void 0;
|
||||
const staleVal = hasStale && allowStale;
|
||||
if (status) {
|
||||
@@ -119744,13 +119744,13 @@ var require_commonjs21 = __commonJS({
|
||||
if (!memoMethod) {
|
||||
throw new Error("no memoMethod provided to constructor");
|
||||
}
|
||||
const { context: context3, forceRefresh, ...options } = memoOptions;
|
||||
const { context: context4, forceRefresh, ...options } = memoOptions;
|
||||
const v = this.get(k, options);
|
||||
if (!forceRefresh && v !== void 0)
|
||||
return v;
|
||||
const vv = memoMethod(k, v, {
|
||||
options,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
this.set(k, vv, options);
|
||||
return vv;
|
||||
@@ -132644,18 +132644,18 @@ var require_webidl3 = __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 = void 0) {
|
||||
@@ -137981,15 +137981,15 @@ var require_api_request3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
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) {
|
||||
@@ -138016,7 +138016,7 @@ var require_api_request3 = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -138136,15 +138136,15 @@ var require_api_stream3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
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) {
|
||||
@@ -138172,7 +138172,7 @@ var require_api_stream3 = __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");
|
||||
@@ -138364,17 +138364,17 @@ var require_api_pipeline3 = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
const { ret, res } = this;
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
if (ret.destroyed) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
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);
|
||||
@@ -138392,7 +138392,7 @@ var require_api_pipeline3 = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -138476,7 +138476,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
@@ -138487,7 +138487,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
throw new SocketError("bad upgrade", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
const { callback, opaque, context: context4 } = this;
|
||||
assert.strictEqual(statusCode, 101);
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
@@ -138496,7 +138496,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -138564,18 +138564,18 @@ var require_api_connect3 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context3) {
|
||||
onConnect(abort, context4) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
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;
|
||||
@@ -138587,7 +138587,7 @@ var require_api_connect3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context3
|
||||
context: context4
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -146706,8 +146706,8 @@ var require_dist_node2 = __commonJS({
|
||||
function isKeyOperator2(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues2(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
function getValues2(context4, operator, key, modifier) {
|
||||
var value = context4[key], result = [];
|
||||
if (isDefined3(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
@@ -146771,7 +146771,7 @@ var require_dist_node2 = __commonJS({
|
||||
expand: expand2.bind(null, template)
|
||||
};
|
||||
}
|
||||
function expand2(template, context3) {
|
||||
function expand2(template, context4) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -146785,7 +146785,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues2(context4, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -152237,7 +152237,7 @@ var require_download_artifact = __commonJS({
|
||||
var promises_1 = __importDefault2(require("fs/promises"));
|
||||
var crypto2 = __importStar2(require("crypto"));
|
||||
var stream2 = __importStar2(require("stream"));
|
||||
var github3 = __importStar2(require_github2());
|
||||
var github4 = __importStar2(require_github2());
|
||||
var core17 = __importStar2(require_core());
|
||||
var httpClient = __importStar2(require_lib());
|
||||
var unzip_stream_1 = __importDefault2(require_unzip());
|
||||
@@ -152325,7 +152325,7 @@ var require_download_artifact = __commonJS({
|
||||
function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
|
||||
const api = github3.getOctokit(token);
|
||||
const api = github4.getOctokit(token);
|
||||
let digestMismatch = false;
|
||||
core17.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`);
|
||||
const { headers, status } = yield api.rest.actions.downloadArtifact({
|
||||
@@ -152646,8 +152646,8 @@ var require_get_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
const github4 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github4.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -152770,9 +152770,9 @@ var require_delete_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github4 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
|
||||
const deleteArtifactResp = yield github3.rest.actions.deleteArtifact({
|
||||
const deleteArtifactResp = yield github4.rest.actions.deleteArtifact({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
artifact_id: getArtifactResp.artifact.id
|
||||
@@ -152879,9 +152879,9 @@ var require_list_artifacts = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github4 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
let currentPageNumber = 1;
|
||||
const { data: listArtifactResponse } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse } = yield github4.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -152906,7 +152906,7 @@ var require_list_artifacts = __commonJS({
|
||||
currentPageNumber++;
|
||||
for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) {
|
||||
(0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
|
||||
const { data: listArtifactResponse2 } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse2 } = yield github4.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -165109,6 +165109,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
@@ -167797,6 +167798,7 @@ var import_archiver = __toESM(require_archiver());
|
||||
// src/analyze.ts
|
||||
var fs12 = __toESM(require("fs"));
|
||||
var path12 = __toESM(require("path"));
|
||||
var github2 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/autobuild.ts
|
||||
@@ -168310,7 +168312,7 @@ async function createDatabaseBundleCli(codeql, config, language) {
|
||||
|
||||
// src/init-action-post-helper.ts
|
||||
var fs18 = __toESM(require("fs"));
|
||||
var github2 = __toESM(require_github());
|
||||
var github3 = __toESM(require_github());
|
||||
|
||||
// src/upload-lib.ts
|
||||
var fs16 = __toESM(require("fs"));
|
||||
@@ -170299,7 +170301,7 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co
|
||||
);
|
||||
}
|
||||
if (process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true") {
|
||||
if (!github2.context.payload.pull_request?.head.repo.fork) {
|
||||
if (!github3.context.payload.pull_request?.head.repo.fork) {
|
||||
await removeUploadedSarif(uploadFailedSarifResult, logger);
|
||||
} else {
|
||||
logger.info(
|
||||
|
||||
Generated
+37
-10
@@ -104404,11 +104404,13 @@ function getUnknownLanguagesError(languages) {
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
var repositoryPropertyParsers = {
|
||||
["github-codeql-disable-overlay" /* DISABLE_OVERLAY */]: parseBooleanRepositoryProperty,
|
||||
["github-codeql-enable-file-coverage-on-prs" /* ENABLE_FILE_COVERAGE_ON_PRS */]: parseBooleanRepositoryProperty,
|
||||
["github-codeql-extra-queries" /* EXTRA_QUERIES */]: parseStringRepositoryProperty
|
||||
};
|
||||
async function loadPropertiesFromApi(gitHubVersion, logger, repositoryNwo) {
|
||||
@@ -109051,15 +109053,38 @@ function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 =
|
||||
}
|
||||
}
|
||||
}
|
||||
async function getFileCoverageInformationEnabled(debugMode, repositoryNwo, features) {
|
||||
return (
|
||||
// Always enable file coverage information in debug mode
|
||||
debugMode || // We're most interested in speeding up PRs, and we want to keep
|
||||
// submitting file coverage information for the default branch since
|
||||
// it is used to populate the status page.
|
||||
!isAnalyzingPullRequest() || // For now, restrict this feature to the GitHub org
|
||||
repositoryNwo.owner !== "github" || !await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */)
|
||||
);
|
||||
async function getFileCoverageInformationEnabled(debugMode, repositoryNwo, features, repositoryProperties, logger) {
|
||||
if (debugMode) return true;
|
||||
if (!isAnalyzingPullRequest()) return true;
|
||||
const envVarValue = process.env["CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS" /* ENABLE_FILE_COVERAGE_ON_PRS */];
|
||||
if (envVarValue === "true") {
|
||||
logger.info(
|
||||
`File coverage information on pull requests has been enabled by the '${"CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS" /* ENABLE_FILE_COVERAGE_ON_PRS */}' environment variable. This may increase the time it takes to analyze pull requests, particularly on large repositories.`
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if (envVarValue === "false") {
|
||||
logger.info(
|
||||
`File coverage information on pull requests has been disabled by the '${"CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS" /* ENABLE_FILE_COVERAGE_ON_PRS */}' environment variable.`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
const repoPropValue = repositoryProperties["github-codeql-enable-file-coverage-on-prs" /* ENABLE_FILE_COVERAGE_ON_PRS */];
|
||||
if (repoPropValue === true) {
|
||||
logger.info(
|
||||
`File coverage information on pull requests has been enabled by the '${"github-codeql-enable-file-coverage-on-prs" /* ENABLE_FILE_COVERAGE_ON_PRS */}' repository property. This may increase the time it takes to analyze pull requests, particularly on large repositories.`
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if (repoPropValue === false) {
|
||||
logger.info(
|
||||
`File coverage information on pull requests has been disabled by the '${"github-codeql-enable-file-coverage-on-prs" /* ENABLE_FILE_COVERAGE_ON_PRS */}' repository property.`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
if (repositoryNwo.owner !== "github") return true;
|
||||
if (!await features.getValue("skip_file_coverage_on_prs" /* SkipFileCoverageOnPrs */)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// src/status-report.ts
|
||||
@@ -109701,7 +109726,9 @@ async function run(startedAt) {
|
||||
enableFileCoverageInformation: await getFileCoverageInformationEnabled(
|
||||
debugMode,
|
||||
repositoryNwo,
|
||||
features
|
||||
features,
|
||||
repositoryPropertiesResult.orElse({}),
|
||||
logger
|
||||
),
|
||||
logger
|
||||
});
|
||||
|
||||
Generated
+1
@@ -103783,6 +103783,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+1
@@ -104777,6 +104777,7 @@ var semver5 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+128
-126
@@ -3842,18 +3842,18 @@ var require_webidl = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -9849,17 +9849,17 @@ var require_api_request = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10065,17 +10065,17 @@ var require_api_stream = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -10500,20 +10500,20 @@ var require_api_connect = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -10525,7 +10525,7 @@ var require_api_connect = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
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(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -30847,17 +30847,17 @@ var require_api_request2 = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -31063,17 +31063,17 @@ var require_api_stream2 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -31498,20 +31498,20 @@ var require_api_connect2 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -31523,7 +31523,7 @@ var require_api_connect2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -40178,8 +40178,8 @@ function isDefined(value) {
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[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, context2) {
|
||||
function expand(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -40257,7 +40257,7 @@ function expand(template, context2) {
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -52275,14 +52275,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _2, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context2 = {};
|
||||
for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
|
||||
context2.addInitializer = function(f) {
|
||||
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) {
|
||||
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], context2);
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
@@ -53009,19 +53009,19 @@ var require_logger = __commonJS({
|
||||
logger: clientLogger
|
||||
};
|
||||
}
|
||||
var context2 = createLoggerContext({
|
||||
var context3 = createLoggerContext({
|
||||
logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL",
|
||||
namespace: "typeSpecRuntime"
|
||||
});
|
||||
exports2.TypeSpecRuntimeLogger = context2.logger;
|
||||
exports2.TypeSpecRuntimeLogger = context3.logger;
|
||||
function setLogLevel(logLevel) {
|
||||
context2.setLogLevel(logLevel);
|
||||
context3.setLogLevel(logLevel);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -57267,19 +57267,19 @@ var require_commonjs2 = __commonJS({
|
||||
exports2.getLogLevel = getLogLevel;
|
||||
exports2.createClientLogger = createClientLogger;
|
||||
var logger_1 = require_internal();
|
||||
var context2 = (0, logger_1.createLoggerContext)({
|
||||
var context3 = (0, logger_1.createLoggerContext)({
|
||||
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
||||
namespace: "azure"
|
||||
});
|
||||
exports2.AzureLogger = context2.logger;
|
||||
exports2.AzureLogger = context3.logger;
|
||||
function setLogLevel(level) {
|
||||
context2.setLogLevel(level);
|
||||
context3.setLogLevel(level);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -58189,14 +58189,14 @@ var require_tracingContext = __commonJS({
|
||||
namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace")
|
||||
};
|
||||
function createTracingContext(options = {}) {
|
||||
let context2 = new TracingContextImpl(options.parentContext);
|
||||
let context3 = new TracingContextImpl(options.parentContext);
|
||||
if (options.span) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.span, options.span);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.span, options.span);
|
||||
}
|
||||
if (options.namespace) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
}
|
||||
return context2;
|
||||
return context3;
|
||||
}
|
||||
var TracingContextImpl = class _TracingContextImpl {
|
||||
_contextMap;
|
||||
@@ -58334,8 +58334,8 @@ var require_tracingClient = __commonJS({
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
function withContext(context2, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context2, callback, ...callbackArgs);
|
||||
function withContext(context3, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context3, callback, ...callbackArgs);
|
||||
}
|
||||
function parseTraceparentHeader(traceparentHeader) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader);
|
||||
@@ -105189,8 +105189,8 @@ var require_graceful_fs = __commonJS({
|
||||
}
|
||||
function noop3() {
|
||||
}
|
||||
function publishQueue(context2, queue2) {
|
||||
Object.defineProperty(context2, gracefulQueue, {
|
||||
function publishQueue(context3, queue2) {
|
||||
Object.defineProperty(context3, gracefulQueue, {
|
||||
get: function() {
|
||||
return queue2;
|
||||
}
|
||||
@@ -117356,7 +117356,7 @@ var require_commonjs21 = __commonJS({
|
||||
free: c.#free,
|
||||
// methods
|
||||
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
||||
backgroundFetch: (k, index, options, context2) => c.#backgroundFetch(k, index, options, context2),
|
||||
backgroundFetch: (k, index, options, context3) => c.#backgroundFetch(k, index, options, context3),
|
||||
moveToTail: (index) => c.#moveToTail(index),
|
||||
indexes: (options) => c.#indexes(options),
|
||||
rindexes: (options) => c.#rindexes(options),
|
||||
@@ -118159,7 +118159,7 @@ var require_commonjs21 = __commonJS({
|
||||
const v = this.#valList[index];
|
||||
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
||||
}
|
||||
#backgroundFetch(k, index, options, context2) {
|
||||
#backgroundFetch(k, index, options, context3) {
|
||||
const v = index === void 0 ? void 0 : this.#valList[index];
|
||||
if (this.#isBackgroundFetch(v)) {
|
||||
return v;
|
||||
@@ -118172,7 +118172,7 @@ var require_commonjs21 = __commonJS({
|
||||
const fetchOpts = {
|
||||
signal: ac.signal,
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
};
|
||||
const cb = (v2, updateCache = false) => {
|
||||
const { aborted } = ac.signal;
|
||||
@@ -118289,7 +118289,7 @@ var require_commonjs21 = __commonJS({
|
||||
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
||||
ignoreFetchAbort = this.ignoreFetchAbort,
|
||||
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
||||
context: context2,
|
||||
context: context3,
|
||||
forceRefresh = false,
|
||||
status,
|
||||
signal
|
||||
@@ -118324,7 +118324,7 @@ var require_commonjs21 = __commonJS({
|
||||
if (index === void 0) {
|
||||
if (status)
|
||||
status.fetch = "miss";
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
return p.__returned = p;
|
||||
} else {
|
||||
const v = this.#valList[index];
|
||||
@@ -118349,7 +118349,7 @@ var require_commonjs21 = __commonJS({
|
||||
this.#statusTTL(status, index);
|
||||
return v;
|
||||
}
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
const hasStale = p.__staleWhileFetching !== void 0;
|
||||
const staleVal = hasStale && allowStale;
|
||||
if (status) {
|
||||
@@ -118371,13 +118371,13 @@ var require_commonjs21 = __commonJS({
|
||||
if (!memoMethod) {
|
||||
throw new Error("no memoMethod provided to constructor");
|
||||
}
|
||||
const { context: context2, forceRefresh, ...options } = memoOptions;
|
||||
const { context: context3, forceRefresh, ...options } = memoOptions;
|
||||
const v = this.get(k, options);
|
||||
if (!forceRefresh && v !== void 0)
|
||||
return v;
|
||||
const vv = memoMethod(k, v, {
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
this.set(k, vv, options);
|
||||
return vv;
|
||||
@@ -131271,18 +131271,18 @@ var require_webidl3 = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts = void 0) {
|
||||
@@ -136608,15 +136608,15 @@ var require_api_request3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -136643,7 +136643,7 @@ var require_api_request3 = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -136763,15 +136763,15 @@ var require_api_stream3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, callback, responseHeaders } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -136799,7 +136799,7 @@ var require_api_stream3 = __commonJS({
|
||||
statusCode,
|
||||
headers,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
|
||||
throw new InvalidReturnValueError("expected Writable");
|
||||
@@ -136991,17 +136991,17 @@ var require_api_pipeline3 = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
const { ret, res } = this;
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
if (ret.destroyed) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = this;
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -137019,7 +137019,7 @@ var require_api_pipeline3 = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -137103,7 +137103,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
@@ -137114,7 +137114,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
throw new SocketError("bad upgrade", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
assert.strictEqual(statusCode, 101);
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
@@ -137123,7 +137123,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -137191,18 +137191,18 @@ var require_api_connect3 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -137214,7 +137214,7 @@ var require_api_connect3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -145333,8 +145333,8 @@ var require_dist_node2 = __commonJS({
|
||||
function isKeyOperator2(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues2(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues2(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined3(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
@@ -145398,7 +145398,7 @@ var require_dist_node2 = __commonJS({
|
||||
expand: expand2.bind(null, template)
|
||||
};
|
||||
}
|
||||
function expand2(template, context2) {
|
||||
function expand2(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -145412,7 +145412,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues2(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -150864,7 +150864,7 @@ var require_download_artifact = __commonJS({
|
||||
var promises_1 = __importDefault2(require("fs/promises"));
|
||||
var crypto2 = __importStar2(require("crypto"));
|
||||
var stream = __importStar2(require("stream"));
|
||||
var github2 = __importStar2(require_github2());
|
||||
var github3 = __importStar2(require_github2());
|
||||
var core14 = __importStar2(require_core());
|
||||
var httpClient = __importStar2(require_lib());
|
||||
var unzip_stream_1 = __importDefault2(require_unzip());
|
||||
@@ -150952,7 +150952,7 @@ var require_download_artifact = __commonJS({
|
||||
function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
|
||||
const api = github2.getOctokit(token);
|
||||
const api = github3.getOctokit(token);
|
||||
let digestMismatch = false;
|
||||
core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`);
|
||||
const { headers, status } = yield api.rest.actions.downloadArtifact({
|
||||
@@ -151273,8 +151273,8 @@ var require_get_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -151397,9 +151397,9 @@ var require_delete_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
|
||||
const deleteArtifactResp = yield github2.rest.actions.deleteArtifact({
|
||||
const deleteArtifactResp = yield github3.rest.actions.deleteArtifact({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
artifact_id: getArtifactResp.artifact.id
|
||||
@@ -151506,9 +151506,9 @@ var require_list_artifacts = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
let currentPageNumber = 1;
|
||||
const { data: listArtifactResponse } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -151533,7 +151533,7 @@ var require_list_artifacts = __commonJS({
|
||||
currentPageNumber++;
|
||||
for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) {
|
||||
(0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
|
||||
const { data: listArtifactResponse2 } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse2 } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -161366,6 +161366,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
@@ -161724,6 +161725,7 @@ var core12 = __toESM(require_core());
|
||||
var import_archiver = __toESM(require_archiver());
|
||||
|
||||
// src/analyze.ts
|
||||
var github2 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/autobuild.ts
|
||||
|
||||
Generated
+1
@@ -121384,6 +121384,7 @@ var semver5 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+1
@@ -106836,6 +106836,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+128
-126
@@ -3842,18 +3842,18 @@ var require_webidl = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -9849,17 +9849,17 @@ var require_api_request = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -10065,17 +10065,17 @@ var require_api_stream = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -10500,20 +10500,20 @@ var require_api_connect = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -10525,7 +10525,7 @@ var require_api_connect = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
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(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts) {
|
||||
@@ -30847,17 +30847,17 @@ var require_api_request2 = __commonJS({
|
||||
}
|
||||
}
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -31063,17 +31063,17 @@ var require_api_stream2 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, 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: context2
|
||||
context: context3
|
||||
});
|
||||
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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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 = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
} 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, context2) {
|
||||
onConnect(abort, context3) {
|
||||
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: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = 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: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -31498,20 +31498,20 @@ var require_api_connect2 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (this.reason) {
|
||||
abort(this.reason);
|
||||
return;
|
||||
}
|
||||
assert(this.callback);
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -31523,7 +31523,7 @@ var require_api_connect2 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -40178,8 +40178,8 @@ function isDefined(value) {
|
||||
function isKeyOperator(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[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, context2) {
|
||||
function expand(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -40257,7 +40257,7 @@ function expand(template, context2) {
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -54488,14 +54488,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
||||
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
||||
var _2, done = false;
|
||||
for (var i = decorators.length - 1; i >= 0; i--) {
|
||||
var context2 = {};
|
||||
for (var p in contextIn) context2[p] = p === "access" ? {} : contextIn[p];
|
||||
for (var p in contextIn.access) context2.access[p] = contextIn.access[p];
|
||||
context2.addInitializer = function(f) {
|
||||
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) {
|
||||
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], context2);
|
||||
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
||||
if (kind === "accessor") {
|
||||
if (result === void 0) continue;
|
||||
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
||||
@@ -55222,19 +55222,19 @@ var require_logger = __commonJS({
|
||||
logger: clientLogger
|
||||
};
|
||||
}
|
||||
var context2 = createLoggerContext({
|
||||
var context3 = createLoggerContext({
|
||||
logLevelEnvVarName: "TYPESPEC_RUNTIME_LOG_LEVEL",
|
||||
namespace: "typeSpecRuntime"
|
||||
});
|
||||
exports2.TypeSpecRuntimeLogger = context2.logger;
|
||||
exports2.TypeSpecRuntimeLogger = context3.logger;
|
||||
function setLogLevel(logLevel) {
|
||||
context2.setLogLevel(logLevel);
|
||||
context3.setLogLevel(logLevel);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -59480,19 +59480,19 @@ var require_commonjs4 = __commonJS({
|
||||
exports2.getLogLevel = getLogLevel;
|
||||
exports2.createClientLogger = createClientLogger;
|
||||
var logger_1 = require_internal();
|
||||
var context2 = (0, logger_1.createLoggerContext)({
|
||||
var context3 = (0, logger_1.createLoggerContext)({
|
||||
logLevelEnvVarName: "AZURE_LOG_LEVEL",
|
||||
namespace: "azure"
|
||||
});
|
||||
exports2.AzureLogger = context2.logger;
|
||||
exports2.AzureLogger = context3.logger;
|
||||
function setLogLevel(level) {
|
||||
context2.setLogLevel(level);
|
||||
context3.setLogLevel(level);
|
||||
}
|
||||
function getLogLevel() {
|
||||
return context2.getLogLevel();
|
||||
return context3.getLogLevel();
|
||||
}
|
||||
function createClientLogger(namespace) {
|
||||
return context2.createClientLogger(namespace);
|
||||
return context3.createClientLogger(namespace);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -60402,14 +60402,14 @@ var require_tracingContext = __commonJS({
|
||||
namespace: /* @__PURE__ */ Symbol.for("@azure/core-tracing namespace")
|
||||
};
|
||||
function createTracingContext(options = {}) {
|
||||
let context2 = new TracingContextImpl(options.parentContext);
|
||||
let context3 = new TracingContextImpl(options.parentContext);
|
||||
if (options.span) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.span, options.span);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.span, options.span);
|
||||
}
|
||||
if (options.namespace) {
|
||||
context2 = context2.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
context3 = context3.setValue(exports2.knownContextKeys.namespace, options.namespace);
|
||||
}
|
||||
return context2;
|
||||
return context3;
|
||||
}
|
||||
var TracingContextImpl = class _TracingContextImpl {
|
||||
_contextMap;
|
||||
@@ -60547,8 +60547,8 @@ var require_tracingClient = __commonJS({
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
function withContext(context2, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context2, callback, ...callbackArgs);
|
||||
function withContext(context3, callback, ...callbackArgs) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().withContext(context3, callback, ...callbackArgs);
|
||||
}
|
||||
function parseTraceparentHeader(traceparentHeader) {
|
||||
return (0, instrumenter_js_1.getInstrumenter)().parseTraceparentHeader(traceparentHeader);
|
||||
@@ -97373,8 +97373,8 @@ var require_graceful_fs = __commonJS({
|
||||
}
|
||||
function noop3() {
|
||||
}
|
||||
function publishQueue(context2, queue2) {
|
||||
Object.defineProperty(context2, gracefulQueue, {
|
||||
function publishQueue(context3, queue2) {
|
||||
Object.defineProperty(context3, gracefulQueue, {
|
||||
get: function() {
|
||||
return queue2;
|
||||
}
|
||||
@@ -109540,7 +109540,7 @@ var require_commonjs21 = __commonJS({
|
||||
free: c.#free,
|
||||
// methods
|
||||
isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
|
||||
backgroundFetch: (k, index, options, context2) => c.#backgroundFetch(k, index, options, context2),
|
||||
backgroundFetch: (k, index, options, context3) => c.#backgroundFetch(k, index, options, context3),
|
||||
moveToTail: (index) => c.#moveToTail(index),
|
||||
indexes: (options) => c.#indexes(options),
|
||||
rindexes: (options) => c.#rindexes(options),
|
||||
@@ -110343,7 +110343,7 @@ var require_commonjs21 = __commonJS({
|
||||
const v = this.#valList[index];
|
||||
return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
||||
}
|
||||
#backgroundFetch(k, index, options, context2) {
|
||||
#backgroundFetch(k, index, options, context3) {
|
||||
const v = index === void 0 ? void 0 : this.#valList[index];
|
||||
if (this.#isBackgroundFetch(v)) {
|
||||
return v;
|
||||
@@ -110356,7 +110356,7 @@ var require_commonjs21 = __commonJS({
|
||||
const fetchOpts = {
|
||||
signal: ac.signal,
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
};
|
||||
const cb = (v2, updateCache = false) => {
|
||||
const { aborted } = ac.signal;
|
||||
@@ -110473,7 +110473,7 @@ var require_commonjs21 = __commonJS({
|
||||
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
||||
ignoreFetchAbort = this.ignoreFetchAbort,
|
||||
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
||||
context: context2,
|
||||
context: context3,
|
||||
forceRefresh = false,
|
||||
status,
|
||||
signal
|
||||
@@ -110508,7 +110508,7 @@ var require_commonjs21 = __commonJS({
|
||||
if (index === void 0) {
|
||||
if (status)
|
||||
status.fetch = "miss";
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
return p.__returned = p;
|
||||
} else {
|
||||
const v = this.#valList[index];
|
||||
@@ -110533,7 +110533,7 @@ var require_commonjs21 = __commonJS({
|
||||
this.#statusTTL(status, index);
|
||||
return v;
|
||||
}
|
||||
const p = this.#backgroundFetch(k, index, options, context2);
|
||||
const p = this.#backgroundFetch(k, index, options, context3);
|
||||
const hasStale = p.__staleWhileFetching !== void 0;
|
||||
const staleVal = hasStale && allowStale;
|
||||
if (status) {
|
||||
@@ -110555,13 +110555,13 @@ var require_commonjs21 = __commonJS({
|
||||
if (!memoMethod) {
|
||||
throw new Error("no memoMethod provided to constructor");
|
||||
}
|
||||
const { context: context2, forceRefresh, ...options } = memoOptions;
|
||||
const { context: context3, forceRefresh, ...options } = memoOptions;
|
||||
const v = this.get(k, options);
|
||||
if (!forceRefresh && v !== void 0)
|
||||
return v;
|
||||
const vv = memoMethod(k, v, {
|
||||
options,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
this.set(k, vv, options);
|
||||
return vv;
|
||||
@@ -123455,18 +123455,18 @@ var require_webidl3 = __commonJS({
|
||||
webidl.errors.exception = function(message) {
|
||||
return new TypeError(`${message.header}: ${message.message}`);
|
||||
};
|
||||
webidl.errors.conversionFailed = function(context2) {
|
||||
const plural = context2.types.length === 1 ? "" : " one of";
|
||||
const message = `${context2.argument} could not be converted to${plural}: ${context2.types.join(", ")}.`;
|
||||
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(", ")}.`;
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
header: context3.prefix,
|
||||
message
|
||||
});
|
||||
};
|
||||
webidl.errors.invalidArgument = function(context2) {
|
||||
webidl.errors.invalidArgument = function(context3) {
|
||||
return webidl.errors.exception({
|
||||
header: context2.prefix,
|
||||
message: `"${context2.value}" is an invalid ${context2.type}.`
|
||||
header: context3.prefix,
|
||||
message: `"${context3.value}" is an invalid ${context3.type}.`
|
||||
});
|
||||
};
|
||||
webidl.brandCheck = function(V, I, opts = void 0) {
|
||||
@@ -128792,15 +128792,15 @@ var require_api_request3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { callback, opaque, abort, context: context2, responseHeaders, highWaterMark } = this;
|
||||
const { callback, opaque, abort, context: context3, responseHeaders, highWaterMark } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -128827,7 +128827,7 @@ var require_api_request3 = __commonJS({
|
||||
trailers: this.trailers,
|
||||
opaque,
|
||||
body,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -128947,15 +128947,15 @@ var require_api_stream3 = __commonJS({
|
||||
}
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume, statusMessage) {
|
||||
const { factory, opaque, context: context2, callback, responseHeaders } = this;
|
||||
const { factory, opaque, context: context3, callback, responseHeaders } = this;
|
||||
const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
@@ -128983,7 +128983,7 @@ var require_api_stream3 = __commonJS({
|
||||
statusCode,
|
||||
headers,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") {
|
||||
throw new InvalidReturnValueError("expected Writable");
|
||||
@@ -129175,17 +129175,17 @@ var require_api_pipeline3 = __commonJS({
|
||||
this.res = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
const { ret, res } = this;
|
||||
assert(!res, "pipeline cannot be retried");
|
||||
if (ret.destroyed) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders(statusCode, rawHeaders, resume) {
|
||||
const { opaque, handler: handler2, context: context2 } = this;
|
||||
const { opaque, handler: handler2, context: context3 } = this;
|
||||
if (statusCode < 200) {
|
||||
if (this.onInfo) {
|
||||
const headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders);
|
||||
@@ -129203,7 +129203,7 @@ var require_api_pipeline3 = __commonJS({
|
||||
headers,
|
||||
opaque,
|
||||
body: this.res,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
} catch (err) {
|
||||
this.res.on("error", util.nop);
|
||||
@@ -129287,7 +129287,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
this.context = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
@@ -129298,7 +129298,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
throw new SocketError("bad upgrade", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
assert.strictEqual(statusCode, 101);
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
@@ -129307,7 +129307,7 @@ var require_api_upgrade3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -129375,18 +129375,18 @@ var require_api_connect3 = __commonJS({
|
||||
this.abort = null;
|
||||
addSignal(this, signal);
|
||||
}
|
||||
onConnect(abort, context2) {
|
||||
onConnect(abort, context3) {
|
||||
if (!this.callback) {
|
||||
throw new RequestAbortedError();
|
||||
}
|
||||
this.abort = abort;
|
||||
this.context = context2;
|
||||
this.context = context3;
|
||||
}
|
||||
onHeaders() {
|
||||
throw new SocketError("bad connect", null);
|
||||
}
|
||||
onUpgrade(statusCode, rawHeaders, socket) {
|
||||
const { callback, opaque, context: context2 } = this;
|
||||
const { callback, opaque, context: context3 } = this;
|
||||
removeSignal(this);
|
||||
this.callback = null;
|
||||
let headers = rawHeaders;
|
||||
@@ -129398,7 +129398,7 @@ var require_api_connect3 = __commonJS({
|
||||
headers,
|
||||
socket,
|
||||
opaque,
|
||||
context: context2
|
||||
context: context3
|
||||
});
|
||||
}
|
||||
onError(err) {
|
||||
@@ -137517,8 +137517,8 @@ var require_dist_node2 = __commonJS({
|
||||
function isKeyOperator2(operator) {
|
||||
return operator === ";" || operator === "&" || operator === "?";
|
||||
}
|
||||
function getValues2(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
function getValues2(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined3(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
@@ -137582,7 +137582,7 @@ var require_dist_node2 = __commonJS({
|
||||
expand: expand2.bind(null, template)
|
||||
};
|
||||
}
|
||||
function expand2(template, context2) {
|
||||
function expand2(template, context3) {
|
||||
var operators = ["+", "#", ".", "/", ";", "?", "&"];
|
||||
template = template.replace(
|
||||
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
||||
@@ -137596,7 +137596,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
expression.split(/,/g).forEach(function(variable) {
|
||||
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
|
||||
values.push(getValues2(context2, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3]));
|
||||
});
|
||||
if (operator && operator !== "+") {
|
||||
var separator = ",";
|
||||
@@ -143048,7 +143048,7 @@ var require_download_artifact = __commonJS({
|
||||
var promises_1 = __importDefault2(require("fs/promises"));
|
||||
var crypto2 = __importStar2(require("crypto"));
|
||||
var stream = __importStar2(require("stream"));
|
||||
var github2 = __importStar2(require_github2());
|
||||
var github3 = __importStar2(require_github2());
|
||||
var core14 = __importStar2(require_core());
|
||||
var httpClient = __importStar2(require_lib());
|
||||
var unzip_stream_1 = __importDefault2(require_unzip());
|
||||
@@ -143136,7 +143136,7 @@ var require_download_artifact = __commonJS({
|
||||
function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, options) {
|
||||
return __awaiter2(this, void 0, void 0, function* () {
|
||||
const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path);
|
||||
const api = github2.getOctokit(token);
|
||||
const api = github3.getOctokit(token);
|
||||
let digestMismatch = false;
|
||||
core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`);
|
||||
const { headers, status } = yield api.rest.actions.downloadArtifact({
|
||||
@@ -143457,8 +143457,8 @@ var require_get_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -143581,9 +143581,9 @@ var require_delete_artifact = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield (0, get_artifact_1.getArtifactPublic)(artifactName, workflowRunId, repositoryOwner, repositoryName, token);
|
||||
const deleteArtifactResp = yield github2.rest.actions.deleteArtifact({
|
||||
const deleteArtifactResp = yield github3.rest.actions.deleteArtifact({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
artifact_id: getArtifactResp.artifact.id
|
||||
@@ -143690,9 +143690,9 @@ var require_list_artifacts = __commonJS({
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github2 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const github3 = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
let currentPageNumber = 1;
|
||||
const { data: listArtifactResponse } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -143717,7 +143717,7 @@ var require_list_artifacts = __commonJS({
|
||||
currentPageNumber++;
|
||||
for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) {
|
||||
(0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
|
||||
const { data: listArtifactResponse2 } = yield github2.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
const { data: listArtifactResponse2 } = yield github3.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
@@ -161352,6 +161352,7 @@ var core12 = __toESM(require_core());
|
||||
var import_archiver = __toESM(require_archiver());
|
||||
|
||||
// src/analyze.ts
|
||||
var github2 = __toESM(require_github());
|
||||
var io5 = __toESM(require_io());
|
||||
|
||||
// src/analyses.ts
|
||||
@@ -161516,6 +161517,7 @@ var semver2 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
Generated
+1
@@ -107508,6 +107508,7 @@ var semver5 = __toESM(require_semver2());
|
||||
// src/feature-flags/properties.ts
|
||||
var RepositoryPropertyName = /* @__PURE__ */ ((RepositoryPropertyName2) => {
|
||||
RepositoryPropertyName2["DISABLE_OVERLAY"] = "github-codeql-disable-overlay";
|
||||
RepositoryPropertyName2["ENABLE_FILE_COVERAGE_ON_PRS"] = "github-codeql-enable-file-coverage-on-prs";
|
||||
RepositoryPropertyName2["EXTRA_QUERIES"] = "github-codeql-extra-queries";
|
||||
return RepositoryPropertyName2;
|
||||
})(RepositoryPropertyName || {});
|
||||
|
||||
+18
-3
@@ -2,10 +2,15 @@ import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import { performance } from "perf_hooks";
|
||||
|
||||
import * as github from "@actions/github";
|
||||
import * as io from "@actions/io";
|
||||
import * as yaml from "js-yaml";
|
||||
|
||||
import { getTemporaryDirectory, PullRequestBranches } from "./actions-util";
|
||||
import {
|
||||
getTemporaryDirectory,
|
||||
isDefaultSetup,
|
||||
PullRequestBranches,
|
||||
} from "./actions-util";
|
||||
import * as analyses from "./analyses";
|
||||
import { setupCppAutobuild } from "./autobuild";
|
||||
import { type CodeQL } from "./codeql";
|
||||
@@ -22,6 +27,7 @@ import {
|
||||
} from "./diff-informed-analysis-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { FeatureEnablement, Feature } from "./feature-flags";
|
||||
import { RepositoryPropertyName } from "./feature-flags/properties";
|
||||
import { KnownLanguage, Language } from "./languages";
|
||||
import { Logger, withGroupAsync } from "./logging";
|
||||
import { OverlayDatabaseMode } from "./overlay";
|
||||
@@ -502,9 +508,18 @@ export async function runQueries(
|
||||
logger.info(qualityAnalysisSummary);
|
||||
}
|
||||
if (!config.enableFileCoverageInformation) {
|
||||
const isOrgOwned =
|
||||
github.context.payload.repository?.owner.type === "Organization";
|
||||
let reenableMessage: string;
|
||||
if (isOrgOwned) {
|
||||
reenableMessage = ` To enable file coverage information on pull requests, set the '${RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS}' repository property to 'true'.`;
|
||||
} else if (!isDefaultSetup()) {
|
||||
reenableMessage = ` To enable file coverage information on pull requests, set the '${EnvVar.ENABLE_FILE_COVERAGE_ON_PRS}' environment variable to 'true'.`;
|
||||
} else {
|
||||
reenableMessage = "";
|
||||
}
|
||||
logger.info(
|
||||
"To speed up pull request analysis, file coverage information is only enabled when analyzing " +
|
||||
"the default branch and protected branches.",
|
||||
`To speed up pull request analysis, file coverage information is only enabled when analyzing the default branch and protected branches.${reenableMessage}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,11 @@ export enum EnvVar {
|
||||
*/
|
||||
ANALYSIS_KEY = "CODEQL_ACTION_ANALYSIS_KEY",
|
||||
|
||||
/**
|
||||
* Whether to enable file coverage information on pull requests.
|
||||
*/
|
||||
ENABLE_FILE_COVERAGE_ON_PRS = "CODEQL_ACTION_ENABLE_FILE_COVERAGE_ON_PRS",
|
||||
|
||||
/** Used by Code Scanning Risk Assessment to communicate the assessment ID to the CodeQL Action. */
|
||||
RISK_ASSESSMENT_ID = "CODEQL_ACTION_RISK_ASSESSMENT_ID",
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ import { GitHubVariant, GitHubVersion } from "../util";
|
||||
*/
|
||||
export enum RepositoryPropertyName {
|
||||
DISABLE_OVERLAY = "github-codeql-disable-overlay",
|
||||
ENABLE_FILE_COVERAGE_ON_PRS = "github-codeql-enable-file-coverage-on-prs",
|
||||
EXTRA_QUERIES = "github-codeql-extra-queries",
|
||||
}
|
||||
|
||||
/** Parsed types of the known repository properties. */
|
||||
type AllRepositoryProperties = {
|
||||
[RepositoryPropertyName.DISABLE_OVERLAY]: boolean;
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]: boolean;
|
||||
[RepositoryPropertyName.EXTRA_QUERIES]: string;
|
||||
};
|
||||
|
||||
@@ -29,6 +31,8 @@ const repositoryPropertyParsers: {
|
||||
) => AllRepositoryProperties[K];
|
||||
} = {
|
||||
[RepositoryPropertyName.DISABLE_OVERLAY]: parseBooleanRepositoryProperty,
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]:
|
||||
parseBooleanRepositoryProperty,
|
||||
[RepositoryPropertyName.EXTRA_QUERIES]: parseStringRepositoryProperty,
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -378,8 +378,9 @@ async function run(startedAt: Date) {
|
||||
repositoryProperties: repositoryPropertiesResult.orElse({}),
|
||||
enableFileCoverageInformation: await getFileCoverageInformationEnabled(
|
||||
debugMode,
|
||||
repositoryNwo,
|
||||
features,
|
||||
repositoryPropertiesResult.orElse({}),
|
||||
logger,
|
||||
),
|
||||
logger,
|
||||
});
|
||||
|
||||
+208
-17
@@ -6,14 +6,16 @@ import * as sinon from "sinon";
|
||||
|
||||
import * as actionsUtil from "./actions-util";
|
||||
import { createStubCodeQL } from "./codeql";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature } from "./feature-flags";
|
||||
import { RepositoryPropertyName } from "./feature-flags/properties";
|
||||
import {
|
||||
checkPacksForOverlayCompatibility,
|
||||
cleanupDatabaseClusterDirectory,
|
||||
getFileCoverageInformationEnabled,
|
||||
} from "./init";
|
||||
import { KnownLanguage } from "./languages";
|
||||
import { parseRepositoryNwo } from "./repository";
|
||||
import { getRunnerLogger } from "./logging";
|
||||
import {
|
||||
createFeatures,
|
||||
LoggedMessage,
|
||||
@@ -453,8 +455,9 @@ test("file coverage information enabled when debugMode is true", async (t) => {
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
true, // debugMode
|
||||
parseRepositoryNwo("github/codeql-action"),
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{},
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -465,20 +468,9 @@ test("file coverage information enabled when not analyzing a pull request", asyn
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
parseRepositoryNwo("github/codeql-action"),
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage information enabled when owner is not 'github'", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
parseRepositoryNwo("other-org/some-repo"),
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{},
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -489,8 +481,9 @@ test("file coverage information enabled when feature flag is not enabled", async
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
parseRepositoryNwo("github/codeql-action"),
|
||||
createFeatures([]),
|
||||
{},
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -501,8 +494,206 @@ test("file coverage information disabled when all conditions for skipping are me
|
||||
t.false(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
parseRepositoryNwo("github/codeql-action"),
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{},
|
||||
getRunnerLogger(true),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage information enabled when repository property enables it on PRs", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]: true,
|
||||
},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage information enabled when env var enables it on PRs", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS] = "true";
|
||||
t.teardown(() => {
|
||||
delete process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
});
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(EnvVar.ENABLE_FILE_COVERAGE_ON_PRS),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage information disabled when env var disables it on PRs", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS] = "false";
|
||||
t.teardown(() => {
|
||||
delete process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
});
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.false(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([]),
|
||||
{},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(EnvVar.ENABLE_FILE_COVERAGE_ON_PRS) &&
|
||||
m.message.includes("disabled"),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage information disabled when repository property disables it on PRs", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.false(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([]),
|
||||
{
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]: false,
|
||||
},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(
|
||||
RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS,
|
||||
) &&
|
||||
m.message.includes("disabled"),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage env var 'false' takes precedence over repository property 'true'", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS] = "false";
|
||||
t.teardown(() => {
|
||||
delete process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
});
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.false(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]: true,
|
||||
},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
// Should mention the env var, not the repo property
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(EnvVar.ENABLE_FILE_COVERAGE_ON_PRS) &&
|
||||
m.message.includes("disabled"),
|
||||
),
|
||||
);
|
||||
t.false(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("file coverage env var takes precedence over repository property", async (t) => {
|
||||
sinon.stub(actionsUtil, "isAnalyzingPullRequest").returns(true);
|
||||
process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS] = "true";
|
||||
t.teardown(() => {
|
||||
delete process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
});
|
||||
|
||||
const messages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(messages);
|
||||
|
||||
t.true(
|
||||
await getFileCoverageInformationEnabled(
|
||||
false, // debugMode
|
||||
createFeatures([Feature.SkipFileCoverageOnPrs]),
|
||||
{
|
||||
[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS]: true,
|
||||
},
|
||||
logger,
|
||||
),
|
||||
);
|
||||
|
||||
// Should mention the env var, not the repo property
|
||||
t.true(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(EnvVar.ENABLE_FILE_COVERAGE_ON_PRS),
|
||||
),
|
||||
);
|
||||
t.false(
|
||||
messages.some(
|
||||
(m) =>
|
||||
m.type === "info" &&
|
||||
typeof m.message === "string" &&
|
||||
m.message.includes(RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
+59
-13
@@ -13,14 +13,18 @@ import {
|
||||
import { GitHubApiDetails } from "./api-client";
|
||||
import { CodeQL, setupCodeQL } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import {
|
||||
CodeQLDefaultVersionInfo,
|
||||
Feature,
|
||||
FeatureEnablement,
|
||||
} from "./feature-flags";
|
||||
import {
|
||||
RepositoryProperties,
|
||||
RepositoryPropertyName,
|
||||
} from "./feature-flags/properties";
|
||||
import { KnownLanguage, Language } from "./languages";
|
||||
import { Logger, withGroupAsync } from "./logging";
|
||||
import { RepositoryNwo } from "./repository";
|
||||
import { ToolsSource } from "./setup-codeql";
|
||||
import { ZstdAvailability } from "./tar";
|
||||
import { ToolsDownloadStatusReport } from "./tools-download";
|
||||
@@ -300,18 +304,60 @@ export function cleanupDatabaseClusterDirectory(
|
||||
|
||||
export async function getFileCoverageInformationEnabled(
|
||||
debugMode: boolean,
|
||||
repositoryNwo: RepositoryNwo,
|
||||
features: FeatureEnablement,
|
||||
repositoryProperties: RepositoryProperties,
|
||||
logger: Logger,
|
||||
): Promise<boolean> {
|
||||
return (
|
||||
// Always enable file coverage information in debug mode
|
||||
debugMode ||
|
||||
// We're most interested in speeding up PRs, and we want to keep
|
||||
// submitting file coverage information for the default branch since
|
||||
// it is used to populate the status page.
|
||||
!isAnalyzingPullRequest() ||
|
||||
// For now, restrict this feature to the GitHub org
|
||||
repositoryNwo.owner !== "github" ||
|
||||
!(await features.getValue(Feature.SkipFileCoverageOnPrs))
|
||||
);
|
||||
// Always enable file coverage information in debug mode
|
||||
if (debugMode) return true;
|
||||
|
||||
// We're most interested in speeding up PRs, and we want to keep
|
||||
// submitting file coverage information for the default branch since
|
||||
// it is used to populate the status page.
|
||||
if (!isAnalyzingPullRequest()) return true;
|
||||
|
||||
// Allow users to explicitly enable or disable file coverage on PRs via
|
||||
// an environment variable. This has the highest precedence.
|
||||
const envVarValue = process.env[EnvVar.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
if (envVarValue === "true") {
|
||||
logger.info(
|
||||
"File coverage information on pull requests has been enabled by the " +
|
||||
`'${EnvVar.ENABLE_FILE_COVERAGE_ON_PRS}' environment variable. ` +
|
||||
"This may increase the time it takes to analyze pull requests, " +
|
||||
"particularly on large repositories.",
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if (envVarValue === "false") {
|
||||
logger.info(
|
||||
"File coverage information on pull requests has been disabled by the " +
|
||||
`'${EnvVar.ENABLE_FILE_COVERAGE_ON_PRS}' environment variable.`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Allow repository owners to explicitly enable or disable file coverage
|
||||
// on PRs via a repository property.
|
||||
const repoPropValue =
|
||||
repositoryProperties[RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS];
|
||||
if (repoPropValue === true) {
|
||||
logger.info(
|
||||
"File coverage information on pull requests has been enabled by the " +
|
||||
`'${RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS}' repository property. ` +
|
||||
"This may increase the time it takes to analyze pull requests, " +
|
||||
"particularly on large repositories.",
|
||||
);
|
||||
return true;
|
||||
}
|
||||
if (repoPropValue === false) {
|
||||
logger.info(
|
||||
"File coverage information on pull requests has been disabled by the " +
|
||||
`'${RepositoryPropertyName.ENABLE_FILE_COVERAGE_ON_PRS}' repository property.`,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(await features.getValue(Feature.SkipFileCoverageOnPrs))) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user