@theia/plugin-ext-vscode 1.18.0-next.125 → 1.18.0-next.135
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/plugin-vscode-cli-contribution.d.ts +7 -1
- package/lib/node/plugin-vscode-cli-contribution.d.ts.map +1 -1
- package/lib/node/plugin-vscode-cli-contribution.js +14 -4
- package/lib/node/plugin-vscode-cli-contribution.js.map +1 -1
- package/package.json +14 -14
- package/src/node/plugin-vscode-cli-contribution.ts +14 -6
|
@@ -18,12 +18,18 @@
|
|
|
18
18
|
import { Argv, Arguments } from '@theia/core/shared/yargs';
|
|
19
19
|
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
20
20
|
import { PluginHostEnvironmentVariable } from '@theia/plugin-ext/lib/common';
|
|
21
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
21
22
|
/**
|
|
22
23
|
* CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
|
|
23
24
|
*/
|
|
24
25
|
export declare class PluginVsCodeCliContribution implements CliContribution, PluginHostEnvironmentVariable {
|
|
26
|
+
/**
|
|
27
|
+
* CLI argument name to define the supported VS Code API version.
|
|
28
|
+
*/
|
|
25
29
|
static VSCODE_API_VERSION: string;
|
|
26
|
-
protected vsCodeApiVersion
|
|
30
|
+
protected vsCodeApiVersion?: string;
|
|
31
|
+
protected vsCodeApiVersionDeferred: Deferred<string>;
|
|
32
|
+
get vsCodeApiVersionPromise(): Promise<string>;
|
|
27
33
|
configure(conf: Argv): void;
|
|
28
34
|
setArguments(args: Arguments): void;
|
|
29
35
|
process(env: NodeJS.ProcessEnv): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-cli-contribution.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin-vscode-cli-contribution.d.ts","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;;;AAGlF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D;;GAEG;AACH,qBACa,2BAA4B,YAAW,eAAe,EAAE,6BAA6B;IAE9F;;OAEG;IACH,MAAM,CAAC,kBAAkB,SAAwB;IAEjD,SAAS,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,wBAAwB,mBAA0B;IAE5D,IAAI,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAE7C;IAED,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAS3B,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAOnC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI;CAMxC"}
|
|
@@ -25,10 +25,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.PluginVsCodeCliContribution = void 0;
|
|
26
26
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
27
27
|
const plugin_vscode_types_1 = require("../common/plugin-vscode-types");
|
|
28
|
+
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
28
29
|
/**
|
|
29
30
|
* CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
|
|
30
31
|
*/
|
|
31
32
|
let PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = class PluginVsCodeCliContribution {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.vsCodeApiVersionDeferred = new promise_util_1.Deferred();
|
|
35
|
+
}
|
|
36
|
+
get vsCodeApiVersionPromise() {
|
|
37
|
+
return this.vsCodeApiVersionDeferred.promise;
|
|
38
|
+
}
|
|
32
39
|
configure(conf) {
|
|
33
40
|
conf.option(PluginVsCodeCliContribution_1.VSCODE_API_VERSION, {
|
|
34
41
|
// eslint-disable-next-line max-len
|
|
@@ -38,11 +45,11 @@ let PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = class PluginVs
|
|
|
38
45
|
});
|
|
39
46
|
}
|
|
40
47
|
setArguments(args) {
|
|
48
|
+
var _a;
|
|
41
49
|
const arg = args[PluginVsCodeCliContribution_1.VSCODE_API_VERSION];
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
50
|
+
this.vsCodeApiVersion = (arg === null || arg === void 0 ? void 0 : arg.trim()) || ((_a = process.env['VSCODE_API_VERSION']) === null || _a === void 0 ? void 0 : _a.trim()) || plugin_vscode_types_1.VSCODE_DEFAULT_API_VERSION;
|
|
51
|
+
process.env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
|
|
52
|
+
this.vsCodeApiVersionDeferred.resolve(this.vsCodeApiVersion);
|
|
46
53
|
}
|
|
47
54
|
process(env) {
|
|
48
55
|
if (this.vsCodeApiVersion) {
|
|
@@ -50,6 +57,9 @@ let PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = class PluginVs
|
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* CLI argument name to define the supported VS Code API version.
|
|
62
|
+
*/
|
|
53
63
|
PluginVsCodeCliContribution.VSCODE_API_VERSION = 'vscode-api-version';
|
|
54
64
|
PluginVsCodeCliContribution = PluginVsCodeCliContribution_1 = __decorate([
|
|
55
65
|
inversify_1.injectable()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-vscode-cli-contribution.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;AAElF,4DAA0D;AAI1D,uEAA2E;
|
|
1
|
+
{"version":3,"file":"plugin-vscode-cli-contribution.js","sourceRoot":"","sources":["../../src/node/plugin-vscode-cli-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;AAElF,4DAA0D;AAI1D,uEAA2E;AAC3E,sEAA+D;AAE/D;;GAEG;AAEH,IAAa,2BAA2B,mCAAxC,MAAa,2BAA2B;IAAxC;QAQc,6BAAwB,GAAG,IAAI,uBAAQ,EAAU,CAAC;IA4BhE,CAAC;IA1BG,IAAI,uBAAuB;QACvB,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;IACjD,CAAC;IAED,SAAS,CAAC,IAAU;QAChB,IAAI,CAAC,MAAM,CAAC,6BAA2B,CAAC,kBAAkB,EAAE;YACxD,mCAAmC;YACnC,WAAW,EAAE,6EAA6E,6BAA2B,CAAC,kBAAkB,+BAA+B,gDAA0B,GAAG;YACpM,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;SACX,CAAC,CAAC;IACP,CAAC;IAED,YAAY,CAAC,IAAe;;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,6BAA2B,CAAC,kBAAkB,CAAuB,CAAC;QACvF,IAAI,CAAC,gBAAgB,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,cAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,0CAAE,IAAI,GAAE,IAAI,gDAA0B,CAAC;QAC/G,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC1D,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,GAAsB;QAC1B,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,GAAG,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;SACrD;IACL,CAAC;CAEJ,CAAA;AAlCG;;GAEG;AACI,8CAAkB,GAAG,oBAAoB,CAAC;AALxC,2BAA2B;IADvC,sBAAU,EAAE;GACA,2BAA2B,CAoCvC;AApCY,kEAA2B"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext-vscode",
|
|
3
|
-
"version": "1.18.0-next.
|
|
3
|
+
"version": "1.18.0-next.135+e5e6f928e39",
|
|
4
4
|
"description": "Theia - Plugin Extension for VsCode",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/callhierarchy": "1.18.0-next.
|
|
7
|
-
"@theia/core": "1.18.0-next.
|
|
8
|
-
"@theia/editor": "1.18.0-next.
|
|
9
|
-
"@theia/filesystem": "1.18.0-next.
|
|
10
|
-
"@theia/monaco": "1.18.0-next.
|
|
11
|
-
"@theia/navigator": "1.18.0-next.
|
|
12
|
-
"@theia/plugin": "1.18.0-next.
|
|
13
|
-
"@theia/plugin-ext": "1.18.0-next.
|
|
14
|
-
"@theia/terminal": "1.18.0-next.
|
|
15
|
-
"@theia/userstorage": "1.18.0-next.
|
|
16
|
-
"@theia/workspace": "1.18.0-next.
|
|
6
|
+
"@theia/callhierarchy": "1.18.0-next.135+e5e6f928e39",
|
|
7
|
+
"@theia/core": "1.18.0-next.135+e5e6f928e39",
|
|
8
|
+
"@theia/editor": "1.18.0-next.135+e5e6f928e39",
|
|
9
|
+
"@theia/filesystem": "1.18.0-next.135+e5e6f928e39",
|
|
10
|
+
"@theia/monaco": "1.18.0-next.135+e5e6f928e39",
|
|
11
|
+
"@theia/navigator": "1.18.0-next.135+e5e6f928e39",
|
|
12
|
+
"@theia/plugin": "1.18.0-next.135+e5e6f928e39",
|
|
13
|
+
"@theia/plugin-ext": "1.18.0-next.135+e5e6f928e39",
|
|
14
|
+
"@theia/terminal": "1.18.0-next.135+e5e6f928e39",
|
|
15
|
+
"@theia/userstorage": "1.18.0-next.135+e5e6f928e39",
|
|
16
|
+
"@theia/workspace": "1.18.0-next.135+e5e6f928e39",
|
|
17
17
|
"@types/request": "^2.0.3",
|
|
18
18
|
"filenamify": "^4.1.0",
|
|
19
19
|
"request": "^2.82.0"
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"watch": "theiaext watch"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@theia/ext-scripts": "1.
|
|
55
|
+
"@theia/ext-scripts": "1.19.0"
|
|
56
56
|
},
|
|
57
57
|
"nyc": {
|
|
58
58
|
"extends": "../../configs/nyc.json"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e5e6f928e39e88d51c4beb005ceb577fe0d3c26e"
|
|
61
61
|
}
|
|
@@ -19,6 +19,7 @@ import { Argv, Arguments } from '@theia/core/shared/yargs';
|
|
|
19
19
|
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
20
20
|
import { PluginHostEnvironmentVariable } from '@theia/plugin-ext/lib/common';
|
|
21
21
|
import { VSCODE_DEFAULT_API_VERSION } from '../common/plugin-vscode-types';
|
|
22
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* CLI Contribution allowing to override the VS Code API version which is returned by `vscode.version` API call.
|
|
@@ -26,9 +27,17 @@ import { VSCODE_DEFAULT_API_VERSION } from '../common/plugin-vscode-types';
|
|
|
26
27
|
@injectable()
|
|
27
28
|
export class PluginVsCodeCliContribution implements CliContribution, PluginHostEnvironmentVariable {
|
|
28
29
|
|
|
30
|
+
/**
|
|
31
|
+
* CLI argument name to define the supported VS Code API version.
|
|
32
|
+
*/
|
|
29
33
|
static VSCODE_API_VERSION = 'vscode-api-version';
|
|
30
34
|
|
|
31
|
-
protected vsCodeApiVersion
|
|
35
|
+
protected vsCodeApiVersion?: string;
|
|
36
|
+
protected vsCodeApiVersionDeferred = new Deferred<string>();
|
|
37
|
+
|
|
38
|
+
get vsCodeApiVersionPromise(): Promise<string> {
|
|
39
|
+
return this.vsCodeApiVersionDeferred.promise;
|
|
40
|
+
}
|
|
32
41
|
|
|
33
42
|
configure(conf: Argv): void {
|
|
34
43
|
conf.option(PluginVsCodeCliContribution.VSCODE_API_VERSION, {
|
|
@@ -40,11 +49,10 @@ export class PluginVsCodeCliContribution implements CliContribution, PluginHostE
|
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
setArguments(args: Arguments): void {
|
|
43
|
-
const arg = args[PluginVsCodeCliContribution.VSCODE_API_VERSION] as string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
52
|
+
const arg = args[PluginVsCodeCliContribution.VSCODE_API_VERSION] as string | undefined;
|
|
53
|
+
this.vsCodeApiVersion = arg?.trim() || process.env['VSCODE_API_VERSION']?.trim() || VSCODE_DEFAULT_API_VERSION;
|
|
54
|
+
process.env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
|
|
55
|
+
this.vsCodeApiVersionDeferred.resolve(this.vsCodeApiVersion);
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
process(env: NodeJS.ProcessEnv): void {
|