@theia/plugin-ext-vscode 1.70.0-next.18 → 1.70.0-next.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts +1 -2
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts.map +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js +4 -15
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js.map +1 -1
- package/package.json +16 -16
- package/src/node/local-vsix-file-plugin-deployer-resolver.ts +5 -14
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { PluginDeployerResolverContext
|
|
1
|
+
import { PluginDeployerResolverContext } from '@theia/plugin-ext';
|
|
2
2
|
import { LocalPluginDeployerResolver } from '@theia/plugin-ext/lib/main/node/resolvers/local-plugin-deployer-resolver';
|
|
3
3
|
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
4
4
|
export declare class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
5
5
|
static LOCAL_FILE: string;
|
|
6
6
|
static FILE_EXTENSION: string;
|
|
7
7
|
protected readonly environment: PluginVSCodeEnvironment;
|
|
8
|
-
protected readonly pluginDeployerHandler: PluginDeployerHandler;
|
|
9
8
|
protected get supportedScheme(): string;
|
|
10
9
|
accept(pluginId: string): boolean;
|
|
11
10
|
resolveFromLocalPath(pluginResolverContext: PluginDeployerResolverContext, localPath: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.d.ts","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,6BAA6B,EAAqB,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,0EAA0E,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAI9E,qBACa,mCAAoC,SAAQ,2BAA2B;IAChF,MAAM,CAAC,UAAU,SAAgB;IACjC,MAAM,CAAC,cAAc,SAAW;IAEC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAEzF,SAAS,KAAK,eAAe,IAAI,MAAM,CAEtC;IAEQ,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC,oBAAoB,CAAC,qBAAqB,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAqCrH"}
|
|
@@ -53,20 +53,13 @@ let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResol
|
|
|
53
53
|
pluginResolverContext.addPlugin(fallbackId, fallbackDeploymentDir);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
const unversionedId = plugin_ext_1.PluginIdentifiers.componentsToUnversionedId(components);
|
|
57
56
|
const versionedId = plugin_ext_1.PluginIdentifiers.componentsToVersionedId(components);
|
|
58
|
-
// Check if an extension with this identity is already deployed in memory
|
|
59
|
-
const existingPlugins = this.pluginDeployerHandler.getDeployedPluginsById(unversionedId);
|
|
60
|
-
if (existingPlugins.length > 0) {
|
|
61
|
-
const existingVersions = existingPlugins.map(p => p.metadata.model.version);
|
|
62
|
-
const error = new Error(`Extension ${unversionedId} is already installed (version(s): ${existingVersions.join(', ')}).`);
|
|
63
|
-
error.name = 'DuplicateExtensionError';
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
57
|
// Check if the deployment directory already exists on disk
|
|
67
58
|
if (await (0, plugin_vscode_utils_1.existsInDeploymentDir)(this.environment, versionedId)) {
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
const unversionedId = plugin_ext_1.PluginIdentifiers.componentsToUnversionedId(components);
|
|
60
|
+
const error = new Error(`Extension ${unversionedId} is already installed (version: ${components.version}).`);
|
|
61
|
+
error.name = 'DuplicateExtensionError';
|
|
62
|
+
throw error;
|
|
70
63
|
}
|
|
71
64
|
const extensionDeploymentDir = await (0, plugin_vscode_utils_1.unpackToDeploymentDir)(this.environment, localPath, versionedId);
|
|
72
65
|
pluginResolverContext.addPlugin(versionedId, extensionDeploymentDir);
|
|
@@ -77,10 +70,6 @@ tslib_1.__decorate([
|
|
|
77
70
|
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
78
71
|
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
79
72
|
], LocalVSIXFilePluginDeployerResolver.prototype, "environment", void 0);
|
|
80
|
-
tslib_1.__decorate([
|
|
81
|
-
(0, inversify_1.inject)(plugin_ext_1.PluginDeployerHandler),
|
|
82
|
-
tslib_1.__metadata("design:type", Object)
|
|
83
|
-
], LocalVSIXFilePluginDeployerResolver.prototype, "pluginDeployerHandler", void 0);
|
|
84
73
|
exports.LocalVSIXFilePluginDeployerResolver = LocalVSIXFilePluginDeployerResolver = LocalVSIXFilePluginDeployerResolver_1 = tslib_1.__decorate([
|
|
85
74
|
(0, inversify_1.injectable)()
|
|
86
75
|
], LocalVSIXFilePluginDeployerResolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,6BAA6B;AAC7B,4DAAkE;AAClE,
|
|
1
|
+
{"version":3,"file":"local-vsix-file-plugin-deployer-resolver.js","sourceRoot":"","sources":["../../src/node/local-vsix-file-plugin-deployer-resolver.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,6BAA6B;AAC7B,4DAAkE;AAClE,kDAAqF;AACrF,6HAAuH;AACvH,mFAA8E;AAC9E,6EAAkE;AAClE,+DAAuH;AAGhH,IAAM,mCAAmC,GAAzC,MAAM,mCAAoC,SAAQ,4DAA2B;;aACzE,eAAU,GAAG,YAAY,AAAf,CAAgB;aAC1B,mBAAc,GAAG,OAAO,AAAV,CAAW;IAIhC,IAAc,eAAe;QACzB,OAAO,qCAAmC,CAAC,UAAU,CAAC;IAC1D,CAAC;IAEQ,MAAM,CAAC,QAAgB;QAC5B,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAA,+CAAkB,EAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,qBAAoD,EAAE,SAAiB;QAC9F,iEAAiE;QACjE,sHAAsH;QACtH,2DAA2D;QAC3D,MAAM,UAAU,GAAG,MAAM,IAAA,sDAAgC,EAAC,SAAS,CAAC,CAAC;QAErE,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,+DAA+D;YAC/D,uDAAuD;YACvD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,qCAAmC,CAAC,cAAc,CAAC,CAAC;YAChG,OAAO,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,WAAW,EAAE,6EAA6E,UAAU,EAAE,CAAC,CAAC;YAE/I,I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ext-vscode",
|
|
3
|
-
"version": "1.70.0-next.
|
|
3
|
+
"version": "1.70.0-next.26+b40555ef6",
|
|
4
4
|
"description": "Theia - Plugin Extension for VsCode",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/callhierarchy": "1.70.0-next.
|
|
7
|
-
"@theia/core": "1.70.0-next.
|
|
8
|
-
"@theia/editor": "1.70.0-next.
|
|
9
|
-
"@theia/filesystem": "1.70.0-next.
|
|
10
|
-
"@theia/monaco": "1.70.0-next.
|
|
6
|
+
"@theia/callhierarchy": "1.70.0-next.26+b40555ef6",
|
|
7
|
+
"@theia/core": "1.70.0-next.26+b40555ef6",
|
|
8
|
+
"@theia/editor": "1.70.0-next.26+b40555ef6",
|
|
9
|
+
"@theia/filesystem": "1.70.0-next.26+b40555ef6",
|
|
10
|
+
"@theia/monaco": "1.70.0-next.26+b40555ef6",
|
|
11
11
|
"@theia/monaco-editor-core": "1.96.302",
|
|
12
|
-
"@theia/navigator": "1.70.0-next.
|
|
13
|
-
"@theia/outline-view": "1.70.0-next.
|
|
14
|
-
"@theia/plugin": "1.70.0-next.
|
|
15
|
-
"@theia/plugin-ext": "1.70.0-next.
|
|
16
|
-
"@theia/scm": "1.70.0-next.
|
|
17
|
-
"@theia/terminal": "1.70.0-next.
|
|
18
|
-
"@theia/typehierarchy": "1.70.0-next.
|
|
19
|
-
"@theia/userstorage": "1.70.0-next.
|
|
20
|
-
"@theia/workspace": "1.70.0-next.
|
|
12
|
+
"@theia/navigator": "1.70.0-next.26+b40555ef6",
|
|
13
|
+
"@theia/outline-view": "1.70.0-next.26+b40555ef6",
|
|
14
|
+
"@theia/plugin": "1.70.0-next.26+b40555ef6",
|
|
15
|
+
"@theia/plugin-ext": "1.70.0-next.26+b40555ef6",
|
|
16
|
+
"@theia/scm": "1.70.0-next.26+b40555ef6",
|
|
17
|
+
"@theia/terminal": "1.70.0-next.26+b40555ef6",
|
|
18
|
+
"@theia/typehierarchy": "1.70.0-next.26+b40555ef6",
|
|
19
|
+
"@theia/userstorage": "1.70.0-next.26+b40555ef6",
|
|
20
|
+
"@theia/workspace": "1.70.0-next.26+b40555ef6",
|
|
21
21
|
"decompress": "^4.2.1",
|
|
22
22
|
"filenamify": "^4.1.0",
|
|
23
23
|
"tslib": "^2.6.2"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"nyc": {
|
|
62
62
|
"extends": "../../configs/nyc.json"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b40555ef601736234983a8381eb2da6504994aaa"
|
|
65
65
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as path from 'path';
|
|
18
18
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { PluginDeployerResolverContext,
|
|
19
|
+
import { PluginDeployerResolverContext, PluginIdentifiers } from '@theia/plugin-ext';
|
|
20
20
|
import { LocalPluginDeployerResolver } from '@theia/plugin-ext/lib/main/node/resolvers/local-plugin-deployer-resolver';
|
|
21
21
|
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
22
22
|
import { isVSCodePluginFile } from './plugin-vscode-file-handler';
|
|
@@ -28,7 +28,6 @@ export class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerReso
|
|
|
28
28
|
static FILE_EXTENSION = '.vsix';
|
|
29
29
|
|
|
30
30
|
@inject(PluginVSCodeEnvironment) protected readonly environment: PluginVSCodeEnvironment;
|
|
31
|
-
@inject(PluginDeployerHandler) protected readonly pluginDeployerHandler: PluginDeployerHandler;
|
|
32
31
|
|
|
33
32
|
protected get supportedScheme(): string {
|
|
34
33
|
return LocalVSIXFilePluginDeployerResolver.LOCAL_FILE;
|
|
@@ -60,26 +59,18 @@ export class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerReso
|
|
|
60
59
|
return;
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
const unversionedId = PluginIdentifiers.componentsToUnversionedId(components);
|
|
64
62
|
const versionedId = PluginIdentifiers.componentsToVersionedId(components);
|
|
65
63
|
|
|
66
|
-
// Check if
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const existingVersions = existingPlugins.map(p => p.metadata.model.version);
|
|
64
|
+
// Check if the deployment directory already exists on disk
|
|
65
|
+
if (await existsInDeploymentDir(this.environment, versionedId)) {
|
|
66
|
+
const unversionedId = PluginIdentifiers.componentsToUnversionedId(components);
|
|
70
67
|
const error = new Error(
|
|
71
|
-
`Extension ${unversionedId} is already installed (version
|
|
68
|
+
`Extension ${unversionedId} is already installed (version: ${components.version}).`
|
|
72
69
|
);
|
|
73
70
|
error.name = 'DuplicateExtensionError';
|
|
74
71
|
throw error;
|
|
75
72
|
}
|
|
76
73
|
|
|
77
|
-
// Check if the deployment directory already exists on disk
|
|
78
|
-
if (await existsInDeploymentDir(this.environment, versionedId)) {
|
|
79
|
-
console.log(`[${pluginResolverContext.getOriginId()}]: Extension "${versionedId}" already exists in deployment dir`);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
74
|
const extensionDeploymentDir = await unpackToDeploymentDir(this.environment, localPath, versionedId);
|
|
84
75
|
pluginResolverContext.addPlugin(versionedId, extensionDeploymentDir);
|
|
85
76
|
}
|