@theia/plugin-ext 1.29.0-next.9 → 1.29.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 +13 -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/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 +1 -11
- 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/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 +6 -6
- 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 +8 -3
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +12 -8
- 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 +10 -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/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 +3 -70
- 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 +51 -59
- package/src/plugin/types-impl.ts +18 -14
- 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
|
}
|
|
@@ -1636,8 +1634,8 @@ export class FileSystemError extends Error {
|
|
|
1636
1634
|
|
|
1637
1635
|
// workaround when extending builtin objects and when compiling to ES5, see:
|
|
1638
1636
|
// 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
|
-
|
|
1637
|
+
if (typeof Object.setPrototypeOf === 'function') {
|
|
1638
|
+
Object.setPrototypeOf(this, FileSystemError.prototype);
|
|
1641
1639
|
}
|
|
1642
1640
|
|
|
1643
1641
|
if (typeof Error.captureStackTrace === 'function' && typeof terminator === 'function') {
|
|
@@ -2555,7 +2553,7 @@ export class SemanticTokensLegend {
|
|
|
2555
2553
|
}
|
|
2556
2554
|
}
|
|
2557
2555
|
|
|
2558
|
-
function isStrArrayOrUndefined(arg:
|
|
2556
|
+
function isStrArrayOrUndefined(arg: unknown): arg is string[] | undefined {
|
|
2559
2557
|
return ((typeof arg === 'undefined') || (Array.isArray(arg) && arg.every(e => typeof e === 'string')));
|
|
2560
2558
|
}
|
|
2561
2559
|
|
|
@@ -2593,7 +2591,7 @@ export class SemanticTokensBuilder {
|
|
|
2593
2591
|
|
|
2594
2592
|
public push(line: number, char: number, length: number, tokenType: number, tokenModifiers?: number): void;
|
|
2595
2593
|
public push(range: Range, tokenType: string, tokenModifiers?: string[]): void;
|
|
2596
|
-
public push(arg0:
|
|
2594
|
+
public push(arg0: number | Range, arg1: number | string, arg2?: number | string[], arg3?: number, arg4?: number): void {
|
|
2597
2595
|
if (typeof arg0 === 'number' && typeof arg1 === 'number' && typeof arg2 === 'number' && typeof arg3 === 'number' &&
|
|
2598
2596
|
(typeof arg4 === 'number' || typeof arg4 === 'undefined')) {
|
|
2599
2597
|
if (typeof arg4 === 'undefined') {
|
|
@@ -2774,4 +2772,10 @@ export class SemanticTokensEdits {
|
|
|
2774
2772
|
}
|
|
2775
2773
|
}
|
|
2776
2774
|
|
|
2775
|
+
export enum InputBoxValidationSeverity {
|
|
2776
|
+
Info = 1,
|
|
2777
|
+
Warning = 2,
|
|
2778
|
+
Error = 3
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2777
2781
|
// #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
|
});
|