@@ -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 * Run 'codeql database cleanup'.
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 * Can be overridden in tests using `setCodeQL`.
@@ -468,7 +449,6 @@ export function setCodeQL(partialCodeql: Partial<CodeQL>): CodeQL {
468449 partialCodeql ,
469450 "resolveBuildEnvironment" ,
470451 ) ,
471- packDownload : resolveFunction ( partialCodeql , "packDownload" ) ,
472452 databaseCleanup : resolveFunction ( partialCodeql , "databaseCleanup" ) ,
473453 databaseBundle : resolveFunction ( partialCodeql , "databaseBundle" ) ,
474454 databaseRunQueries : resolveFunction ( partialCodeql , "databaseRunQueries" ) ,
@@ -891,58 +871,6 @@ export async function getCodeQLForCmd(
891871 return await runCli ( cmd , codeqlArgs ) ;
892872 } ,
893873
894- /**
895- * Download specified packs into the package cache. If the specified
896- * package and version already exists (e.g., from a previous analysis run),
897- * then it is not downloaded again (unless the extra option `--force` is
898- * specified).
899- *
900- * If no version is specified, then the latest version is
901- * downloaded. The check to determine what the latest version is is done
902- * each time this package is requested.
903- *
904- * Optionally, a `qlconfigFile` is included. If used, then this file
905- * is used to determine which registry each pack is downloaded from.
906- */
907- async packDownload (
908- packs : string [ ] ,
909- qlconfigFile : string | undefined ,
910- ) : Promise < PackDownloadOutput > {
911- const qlconfigArg = qlconfigFile
912- ? [ `--qlconfig-file=${ qlconfigFile } ` ]
913- : ( [ ] as string [ ] ) ;
914-
915- const codeqlArgs = [
916- "pack" ,
917- "download" ,
918- ...qlconfigArg ,
919- "--format=json" ,
920- "--resolve-query-specs" ,
921- ...getExtraOptionsFromEnv ( [ "pack" , "download" ] ) ,
922- ...packs ,
923- ] ;
924-
925- const output = await runCli ( cmd , codeqlArgs ) ;
926-
927- try {
928- const parsedOutput : PackDownloadOutput = JSON . parse ( output ) ;
929- if (
930- Array . isArray ( parsedOutput . packs ) &&
931- // TODO PackDownloadOutput will not include the version if it is not specified
932- // in the input. The version is always the latest version available.
933- // It should be added to the output, but this requires a CLI change
934- parsedOutput . packs . every ( ( p ) => p . name /* && p.version */ )
935- ) {
936- return parsedOutput ;
937- } else {
938- throw new Error ( "Unexpected output from pack download" ) ;
939- }
940- } catch ( e ) {
941- throw new Error (
942- `Attempted to download specified packs but got an error:\n${ output } \n${ e } ` ,
943- ) ;
944- }
945- } ,
946874 async databaseCleanup (
947875 databasePath : string ,
948876 cleanupLevel : string ,
0 commit comments