@theia/plugin-ext 1.70.0-next.6 → 1.70.0-next.61

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 (110) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +6 -1
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc-model.js +2 -1
  4. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  5. package/lib/common/plugin-protocol.d.ts +8 -0
  6. package/lib/common/plugin-protocol.d.ts.map +1 -1
  7. package/lib/common/plugin-protocol.js.map +1 -1
  8. package/lib/hosted/browser/hosted-plugin.d.ts +2 -0
  9. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  10. package/lib/hosted/browser/hosted-plugin.js +7 -0
  11. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  12. package/lib/hosted/common/hosted-plugin.d.ts +3 -0
  13. package/lib/hosted/common/hosted-plugin.d.ts.map +1 -1
  14. package/lib/hosted/common/hosted-plugin.js +13 -0
  15. package/lib/hosted/common/hosted-plugin.js.map +1 -1
  16. package/lib/hosted/common/hosted-plugin.spec.d.ts +2 -0
  17. package/lib/hosted/common/hosted-plugin.spec.d.ts.map +1 -0
  18. package/lib/hosted/common/hosted-plugin.spec.js +308 -0
  19. package/lib/hosted/common/hosted-plugin.spec.js.map +1 -0
  20. package/lib/hosted/node/hosted-plugin-process.d.ts +2 -0
  21. package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
  22. package/lib/hosted/node/hosted-plugin-process.js +8 -0
  23. package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
  24. package/lib/hosted/node/plugin-host-navigator-override.d.ts +12 -0
  25. package/lib/hosted/node/plugin-host-navigator-override.d.ts.map +1 -0
  26. package/lib/hosted/node/plugin-host-navigator-override.js +37 -0
  27. package/lib/hosted/node/plugin-host-navigator-override.js.map +1 -0
  28. package/lib/hosted/node/plugin-host-navigator-override.spec.d.ts +2 -0
  29. package/lib/hosted/node/plugin-host-navigator-override.spec.d.ts.map +1 -0
  30. package/lib/hosted/node/plugin-host-navigator-override.spec.js +49 -0
  31. package/lib/hosted/node/plugin-host-navigator-override.spec.js.map +1 -0
  32. package/lib/hosted/node/plugin-host.js +3 -0
  33. package/lib/hosted/node/plugin-host.js.map +1 -1
  34. package/lib/hosted/node/scanners/scanner-theia.d.ts +1 -0
  35. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  36. package/lib/hosted/node/scanners/scanner-theia.js +7 -0
  37. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  38. package/lib/hosted/node/scanners/scanner-theia.spec.d.ts +2 -0
  39. package/lib/hosted/node/scanners/scanner-theia.spec.d.ts.map +1 -0
  40. package/lib/hosted/node/scanners/scanner-theia.spec.js +93 -0
  41. package/lib/hosted/node/scanners/scanner-theia.spec.js.map +1 -0
  42. package/lib/main/browser/languages-main.d.ts +2 -2
  43. package/lib/main/browser/languages-main.d.ts.map +1 -1
  44. package/lib/main/browser/languages-main.js +8 -9
  45. package/lib/main/browser/languages-main.js.map +1 -1
  46. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  47. package/lib/main/browser/plugin-ext-frontend-module.js +26 -0
  48. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  49. package/lib/main/browser/plugin-ext-widget.d.ts +1 -1
  50. package/lib/main/browser/plugin-ext-widget.d.ts.map +1 -1
  51. package/lib/main/browser/plugin-ext-widget.js +10 -3
  52. package/lib/main/browser/plugin-ext-widget.js.map +1 -1
  53. package/lib/main/browser/text-editor-main.d.ts.map +1 -1
  54. package/lib/main/browser/text-editor-main.js +12 -4
  55. package/lib/main/browser/text-editor-main.js.map +1 -1
  56. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  57. package/lib/main/browser/view/plugin-view-registry.js +16 -0
  58. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  59. package/lib/main/browser/webview/webview.js +1 -1
  60. package/lib/main/browser/webview/webview.js.map +1 -1
  61. package/lib/main/common/plugin-host-environment-preferences.d.ts +14 -0
  62. package/lib/main/common/plugin-host-environment-preferences.d.ts.map +1 -0
  63. package/lib/main/common/plugin-host-environment-preferences.js +43 -0
  64. package/lib/main/common/plugin-host-environment-preferences.js.map +1 -0
  65. package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
  66. package/lib/main/node/plugin-deployer-impl.js +5 -0
  67. package/lib/main/node/plugin-deployer-impl.js.map +1 -1
  68. package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
  69. package/lib/main/node/plugin-ext-backend-module.js +5 -0
  70. package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
  71. package/lib/main/node/plugin-host-navigator-state-initializer.d.ts +17 -0
  72. package/lib/main/node/plugin-host-navigator-state-initializer.d.ts.map +1 -0
  73. package/lib/main/node/plugin-host-navigator-state-initializer.js +53 -0
  74. package/lib/main/node/plugin-host-navigator-state-initializer.js.map +1 -0
  75. package/lib/plugin/file-system-event-service-ext-impl.d.ts +1 -1
  76. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  77. package/lib/plugin/file-system-ext-impl.d.ts +1 -1
  78. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  79. package/lib/plugin/file-system-ext-impl.js +5 -1
  80. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  81. package/lib/plugin/types-impl.d.ts +2 -1
  82. package/lib/plugin/types-impl.d.ts.map +1 -1
  83. package/lib/plugin/types-impl.js.map +1 -1
  84. package/package.json +30 -30
  85. package/src/common/plugin-api-rpc-model.ts +10 -1
  86. package/src/common/plugin-protocol.ts +9 -1
  87. package/src/hosted/browser/hosted-plugin.ts +6 -0
  88. package/src/hosted/common/hosted-plugin.spec.ts +377 -0
  89. package/src/hosted/common/hosted-plugin.ts +18 -1
  90. package/src/hosted/node/hosted-plugin-process.ts +7 -0
  91. package/src/hosted/node/plugin-host-navigator-override.spec.ts +53 -0
  92. package/src/hosted/node/plugin-host-navigator-override.ts +34 -0
  93. package/src/hosted/node/plugin-host.ts +4 -0
  94. package/src/hosted/node/scanners/scanner-theia.spec.ts +112 -0
  95. package/src/hosted/node/scanners/scanner-theia.ts +8 -0
  96. package/src/main/browser/languages-main.ts +32 -51
  97. package/src/main/browser/plugin-ext-frontend-module.ts +31 -1
  98. package/src/main/browser/plugin-ext-widget.tsx +13 -3
  99. package/src/main/browser/style/plugin-sidebar.css +13 -0
  100. package/src/main/browser/text-editor-main.ts +10 -2
  101. package/src/main/browser/view/plugin-view-registry.ts +18 -1
  102. package/src/main/browser/webview/pre/main.js +11 -12
  103. package/src/main/browser/webview/webview.ts +1 -1
  104. package/src/main/common/plugin-host-environment-preferences.ts +48 -0
  105. package/src/main/node/plugin-deployer-impl.ts +5 -0
  106. package/src/main/node/plugin-ext-backend-module.ts +5 -1
  107. package/src/main/node/plugin-host-navigator-state-initializer.ts +47 -0
  108. package/src/plugin/file-system-event-service-ext-impl.ts +1 -1
  109. package/src/plugin/file-system-ext-impl.ts +1 -2
  110. package/src/plugin/types-impl.ts +2 -1
