File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ import * as fs from "fs";
22import path from "path" ;
33
44import { getTemporaryDirectory } from "../actions-util" ;
5- import { VersionInfo } from "../codeql" ;
65import { Env , getEnv } from "../environment" ;
76import { isPersistedVersionInfo } from "../util" ;
87
8+ import type { VersionInfo } from "./types" ;
9+
910/**
1011 * The name of the temporary file that backs the on-disk cache of
1112 * CLI responses between workflow steps.
Original file line number Diff line number Diff line change 1+ export interface VersionInfo {
2+ version : string ;
3+ features ?: { [ name : string ] : boolean } ;
4+ /**
5+ * The overlay version helps deal with backward incompatible changes for
6+ * overlay analysis. When a precompiled query pack reports the same overlay
7+ * version as the CodeQL CLI, we can use the CodeQL CLI to perform overlay
8+ * analysis with that pack. Otherwise, if the overlay versions are different,
9+ * or if either the pack or the CLI does not report an overlay version,
10+ * we need to revert to non-overlay analysis.
11+ */
12+ overlayVersion ?: number ;
13+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313} from "./actions-util" ;
1414import * as api from "./api-client" ;
1515import * as outputCache from "./cli/output-cache" ;
16+ import type { VersionInfo } from "./cli/types" ;
1617import { CliError , wrapCliConfigurationError } from "./cli-errors" ;
1718import { appendExtraQueryExclusions , type Config } from "./config-utils" ;
1819import { DocUrl } from "./doc-url" ;
@@ -216,20 +217,6 @@ export interface CodeQL {
216217 ) : Promise < void > ;
217218}
218219
219- export interface VersionInfo {
220- version : string ;
221- features ?: { [ name : string ] : boolean } ;
222- /**
223- * The overlay version helps deal with backward incompatible changes for
224- * overlay analysis. When a precompiled query pack reports the same overlay
225- * version as the CodeQL CLI, we can use the CodeQL CLI to perform overlay
226- * analysis with that pack. Otherwise, if the overlay versions are different,
227- * or if either the pack or the CLI does not report an overlay version,
228- * we need to revert to non-overlay analysis.
229- */
230- overlayVersion ?: number ;
231- }
232-
233220export interface ResolveDatabaseOutput {
234221 overlayBaseSpecifier ?: string ;
235222}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import * as apiClient from "./api-client";
1919import { GitHubApiDetails } from "./api-client" ;
2020import { CachingKind } from "./caching-utils" ;
2121import { resetCachedCodeQlVersion } from "./cli/output-cache" ;
22+ import type { VersionInfo } from "./cli/types" ;
2223import * as codeql from "./codeql" ;
2324import { Config } from "./config-utils" ;
2425import * as defaults from "./defaults.json" ;
@@ -872,7 +873,7 @@ export const makeVersionInfo = (
872873 version : string ,
873874 features ?: { [ name : string ] : boolean } ,
874875 overlayVersion ?: number ,
875- ) : codeql . VersionInfo => ( {
876+ ) : VersionInfo => ( {
876877 version,
877878 features,
878879 overlayVersion,
Original file line number Diff line number Diff line change 11import * as semver from "semver" ;
22
3- import type { VersionInfo } from "./codeql " ;
3+ import type { VersionInfo } from "./cli/types " ;
44
55export enum ToolsFeature {
66 BuiltinExtractorsSpecifyDefaultQueries = "builtinExtractorsSpecifyDefaultQueries" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import * as yaml from "js-yaml";
1010import * as semver from "semver" ;
1111
1212import * as apiCompatibility from "./api-compatibility.json" ;
13- import type { CodeQL , VersionInfo } from "./codeql" ;
13+ import type { VersionInfo } from "./cli/types" ;
14+ import type { CodeQL } from "./codeql" ;
1415import type { Pack } from "./config/db-config" ;
1516import type { Config } from "./config-utils" ;
1617import { EnvVar , getRequiredEnvParam } from "./environment" ;
You can’t perform that action at this time.
0 commit comments