@@ -17,6 +17,7 @@ import {
1717import * as api from "./api-client" ;
1818import { CachingKind , getCachingKind } from "./caching-utils" ;
1919import { type CodeQL } from "./codeql" ;
20+ import { ExcludeQueryFilter , UserConfig } from "./config/db-config" ;
2021import { shouldPerformDiffInformedAnalysis } from "./diff-informed-analysis-utils" ;
2122import { Feature , FeatureEnablement } from "./feature-flags" ;
2223import { getGitRoot , isAnalyzingDefaultBranch } from "./git-utils" ;
@@ -38,35 +39,12 @@ import {
3839 isDefined ,
3940} from "./util" ;
4041
42+ export * from "./config/db-config" ;
43+
4144// Property names from the user-supplied config file.
4245
4346const PACKS_PROPERTY = "packs" ;
4447
45- /**
46- * Format of the config file supplied by the user.
47- */
48- export interface UserConfig {
49- name ?: string ;
50- "disable-default-queries" ?: boolean ;
51- queries ?: Array < {
52- name ?: string ;
53- uses : string ;
54- } > ;
55- "paths-ignore" ?: string [ ] ;
56- paths ?: string [ ] ;
57-
58- // If this is a multi-language analysis, then the packages must be split by
59- // language. If this is a single language analysis, then no split by
60- // language is necessary.
61- packs ?: Record < string , string [ ] > | string [ ] ;
62-
63- // Set of query filters to include and exclude extra queries based on
64- // codeql query suite `include` and `exclude` properties
65- "query-filters" ?: QueryFilter [ ] ;
66- }
67-
68- export type QueryFilter = ExcludeQueryFilter | IncludeQueryFilter ;
69-
7048export type RegistryConfigWithCredentials = RegistryConfigNoCredentials & {
7149 // Token to use when downloading packs from this registry.
7250 token : string ;
@@ -90,14 +68,6 @@ export interface RegistryConfigNoCredentials {
9068 kind ?: "github" | "docker" ;
9169}
9270
93- interface ExcludeQueryFilter {
94- exclude : Record < string , string [ ] | string > ;
95- }
96-
97- interface IncludeQueryFilter {
98- include : Record < string , string [ ] | string > ;
99- }
100-
10171/**
10272 * Format of the parsed config file.
10373 */
0 commit comments