@@ -12,6 +12,7 @@ import { shouldPerformDiffInformedAnalysis } from "./diff-informed-analysis-util
1212import { Feature , FeatureEnablement } from "./feature-flags" ;
1313import { Language , parseLanguage } from "./languages" ;
1414import { Logger } from "./logging" ;
15+ import { OverlayDatabaseMode } from "./overlay-database-utils" ;
1516import { RepositoryNwo } from "./repository" ;
1617import { downloadTrapCaches } from "./trap-caching" ;
1718import {
@@ -189,6 +190,11 @@ export interface AugmentationProperties {
189190 * Extra query exclusions to append to the config.
190191 */
191192 extraQueryExclusions ?: ExcludeQueryFilter [ ] ;
193+
194+ /**
195+ * The overlay database mode to use.
196+ */
197+ overlayDatabaseMode : OverlayDatabaseMode ;
192198}
193199
194200/**
@@ -202,6 +208,7 @@ export const defaultAugmentationProperties: AugmentationProperties = {
202208 queriesInput : undefined ,
203209 qualityQueriesInput : undefined ,
204210 extraQueryExclusions : [ ] ,
211+ overlayDatabaseMode : OverlayDatabaseMode . None ,
205212} ;
206213export type Packs = Partial < Record < Language , string [ ] > > ;
207214
@@ -426,6 +433,7 @@ export interface InitConfigInputs {
426433 tempDir : string ;
427434 codeql : CodeQL ;
428435 workspacePath : string ;
436+ sourceRoot : string ;
429437 githubVersion : GitHubVersion ;
430438 apiDetails : api . GitHubApiCombinedDetails ;
431439 features : FeatureEnablement ;
@@ -459,6 +467,7 @@ export async function getDefaultConfig({
459467 repository,
460468 tempDir,
461469 codeql,
470+ sourceRoot,
462471 githubVersion,
463472 features,
464473 logger,
@@ -484,6 +493,8 @@ export async function getDefaultConfig({
484493 queriesInput ,
485494 qualityQueriesInput ,
486495 languages ,
496+ sourceRoot ,
497+ buildMode ,
487498 logger ,
488499 ) ;
489500
@@ -551,6 +562,7 @@ async function loadConfig({
551562 tempDir,
552563 codeql,
553564 workspacePath,
565+ sourceRoot,
554566 githubVersion,
555567 apiDetails,
556568 features,
@@ -595,6 +607,8 @@ async function loadConfig({
595607 queriesInput ,
596608 qualityQueriesInput ,
597609 languages ,
610+ sourceRoot ,
611+ buildMode ,
598612 logger ,
599613 ) ;
600614
@@ -637,6 +651,8 @@ async function loadConfig({
637651 * @param languages The languages that the config file is for. If the packs input
638652 * is non-empty, then there must be exactly one language. Otherwise, an
639653 * error is thrown.
654+ * @param sourceRoot The source root of the repository.
655+ * @param buildMode The build mode to use.
640656 * @param logger The logger to use for logging.
641657 *
642658 * @returns The properties that need to be augmented in the config file.
@@ -652,6 +668,8 @@ export async function calculateAugmentation(
652668 rawQueriesInput : string | undefined ,
653669 rawQualityQueriesInput : string | undefined ,
654670 languages : Language [ ] ,
671+ sourceRoot : string ,
672+ buildMode : BuildMode | undefined ,
655673 logger : Logger ,
656674) : Promise < AugmentationProperties > {
657675 const packsInputCombines = shouldCombine ( rawPacksInput ) ;
@@ -665,6 +683,13 @@ export async function calculateAugmentation(
665683 rawQueriesInput ,
666684 queriesInputCombines ,
667685 ) ;
686+ const overlayDatabaseMode = await getOverlayDatabaseMode (
687+ codeql ,
688+ features ,
689+ sourceRoot ,
690+ buildMode ,
691+ logger ,
692+ ) ;
668693
669694 const qualityQueriesInput = parseQueriesFromInput (
670695 rawQualityQueriesInput ,
@@ -685,6 +710,7 @@ export async function calculateAugmentation(
685710 queriesInputCombines,
686711 qualityQueriesInput,
687712 extraQueryExclusions,
713+ overlayDatabaseMode,
688714 } ;
689715}
690716
@@ -711,6 +737,16 @@ function parseQueriesFromInput(
711737 return trimmedInput . split ( "," ) . map ( ( query ) => ( { uses : query . trim ( ) } ) ) ;
712738}
713739
740+ async function getOverlayDatabaseMode (
741+ codeql : CodeQL ,
742+ features : FeatureEnablement ,
743+ sourceRoot : string ,
744+ buildMode : BuildMode | undefined ,
745+ logger : Logger ,
746+ ) : Promise < OverlayDatabaseMode > {
747+ return OverlayDatabaseMode . None ;
748+ }
749+
714750/**
715751 * Pack names must be in the form of `scope/name`, with only alpha-numeric characters,
716752 * and `-` allowed as long as not the first or last char.
0 commit comments