@@ -136,14 +136,6 @@ export interface CodeQL {
136136 language : string ,
137137 ) : Promise < ResolveBuildEnvironmentOutput > ;
138138
139- /**
140- * Run 'codeql pack download'.
141- */
142- packDownload (
143- packs : string [ ] ,
144- qlconfigFile : string | undefined ,
145- ) : Promise < PackDownloadOutput > ;
146-
147139 /**
148140 * Clean up all the databases within a database cluster.
149141 */
@@ -256,17 +248,6 @@ export interface ResolveBuildEnvironmentOutput {
256248 } ;
257249}
258250
259- export interface PackDownloadOutput {
260- packs : PackDownloadItem [ ] ;
261- }
262-
263- interface PackDownloadItem {
264- name : string ;
265- version : string ;
266- packDir : string ;
267- installResult : string ;
268- }
269-
270251/**
271252 * Stores the CodeQL object, and is populated by `setupCodeQL` or `getCodeQL`.
272253 */
@@ -478,7 +459,6 @@ export function createStubCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
478459 partialCodeql ,
479460 "resolveBuildEnvironment" ,
480461 ) ,
481- packDownload : resolveFunction ( partialCodeql , "packDownload" ) ,
482462 databaseCleanupCluster : resolveFunction (
483463 partialCodeql ,
484464 "databaseCleanupCluster" ,
@@ -888,59 +868,6 @@ export async function getCodeQLForCmd(
888868 ] ;
889869 return await runCli ( cmd , codeqlArgs ) ;
890870 } ,
891-
892- /**
893- * Download specified packs into the package cache. If the specified
894- * package and version already exists (e.g., from a previous analysis run),
895- * then it is not downloaded again (unless the extra option `--force` is
896- * specified).
897- *
898- * If no version is specified, then the latest version is
899- * downloaded. The check to determine what the latest version is is done
900- * each time this package is requested.
901- *
902- * Optionally, a `qlconfigFile` is included. If used, then this file
903- * is used to determine which registry each pack is downloaded from.
904- */
905- async packDownload (
906- packs : string [ ] ,
907- qlconfigFile : string | undefined ,
908- ) : Promise < PackDownloadOutput > {
909- const qlconfigArg = qlconfigFile
910- ? [ `--qlconfig-file=${ qlconfigFile } ` ]
911- : ( [ ] as string [ ] ) ;
912-
913- const codeqlArgs = [
914- "pack" ,
915- "download" ,
916- ...qlconfigArg ,
917- "--format=json" ,
918- "--resolve-query-specs" ,
919- ...getExtraOptionsFromEnv ( [ "pack" , "download" ] ) ,
920- ...packs ,
921- ] ;
922-
923- const output = await runCli ( cmd , codeqlArgs ) ;
924-
925- try {
926- const parsedOutput : PackDownloadOutput = JSON . parse ( output ) ;
927- if (
928- Array . isArray ( parsedOutput . packs ) &&
929- // TODO PackDownloadOutput will not include the version if it is not specified
930- // in the input. The version is always the latest version available.
931- // It should be added to the output, but this requires a CLI change
932- parsedOutput . packs . every ( ( p ) => p . name /* && p.version */ )
933- ) {
934- return parsedOutput ;
935- } else {
936- throw new Error ( "Unexpected output from pack download" ) ;
937- }
938- } catch ( e ) {
939- throw new Error (
940- `Attempted to download specified packs but got an error:\n${ output } \n${ e } ` ,
941- ) ;
942- }
943- } ,
944871 async databaseCleanupCluster (
945872 config : Config ,
946873 cleanupLevel : string ,
0 commit comments