Remove dead code
This commit is contained in:
parent
648838c4a0
commit
1eeb9df353
3 changed files with 2 additions and 66 deletions
24
lib/util.js
generated
24
lib/util.js
generated
|
|
@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getPinnedCodeqlVersion = exports.parseMatrixInput = exports.shouldBypassToolcache = exports.isHostedRunner = exports.checkForTimeout = exports.withTimeout = exports.tryGetFolderBytes = exports.listFolder = exports.doesDirectoryExist = exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.isInTestMode = exports.checkActionVersion = exports.getMlPoweredJsQueriesStatus = exports.getMlPoweredJsQueriesPack = exports.ML_POWERED_JS_QUERIES_PACK_NAME = exports.isGoodVersion = exports.delay = exports.bundleDb = exports.codeQlVersionAbove = exports.getCachedCodeQlVersion = exports.cacheCodeQlVersion = exports.isHTTPError = exports.UserError = exports.HTTPError = exports.getRequiredEnvParam = exports.enrichEnvironment = exports.initializeEnvironment = exports.EnvVar = exports.assertNever = exports.apiVersionInRange = exports.DisallowedAPIVersionReason = exports.checkGitHubVersionInRange = exports.getGitHubVersion = exports.GitHubVariant = exports.parseGitHubUrl = exports.getCodeQLDatabasePath = exports.getThreadsFlag = exports.getThreadsFlagValue = exports.getAddSnippetsFlag = exports.getMemoryFlag = exports.getMemoryFlagValue = exports.withTmpDir = exports.getToolNames = exports.getExtraOptionsEnvParam = exports.DID_AUTOBUILD_GO_ENV_VAR_NAME = exports.DEFAULT_DEBUG_DATABASE_NAME = exports.DEFAULT_DEBUG_ARTIFACT_NAME = exports.GITHUB_DOTCOM_URL = void 0;
|
||||
exports.parseMatrixInput = exports.shouldBypassToolcache = exports.isHostedRunner = exports.checkForTimeout = exports.withTimeout = exports.tryGetFolderBytes = exports.listFolder = exports.doesDirectoryExist = exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.isInTestMode = exports.checkActionVersion = exports.getMlPoweredJsQueriesStatus = exports.getMlPoweredJsQueriesPack = exports.ML_POWERED_JS_QUERIES_PACK_NAME = exports.isGoodVersion = exports.delay = exports.bundleDb = exports.codeQlVersionAbove = exports.getCachedCodeQlVersion = exports.cacheCodeQlVersion = exports.isHTTPError = exports.UserError = exports.HTTPError = exports.getRequiredEnvParam = exports.enrichEnvironment = exports.initializeEnvironment = exports.EnvVar = exports.assertNever = exports.apiVersionInRange = exports.DisallowedAPIVersionReason = exports.checkGitHubVersionInRange = exports.getGitHubVersion = exports.GitHubVariant = exports.parseGitHubUrl = exports.getCodeQLDatabasePath = exports.getThreadsFlag = exports.getThreadsFlagValue = exports.getAddSnippetsFlag = exports.getMemoryFlag = exports.getMemoryFlagValue = exports.withTmpDir = exports.getToolNames = exports.getExtraOptionsEnvParam = exports.DID_AUTOBUILD_GO_ENV_VAR_NAME = exports.DEFAULT_DEBUG_DATABASE_NAME = exports.DEFAULT_DEBUG_ARTIFACT_NAME = exports.GITHUB_DOTCOM_URL = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
|
|
@ -36,7 +36,6 @@ const api_client_1 = require("./api-client");
|
|||
const apiCompatibility = __importStar(require("./api-compatibility.json"));
|
||||
const codeql_1 = require("./codeql");
|
||||
const config_utils_1 = require("./config-utils");
|
||||
const defaults = __importStar(require("./defaults.json")); // Referenced from codeql-action-sync-tool!
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const languages_1 = require("./languages");
|
||||
const shared_environment_1 = require("./shared-environment");
|
||||
|
|
@ -758,25 +757,4 @@ function parseMatrixInput(matrixInput) {
|
|||
return JSON.parse(matrixInput);
|
||||
}
|
||||
exports.parseMatrixInput = parseMatrixInput;
|
||||
function computeToolcacheVersion(cliVersion, tagName) {
|
||||
return `${cliVersion}-${tagName}`;
|
||||
}
|
||||
/**
|
||||
* Gets version information about the CodeQL bundle which was current as of the release of this
|
||||
* Action.
|
||||
*
|
||||
* This should be used in the following circumstances:
|
||||
*
|
||||
* - When running the Action on Enterprise instances.
|
||||
* - When a user requests `tools: latest`.
|
||||
* - When the Action is running on Dotcom and no default CodeQL version feature flags are enabled.
|
||||
*/
|
||||
function getPinnedCodeqlVersion() {
|
||||
return {
|
||||
cliVersion: defaults.cliVersion,
|
||||
tagName: defaults.bundleVersion,
|
||||
toolcacheVersion: computeToolcacheVersion(defaults.cliVersion, defaults.bundleVersion),
|
||||
};
|
||||
}
|
||||
exports.getPinnedCodeqlVersion = getPinnedCodeqlVersion;
|
||||
//# sourceMappingURL=util.js.map
|
||||
File diff suppressed because one or more lines are too long
42
src/util.ts
42
src/util.ts
|
|
@ -19,7 +19,6 @@ import {
|
|||
parsePacksSpecification,
|
||||
prettyPrintPack,
|
||||
} from "./config-utils";
|
||||
import * as defaults from "./defaults.json"; // Referenced from codeql-action-sync-tool!
|
||||
import { Feature, FeatureEnablement } from "./feature-flags";
|
||||
import { KOTLIN_SWIFT_BYPASS, Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
|
|
@ -902,44 +901,3 @@ export function parseMatrixInput(
|
|||
}
|
||||
return JSON.parse(matrixInput);
|
||||
}
|
||||
|
||||
/** Version information about a CodeQL bundle. */
|
||||
export interface CodeqlBundleVersionInfo {
|
||||
/** Version number of the CLI contained within this bundle. */
|
||||
cliVersion: string;
|
||||
/** The name of the tag of the GitHub Release containing this bundle. */
|
||||
tagName: string;
|
||||
/**
|
||||
* Version number of this bundle within the toolcache.
|
||||
*
|
||||
* For compatibility with previous runner images and toolcaches, consumers should fallback to
|
||||
* looking up the `0.0.0-pre` version number within the toolcache if this version number is not
|
||||
* found, where `pre` is the prerelease component of this version number.
|
||||
*/
|
||||
toolcacheVersion: string;
|
||||
}
|
||||
|
||||
function computeToolcacheVersion(cliVersion: string, tagName: string): string {
|
||||
return `${cliVersion}-${tagName}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets version information about the CodeQL bundle which was current as of the release of this
|
||||
* Action.
|
||||
*
|
||||
* This should be used in the following circumstances:
|
||||
*
|
||||
* - When running the Action on Enterprise instances.
|
||||
* - When a user requests `tools: latest`.
|
||||
* - When the Action is running on Dotcom and no default CodeQL version feature flags are enabled.
|
||||
*/
|
||||
export function getPinnedCodeqlVersion(): CodeqlBundleVersionInfo {
|
||||
return {
|
||||
cliVersion: defaults.cliVersion,
|
||||
tagName: defaults.bundleVersion,
|
||||
toolcacheVersion: computeToolcacheVersion(
|
||||
defaults.cliVersion,
|
||||
defaults.bundleVersion
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue