mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 03:25:38 +00:00
remote install-extension with VSIX
This commit is contained in:
parent
18aa3199c2
commit
dc58838950
2 changed files with 11 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.53.0",
|
||||
"distro": "e18399989de7611efea635bfae2b490b3aa0ce48",
|
||||
"distro": "1c294d42f651cc04e284747e849e624cebd770d5",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
|
|
@ -42,8 +42,8 @@ export interface RunCommandPipeArgs {
|
|||
export interface ExtensionManagementPipeArgs {
|
||||
type: 'extensionManagement';
|
||||
list?: { showVersions?: boolean, category?: string; };
|
||||
install?: (string | URI)[];
|
||||
uninstall?: (string | URI)[];
|
||||
install?: string[];
|
||||
uninstall?: string[];
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,14 @@ export class CLIServerBase {
|
|||
private async manageExtensions(data: ExtensionManagementPipeArgs, res: http.ServerResponse) {
|
||||
console.log('server: manageExtensions');
|
||||
try {
|
||||
const output = await this._commands.executeCommand('_remoteCLI.manageExtensions', data, { allowTunneling: true });
|
||||
const toExtOrVSIX = (inputs: string[] | undefined) => inputs?.map(input => /\.vsix$/i.test(input) ? URI.parse(input) : input);
|
||||
const commandArgs = {
|
||||
list: data.list,
|
||||
install: toExtOrVSIX(data.install),
|
||||
uninstall: toExtOrVSIX(data.uninstall),
|
||||
force: data.force
|
||||
};
|
||||
const output = await this._commands.executeCommand('_remoteCLI.manageExtensions', commandArgs, { allowTunneling: true });
|
||||
res.writeHead(200);
|
||||
res.write(output);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue