@theia/plugin-ext-vscode 1.75.0-next.8 → 1.75.0
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/browser/plugin-vscode-commands-contribution.d.ts +18 -2
- package/lib/browser/plugin-vscode-commands-contribution.d.ts.map +1 -1
- package/lib/browser/plugin-vscode-commands-contribution.js +207 -1
- package/lib/browser/plugin-vscode-commands-contribution.js.map +1 -1
- package/lib/browser/plugin-vscode-commands-contribution.spec.d.ts +2 -0
- package/lib/browser/plugin-vscode-commands-contribution.spec.d.ts.map +1 -0
- package/lib/browser/plugin-vscode-commands-contribution.spec.js +61 -0
- package/lib/browser/plugin-vscode-commands-contribution.spec.js.map +1 -0
- package/lib/common/plugin-vscode-types.d.ts +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts +2 -0
- package/lib/node/local-vsix-file-plugin-deployer-resolver.d.ts.map +1 -1
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js +8 -2
- package/lib/node/local-vsix-file-plugin-deployer-resolver.js.map +1 -1
- package/lib/node/plugin-vscode-deployer-participant.d.ts +2 -0
- package/lib/node/plugin-vscode-deployer-participant.d.ts.map +1 -1
- package/lib/node/plugin-vscode-deployer-participant.js +7 -1
- package/lib/node/plugin-vscode-deployer-participant.js.map +1 -1
- package/lib/node/plugin-vscode-directory-handler.d.ts +6 -2
- package/lib/node/plugin-vscode-directory-handler.d.ts.map +1 -1
- package/lib/node/plugin-vscode-directory-handler.js +8 -2
- package/lib/node/plugin-vscode-directory-handler.js.map +1 -1
- package/lib/node/plugin-vscode-file-handler.d.ts +2 -0
- package/lib/node/plugin-vscode-file-handler.d.ts.map +1 -1
- package/lib/node/plugin-vscode-file-handler.js +8 -2
- package/lib/node/plugin-vscode-file-handler.js.map +1 -1
- package/lib/node/scanner-vscode.d.ts.map +1 -1
- package/lib/node/scanner-vscode.js +8 -47
- package/lib/node/scanner-vscode.js.map +1 -1
- package/package.json +18 -17
- package/src/browser/plugin-vscode-commands-contribution.spec.ts +68 -0
- package/src/browser/plugin-vscode-commands-contribution.ts +239 -3
- package/src/node/local-vsix-file-plugin-deployer-resolver.ts +7 -3
- package/src/node/plugin-vscode-deployer-participant.ts +6 -2
- package/src/node/plugin-vscode-directory-handler.ts +11 -5
- package/src/node/plugin-vscode-file-handler.ts +7 -3
- package/src/node/scanner-vscode.ts +9 -52
|
@@ -1,10 +1,12 @@
|
|
|
1
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
|
+
import { ILogger } from '@theia/core';
|
|
4
5
|
export declare class LocalVSIXFilePluginDeployerResolver extends LocalPluginDeployerResolver {
|
|
5
6
|
static LOCAL_FILE: string;
|
|
6
7
|
static FILE_EXTENSION: string;
|
|
7
8
|
protected readonly environment: PluginVSCodeEnvironment;
|
|
9
|
+
protected readonly logger: ILogger;
|
|
8
10
|
protected get supportedScheme(): string;
|
|
9
11
|
accept(pluginId: string): boolean;
|
|
10
12
|
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,EAAqB,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,0EAA0E,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;
|
|
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;AAG9E,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,mCAAoC,SAAQ,2BAA2B;IAChF,MAAM,CAAC,UAAU,SAAgB;IACjC,MAAM,CAAC,cAAc,SAAW;IAEC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAEzF,mBAC4B,MAAM,EAAE,OAAO,CAAC;IAE5C,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"}
|
|
@@ -25,6 +25,7 @@ const local_plugin_deployer_resolver_1 = require("@theia/plugin-ext/lib/main/nod
|
|
|
25
25
|
const plugin_vscode_environment_1 = require("../common/plugin-vscode-environment");
|
|
26
26
|
const plugin_vscode_file_handler_1 = require("./plugin-vscode-file-handler");
|
|
27
27
|
const plugin_vscode_utils_1 = require("./plugin-vscode-utils");
|
|
28
|
+
const core_1 = require("@theia/core");
|
|
28
29
|
let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResolver extends local_plugin_deployer_resolver_1.LocalPluginDeployerResolver {
|
|
29
30
|
static { LocalVSIXFilePluginDeployerResolver_1 = this; }
|
|
30
31
|
static { this.LOCAL_FILE = 'local-file'; }
|
|
@@ -44,9 +45,9 @@ let LocalVSIXFilePluginDeployerResolver = class LocalVSIXFilePluginDeployerResol
|
|
|
44
45
|
// Fallback to filename-based ID if package.json cannot be read
|
|
45
46
|
// This maintains backward compatibility for edge cases
|
|
46
47
|
const fallbackId = path.basename(localPath, LocalVSIXFilePluginDeployerResolver_1.FILE_EXTENSION);
|
|
47
|
-
|
|
48
|
+
this.logger.warn(`[${pluginResolverContext.getOriginId()}]: Could not read extension identity from VSIX, falling back to filename: ${fallbackId}`);
|
|
48
49
|
if (await (0, plugin_vscode_utils_1.existsInDeploymentDir)(this.environment, fallbackId)) {
|
|
49
|
-
|
|
50
|
+
this.logger.info(`[${pluginResolverContext.getOriginId()}]: Target dir already exists in plugin deployment dir`);
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
52
53
|
const fallbackDeploymentDir = await (0, plugin_vscode_utils_1.unpackToDeploymentDir)(this.environment, localPath, fallbackId);
|
|
@@ -70,6 +71,11 @@ tslib_1.__decorate([
|
|
|
70
71
|
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
71
72
|
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
72
73
|
], LocalVSIXFilePluginDeployerResolver.prototype, "environment", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
76
|
+
(0, inversify_1.named)('plugin-ext-vscode:LocalVSIXFilePluginDeployerResolver'),
|
|
77
|
+
tslib_1.__metadata("design:type", Object)
|
|
78
|
+
], LocalVSIXFilePluginDeployerResolver.prototype, "logger", void 0);
|
|
73
79
|
exports.LocalVSIXFilePluginDeployerResolver = LocalVSIXFilePluginDeployerResolver = LocalVSIXFilePluginDeployerResolver_1 = tslib_1.__decorate([
|
|
74
80
|
(0, inversify_1.injectable)()
|
|
75
81
|
], 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,
|
|
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,4DAAyE;AACzE,kDAAqF;AACrF,6HAAuH;AACvH,mFAA8E;AAC9E,6EAAkE;AAClE,+DAAuH;AACvH,sCAAsC;AAG/B,IAAM,mCAAmC,GAAzC,MAAM,mCAAoC,SAAQ,4DAA2B;;aACzE,eAAU,GAAG,YAAY,AAAf,CAAgB;aAC1B,mBAAc,GAAG,OAAO,AAAV,CAAW;IAOhC,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,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DAAuB;wEAAC;AAG7D;IAD3B,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,uDAAuD,CAAC;;mEACpC;8CAPnC,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAsD/C"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
2
2
|
import { PluginDeployerParticipant, PluginDeployerStartContext } from '@theia/plugin-ext/lib/common/plugin-protocol';
|
|
3
|
+
import { ILogger } from '@theia/core';
|
|
3
4
|
export declare class PluginVSCodeDeployerParticipant implements PluginDeployerParticipant {
|
|
4
5
|
protected readonly environments: PluginVSCodeEnvironment;
|
|
6
|
+
protected readonly logger: ILogger;
|
|
5
7
|
onWillStart(context: PluginDeployerStartContext): Promise<void>;
|
|
6
8
|
}
|
|
7
9
|
//# sourceMappingURL=plugin-vscode-deployer-participant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-deployer-participant.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-vscode-deployer-participant.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAErH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,qBACa,+BAAgC,YAAW,yBAAyB;IAG7E,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,uBAAuB,CAAC;IAGzD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAE7B,WAAW,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBxE"}
|
|
@@ -22,6 +22,7 @@ const fs = require("@theia/core/shared/fs-extra");
|
|
|
22
22
|
const node_1 = require("@theia/core/lib/node");
|
|
23
23
|
const plugin_vscode_environment_1 = require("../common/plugin-vscode-environment");
|
|
24
24
|
const local_vsix_file_plugin_deployer_resolver_1 = require("./local-vsix-file-plugin-deployer-resolver");
|
|
25
|
+
const core_1 = require("@theia/core");
|
|
25
26
|
let PluginVSCodeDeployerParticipant = class PluginVSCodeDeployerParticipant {
|
|
26
27
|
async onWillStart(context) {
|
|
27
28
|
const extensionDeploymentDirUri = await this.environments.getDeploymentDirUri();
|
|
@@ -33,7 +34,7 @@ let PluginVSCodeDeployerParticipant = class PluginVSCodeDeployerParticipant {
|
|
|
33
34
|
for (const file of files) {
|
|
34
35
|
if (file.endsWith(local_vsix_file_plugin_deployer_resolver_1.LocalVSIXFilePluginDeployerResolver.FILE_EXTENSION)) {
|
|
35
36
|
const extensionUri = userExtensionDirUri.resolve(file).withScheme('local-file').toString();
|
|
36
|
-
|
|
37
|
+
this.logger.info(`found drop-in extension "${extensionUri}"`);
|
|
37
38
|
context.userEntries.push(extensionUri);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -45,6 +46,11 @@ tslib_1.__decorate([
|
|
|
45
46
|
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
46
47
|
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
47
48
|
], PluginVSCodeDeployerParticipant.prototype, "environments", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
51
|
+
(0, inversify_1.named)('plugin-ext-vscode:PluginVSCodeDeployerParticipant'),
|
|
52
|
+
tslib_1.__metadata("design:type", Object)
|
|
53
|
+
], PluginVSCodeDeployerParticipant.prototype, "logger", void 0);
|
|
48
54
|
exports.PluginVSCodeDeployerParticipant = PluginVSCodeDeployerParticipant = tslib_1.__decorate([
|
|
49
55
|
(0, inversify_1.injectable)()
|
|
50
56
|
], PluginVSCodeDeployerParticipant);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-deployer-participant.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,
|
|
1
|
+
{"version":3,"file":"plugin-vscode-deployer-participant.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-deployer-participant.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,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,4DAAyE;AACzE,kDAAkD;AAClD,+CAA+C;AAC/C,mFAA8E;AAE9E,yGAAiG;AACjG,sCAAsC;AAG/B,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAQxC,KAAK,CAAC,WAAW,CAAC,OAAmC;QACjD,MAAM,yBAAyB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;QAChF,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEvF,MAAM,mBAAmB,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,CAAC;QAC9E,MAAM,oBAAoB,GAAG,cAAO,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAEjE,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAC5C,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YACrD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,8EAAmC,CAAC,cAAc,CAAC,EAAE,CAAC;oBACpE,MAAM,YAAY,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;oBAC3F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,YAAY,GAAG,CAAC,CAAC;oBAC9D,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC3C,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ,CAAA;AA1BY,0EAA+B;AAGrB;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACC,mDAAuB;qEAAC;AAGtC;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,mDAAmD,CAAC;;+DACzC;0CAN1B,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CA0B3C"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ILogger, type URI } from '@theia/core';
|
|
2
2
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
3
3
|
import { PluginDeployerDirectoryHandler, PluginDeployerEntry, PluginDeployerDirectoryHandlerContext, PluginPackage } from '@theia/plugin-ext';
|
|
4
4
|
import { PluginCliContribution } from '@theia/plugin-ext/lib/main/node/plugin-cli-contribution';
|
|
5
|
+
/** Fields read while resolving a VS Code extension directory */
|
|
6
|
+
type PluginPackageResolveInput = Partial<Pick<PluginPackage, 'name' | 'version' | 'publisher' | 'engines'>>;
|
|
5
7
|
export declare class PluginVsCodeDirectoryHandler implements PluginDeployerDirectoryHandler {
|
|
6
8
|
protected readonly deploymentDirectory: Deferred<URI>;
|
|
7
9
|
protected readonly pluginCli: PluginCliContribution;
|
|
10
|
+
protected readonly logger: ILogger;
|
|
8
11
|
accept(plugin: PluginDeployerEntry): Promise<boolean>;
|
|
9
12
|
protected attemptResolution(plugin: PluginDeployerEntry): Promise<boolean>;
|
|
10
13
|
protected deriveMetadata(plugin: PluginDeployerEntry): Promise<boolean>;
|
|
@@ -14,8 +17,9 @@ export declare class PluginVsCodeDirectoryHandler implements PluginDeployerDirec
|
|
|
14
17
|
protected resolveFromNpmTarball(plugin: PluginDeployerEntry): Promise<boolean>;
|
|
15
18
|
protected resolvePackage(plugin: PluginDeployerEntry, options?: {
|
|
16
19
|
pluginPath: string;
|
|
17
|
-
pck?:
|
|
20
|
+
pck?: PluginPackageResolveInput;
|
|
18
21
|
}): boolean;
|
|
19
22
|
protected requirePackage(pluginPath: string): Promise<PluginPackage | undefined>;
|
|
20
23
|
}
|
|
24
|
+
export {};
|
|
21
25
|
//# sourceMappingURL=plugin-vscode-directory-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-directory-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin-vscode-directory-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAa,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EACH,8BAA8B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zF"}
|
|
@@ -20,13 +20,14 @@ const tslib_1 = require("tslib");
|
|
|
20
20
|
const path = require("path");
|
|
21
21
|
const fs = require("@theia/core/shared/fs-extra");
|
|
22
22
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
23
24
|
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
24
25
|
const plugin_ext_1 = require("@theia/plugin-ext");
|
|
25
26
|
const plugin_cli_contribution_1 = require("@theia/plugin-ext/lib/main/node/plugin-cli-contribution");
|
|
26
27
|
const plugin_vscode_utils_1 = require("./plugin-vscode-utils");
|
|
27
28
|
let PluginVsCodeDirectoryHandler = class PluginVsCodeDirectoryHandler {
|
|
28
29
|
async accept(plugin) {
|
|
29
|
-
|
|
30
|
+
this.logger.debug(`Resolving "${plugin.id()}" as a VS Code extension...`);
|
|
30
31
|
if (plugin.path().startsWith(plugin_vscode_utils_1.TMP_DIR_PREFIX)) {
|
|
31
32
|
// avoid adding corrupted plugins from temporary directories
|
|
32
33
|
return false;
|
|
@@ -85,7 +86,7 @@ let PluginVsCodeDirectoryHandler = class PluginVsCodeDirectoryHandler {
|
|
|
85
86
|
plugin.rootPath = plugin.path();
|
|
86
87
|
plugin.updatePath(pluginPath);
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
+
this.logger.debug(`Resolved "${plugin.id()}" to a VS Code extension "${pck.name}@${pck.version}" with engines:`, pck.engines);
|
|
89
90
|
return true;
|
|
90
91
|
}
|
|
91
92
|
async requirePackage(pluginPath) {
|
|
@@ -104,6 +105,11 @@ tslib_1.__decorate([
|
|
|
104
105
|
(0, inversify_1.inject)(plugin_cli_contribution_1.PluginCliContribution),
|
|
105
106
|
tslib_1.__metadata("design:type", plugin_cli_contribution_1.PluginCliContribution)
|
|
106
107
|
], PluginVsCodeDirectoryHandler.prototype, "pluginCli", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
110
|
+
(0, inversify_1.named)('plugin-ext-vscode:PluginVsCodeDirectoryHandler'),
|
|
111
|
+
tslib_1.__metadata("design:type", Object)
|
|
112
|
+
], PluginVsCodeDirectoryHandler.prototype, "logger", void 0);
|
|
107
113
|
exports.PluginVsCodeDirectoryHandler = PluginVsCodeDirectoryHandler = tslib_1.__decorate([
|
|
108
114
|
(0, inversify_1.injectable)()
|
|
109
115
|
], PluginVsCodeDirectoryHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-directory-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.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,kDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"plugin-vscode-directory-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-directory-handler.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,kDAAkD;AAClD,4DAAyE;AACzE,sCAAgD;AAChD,sEAA0E;AAC1E,kDAG2B;AAC3B,qGAAgG;AAChG,+DAAuD;AAMhD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IASrC,KAAK,CAAC,MAAM,CAAC,MAA2B;QACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,MAAM,CAAC,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"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { PluginDeployerFileHandler, PluginDeployerEntry, PluginDeployerFileHandlerContext } from '@theia/plugin-ext';
|
|
2
2
|
import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment';
|
|
3
|
+
import { ILogger } from '@theia/core';
|
|
3
4
|
export declare const isVSCodePluginFile: (pluginPath?: string) => boolean;
|
|
4
5
|
export declare class PluginVsCodeFileHandler implements PluginDeployerFileHandler {
|
|
5
6
|
protected readonly environment: PluginVSCodeEnvironment;
|
|
7
|
+
protected readonly logger: ILogger;
|
|
6
8
|
accept(resolvedPlugin: PluginDeployerEntry): Promise<boolean>;
|
|
7
9
|
handle(context: PluginDeployerFileHandlerContext): Promise<void>;
|
|
8
10
|
protected getNormalizedExtensionId(pluginId: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-file-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAIrH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-vscode-file-handler.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAIrH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAG9E,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,YAAyF,CAAC;AAEhJ,qBACa,uBAAwB,YAAW,yBAAyB;IAErE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAE7B,MAAM,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAS7D,MAAM,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBtE,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;CAG/D"}
|
|
@@ -23,6 +23,7 @@ const fs = require("@theia/core/shared/fs-extra");
|
|
|
23
23
|
const plugin_vscode_environment_1 = require("../common/plugin-vscode-environment");
|
|
24
24
|
const file_uri_1 = require("@theia/core/lib/common/file-uri");
|
|
25
25
|
const plugin_vscode_utils_1 = require("./plugin-vscode-utils");
|
|
26
|
+
const core_1 = require("@theia/core");
|
|
26
27
|
const isVSCodePluginFile = (pluginPath) => Boolean(pluginPath && (pluginPath.endsWith('.vsix') || pluginPath.endsWith('.tgz')));
|
|
27
28
|
exports.isVSCodePluginFile = isVSCodePluginFile;
|
|
28
29
|
let PluginVsCodeFileHandler = class PluginVsCodeFileHandler {
|
|
@@ -38,7 +39,7 @@ let PluginVsCodeFileHandler = class PluginVsCodeFileHandler {
|
|
|
38
39
|
const id = this.getNormalizedExtensionId(context.pluginEntry().id());
|
|
39
40
|
const extensionDeploymentDir = await (0, plugin_vscode_utils_1.unpackToDeploymentDir)(this.environment, context.pluginEntry().path(), id);
|
|
40
41
|
context.pluginEntry().updatePath(extensionDeploymentDir);
|
|
41
|
-
|
|
42
|
+
this.logger.info(`root path: ${context.pluginEntry().rootPath}`);
|
|
42
43
|
const originalPath = context.pluginEntry().originalPath();
|
|
43
44
|
if (originalPath && originalPath !== extensionDeploymentDir) {
|
|
44
45
|
const tempDirUri = await this.environment.getTempDirUri();
|
|
@@ -47,7 +48,7 @@ let PluginVsCodeFileHandler = class PluginVsCodeFileHandler {
|
|
|
47
48
|
await fs.remove(file_uri_1.FileUri.fsPath(originalPath));
|
|
48
49
|
}
|
|
49
50
|
catch (e) {
|
|
50
|
-
|
|
51
|
+
this.logger.error(`[${id}]: failed to remove temporary files: "${originalPath}"`, e);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -61,6 +62,11 @@ tslib_1.__decorate([
|
|
|
61
62
|
(0, inversify_1.inject)(plugin_vscode_environment_1.PluginVSCodeEnvironment),
|
|
62
63
|
tslib_1.__metadata("design:type", plugin_vscode_environment_1.PluginVSCodeEnvironment)
|
|
63
64
|
], PluginVsCodeFileHandler.prototype, "environment", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
67
|
+
(0, inversify_1.named)('plugin-ext-vscode:PluginVsCodeFileHandler'),
|
|
68
|
+
tslib_1.__metadata("design:type", Object)
|
|
69
|
+
], PluginVsCodeFileHandler.prototype, "logger", void 0);
|
|
64
70
|
exports.PluginVsCodeFileHandler = PluginVsCodeFileHandler = tslib_1.__decorate([
|
|
65
71
|
(0, inversify_1.injectable)()
|
|
66
72
|
], PluginVsCodeFileHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-file-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.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;;;;AAGhF,yCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"plugin-vscode-file-handler.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-file-handler.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E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AAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC;QAC1D,IAAI,YAAY,IAAI,YAAY,KAAK,sBAAsB,EAAE,CAAC;YAC1D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;YAC1D,IAAI,YAAY,CAAC,UAAU,CAAC,kBAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;gBACtD,IAAI,CAAC;oBACD,MAAM,EAAE,CAAC,MAAM,CAAC,kBAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;gBAClD,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACT,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,yCAAyC,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;gBACzF,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAES,wBAAwB,CAAC,QAAgB;QAC/C,OAAO,UAAU,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;CACJ,CAAA;AArCY,0DAAuB;AAEb;IADlB,IAAA,kBAAM,EAAC,mDAAuB,CAAC;sCACA,mDAAuB;4DAAC;AAGrC;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,2CAA2C,CAAC;;uDACjC;kCAL1B,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAqCnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner-vscode.d.ts","sourceRoot":"","sources":["../../src/node/scanner-vscode.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"scanner-vscode.d.ts","sourceRoot":"","sources":["../../src/node/scanner-vscode.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAA6B,MAAM,mBAAmB,CAAC;AACxI,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAC;AAO9F,qBACa,mBAAoB,SAAQ,kBAAmB,YAAW,aAAa;IAEhF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;IAEtD,IAAa,OAAO,IAAI,YAAY,CAEnC;IAEQ,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,WAAW;IAYrD;;OAEG;IACM,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAavE,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,eAAe;CAOhE"}
|
|
@@ -23,6 +23,7 @@ const plugin_ext_1 = require("@theia/plugin-ext");
|
|
|
23
23
|
const scanner_theia_1 = require("@theia/plugin-ext/lib/hosted/node/scanners/scanner-theia");
|
|
24
24
|
const environment_1 = require("@theia/core/shared/@theia/application-package/lib/environment");
|
|
25
25
|
const plugin_vscode_uri_1 = require("../common/plugin-vscode-uri");
|
|
26
|
+
const plugin_model_1 = require("@theia/plugin-utils/lib/common/plugin-model");
|
|
26
27
|
const uiKind = environment_1.environment.electron.is() ? plugin_ext_1.UIKind.Desktop : plugin_ext_1.UIKind.Web;
|
|
27
28
|
let VsCodePluginScanner = class VsCodePluginScanner extends scanner_theia_1.TheiaPluginScanner {
|
|
28
29
|
constructor() {
|
|
@@ -33,46 +34,13 @@ let VsCodePluginScanner = class VsCodePluginScanner extends scanner_theia_1.Thei
|
|
|
33
34
|
return this.VSCODE_TYPE;
|
|
34
35
|
}
|
|
35
36
|
getModel(plugin) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// Mimic choosing frontend (web extension) and backend (local/remote extension) as described here:
|
|
40
|
-
// https://code.visualstudio.com/api/advanced-topics/extension-host#preferred-extension-location
|
|
41
|
-
const entryPoint = {};
|
|
42
|
-
// Act like codespaces when run in the browser (UIKind === 'web' and extensionKind is ['ui'])
|
|
43
|
-
const preferFrontend = uiKind === plugin_ext_1.UIKind.Web && (plugin.extensionKind?.length === 1 && plugin.extensionKind[0] === 'ui');
|
|
44
|
-
if (plugin.browser && (!plugin.main || preferFrontend)) {
|
|
45
|
-
// Use frontend if available and there is no backend or frontend is preferred
|
|
46
|
-
entryPoint.frontend = plugin.browser;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
// Default to using backend
|
|
50
|
-
entryPoint.backend = plugin.main;
|
|
51
|
-
}
|
|
52
|
-
if (plugin.theiaPlugin?.headless) {
|
|
53
|
-
// Support the Theia-specific extension for headless plugins
|
|
54
|
-
entryPoint.headless = plugin.theiaPlugin?.headless;
|
|
55
|
-
}
|
|
56
|
-
const result = {
|
|
57
|
-
packagePath: plugin.packagePath,
|
|
37
|
+
const result = (0, plugin_model_1.buildModelForVsCode)({
|
|
38
|
+
...plugin,
|
|
39
|
+
publisher: plugin.publisher ?? plugin_ext_1.PluginIdentifiers.UNPUBLISHED,
|
|
58
40
|
packageUri: this.pluginUriFactory.createUri(plugin).toString(),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
publisher: publisher,
|
|
63
|
-
version: plugin.version,
|
|
64
|
-
displayName: plugin.displayName,
|
|
65
|
-
description: plugin.description,
|
|
66
|
-
engine: {
|
|
67
|
-
type: this.VSCODE_TYPE,
|
|
68
|
-
version: plugin.engines[this.VSCODE_TYPE]
|
|
69
|
-
},
|
|
70
|
-
entryPoint,
|
|
71
|
-
iconUrl: plugin.icon && plugin_ext_1.PluginPackage.toPluginUrl(plugin, plugin.icon),
|
|
72
|
-
l10n: plugin.l10n,
|
|
73
|
-
readmeUrl: this.getReadmeUrl(plugin),
|
|
74
|
-
licenseUrl: this.getLicenseUrl(plugin)
|
|
75
|
-
};
|
|
41
|
+
}, { uiKind: uiKind === plugin_ext_1.UIKind.Web ? 'web' : 'desktop' });
|
|
42
|
+
result.licenseUrl = this.getLicenseUrl(plugin);
|
|
43
|
+
result.readmeUrl = this.getReadmeUrl(plugin);
|
|
76
44
|
this.applyTrustExtraction(plugin, result);
|
|
77
45
|
return result;
|
|
78
46
|
}
|
|
@@ -80,27 +48,20 @@ let VsCodePluginScanner = class VsCodePluginScanner extends scanner_theia_1.Thei
|
|
|
80
48
|
* Maps extension dependencies to deployable extension dependencies.
|
|
81
49
|
*/
|
|
82
50
|
getDependencies(plugin) {
|
|
83
|
-
// Store the list of dependencies.
|
|
84
51
|
const dependencies = new Map();
|
|
85
|
-
// Iterate through the list of dependencies from `extensionDependencies` and `extensionPack`.
|
|
86
52
|
for (const dependency of [plugin.extensionDependencies, plugin.extensionPack]) {
|
|
87
53
|
if (dependency !== undefined) {
|
|
88
|
-
// Iterate over the list of dependencies present, and add them to the collection.
|
|
89
54
|
dependency.forEach((dep) => {
|
|
90
55
|
const dependencyId = dep.toLowerCase();
|
|
91
56
|
dependencies.set(dependencyId, plugin_vscode_uri_1.VSCodeExtensionUri.fromId(dependencyId).toString());
|
|
92
57
|
});
|
|
93
58
|
}
|
|
94
59
|
}
|
|
95
|
-
// Return the map of dependencies if present, else `undefined`.
|
|
96
60
|
return dependencies.size > 0 ? dependencies : undefined;
|
|
97
61
|
}
|
|
98
62
|
getLifecycle(plugin) {
|
|
99
63
|
return {
|
|
100
|
-
|
|
101
|
-
stopMethod: 'deactivate',
|
|
102
|
-
frontendModuleName: (0, plugin_ext_1.buildFrontendModuleName)(plugin),
|
|
103
|
-
frontendInitPath: 'plugin-vscode-init-fe.js',
|
|
64
|
+
...(0, plugin_model_1.buildLifecycle)(plugin, 'vscode'),
|
|
104
65
|
backendInitPath: path.join(__dirname, 'plugin-vscode-init'),
|
|
105
66
|
};
|
|
106
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner-vscode.js","sourceRoot":"","sources":["../../src/node/scanner-vscode.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,wCAAwC;AACxC,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,4DAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"scanner-vscode.js","sourceRoot":"","sources":["../../src/node/scanner-vscode.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,wCAAwC;AACxC,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,4DAA0D;AAC1D,kDAAwI;AACxI,4FAA8F;AAC9F,+FAA4F;AAC5F,mEAAiE;AACjE,8EAAkG;AAElG,MAAM,MAAM,GAAG,yBAAW,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAM,CAAC,GAAG,CAAC;AAGhE,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,kCAAkB;IAApD;;QAEc,gBAAW,GAAiB,QAAQ,CAAC;IAyC1D,CAAC;IAvCG,IAAa,OAAO;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAEQ,QAAQ,CAAC,MAAqB;QACnC,MAAM,MAAM,GAAG,IAAA,kCAAmB,EAAC;YAC/B,GAAG,MAAM;YACT,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,8BAAiB,CAAC,WAAW;YAC5D,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,MAAM,C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B,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CA2C/B"}
|
package/package.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext-vscode",
|
|
3
|
-
"version": "1.75.0
|
|
3
|
+
"version": "1.75.0",
|
|
4
4
|
"description": "Theia - Plugin Extension for VsCode",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/callhierarchy": "1.75.0
|
|
7
|
-
"@theia/core": "1.75.0
|
|
8
|
-
"@theia/editor": "1.75.0
|
|
9
|
-
"@theia/filesystem": "1.75.0
|
|
10
|
-
"@theia/monaco": "1.75.0
|
|
6
|
+
"@theia/callhierarchy": "1.75.0",
|
|
7
|
+
"@theia/core": "1.75.0",
|
|
8
|
+
"@theia/editor": "1.75.0",
|
|
9
|
+
"@theia/filesystem": "1.75.0",
|
|
10
|
+
"@theia/monaco": "1.75.0",
|
|
11
11
|
"@theia/monaco-editor-core": "1.108.201",
|
|
12
|
-
"@theia/navigator": "1.75.0
|
|
13
|
-
"@theia/outline-view": "1.75.0
|
|
14
|
-
"@theia/plugin": "1.75.0
|
|
15
|
-
"@theia/plugin-ext": "1.75.0
|
|
16
|
-
"@theia/
|
|
17
|
-
"@theia/
|
|
18
|
-
"@theia/
|
|
19
|
-
"@theia/
|
|
20
|
-
"@theia/
|
|
12
|
+
"@theia/navigator": "1.75.0",
|
|
13
|
+
"@theia/outline-view": "1.75.0",
|
|
14
|
+
"@theia/plugin": "1.75.0",
|
|
15
|
+
"@theia/plugin-ext": "1.75.0",
|
|
16
|
+
"@theia/plugin-utils": "1.75.0",
|
|
17
|
+
"@theia/scm": "1.75.0",
|
|
18
|
+
"@theia/terminal": "1.75.0",
|
|
19
|
+
"@theia/typehierarchy": "1.75.0",
|
|
20
|
+
"@theia/userstorage": "1.75.0",
|
|
21
|
+
"@theia/workspace": "1.75.0",
|
|
21
22
|
"decompress": "^4.2.1",
|
|
22
23
|
"filenamify": "^4.3.0",
|
|
23
24
|
"tslib": "^2.8.1"
|
|
@@ -56,10 +57,10 @@
|
|
|
56
57
|
"watch": "theiaext watch"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
|
-
"@theia/ext-scripts": "1.
|
|
60
|
+
"@theia/ext-scripts": "1.75.0"
|
|
60
61
|
},
|
|
61
62
|
"nyc": {
|
|
62
63
|
"extends": "../../configs/nyc.json"
|
|
63
64
|
},
|
|
64
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "6d8e911f05f0fd9a13d76797e79b21ee3f038bc2"
|
|
65
66
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 EclipseSource and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
|
|
18
|
+
|
|
19
|
+
const disableJSDOM = enableJSDOM();
|
|
20
|
+
// xterm.js is loaded transitively by the command contribution and probes canvas
|
|
21
|
+
// support at module-load time. These tests do not render a terminal.
|
|
22
|
+
const canvasProto = (globalThis as { HTMLCanvasElement?: { prototype: { getContext?: unknown } } }).HTMLCanvasElement?.prototype;
|
|
23
|
+
if (canvasProto) {
|
|
24
|
+
canvasProto.getContext = () => undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
|
28
|
+
FrontendApplicationConfigProvider.set({});
|
|
29
|
+
|
|
30
|
+
import { expect } from 'chai';
|
|
31
|
+
import { EditorGroupNavigationRect, PluginVscodeCommandsContribution } from './plugin-vscode-commands-contribution';
|
|
32
|
+
|
|
33
|
+
after(() => disableJSDOM());
|
|
34
|
+
|
|
35
|
+
function rect(left: number, top: number, width: number, height: number): EditorGroupNavigationRect {
|
|
36
|
+
return { left, top, right: left + width, bottom: top + height, width, height };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
describe('PluginVscodeCommandsContribution', () => {
|
|
40
|
+
const contribution = new PluginVscodeCommandsContribution();
|
|
41
|
+
|
|
42
|
+
describe('findClosestEditorGroup', () => {
|
|
43
|
+
it('prefers the orthogonally-overlapping group when navigating up out of a split column', () => {
|
|
44
|
+
const left = rect(0, 0, 50, 100);
|
|
45
|
+
const upperRight = rect(50, 0, 50, 50);
|
|
46
|
+
const lowerRight = rect(50, 50, 50, 50);
|
|
47
|
+
expect(contribution['findClosestEditorGroup'](lowerRight, [left, upperRight], 'up')).to.equal(1);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('navigates between columns in a 2x2 grid without skipping', () => {
|
|
51
|
+
const topLeft = rect(0, 0, 50, 50);
|
|
52
|
+
const topRight = rect(50, 0, 50, 50);
|
|
53
|
+
const bottomLeft = rect(0, 50, 50, 50);
|
|
54
|
+
const bottomRight = rect(50, 50, 50, 50);
|
|
55
|
+
const candidates = [topRight, bottomLeft, bottomRight];
|
|
56
|
+
expect(contribution['findClosestEditorGroup'](topLeft, candidates, 'right')).to.equal(0);
|
|
57
|
+
expect(contribution['findClosestEditorGroup'](topLeft, candidates, 'down')).to.equal(1);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('returns -1 when no candidate lies in the requested direction', () => {
|
|
61
|
+
const left = rect(0, 0, 50, 100);
|
|
62
|
+
const right = rect(50, 0, 50, 100);
|
|
63
|
+
expect(contribution['findClosestEditorGroup'](left, [right], 'left')).to.equal(-1);
|
|
64
|
+
expect(contribution['findClosestEditorGroup'](left, [right], 'up')).to.equal(-1);
|
|
65
|
+
expect(contribution['findClosestEditorGroup'](left, [], 'right')).to.equal(-1);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|