File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ export interface UpgradesInfo {
5050 finalDbscheme : string ;
5151}
5252
53+ /**
54+ * The expected output of `codeql resolve qlpacks`.
55+ */
56+ export type QlpacksInfo = { [ name : string ] : string [ ] } ;
57+
5358/**
5459 * The expected output of `codeql resolve metadata`.
5560 */
@@ -396,7 +401,6 @@ export class CodeQLCliServer implements Disposable {
396401 "Resolving database" ) ;
397402 }
398403
399-
400404 /**
401405 * Gets information necessary for upgrading a database.
402406 * @param dbScheme the path to the dbscheme of the database to be upgraded.
@@ -412,6 +416,21 @@ export class CodeQLCliServer implements Disposable {
412416 "Resolving database upgrade scripts" ,
413417 ) ;
414418 }
419+
420+ /**
421+ * Gets information about available qlpacks
422+ * @param searchPath A list of directories to search for qlpacks
423+ * @returns A dictionary mapping qlpack name to the directory it comes from
424+ */
425+ resolveQlpacks ( searchPath : string [ ] ) : Promise < QlpacksInfo > {
426+ const args = [ '--additional-packs' , searchPath . join ( path . delimiter ) ] ;
427+
428+ return this . runJsonCodeQlCliCommand < QlpacksInfo > (
429+ [ 'resolve' , 'qlpacks' ] ,
430+ args ,
431+ "Resolving qlpack information" ,
432+ ) ;
433+ }
415434}
416435
417436/**
You can’t perform that action at this time.
0 commit comments