mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 09:37:15 +00:00
Rebuild now type error fixed in main
This commit is contained in:
21
lib/setup-codeql-action.js
generated
21
lib/setup-codeql-action.js
generated
@@ -90961,24 +90961,25 @@ var Features = class {
|
||||
* @throws if a `minimumVersion` is specified for the feature, and `codeql` is not provided.
|
||||
*/
|
||||
async getValue(feature, codeql) {
|
||||
if (!codeql && featureConfig[feature].minimumVersion) {
|
||||
const config = featureConfig[feature];
|
||||
if (!codeql && config.minimumVersion) {
|
||||
throw new Error(
|
||||
`Internal error: A minimum version is specified for feature ${feature}, but no instance of CodeQL was provided.`
|
||||
);
|
||||
}
|
||||
if (!codeql && featureConfig[feature].toolsFeature) {
|
||||
if (!codeql && config.toolsFeature) {
|
||||
throw new Error(
|
||||
`Internal error: A required tools feature is specified for feature ${feature}, but no instance of CodeQL was provided.`
|
||||
);
|
||||
}
|
||||
const envVar = (process.env[featureConfig[feature].envVar] || "").toLocaleLowerCase();
|
||||
const envVar = (process.env[config.envVar] || "").toLocaleLowerCase();
|
||||
if (envVar === "false") {
|
||||
this.logger.debug(
|
||||
`Feature ${feature} is disabled via the environment variable ${featureConfig[feature].envVar}.`
|
||||
`Feature ${feature} is disabled via the environment variable ${config.envVar}.`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
const minimumVersion2 = featureConfig[feature].minimumVersion;
|
||||
const minimumVersion2 = config.minimumVersion;
|
||||
if (codeql && minimumVersion2) {
|
||||
if (!await codeQlVersionAtLeast(codeql, minimumVersion2)) {
|
||||
this.logger.debug(
|
||||
@@ -90991,7 +90992,7 @@ var Features = class {
|
||||
);
|
||||
}
|
||||
}
|
||||
const toolsFeature = featureConfig[feature].toolsFeature;
|
||||
const toolsFeature = config.toolsFeature;
|
||||
if (codeql && toolsFeature) {
|
||||
if (!await codeql.supportsFeature(toolsFeature)) {
|
||||
this.logger.debug(
|
||||
@@ -91006,7 +91007,7 @@ var Features = class {
|
||||
}
|
||||
if (envVar === "true") {
|
||||
this.logger.debug(
|
||||
`Feature ${feature} is enabled via the environment variable ${featureConfig[feature].envVar}.`
|
||||
`Feature ${feature} is enabled via the environment variable ${config.envVar}.`
|
||||
);
|
||||
return true;
|
||||
}
|
||||
@@ -91017,7 +91018,7 @@ var Features = class {
|
||||
);
|
||||
return apiValue;
|
||||
}
|
||||
const defaultValue = featureConfig[feature].defaultValue;
|
||||
const defaultValue = config.defaultValue;
|
||||
this.logger.debug(
|
||||
`Feature ${feature} is ${defaultValue ? "enabled" : "disabled"} due to its default value.`
|
||||
);
|
||||
@@ -91154,7 +91155,9 @@ var GitHubFeatureFlags = class {
|
||||
return {};
|
||||
}
|
||||
try {
|
||||
const featuresToRequest = Object.entries(featureConfig).filter(([, config]) => !config.legacyApi).map(([f]) => f);
|
||||
const featuresToRequest = Object.entries(featureConfig).filter(
|
||||
([, config]) => !config.legacyApi
|
||||
).map(([f]) => f);
|
||||
const FEATURES_PER_REQUEST = 25;
|
||||
const featureChunks = [];
|
||||
while (featuresToRequest.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user