mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
24 lines
881 B
TypeScript
24 lines
881 B
TypeScript
import type { VersionInfo } from "./cli/types";
|
|
|
|
export enum ToolsFeature {
|
|
BuiltinExtractorsSpecifyDefaultQueries = "builtinExtractorsSpecifyDefaultQueries",
|
|
BundleSupportsIncludeOption = "bundleSupportsIncludeOption",
|
|
BundleSupportsOverlay = "bundleSupportsOverlay",
|
|
IndirectTracingSupportsStaticBinaries = "indirectTracingSupportsStaticBinaries",
|
|
SuppressesMissingFileBaselineWarning = "suppressesMissingFileBaselineWarning",
|
|
}
|
|
|
|
/**
|
|
* Determines if the given feature is supported by the CLI.
|
|
*
|
|
* @param versionInfo Version information, including features, returned by the CLI.
|
|
* @param feature The feature to check for.
|
|
* @returns True if the feature is supported or false otherwise.
|
|
*/
|
|
export function isSupportedToolsFeature(
|
|
versionInfo: VersionInfo,
|
|
feature: ToolsFeature,
|
|
): boolean {
|
|
return !!versionInfo.features && versionInfo.features[feature];
|
|
}
|