@theia/plugin-ext 1.29.0-next.9 → 1.30.0-next.1
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/common/plugin-api-rpc.d.ts +17 -15
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/rpc-protocol.d.ts +1 -1
- package/lib/common/rpc-protocol.d.ts.map +1 -1
- package/lib/common/rpc-protocol.js +3 -3
- package/lib/common/rpc-protocol.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +3 -6
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/authentication-main.js +16 -37
- package/lib/main/browser/authentication-main.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts +2 -0
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +4 -3
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +1 -1
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +20 -10
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +4 -4
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts +1 -0
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +1 -0
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +2 -1
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/theme-icon-override.d.ts +2 -0
- package/lib/main/browser/theme-icon-override.d.ts.map +1 -0
- package/lib/main/browser/theme-icon-override.js +217 -0
- package/lib/main/browser/theme-icon-override.js.map +1 -0
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +0 -1
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.d.ts +9 -8
- package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-widget.js +7 -4
- package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.js +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.d.ts +1 -1
- package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +4 -1
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/main/node/plugin-localization-backend-contribution.d.ts +10 -0
- package/lib/main/node/plugin-localization-backend-contribution.d.ts.map +1 -0
- package/lib/main/node/plugin-localization-backend-contribution.js +59 -0
- package/lib/main/node/plugin-localization-backend-contribution.js.map +1 -0
- package/lib/plugin/authentication-ext.d.ts +2 -12
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.js +3 -55
- package/lib/plugin/authentication-ext.js.map +1 -1
- package/lib/plugin/custom-editors.js +1 -1
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.js +8 -9
- package/lib/plugin/languages/code-action.js.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.js +0 -1
- package/lib/plugin/languages/document-highlight.js.map +1 -1
- package/lib/plugin/languages/util.d.ts +2 -2
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/util.js +0 -2
- package/lib/plugin/languages/util.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +3 -35
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/preference-registry.js +5 -0
- package/lib/plugin/preference-registry.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js +44 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.d.ts +5 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +27 -4
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +7 -7
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +45 -53
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +13 -8
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +12 -10
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/lib/plugin/workspace.js +6 -1
- package/lib/plugin/workspace.js.map +1 -1
- package/lib/plugin-ext-backend-electron-module.js +2 -2
- package/lib/plugin-ext-backend-electron-module.js.map +1 -1
- package/lib/plugin-ext-backend-module.js +2 -2
- package/lib/plugin-ext-backend-module.js.map +1 -1
- package/package.json +26 -26
- package/src/common/plugin-api-rpc.ts +11 -15
- package/src/common/rpc-protocol.ts +5 -5
- package/src/main/browser/authentication-main.ts +17 -42
- package/src/main/browser/comments/comment-thread-widget.tsx +5 -3
- package/src/main/browser/debug/debug-main.ts +20 -12
- package/src/main/browser/debug/plugin-debug-session-factory.ts +3 -3
- package/src/main/browser/plugin-ext-frontend-module.ts +1 -0
- package/src/main/browser/style/tree.css +2 -0
- package/src/main/browser/terminal-main.ts +2 -1
- package/src/main/browser/theme-icon-override.ts +221 -0
- package/src/main/browser/view/plugin-view-registry.ts +0 -1
- package/src/main/browser/view/plugin-view-widget.ts +14 -11
- package/src/main/browser/view/tree-view-decorator-service.ts +2 -2
- package/src/main/node/plugin-ext-backend-module.ts +6 -1
- package/src/main/node/plugin-localization-backend-contribution.ts +42 -0
- package/src/plugin/authentication-ext.ts +4 -71
- package/src/plugin/custom-editors.ts +1 -1
- package/src/plugin/debug/debug-ext.ts +1 -1
- package/src/plugin/languages/code-action.ts +9 -12
- package/src/plugin/languages/document-highlight.ts +1 -2
- package/src/plugin/languages/util.ts +2 -4
- package/src/plugin/plugin-context.ts +7 -41
- package/src/plugin/preference-registry.spec.ts +45 -1
- package/src/plugin/preference-registry.ts +5 -0
- package/src/plugin/quick-open.ts +32 -6
- package/src/plugin/type-converters.ts +46 -54
- package/src/plugin/types-impl.ts +25 -24
- package/src/plugin/workspace.ts +5 -1
- package/src/plugin-ext-backend-electron-module.ts +2 -2
- package/src/plugin-ext-backend-module.ts +2 -2
package/src/plugin/types-impl.ts
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
*--------------------------------------------------------------------------------------------*/
|
|
21
21
|
|
|
22
22
|
/* eslint-disable no-null/no-null */
|
|
23
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
23
|
|
|
25
24
|
import { UUID } from '@theia/core/shared/@phosphor/coreutils';
|
|
26
25
|
import { illegalArgument } from '../common/errors';
|
|
@@ -38,6 +37,7 @@ import { es5ClassCompat } from '../common/types';
|
|
|
38
37
|
* A reviver that takes URI's transferred via JSON.stringify() and makes
|
|
39
38
|
* instances of our local plugin API URI class (below)
|
|
40
39
|
*/
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
41
|
export function reviver(key: string | undefined, value: any): any {
|
|
42
42
|
const revived = ObjectsTransferrer.reviver(key, value);
|
|
43
43
|
if (CodeURI.isUri(revived)) {
|
|
@@ -423,7 +423,7 @@ export class Position {
|
|
|
423
423
|
return false;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
toJSON():
|
|
426
|
+
toJSON(): unknown {
|
|
427
427
|
return { line: this.line, character: this.character };
|
|
428
428
|
}
|
|
429
429
|
}
|
|
@@ -546,19 +546,17 @@ export class Range {
|
|
|
546
546
|
return new Range(start, end);
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
-
|
|
550
|
-
static isRange(thing: any): thing is theia.Range {
|
|
549
|
+
static isRange(thing: unknown): thing is theia.Range {
|
|
551
550
|
if (thing instanceof Range) {
|
|
552
551
|
return true;
|
|
553
552
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
&& Position.isPosition((<Range>thing).end);
|
|
553
|
+
const range = thing as theia.Range;
|
|
554
|
+
return !!thing && typeof thing === 'object'
|
|
555
|
+
&& Position.isPosition(range.start)
|
|
556
|
+
&& Position.isPosition(range.end);
|
|
559
557
|
}
|
|
560
558
|
|
|
561
|
-
toJSON():
|
|
559
|
+
toJSON(): unknown {
|
|
562
560
|
return [this.start, this.end];
|
|
563
561
|
}
|
|
564
562
|
}
|
|
@@ -721,8 +719,7 @@ export class SnippetString {
|
|
|
721
719
|
|
|
722
720
|
@es5ClassCompat
|
|
723
721
|
export class ThemeColor {
|
|
724
|
-
constructor(public id: string) {
|
|
725
|
-
}
|
|
722
|
+
constructor(public id: string) { }
|
|
726
723
|
}
|
|
727
724
|
|
|
728
725
|
@es5ClassCompat
|
|
@@ -1100,18 +1097,18 @@ export class SignatureHelp {
|
|
|
1100
1097
|
@es5ClassCompat
|
|
1101
1098
|
export class Hover {
|
|
1102
1099
|
|
|
1103
|
-
public contents: theia.MarkdownString
|
|
1100
|
+
public contents: Array<theia.MarkdownString | theia.MarkedString>;
|
|
1104
1101
|
public range?: Range;
|
|
1105
1102
|
|
|
1106
1103
|
constructor(
|
|
1107
|
-
contents: theia.MarkdownString | theia.MarkedString | theia.MarkdownString
|
|
1104
|
+
contents: theia.MarkdownString | theia.MarkedString | Array<theia.MarkdownString | theia.MarkedString>,
|
|
1108
1105
|
range?: Range
|
|
1109
1106
|
) {
|
|
1110
1107
|
if (!contents) {
|
|
1111
1108
|
illegalArgument('contents must be defined');
|
|
1112
1109
|
}
|
|
1113
1110
|
if (Array.isArray(contents)) {
|
|
1114
|
-
this.contents =
|
|
1111
|
+
this.contents = contents;
|
|
1115
1112
|
} else {
|
|
1116
1113
|
this.contents = [contents];
|
|
1117
1114
|
}
|
|
@@ -1556,8 +1553,6 @@ export class QuickInputButtons {
|
|
|
1556
1553
|
static readonly Back: theia.QuickInputButton = {
|
|
1557
1554
|
iconPath: {
|
|
1558
1555
|
id: 'Back',
|
|
1559
|
-
dark: '',
|
|
1560
|
-
light: ''
|
|
1561
1556
|
},
|
|
1562
1557
|
tooltip: 'Back'
|
|
1563
1558
|
};
|
|
@@ -1636,8 +1631,8 @@ export class FileSystemError extends Error {
|
|
|
1636
1631
|
|
|
1637
1632
|
// workaround when extending builtin objects and when compiling to ES5, see:
|
|
1638
1633
|
// https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
|
1639
|
-
if (typeof
|
|
1640
|
-
|
|
1634
|
+
if (typeof Object.setPrototypeOf === 'function') {
|
|
1635
|
+
Object.setPrototypeOf(this, FileSystemError.prototype);
|
|
1641
1636
|
}
|
|
1642
1637
|
|
|
1643
1638
|
if (typeof Error.captureStackTrace === 'function' && typeof terminator === 'function') {
|
|
@@ -2555,7 +2550,7 @@ export class SemanticTokensLegend {
|
|
|
2555
2550
|
}
|
|
2556
2551
|
}
|
|
2557
2552
|
|
|
2558
|
-
function isStrArrayOrUndefined(arg:
|
|
2553
|
+
function isStrArrayOrUndefined(arg: unknown): arg is string[] | undefined {
|
|
2559
2554
|
return ((typeof arg === 'undefined') || (Array.isArray(arg) && arg.every(e => typeof e === 'string')));
|
|
2560
2555
|
}
|
|
2561
2556
|
|
|
@@ -2593,7 +2588,7 @@ export class SemanticTokensBuilder {
|
|
|
2593
2588
|
|
|
2594
2589
|
public push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void;
|
|
2595
2590
|
public push(range: Range, tokenType: string, tokenModifiers?: string[]): void;
|
|
2596
|
-
public push(arg0:
|
|
2591
|
+
public push(arg0: number | Range, arg1: number | string, arg2?: number | string[], arg3?: number, arg4?: number): void {
|
|
2597
2592
|
if (typeof arg0 === 'number' && typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' &&
|
|
2598
2593
|
(typeof arg4 === 'number' || typeof arg4 === 'undefined')) {
|
|
2599
2594
|
if (typeof arg4 === 'undefined') {
|
|
@@ -2741,7 +2736,7 @@ export class SemanticTokensBuilder {
|
|
|
2741
2736
|
|
|
2742
2737
|
@es5ClassCompat
|
|
2743
2738
|
export class SemanticTokens {
|
|
2744
|
-
readonly resultId
|
|
2739
|
+
readonly resultId: string | undefined;
|
|
2745
2740
|
readonly data: Uint32Array;
|
|
2746
2741
|
|
|
2747
2742
|
constructor(data: Uint32Array, resultId?: string) {
|
|
@@ -2754,7 +2749,7 @@ export class SemanticTokens {
|
|
|
2754
2749
|
export class SemanticTokensEdit {
|
|
2755
2750
|
readonly start: number;
|
|
2756
2751
|
readonly deleteCount: number;
|
|
2757
|
-
readonly data
|
|
2752
|
+
readonly data: Uint32Array | undefined;
|
|
2758
2753
|
|
|
2759
2754
|
constructor(start: number, deleteCount: number, data?: Uint32Array) {
|
|
2760
2755
|
this.start = start;
|
|
@@ -2765,7 +2760,7 @@ export class SemanticTokensEdit {
|
|
|
2765
2760
|
|
|
2766
2761
|
@es5ClassCompat
|
|
2767
2762
|
export class SemanticTokensEdits {
|
|
2768
|
-
readonly resultId
|
|
2763
|
+
readonly resultId: string | undefined;
|
|
2769
2764
|
readonly edits: SemanticTokensEdit[];
|
|
2770
2765
|
|
|
2771
2766
|
constructor(edits: SemanticTokensEdit[], resultId?: string) {
|
|
@@ -2774,4 +2769,10 @@ export class SemanticTokensEdits {
|
|
|
2774
2769
|
}
|
|
2775
2770
|
}
|
|
2776
2771
|
|
|
2772
|
+
export enum InputBoxValidationSeverity {
|
|
2773
|
+
Info = 1,
|
|
2774
|
+
Warning = 2,
|
|
2775
|
+
Error = 3
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2777
2778
|
// #endregion
|
package/src/plugin/workspace.ts
CHANGED
|
@@ -243,8 +243,12 @@ export class WorkspaceExtImpl implements WorkspaceExt {
|
|
|
243
243
|
// `file` and `untitled` schemas are reserved by `workspace.openTextDocument` API:
|
|
244
244
|
// `file`-scheme for opening a file
|
|
245
245
|
// `untitled`-scheme for opening a new file that should be saved
|
|
246
|
-
if (scheme === Schemes.file || scheme === Schemes.untitled
|
|
246
|
+
if (scheme === Schemes.file || scheme === Schemes.untitled) {
|
|
247
247
|
throw new Error(`Text Content Document Provider for scheme '${scheme}' is already registered`);
|
|
248
|
+
} else if (this.documentContentProviders.has(scheme)) {
|
|
249
|
+
// TODO: we should be able to handle multiple registrations, but for now we should ensure that it doesn't crash plugin activation.
|
|
250
|
+
console.warn(`Repeat registration of TextContentDocumentProvider for scheme '${scheme}'. This registration will be ignored.`);
|
|
251
|
+
return { dispose: () => { } };
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
this.documentContentProviders.set(scheme, provider);
|
|
@@ -18,7 +18,7 @@ import { ContainerModule } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { bindElectronBackend } from './hosted/node-electron/plugin-ext-hosted-electron-backend-module';
|
|
19
19
|
import { bindMainBackend } from './main/node/plugin-ext-backend-module';
|
|
20
20
|
|
|
21
|
-
export default new ContainerModule(bind => {
|
|
22
|
-
bindMainBackend(bind);
|
|
21
|
+
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
22
|
+
bindMainBackend(bind, unbind, isBound, rebind);
|
|
23
23
|
bindElectronBackend(bind);
|
|
24
24
|
});
|
|
@@ -18,7 +18,7 @@ import { ContainerModule } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { bindHostedBackend } from './hosted/node/plugin-ext-hosted-backend-module';
|
|
19
19
|
import { bindMainBackend } from './main/node/plugin-ext-backend-module';
|
|
20
20
|
|
|
21
|
-
export default new ContainerModule(bind => {
|
|
22
|
-
bindMainBackend(bind);
|
|
21
|
+
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
22
|
+
bindMainBackend(bind, unbind, isBound, rebind);
|
|
23
23
|
bindHostedBackend(bind);
|
|
24
24
|
});
|