@@ -19,8 +19,9 @@ import {
1919 getAnalysisConfig ,
2020} from "./analyses" ;
2121import * as api from "./api-client" ;
22- import { CachingKind , getCachingKind } from "./caching-utils" ;
22+ import { getCachingKind } from "./caching-utils" ;
2323import { type CodeQL } from "./codeql" ;
24+ import { type Config } from "./config/action-config" ;
2425import {
2526 calculateAugmentation ,
2627 ExcludeQueryFilter ,
@@ -82,6 +83,8 @@ import {
8283 getEnv ,
8384} from "./util" ;
8485
86+ export { type Config } from "./config/action-config" ;
87+
8588/**
8689 * The minimum available disk space (in MB) required to perform overlay analysis.
8790 * If the available disk space on the runner is below the threshold when deciding
@@ -143,125 +146,6 @@ export interface RegistryConfigNoCredentials {
143146 kind ?: "github" | "docker" ;
144147}
145148
146- /**
147- * Format of the parsed config file.
148- */
149- export interface Config {
150- /**
151- * The version of the CodeQL Action that the configuration is for.
152- */
153- version : string ;
154- /**
155- * Set of analysis kinds that are enabled.
156- */
157- analysisKinds : AnalysisKind [ ] ;
158- /**
159- * Set of languages to run analysis for.
160- */
161- languages : Language [ ] ;
162- /**
163- * Build mode, if set. Currently only a single build mode is supported per job.
164- */
165- buildMode : BuildMode | undefined ;
166- /**
167- * A unaltered copy of the original user input.
168- * Mainly intended to be used for status reporting.
169- * If any field is useful for the actual processing
170- * of the action then consider pulling it out to a
171- * top-level field above.
172- */
173- originalUserInput : UserConfig ;
174- /**
175- * Directory to use for temporary files that should be
176- * deleted at the end of the job.
177- */
178- tempDir : string ;
179- /**
180- * Path of the CodeQL executable.
181- */
182- codeQLCmd : string ;
183- /**
184- * Version of GitHub we are talking to.
185- */
186- gitHubVersion : GitHubVersion ;
187- /**
188- * The location where CodeQL databases should be stored.
189- */
190- dbLocation : string ;
191- /**
192- * Specifies whether we are debugging mode and should try to produce extra
193- * output for debugging purposes when possible.
194- */
195- debugMode : boolean ;
196- /**
197- * Specifies the name of the debugging artifact if we are in debug mode.
198- */
199- debugArtifactName : string ;
200- /**
201- * Specifies the name of the database in the debugging artifact.
202- */
203- debugDatabaseName : string ;
204- /**
205- * The configuration we computed by combining `originalUserInput` with `augmentationProperties`,
206- * as well as adjustments made to it based on unsupported or required options.
207- */
208- computedConfig : UserConfig ;
209-
210- /**
211- * Partial map from languages to locations of TRAP caches for that language.
212- * If a key is omitted, then TRAP caching should not be used for that language.
213- */
214- trapCaches : { [ language : Language ] : string } ;
215-
216- /**
217- * Time taken to download TRAP caches. Used for status reporting.
218- */
219- trapCacheDownloadTime : number ;
220-
221- /** A value indicating how dependency caching should be used. */
222- dependencyCachingEnabled : CachingKind ;
223-
224- /** The keys of caches that we restored, if any. */
225- dependencyCachingRestoredKeys : string [ ] ;
226-
227- /**
228- * Extra query exclusions to append to the config.
229- */
230- extraQueryExclusions : ExcludeQueryFilter [ ] ;
231-
232- /**
233- * The overlay database mode to use.
234- */
235- overlayDatabaseMode : OverlayDatabaseMode ;
236-
237- /**
238- * Whether to use caching for overlay databases. If it is true, the action
239- * will upload the created overlay-base database to the actions cache, and
240- * download an overlay-base database from the actions cache before it creates
241- * a new overlay database. If it is false, the action assumes that the
242- * workflow will be responsible for managing database storage and retrieval.
243- *
244- * This property has no effect unless `overlayDatabaseMode` is `Overlay` or
245- * `OverlayBase`.
246- */
247- useOverlayDatabaseCaching : boolean ;
248-
249- /**
250- * Whether the overlay database mode was set explicitly.
251- */
252- overlayModeSetExplicitly : boolean ;
253-
254- /**
255- * A partial mapping from repository properties that affect us to their values.
256- */
257- repositoryProperties : RepositoryProperties ;
258-
259- /**
260- * Whether to enable file coverage information.
261- */
262- enableFileCoverageInformation : boolean ;
263- }
264-
265149async function getSupportedLanguageMap (
266150 codeql : CodeQL ,
267151 logger : Logger ,
0 commit comments