@@ -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 {
@@ -184,6 +185,11 @@ export interface AugmentationProperties {
184185 * Default query filters to apply to the queries in the config.
185186 */
186187 defaultQueryFilters ?: QueryFilter [ ] ;
188+
189+ /**
190+ * The overlay database mode to use.
191+ */
192+ overlayDatabaseMode : OverlayDatabaseMode ;
187193}
188194
189195/**
@@ -196,6 +202,7 @@ export const defaultAugmentationProperties: AugmentationProperties = {
196202 packsInput : undefined ,
197203 queriesInput : undefined ,
198204 defaultQueryFilters : [ ] ,
205+ overlayDatabaseMode : OverlayDatabaseMode . None ,
199206} ;
200207export type Packs = Partial < Record < Language , string [ ] > > ;
201208
@@ -419,6 +426,7 @@ export interface InitConfigInputs {
419426 tempDir : string ;
420427 codeql : CodeQL ;
421428 workspacePath : string ;
429+ sourceRoot : string ;
422430 githubVersion : GitHubVersion ;
423431 apiDetails : api . GitHubApiCombinedDetails ;
424432 features : FeatureEnablement ;
@@ -451,6 +459,7 @@ export async function getDefaultConfig({
451459 repository,
452460 tempDir,
453461 codeql,
462+ sourceRoot,
454463 githubVersion,
455464 features,
456465 logger,
@@ -475,6 +484,8 @@ export async function getDefaultConfig({
475484 packsInput ,
476485 queriesInput ,
477486 languages ,
487+ sourceRoot ,
488+ buildMode ,
478489 logger ,
479490 ) ;
480491
@@ -541,6 +552,7 @@ async function loadConfig({
541552 tempDir,
542553 codeql,
543554 workspacePath,
555+ sourceRoot,
544556 githubVersion,
545557 apiDetails,
546558 features,
@@ -584,6 +596,8 @@ async function loadConfig({
584596 packsInput ,
585597 queriesInput ,
586598 languages ,
599+ sourceRoot ,
600+ buildMode ,
587601 logger ,
588602 ) ;
589603
@@ -626,6 +640,8 @@ async function loadConfig({
626640 * @param languages The languages that the config file is for. If the packs input
627641 * is non-empty, then there must be exactly one language. Otherwise, an
628642 * error is thrown.
643+ * @param sourceRoot The source root of the repository.
644+ * @param buildMode The build mode to use.
629645 * @param logger The logger to use for logging.
630646 *
631647 * @returns The properties that need to be augmented in the config file.
@@ -640,6 +656,8 @@ export async function calculateAugmentation(
640656 rawPacksInput : string | undefined ,
641657 rawQueriesInput : string | undefined ,
642658 languages : Language [ ] ,
659+ sourceRoot : string ,
660+ buildMode : BuildMode | undefined ,
643661 logger : Logger ,
644662) : Promise < AugmentationProperties > {
645663 const packsInputCombines = shouldCombine ( rawPacksInput ) ;
@@ -653,6 +671,13 @@ export async function calculateAugmentation(
653671 rawQueriesInput ,
654672 queriesInputCombines ,
655673 ) ;
674+ const overlayDatabaseMode = await getOverlayDatabaseMode (
675+ codeql ,
676+ features ,
677+ sourceRoot ,
678+ buildMode ,
679+ logger ,
680+ ) ;
656681
657682 const defaultQueryFilters : QueryFilter [ ] = [ ] ;
658683 if ( await shouldPerformDiffInformedAnalysis ( codeql , features , logger ) ) {
@@ -665,6 +690,7 @@ export async function calculateAugmentation(
665690 queriesInput,
666691 queriesInputCombines,
667692 defaultQueryFilters,
693+ overlayDatabaseMode,
668694 } ;
669695}
670696
@@ -691,6 +717,16 @@ function parseQueriesFromInput(
691717 return trimmedInput . split ( "," ) . map ( ( query ) => ( { uses : query . trim ( ) } ) ) ;
692718}
693719
720+ async function getOverlayDatabaseMode (
721+ codeql : CodeQL ,
722+ features : FeatureEnablement ,
723+ sourceRoot : string ,
724+ buildMode : BuildMode | undefined ,
725+ logger : Logger ,
726+ ) : Promise < OverlayDatabaseMode > {
727+ return OverlayDatabaseMode . None ;
728+ }
729+
694730/**
695731 * Pack names must be in the form of `scope/name`, with only alpha-numeric characters,
696732 * and `-` allowed as long as not the first or last char.
0 commit comments