Update wording to be more clear
This commit is contained in:
@@ -375,8 +375,8 @@
|
|||||||
"title": "CodeQL: Clear Cache"
|
"title": "CodeQL: Clear Cache"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "codeQL.installPacks",
|
"command": "codeQL.installPackDependencies",
|
||||||
"title": "CodeQL: Install Packs"
|
"title": "CodeQL: Install Pack Dependencies"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "codeQL.downloadPacks",
|
"command": "codeQL.downloadPacks",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ import { RemoteQuery } from './remote-queries/remote-query';
|
|||||||
import { URLSearchParams } from 'url';
|
import { URLSearchParams } from 'url';
|
||||||
import { RemoteQueriesInterfaceManager } from './remote-queries/remote-queries-interface';
|
import { RemoteQueriesInterfaceManager } from './remote-queries/remote-queries-interface';
|
||||||
import { sampleRemoteQuery, sampleRemoteQueryResult } from './remote-queries/sample-data';
|
import { sampleRemoteQuery, sampleRemoteQueryResult } from './remote-queries/sample-data';
|
||||||
import { handleDownloadPacks, handleInstallPacks } from './packaging';
|
import { handleDownloadPacks, handleInstallPackDependencies } from './packaging';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extension.ts
|
* extension.ts
|
||||||
@@ -924,12 +924,12 @@ async function activateWithInstalledDistribution(
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(
|
ctx.subscriptions.push(
|
||||||
commandRunnerWithProgress('codeQL.installPacks', async (
|
commandRunnerWithProgress('codeQL.installPackDependencies', async (
|
||||||
progress: ProgressCallback
|
progress: ProgressCallback
|
||||||
) =>
|
) =>
|
||||||
await handleInstallPacks(cliServer, progress),
|
await handleInstallPackDependencies(cliServer, progress),
|
||||||
{
|
{
|
||||||
title: 'Installing packs',
|
title: 'Installing pack dependencies',
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export async function handleDownloadPacks(
|
|||||||
void showAndLogInformationMessage('Finished downloading packs.');
|
void showAndLogInformationMessage('Finished downloading packs.');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
void showAndLogErrorMessage(
|
void showAndLogErrorMessage(
|
||||||
'Unable to download all packs. See logs for more details.'
|
'Unable to download all packs. See log for more details.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ interface QLPackQuickPickItem extends QuickPickItem {
|
|||||||
* @param cliServer The CLI server.
|
* @param cliServer The CLI server.
|
||||||
* @param progress A progress callback.
|
* @param progress A progress callback.
|
||||||
*/
|
*/
|
||||||
export async function handleInstallPacks(
|
export async function handleInstallPackDependencies(
|
||||||
cliServer: CodeQLCliServer,
|
cliServer: CodeQLCliServer,
|
||||||
progress: ProgressCallback,
|
progress: ProgressCallback,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
@@ -96,7 +96,7 @@ export async function handleInstallPacks(
|
|||||||
} or later.`);
|
} or later.`);
|
||||||
}
|
}
|
||||||
progress({
|
progress({
|
||||||
message: 'Choose packs to install',
|
message: 'Choose packs to install dependencies for',
|
||||||
step: 1,
|
step: 1,
|
||||||
maxStep: 2,
|
maxStep: 2,
|
||||||
});
|
});
|
||||||
@@ -106,13 +106,13 @@ export async function handleInstallPacks(
|
|||||||
packRootDir: value,
|
packRootDir: value,
|
||||||
}));
|
}));
|
||||||
const packsToInstall = await window.showQuickPick(quickPickItems, {
|
const packsToInstall = await window.showQuickPick(quickPickItems, {
|
||||||
placeHolder: 'Select packs to install',
|
placeHolder: 'Select packs to install dependencies for',
|
||||||
canPickMany: true,
|
canPickMany: true,
|
||||||
ignoreFocusOut: true,
|
ignoreFocusOut: true,
|
||||||
});
|
});
|
||||||
if (packsToInstall && packsToInstall.length > 0) {
|
if (packsToInstall && packsToInstall.length > 0) {
|
||||||
progress({
|
progress({
|
||||||
message: 'Installing packs. This may take a few minutes.',
|
message: 'Installing dependencies. This may take a few minutes.',
|
||||||
step: 2,
|
step: 2,
|
||||||
maxStep: 2,
|
maxStep: 2,
|
||||||
});
|
});
|
||||||
@@ -131,10 +131,10 @@ export async function handleInstallPacks(
|
|||||||
if (failedPacks.length > 0) {
|
if (failedPacks.length > 0) {
|
||||||
void logger.log(`Errors:\n${errors.join('\n')}`);
|
void logger.log(`Errors:\n${errors.join('\n')}`);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unable to install packs: ${failedPacks.join(', ')}. See log for more details.`
|
`Unable to install pack dependencies for: ${failedPacks.join(', ')}. See log for more details.`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
void showAndLogInformationMessage('Finished installing packs.');
|
void showAndLogInformationMessage('Finished installing pack dependencies.');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new UserCancellationException('No packs selected.');
|
throw new UserCancellationException('No packs selected.');
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ describe('Packaging commands', function() {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await mod.handleInstallPacks(cli, progress);
|
await mod.handleInstallPackDependencies(cli, progress);
|
||||||
expect(showAndLogInformationMessageSpy.firstCall.args[0]).to.contain(
|
expect(showAndLogInformationMessageSpy.firstCall.args[0]).to.contain(
|
||||||
'Finished installing packs.'
|
'Finished installing pack dependencies.'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -118,11 +118,11 @@ describe('Packaging commands', function() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// expect this to throw an error
|
// expect this to throw an error
|
||||||
await mod.handleInstallPacks(cli, progress);
|
await mod.handleInstallPackDependencies(cli, progress);
|
||||||
// This line should not be reached
|
// This line should not be reached
|
||||||
expect(true).to.be.false;
|
expect(true).to.be.false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
expect(error.message).to.contain('Unable to install packs:');
|
expect(error.message).to.contain('Unable to install pack dependencies');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user