Move packaging commands to withProgress

This commit is contained in:
Koen Vlaswinkel
2023-03-21 16:47:00 +01:00
parent ef267f87bb
commit dfff7ae8de

View File

@@ -6,9 +6,10 @@ import {
} from "./helpers";
import { ExtensionContext, QuickPickItem, window } from "vscode";
import {
commandRunnerWithProgress,
commandRunner,
ProgressCallback,
UserCancellationException,
withProgress,
} from "./commandRunner";
import { extLogger } from "./common";
import { asError, getErrorStack } from "./pure/helpers-pure";
@@ -24,24 +25,26 @@ export function registerPackagingCommands(
{ cliServer }: PackagingOptions,
) {
ctx.subscriptions.push(
commandRunnerWithProgress(
"codeQL.installPackDependencies",
async (progress: ProgressCallback) =>
await handleInstallPackDependencies(cliServer, progress),
{
title: "Installing pack dependencies",
},
commandRunner("codeQL.installPackDependencies", async () =>
withProgress(
async (progress: ProgressCallback) =>
await handleInstallPackDependencies(cliServer, progress),
{
title: "Installing pack dependencies",
},
),
),
);
ctx.subscriptions.push(
commandRunnerWithProgress(
"codeQL.downloadPacks",
async (progress: ProgressCallback) =>
await handleDownloadPacks(cliServer, progress),
{
title: "Downloading packs",
},
commandRunner("codeQL.downloadPacks", async () =>
withProgress(
async (progress: ProgressCallback) =>
await handleDownloadPacks(cliServer, progress),
{
title: "Downloading packs",
},
),
),
);
}