11import fetch , { Response } from "node-fetch" ;
22import { zip } from "zip-a-folder" ;
33import { Open } from "unzipper" ;
4- import { Uri , CancellationToken , window , InputBoxOptions } from "vscode" ;
4+ import { Uri , window , InputBoxOptions } from "vscode" ;
55import { CodeQLCliServer } from "../codeql-cli/cli" ;
66import {
77 ensureDir ,
@@ -44,7 +44,6 @@ export async function promptImportInternetDatabase(
4444 databaseManager : DatabaseManager ,
4545 storagePath : string ,
4646 progress : ProgressCallback ,
47- token : CancellationToken ,
4847 cli ?: CodeQLCliServer ,
4948) : Promise < DatabaseItem | undefined > {
5049 const databaseUrl = await window . showInputBox ( {
@@ -63,7 +62,6 @@ export async function promptImportInternetDatabase(
6362 storagePath ,
6463 undefined ,
6564 progress ,
66- token ,
6765 cli ,
6866 ) ;
6967
@@ -86,7 +84,6 @@ export async function promptImportInternetDatabase(
8684 * @param storagePath where to store the unzipped database.
8785 * @param credentials the credentials to use to authenticate with GitHub
8886 * @param progress the progress callback
89- * @param token the cancellation token
9087 * @param cli the CodeQL CLI server
9188 */
9289export async function promptImportGithubDatabase (
@@ -95,7 +92,6 @@ export async function promptImportGithubDatabase(
9592 storagePath : string ,
9693 credentials : Credentials | undefined ,
9794 progress : ProgressCallback ,
98- token : CancellationToken ,
9995 cli ?: CodeQLCliServer ,
10096) : Promise < DatabaseItem | undefined > {
10197 const githubRepo = await askForGitHubRepo ( progress ) ;
@@ -109,7 +105,6 @@ export async function promptImportGithubDatabase(
109105 storagePath ,
110106 credentials ,
111107 progress ,
112- token ,
113108 cli ,
114109 ) ;
115110
@@ -157,7 +152,6 @@ export async function askForGitHubRepo(
157152 * @param storagePath where to store the unzipped database.
158153 * @param credentials the credentials to use to authenticate with GitHub
159154 * @param progress the progress callback
160- * @param token the cancellation token
161155 * @param cli the CodeQL CLI server
162156 * @param language the language to download. If undefined, the user will be prompted to choose a language.
163157 **/
@@ -167,7 +161,6 @@ export async function downloadGitHubDatabase(
167161 storagePath : string ,
168162 credentials : Credentials | undefined ,
169163 progress : ProgressCallback ,
170- token : CancellationToken ,
171164 cli ?: CodeQLCliServer ,
172165 language ?: string ,
173166) : Promise < DatabaseItem | undefined > {
@@ -213,7 +206,6 @@ export async function downloadGitHubDatabase(
213206 storagePath ,
214207 `${ owner } /${ name } ` ,
215208 progress ,
216- token ,
217209 cli ,
218210 ) ;
219211}
@@ -231,7 +223,6 @@ export async function importArchiveDatabase(
231223 databaseManager : DatabaseManager ,
232224 storagePath : string ,
233225 progress : ProgressCallback ,
234- token : CancellationToken ,
235226 cli ?: CodeQLCliServer ,
236227) : Promise < DatabaseItem | undefined > {
237228 try {
@@ -242,7 +233,6 @@ export async function importArchiveDatabase(
242233 storagePath ,
243234 undefined ,
244235 progress ,
245- token ,
246236 cli ,
247237 ) ;
248238 if ( item ) {
@@ -275,7 +265,6 @@ export async function importArchiveDatabase(
275265 * @param storagePath where to store the unzipped database.
276266 * @param nameOverride a name for the database that overrides the default
277267 * @param progress callback to send progress messages to
278- * @param token cancellation token
279268 */
280269async function databaseArchiveFetcher (
281270 databaseUrl : string ,
@@ -284,7 +273,6 @@ async function databaseArchiveFetcher(
284273 storagePath : string ,
285274 nameOverride : string | undefined ,
286275 progress : ProgressCallback ,
287- token : CancellationToken ,
288276 cli ?: CodeQLCliServer ,
289277) : Promise < DatabaseItem > {
290278 progress ( {
@@ -327,8 +315,6 @@ async function databaseArchiveFetcher(
327315 const makeSelected = true ;
328316
329317 const item = await databaseManager . openDatabase (
330- progress ,
331- token ,
332318 Uri . file ( dbPath ) ,
333319 makeSelected ,
334320 nameOverride ,
0 commit comments