@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.
Files changed (119) hide show
  1. package/lib/common/plugin-api-rpc.d.ts +13 -15
  2. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.js.map +1 -1
  4. package/lib/common/rpc-protocol.d.ts +1 -1
  5. package/lib/common/rpc-protocol.d.ts.map +1 -1
  6. package/lib/common/rpc-protocol.js +3 -3
  7. package/lib/common/rpc-protocol.js.map +1 -1
  8. package/lib/main/browser/authentication-main.d.ts +3 -6
  9. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  10. package/lib/main/browser/authentication-main.js +16 -37
  11. package/lib/main/browser/authentication-main.js.map +1 -1
  12. package/lib/main/browser/comments/comment-thread-widget.d.ts +2 -0
  13. package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
  14. package/lib/main/browser/comments/comment-thread-widget.js +4 -3
  15. package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
  16. package/lib/main/browser/debug/debug-main.d.ts +1 -1
  17. package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
  18. package/lib/main/browser/debug/debug-main.js +20 -10
  19. package/lib/main/browser/debug/debug-main.js.map +1 -1
  20. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +4 -4
  21. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  22. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  23. package/lib/main/browser/plugin-ext-frontend-module.d.ts +1 -0
  24. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  25. package/lib/main/browser/plugin-ext-frontend-module.js +1 -0
  26. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  27. package/lib/main/browser/theme-icon-override.d.ts +2 -0
  28. package/lib/main/browser/theme-icon-override.d.ts.map +1 -0
  29. package/lib/main/browser/theme-icon-override.js +217 -0
  30. package/lib/main/browser/theme-icon-override.js.map +1 -0
  31. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  32. package/lib/main/browser/view/plugin-view-registry.js +0 -1
  33. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  34. package/lib/main/browser/view/plugin-view-widget.d.ts +9 -8
  35. package/lib/main/browser/view/plugin-view-widget.d.ts.map +1 -1
  36. package/lib/main/browser/view/plugin-view-widget.js +7 -4
  37. package/lib/main/browser/view/plugin-view-widget.js.map +1 -1
  38. package/lib/main/browser/view/tree-view-decorator-service.d.ts +1 -1
  39. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
  40. package/lib/main/browser/view/tree-view-decorator-service.js +1 -1
  41. package/lib/main/browser/view/tree-view-decorator-service.js.map +1 -1
  42. package/lib/main/node/plugin-ext-backend-module.d.ts +1 -1
  43. package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
  44. package/lib/main/node/plugin-ext-backend-module.js +4 -1
  45. package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
  46. package/lib/main/node/plugin-localization-backend-contribution.d.ts +10 -0
  47. package/lib/main/node/plugin-localization-backend-contribution.d.ts.map +1 -0
  48. package/lib/main/node/plugin-localization-backend-contribution.js +59 -0
  49. package/lib/main/node/plugin-localization-backend-contribution.js.map +1 -0
  50. package/lib/plugin/authentication-ext.d.ts +1 -11
  51. package/lib/plugin/authentication-ext.d.ts.map +1 -1
  52. package/lib/plugin/authentication-ext.js +3 -55
  53. package/lib/plugin/authentication-ext.js.map +1 -1
  54. package/lib/plugin/languages/code-action.d.ts.map +1 -1
  55. package/lib/plugin/languages/code-action.js +8 -9
  56. package/lib/plugin/languages/code-action.js.map +1 -1
  57. package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
  58. package/lib/plugin/languages/document-highlight.js +0 -1
  59. package/lib/plugin/languages/document-highlight.js.map +1 -1
  60. package/lib/plugin/languages/util.d.ts +2 -2
  61. package/lib/plugin/languages/util.d.ts.map +1 -1
  62. package/lib/plugin/languages/util.js +0 -2
  63. package/lib/plugin/languages/util.js.map +1 -1
  64. package/lib/plugin/plugin-context.d.ts.map +1 -1
  65. package/lib/plugin/plugin-context.js +3 -35
  66. package/lib/plugin/plugin-context.js.map +1 -1
  67. package/lib/plugin/preference-registry.d.ts.map +1 -1
  68. package/lib/plugin/preference-registry.js +5 -0
  69. package/lib/plugin/preference-registry.js.map +1 -1
  70. package/lib/plugin/preference-registry.spec.js +44 -1
  71. package/lib/plugin/preference-registry.spec.js.map +1 -1
  72. package/lib/plugin/quick-open.d.ts +5 -1
  73. package/lib/plugin/quick-open.d.ts.map +1 -1
  74. package/lib/plugin/quick-open.js +27 -4
  75. package/lib/plugin/quick-open.js.map +1 -1
  76. package/lib/plugin/type-converters.d.ts +6 -6
  77. package/lib/plugin/type-converters.d.ts.map +1 -1
  78. package/lib/plugin/type-converters.js +45 -53
  79. package/lib/plugin/type-converters.js.map +1 -1
  80. package/lib/plugin/types-impl.d.ts +8 -3
  81. package/lib/plugin/types-impl.d.ts.map +1 -1
  82. package/lib/plugin/types-impl.js +12 -8
  83. package/lib/plugin/types-impl.js.map +1 -1
  84. package/lib/plugin/workspace.d.ts.map +1 -1
  85. package/lib/plugin/workspace.js +6 -1
  86. package/lib/plugin/workspace.js.map +1 -1
  87. package/lib/plugin-ext-backend-electron-module.js +2 -2
  88. package/lib/plugin-ext-backend-electron-module.js.map +1 -1
  89. package/lib/plugin-ext-backend-module.js +2 -2
  90. package/lib/plugin-ext-backend-module.js.map +1 -1
  91. package/package.json +26 -26
  92. package/src/common/plugin-api-rpc.ts +10 -15
  93. package/src/common/rpc-protocol.ts +5 -5
  94. package/src/main/browser/authentication-main.ts +17 -42
  95. package/src/main/browser/comments/comment-thread-widget.tsx +5 -3
  96. package/src/main/browser/debug/debug-main.ts +20 -12
  97. package/src/main/browser/debug/plugin-debug-session-factory.ts +3 -3
  98. package/src/main/browser/plugin-ext-frontend-module.ts +1 -0
  99. package/src/main/browser/style/tree.css +2 -0
  100. package/src/main/browser/theme-icon-override.ts +221 -0
  101. package/src/main/browser/view/plugin-view-registry.ts +0 -1
  102. package/src/main/browser/view/plugin-view-widget.ts +14 -11
  103. package/src/main/browser/view/tree-view-decorator-service.ts +2 -2
  104. package/src/main/node/plugin-ext-backend-module.ts +6 -1
  105. package/src/main/node/plugin-localization-backend-contribution.ts +42 -0
  106. package/src/plugin/authentication-ext.ts +3 -70
  107. package/src/plugin/debug/debug-ext.ts +1 -1
  108. package/src/plugin/languages/code-action.ts +9 -12
  109. package/src/plugin/languages/document-highlight.ts +1 -2
  110. package/src/plugin/languages/util.ts +2 -4
  111. package/src/plugin/plugin-context.ts +7 -41
  112. package/src/plugin/preference-registry.spec.ts +45 -1
  113. package/src/plugin/preference-registry.ts +5 -0
  114. package/src/plugin/quick-open.ts +32 -6
  115. package/src/plugin/type-converters.ts +51 -59
  116. package/src/plugin/types-impl.ts +18 -14
  117. package/src/plugin/workspace.ts +5 -1
  118. package/src/plugin-ext-backend-electron-module.ts +2 -2
  119. package/src/plugin-ext-backend-module.ts +2 -2
@@ -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(): any {
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
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
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
- if (!thing) {
555
- return false;
556
- }
557
- return Position.isPosition((<Range>thing).start)
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(): any {
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 (<any>Object).setPrototypeOf === 'function') {
1640
- (<any>Object).setPrototypeOf(this, FileSystemError.prototype);
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: any): arg is string[] | undefined {
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: any, arg1: any, arg2: any, arg3?: any, arg4?: any): void {
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
@@ -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 || this.documentContentProviders.has(scheme)) {
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
  });