@@ -47,6 +47,8 @@ import { RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-co
47
47
  import { PluginRemoteCopyContribution } from './plugin-remote-copy-contribution';
48
48
  import { RemoteCopyContribution } from '@theia/core/lib/node/remote/remote-copy-contribution';
49
49
  import { bindWebviewPreferences } from '../common/webview-preferences';
50
+ import { bindPluginHostEnvironmentPreferences } from '../common/plugin-host-environment-preferences';
51
+ import { PluginHostNavigatorStateInitializer } from './plugin-host-navigator-state-initializer';
50
52
 
51
53
  export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void {
52
54
  bind(PluginApiContribution).toSelf().inSingletonScope();
@@ -104,5 +106,7 @@ export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind
104
106
 
105
107
  rebind(LocalizationServerImpl).to(PluginLocalizationServer).inSingletonScope();
106
108
  bindWebviewPreferences(bind);
107
-
109
+ bindPluginHostEnvironmentPreferences(bind);
110
+ bind(PluginHostNavigatorStateInitializer).toSelf().inSingletonScope();
111
+ bind(BackendApplicationContribution).toService(PluginHostNavigatorStateInitializer);
108
112
  }
@@ -0,0 +1,47 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2026 STMicroelectronics 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 { inject, injectable } from '@theia/core/shared/inversify';
18
+ import { PreferenceService } from '@theia/core/lib/common/preferences';
19
+ import { BackendApplicationContribution } from '@theia/core/lib/node';
20
+ import { PluginHostNavigatorState, SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF } from '../common/plugin-host-environment-preferences';
21
+
22
+ /**
23
+ * Keeps {@link PluginHostNavigatorState} in sync with the navigator preference.
24
+ *
25
+ * `PreferenceService` has async dependencies and cannot be injected in
26
+ * connection-scoped containers. This contribution runs in the root container
27
+ * and mutates the shared state object by reference so that
28
+ * `HostedPluginProcess` (connection-scoped) always sees the latest value.
29
+ */
30
+ @injectable()
31
+ export class PluginHostNavigatorStateInitializer implements BackendApplicationContribution {
32
+
33
+ @inject(PreferenceService)
34
+ protected readonly preferences: PreferenceService;
35
+
36
+ @inject(PluginHostNavigatorState)
37
+ protected readonly state: PluginHostNavigatorState;
38
+
39
+ onStart(): void {
40
+ this.state.supportNodeGlobalNavigator = this.preferences.get<boolean>(SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF, false);
41
+ this.preferences.onPreferenceChanged(e => {
42
+ if (e.preferenceName === SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF) {
43
+ this.state.supportNodeGlobalNavigator = this.preferences.get<boolean>(SUPPORT_NODE_GLOBAL_NAVIGATOR_PREF, false);
44
+ }
45
+ });
46
+ }
47
+ }
@@ -30,7 +30,7 @@
30
30
 
31
31
  import { Emitter, WaitUntilEvent, AsyncEmitter, WaitUntilData } from '@theia/core/lib/common/event';
32
32
  import { IRelativePattern, parse } from '@theia/core/lib/common/glob';
33
- import { UriComponents } from '@theia/core/shared/vscode-uri';
33
+ import { UriComponents } from '../common/uri-components';
34
34
  import { Disposable, URI, WorkspaceEdit } from './types-impl';
35
35
  import { EditorsAndDocumentsExtImpl as ExtHostDocumentsAndEditors } from './editors-and-documents';
36
36
  import type * as vscode from '@theia/plugin';
@@ -28,14 +28,13 @@
28
28
  /* eslint-disable @typescript-eslint/tslint/config */
29
29
  /* eslint-disable @typescript-eslint/no-explicit-any */
30
30
 
31
- import { UriComponents } from '@theia/core/shared/vscode-uri';
31
+ import { Schemes as Schemas, UriComponents } from '../common/uri-components';
32
32
  import { FileChangeType, FileSystemError, URI } from './types-impl';
33
33
  import { RPCProtocol } from '../common/rpc-protocol';
34
34
  import { PLUGIN_RPC_CONTEXT, FileSystemExt, FileSystemMain, IFileChangeDto } from '../common/plugin-api-rpc';
35
35
  import * as vscode from '@theia/plugin';
36
36
  import * as files from '@theia/filesystem/lib/common/files';
37
37
  import * as typeConverter from './type-converters';
38
- import { Schemes as Schemas } from '../common/uri-components';
39
38
  import { State, StateMachine, LinkComputer, Edge } from '../common/link-computer';
40
39
  import { commonPrefixLength } from '@theia/core/lib/common/strings';
41
40
  import { CharCode } from '@theia/core/lib/common/char-code';
@@ -24,7 +24,8 @@
24
24
  import { UUID } from '@theia/core/shared/@lumino/coreutils';
25
25
  import { illegalArgument } from '../common/errors';
26
26
  import type * as theia from '@theia/plugin';
27
- import { URI as CodeURI, UriComponents } from '@theia/core/shared/vscode-uri';
27
+ import { URI as CodeURI } from '@theia/core/shared/vscode-uri';
28
+ import { UriComponents } from '../common/uri-components';
28
29
  import { relative } from '../common/paths-util';
29
30
  import { startsWithIgnoreCase } from '@theia/core/lib/common/strings';
30
31
  import { SymbolKind } from '../common/plugin-api-rpc-model';