@theia/plugin-ext 1.77.0-next.7 → 1.77.0-next.77
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/character-classifier.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +2 -0
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +9 -0
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js +19 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +4 -2
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.spec.d.ts +2 -0
- package/lib/hosted/browser/hosted-plugin.spec.d.ts.map +1 -0
- package/lib/hosted/browser/hosted-plugin.spec.js +59 -0
- package/lib/hosted/browser/hosted-plugin.spec.js.map +1 -0
- package/lib/hosted/browser/worker/worker-main.js +2 -1
- package/lib/hosted/browser/worker/worker-main.js.map +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.js +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.js.map +1 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.spec.js +2 -1
- package/lib/hosted/browser-only/browser-only-plugin-paths-service.spec.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +2 -2
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +1 -1
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +2 -1
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-host-proxy.d.ts.map +1 -1
- package/lib/hosted/node/plugin-host-proxy.js +10 -6
- package/lib/hosted/node/plugin-host-proxy.js.map +1 -1
- package/lib/hosted/node/plugin-host-rpc.js +1 -1
- package/lib/hosted/node/plugin-host-rpc.js.map +1 -1
- package/lib/hosted/node/plugin-host.js +2 -1
- package/lib/hosted/node/plugin-host.js.map +1 -1
- package/lib/hosted/node/plugin-reader.js +6 -6
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/plugin-reader.spec.js +4 -3
- package/lib/hosted/node/plugin-reader.spec.js.map +1 -1
- package/lib/hosted/node/plugin-require-override.d.ts.map +1 -1
- package/lib/hosted/node/plugin-require-override.js +3 -1
- package/lib/hosted/node/plugin-require-override.js.map +1 -1
- package/lib/hosted/node/plugin-require-override.spec.d.ts +2 -0
- package/lib/hosted/node/plugin-require-override.spec.d.ts.map +1 -0
- package/lib/hosted/node/plugin-require-override.spec.js +40 -0
- package/lib/hosted/node/plugin-require-override.spec.js.map +1 -0
- package/lib/hosted/node/scanners/file-plugin-uri-factory.js +1 -1
- package/lib/hosted/node/scanners/file-plugin-uri-factory.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +2 -2
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.spec.js +5 -4
- package/lib/hosted/node/scanners/scanner-theia.spec.js.map +1 -1
- package/lib/hosted/node-electron/scanner-theia-electron.js +1 -1
- package/lib/hosted/node-electron/scanner-theia-electron.js.map +1 -1
- package/lib/main/browser/commands.js +1 -1
- package/lib/main/browser/commands.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +3 -2
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/comments/comments-contribution.js +1 -1
- package/lib/main/browser/comments/comments-contribution.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.spec.js +3 -2
- package/lib/main/browser/custom-editors/custom-editor-opener.spec.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +2 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/decorations/decorations-main.js +2 -1
- package/lib/main/browser/decorations/decorations-main.js.map +1 -1
- package/lib/main/browser/dialogs-main.js +2 -1
- package/lib/main/browser/dialogs-main.js.map +1 -1
- package/lib/main/browser/documents-main.js +3 -2
- package/lib/main/browser/documents-main.js.map +1 -1
- package/lib/main/browser/file-system-main-impl.js +3 -2
- package/lib/main/browser/file-system-main-impl.js.map +1 -1
- package/lib/main/browser/hierarchy/hierarchy-types-converters.js +3 -2
- package/lib/main/browser/hierarchy/hierarchy-types-converters.js.map +1 -1
- package/lib/main/browser/languages-main.js +3 -3
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/languages-main.spec.js +2 -1
- package/lib/main/browser/languages-main.spec.js.map +1 -1
- package/lib/main/browser/main-file-system-event-service.d.ts +1 -22
- package/lib/main/browser/main-file-system-event-service.d.ts.map +1 -1
- package/lib/main/browser/main-file-system-event-service.js +2 -48
- package/lib/main/browser/main-file-system-event-service.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +1 -12
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js +3 -2
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +1 -1
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-widget.js +1 -1
- package/lib/main/browser/plugin-ext-widget.js.map +1 -1
- package/lib/main/browser/plugin-icon-service.js +1 -1
- package/lib/main/browser/plugin-icon-service.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.d.ts +2 -2
- package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.js +2 -2
- package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.spec.js +2 -1
- package/lib/main/browser/plugin-icon-theme-service.spec.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/scm-main.d.ts +3 -1
- package/lib/main/browser/scm-main.d.ts.map +1 -1
- package/lib/main/browser/scm-main.js +6 -3
- package/lib/main/browser/scm-main.js.map +1 -1
- package/lib/main/browser/scm-main.spec.js +31 -0
- package/lib/main/browser/scm-main.spec.js.map +1 -1
- package/lib/main/browser/status-bar-message-registry-main.js +2 -1
- package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
- package/lib/main/browser/text-editor-main.js +2 -1
- package/lib/main/browser/text-editor-main.js.map +1 -1
- package/lib/main/browser/text-editors-main.js +2 -1
- package/lib/main/browser/text-editors-main.js.map +1 -1
- package/lib/main/browser/view/plugin-tree-view-node-label-provider.js +1 -1
- package/lib/main/browser/view/plugin-tree-view-node-label-provider.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.d.ts +17 -2
- package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.js +72 -21
- package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
- package/lib/main/browser/view/plugin-view-registry.spec.js +188 -9
- package/lib/main/browser/view/plugin-view-registry.spec.js.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/browser/view/tree-view-widget.js +2 -2
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/webview/pre/main.spec.d.ts +2 -0
- package/lib/main/browser/webview/pre/main.spec.d.ts.map +1 -0
- package/lib/main/browser/webview/pre/main.spec.js +45 -0
- package/lib/main/browser/webview/pre/main.spec.js.map +1 -0
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts +1 -1
- package/lib/main/browser/webview/webview-theme-data-provider.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +6 -3
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/window-state-main.js +2 -1
- package/lib/main/browser/window-state-main.js.map +1 -1
- package/lib/main/browser/workspace-main.js +1 -1
- package/lib/main/browser/workspace-main.js.map +1 -1
- package/lib/main/common/plugin-theia-environment.js +1 -1
- package/lib/main/common/plugin-theia-environment.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.js +4 -4
- package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +3 -3
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.js +4 -4
- package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +2 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-file-handler-context-impl.js +3 -2
- package/lib/main/node/plugin-deployer-file-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +7 -2
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.spec.d.ts +2 -0
- package/lib/main/node/plugin-deployer-impl.spec.d.ts.map +1 -0
- package/lib/main/node/plugin-deployer-impl.spec.js +66 -0
- package/lib/main/node/plugin-deployer-impl.spec.js.map +1 -0
- package/lib/main/node/plugin-github-resolver.js +1 -1
- package/lib/main/node/plugin-github-resolver.js.map +1 -1
- package/lib/main/node/plugin-http-resolver.js +1 -1
- package/lib/main/node/plugin-http-resolver.js.map +1 -1
- package/lib/main/node/plugin-service.d.ts +1 -1
- package/lib/main/node/plugin-service.d.ts.map +1 -1
- package/lib/main/node/plugin-service.js +4 -4
- package/lib/main/node/plugin-service.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.js +2 -2
- package/lib/main/node/plugins-key-value-storage.js.map +1 -1
- package/lib/main/node/plugins-key-value-storage.spec.js +2 -1
- package/lib/main/node/plugins-key-value-storage.spec.js.map +1 -1
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js +2 -2
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.js.map +1 -1
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.spec.js +4 -3
- package/lib/main/node/resolvers/local-directory-plugin-deployer-resolver.spec.js.map +1 -1
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js +3 -3
- package/lib/main/node/resolvers/local-plugin-deployer-resolver.js.map +1 -1
- package/lib/main/node/temp-dir-util.js +3 -2
- package/lib/main/node/temp-dir-util.js.map +1 -1
- package/lib/plugin/comments.d.ts +1 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +2 -1
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/decorations.spec.js +2 -1
- package/lib/plugin/decorations.spec.js.map +1 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/document-data.js +0 -1
- package/lib/plugin/document-data.js.map +1 -1
- package/lib/plugin/documents.js +2 -1
- package/lib/plugin/documents.js.map +1 -1
- package/lib/plugin/editors-and-documents.js +1 -1
- package/lib/plugin/editors-and-documents.js.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +3 -2
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +5 -4
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-watcher.spec.js +2 -1
- package/lib/plugin/file-system-watcher.spec.js.map +1 -1
- package/lib/plugin/known-commands.js +5 -5
- package/lib/plugin/known-commands.js.map +1 -1
- package/lib/plugin/known-commands.spec.js +2 -1
- package/lib/plugin/known-commands.spec.js.map +1 -1
- package/lib/plugin/languages/call-hierarchy.js +2 -1
- package/lib/plugin/languages/call-hierarchy.js.map +1 -1
- package/lib/plugin/languages/code-action.js +2 -1
- package/lib/plugin/languages/code-action.js.map +1 -1
- package/lib/plugin/languages/color.js +2 -1
- package/lib/plugin/languages/color.js.map +1 -1
- package/lib/plugin/languages/completion.js +2 -1
- package/lib/plugin/languages/completion.js.map +1 -1
- package/lib/plugin/languages/declaration.js +3 -2
- package/lib/plugin/languages/declaration.js.map +1 -1
- package/lib/plugin/languages/definition.js +3 -2
- package/lib/plugin/languages/definition.js.map +1 -1
- package/lib/plugin/languages/document-drop-edit.js +4 -3
- package/lib/plugin/languages/document-drop-edit.js.map +1 -1
- package/lib/plugin/languages/document-formatting.js +2 -1
- package/lib/plugin/languages/document-formatting.js.map +1 -1
- package/lib/plugin/languages/document-highlight.js +3 -2
- package/lib/plugin/languages/document-highlight.js.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.js +2 -1
- package/lib/plugin/languages/evaluatable-expression.js.map +1 -1
- package/lib/plugin/languages/folding.js +2 -1
- package/lib/plugin/languages/folding.js.map +1 -1
- package/lib/plugin/languages/hover.js +2 -1
- package/lib/plugin/languages/hover.js.map +1 -1
- package/lib/plugin/languages/implementation.js +3 -2
- package/lib/plugin/languages/implementation.js.map +1 -1
- package/lib/plugin/languages/inlay-hints.js +2 -1
- package/lib/plugin/languages/inlay-hints.js.map +1 -1
- package/lib/plugin/languages/inline-completion.js +2 -1
- package/lib/plugin/languages/inline-completion.js.map +1 -1
- package/lib/plugin/languages/inline-values.js +2 -1
- package/lib/plugin/languages/inline-values.js.map +1 -1
- package/lib/plugin/languages/lens.js +2 -1
- package/lib/plugin/languages/lens.js.map +1 -1
- package/lib/plugin/languages/link-provider.js +2 -1
- package/lib/plugin/languages/link-provider.js.map +1 -1
- package/lib/plugin/languages/multi-document-highlight.js +3 -2
- package/lib/plugin/languages/multi-document-highlight.js.map +1 -1
- package/lib/plugin/languages/on-type-formatting.js +2 -1
- package/lib/plugin/languages/on-type-formatting.js.map +1 -1
- package/lib/plugin/languages/outline.js +3 -2
- package/lib/plugin/languages/outline.js.map +1 -1
- package/lib/plugin/languages/range-formatting.js +2 -1
- package/lib/plugin/languages/range-formatting.js.map +1 -1
- package/lib/plugin/languages/reference.js +2 -1
- package/lib/plugin/languages/reference.js.map +1 -1
- package/lib/plugin/languages/rename.js +2 -1
- package/lib/plugin/languages/rename.js.map +1 -1
- package/lib/plugin/languages/selection-range.js +2 -1
- package/lib/plugin/languages/selection-range.js.map +1 -1
- package/lib/plugin/languages/signature.js +2 -1
- package/lib/plugin/languages/signature.js.map +1 -1
- package/lib/plugin/languages/type-definition.js +3 -2
- package/lib/plugin/languages/type-definition.js.map +1 -1
- package/lib/plugin/languages/type-hierarchy.js +2 -1
- package/lib/plugin/languages/type-hierarchy.js.map +1 -1
- package/lib/plugin/languages/util.js +2 -1
- package/lib/plugin/languages/util.js.map +1 -1
- package/lib/plugin/languages/workspace-symbol.js +2 -1
- package/lib/plugin/languages/workspace-symbol.js.map +1 -1
- package/lib/plugin/node/debug/debug.spec.js +2 -1
- package/lib/plugin/node/debug/debug.spec.js.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.js +3 -2
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.js.map +1 -1
- package/lib/plugin/node/env-node-ext.js +1 -1
- package/lib/plugin/node/env-node-ext.js.map +1 -1
- package/lib/plugin/notebook/notebook-document.js +3 -2
- package/lib/plugin/notebook/notebook-document.js.map +1 -1
- package/lib/plugin/notebook/notebook-editors.js +2 -1
- package/lib/plugin/notebook/notebook-editors.js.map +1 -1
- package/lib/plugin/notebook/notebooks.js +2 -1
- package/lib/plugin/notebook/notebooks.js.map +1 -1
- package/lib/plugin/path.spec.js +2 -1
- package/lib/plugin/path.spec.js.map +1 -1
- package/lib/plugin/plugin-context.js +1 -1
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-icon-path.js +2 -1
- package/lib/plugin/plugin-icon-path.js.map +1 -1
- package/lib/plugin/plugin-manager.js +2 -2
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/preference-registry.spec.js +2 -1
- package/lib/plugin/preference-registry.spec.js.map +1 -1
- package/lib/plugin/quick-open.js +2 -1
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/relative-pattern.spec.js +3 -2
- package/lib/plugin/relative-pattern.spec.js.map +1 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/scm.js +14 -1
- package/lib/plugin/scm.js.map +1 -1
- package/lib/plugin/scm.spec.js +56 -1
- package/lib/plugin/scm.spec.js.map +1 -1
- package/lib/plugin/tasks/task-provider.js +2 -1
- package/lib/plugin/tasks/task-provider.js.map +1 -1
- package/lib/plugin/tasks/tasks.js +2 -1
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/telemetry-ext.spec.js +2 -1
- package/lib/plugin/telemetry-ext.spec.js.map +1 -1
- package/lib/plugin/terminal-ext.js +1 -1
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/terminal-ext.spec.js +2 -1
- package/lib/plugin/terminal-ext.spec.js.map +1 -1
- package/lib/plugin/tests.js +1 -1
- package/lib/plugin/tests.js.map +1 -1
- package/lib/plugin/text-editor.js +2 -1
- package/lib/plugin/text-editor.js.map +1 -1
- package/lib/plugin/text-editors.js +2 -1
- package/lib/plugin/text-editors.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +2 -1
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.js +6 -5
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/type-converters.spec.js +5 -4
- package/lib/plugin/type-converters.spec.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +10 -0
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +7 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/types-impl.spec.js +25 -2
- package/lib/plugin/types-impl.spec.js.map +1 -1
- package/lib/plugin/workspace.js +2 -2
- package/lib/plugin/workspace.js.map +1 -1
- package/lib/plugin/workspace.spec.js +2 -1
- package/lib/plugin/workspace.spec.js.map +1 -1
- package/lib/plugin-ext-frontend-electron-module.js +2 -1
- package/lib/plugin-ext-frontend-electron-module.js.map +1 -1
- package/lib/plugin-ext-frontend-module.js +2 -1
- package/lib/plugin-ext-frontend-module.js.map +1 -1
- package/package.json +32 -32
- package/src/common/character-classifier.ts +1 -1
- package/src/common/plugin-api-rpc.ts +2 -0
- package/src/common/plugin-protocol.ts +18 -0
- package/src/hosted/browser/hosted-plugin.spec.ts +66 -0
- package/src/hosted/browser/hosted-plugin.ts +3 -1
- package/src/hosted/node/plugin-host-proxy.ts +6 -3
- package/src/hosted/node/plugin-reader.ts +1 -1
- package/src/hosted/node/plugin-require-override.spec.ts +44 -0
- package/src/hosted/node/plugin-require-override.ts +1 -0
- package/src/main/browser/file-system-main-impl.ts +1 -1
- package/src/main/browser/main-file-system-event-service.ts +2 -49
- package/src/main/browser/menus/menus-contribution-handler.ts +6 -13
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +6 -3
- package/src/main/browser/plugin-shared-style.ts +2 -2
- package/src/main/browser/scm-main.spec.ts +32 -0
- package/src/main/browser/scm-main.ts +6 -2
- package/src/main/browser/view/plugin-view-registry.spec.ts +277 -12
- package/src/main/browser/view/plugin-view-registry.ts +76 -21
- package/src/main/browser/view/tree-view-widget.tsx +1 -1
- package/src/main/browser/webview/pre/main.js +19 -10
- package/src/main/browser/webview/pre/main.spec.ts +46 -0
- package/src/main/browser/webview/webview.ts +7 -3
- package/src/main/node/handlers/plugin-theia-directory-handler.ts +1 -1
- package/src/main/node/handlers/plugin-theia-file-handler.ts +1 -1
- package/src/main/node/plugin-deployer-file-handler-context-impl.ts +1 -1
- package/src/main/node/plugin-deployer-impl.spec.ts +75 -0
- package/src/main/node/plugin-deployer-impl.ts +7 -2
- package/src/main/node/plugin-service.ts +1 -1
- package/src/plugin/document-data.ts +0 -1
- package/src/plugin/file-system-event-service-ext-impl.ts +1 -1
- package/src/plugin/file-system-ext-impl.ts +2 -2
- package/src/plugin/known-commands.ts +5 -5
- package/src/plugin/plugin-context.ts +4 -4
- package/src/plugin/plugin-manager.ts +1 -1
- package/src/plugin/scm.spec.ts +67 -1
- package/src/plugin/scm.ts +18 -1
- package/src/plugin/tests.ts +2 -2
- package/src/plugin/tree/tree-views.ts +2 -1
- package/src/plugin/type-converters.spec.ts +1 -1
- package/src/plugin/types-impl.spec.ts +25 -0
- package/src/plugin/types-impl.ts +7 -0
- package/lib/main/browser/main-file-system-event-service.spec.d.ts +0 -2
- package/lib/main/browser/main-file-system-event-service.spec.d.ts.map +0 -1
- package/lib/main/browser/main-file-system-event-service.spec.js +0 -100
- package/lib/main/browser/main-file-system-event-service.spec.js.map +0 -1
- package/src/main/browser/main-file-system-event-service.spec.ts +0 -125
|
@@ -20,7 +20,7 @@ import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
|
20
20
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
21
21
|
import { getTempDirPathAsync } from '../temp-dir-util';
|
|
22
22
|
import * as fs from '@theia/core/shared/fs-extra';
|
|
23
|
-
import
|
|
23
|
+
import filenamify from 'filenamify';
|
|
24
24
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
|
25
25
|
import { PluginTheiaEnvironment } from '../../common/plugin-theia-environment';
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { PluginDeployerEntry, PluginDeployerFileHandlerContext } from '../../common/plugin-protocol';
|
|
18
|
-
import
|
|
18
|
+
import decompress from 'decompress';
|
|
19
19
|
|
|
20
20
|
export class PluginDeployerFileHandlerContextImpl implements PluginDeployerFileHandlerContext {
|
|
21
21
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2026 Vinay Kaushal 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 { expect } from 'chai';
|
|
18
|
+
import { DuplicateExtensionError, PluginDeployerResolver, PluginType } from '../../common/plugin-protocol';
|
|
19
|
+
import { PluginDeployerImpl } from './plugin-deployer-impl';
|
|
20
|
+
|
|
21
|
+
describe('PluginDeployerImpl', () => {
|
|
22
|
+
|
|
23
|
+
function createDeployer(resolve: PluginDeployerResolver['resolve'], logs: { info: string[], error: string[] }): PluginDeployerImpl {
|
|
24
|
+
const deployer = new PluginDeployerImpl();
|
|
25
|
+
const resolver: PluginDeployerResolver = { accept: () => true, resolve };
|
|
26
|
+
Object.assign(deployer, {
|
|
27
|
+
pluginResolvers: [resolver],
|
|
28
|
+
pluginDeployerFileHandlers: [],
|
|
29
|
+
pluginDeployerDirectoryHandlers: [],
|
|
30
|
+
logger: {
|
|
31
|
+
info: (message: string) => logs.info.push(message),
|
|
32
|
+
error: (message: string) => logs.error.push(message)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return deployer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
describe('resolvePlugins', () => {
|
|
39
|
+
|
|
40
|
+
it('logs an already installed plugin as info instead of an error', async () => {
|
|
41
|
+
const logs = { info: [] as string[], error: [] as string[] };
|
|
42
|
+
const deployer = createDeployer(async () => { throw DuplicateExtensionError.create('Extension a.b is already installed.'); }, logs);
|
|
43
|
+
|
|
44
|
+
await deployer.resolvePlugins([{ id: 'local-file:/a.vsix', type: PluginType.User }]).catch(() => undefined);
|
|
45
|
+
|
|
46
|
+
expect(logs.error).to.be.empty;
|
|
47
|
+
expect(logs.info).to.have.lengthOf(1);
|
|
48
|
+
expect(logs.info[0]).to.contain('Extension a.b is already installed.');
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('rethrows the duplicate error when nothing else resolved, so a single install can report it', async () => {
|
|
52
|
+
const logs = { info: [] as string[], error: [] as string[] };
|
|
53
|
+
const deployer = createDeployer(async () => { throw DuplicateExtensionError.create('Extension a.b is already installed.'); }, logs);
|
|
54
|
+
|
|
55
|
+
let error: unknown;
|
|
56
|
+
try {
|
|
57
|
+
await deployer.resolvePlugins([{ id: 'local-file:/a.vsix', type: PluginType.User }]);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
error = e;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
expect(DuplicateExtensionError.is(error)).to.be.true;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('still logs other resolution failures as errors', async () => {
|
|
66
|
+
const logs = { info: [] as string[], error: [] as string[] };
|
|
67
|
+
const deployer = createDeployer(async () => { throw new Error('boom'); }, logs);
|
|
68
|
+
|
|
69
|
+
await deployer.resolvePlugins([{ id: 'local-file:/a.vsix', type: PluginType.User }]).catch(() => undefined);
|
|
70
|
+
|
|
71
|
+
expect(logs.error).to.have.lengthOf(1);
|
|
72
|
+
expect(logs.info).to.be.empty;
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
PluginDeployerResolver, PluginDeployerFileHandler, PluginDeployerDirectoryHandler,
|
|
23
23
|
PluginDeployerEntry, PluginDeployer, PluginDeployerParticipant, PluginDeployerStartContext,
|
|
24
24
|
PluginDeployerResolverInit,
|
|
25
|
-
PluginDeployerEntryType, PluginDeployerHandler, PluginType, UnresolvedPluginEntry, PluginIdentifiers, PluginDeployOptions
|
|
25
|
+
PluginDeployerEntryType, PluginDeployerHandler, PluginType, UnresolvedPluginEntry, PluginIdentifiers, PluginDeployOptions,
|
|
26
|
+
DuplicateExtensionError
|
|
26
27
|
} from '../../common/plugin-protocol';
|
|
27
28
|
import { PluginDeployerEntryImpl } from './plugin-deployer-entry-impl';
|
|
28
29
|
import {
|
|
@@ -215,7 +216,11 @@ export class PluginDeployerImpl implements PluginDeployer {
|
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
} catch (e) {
|
|
218
|
-
|
|
219
|
+
if (DuplicateExtensionError.is(e)) {
|
|
220
|
+
this.logger.info(`Skipping '${entry.id}': ${e.message}`);
|
|
221
|
+
} else {
|
|
222
|
+
this.logger.error(`Failed to resolve plugins from '${entry.id}'`, e);
|
|
223
|
+
}
|
|
219
224
|
errors.push(e instanceof Error ? e : new Error(String(e)));
|
|
220
225
|
}
|
|
221
226
|
}));
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import * as http from 'http';
|
|
18
18
|
import * as path from 'path';
|
|
19
19
|
const vhost = require('vhost');
|
|
20
|
-
import
|
|
20
|
+
import express from '@theia/core/shared/express';
|
|
21
21
|
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
|
|
22
22
|
import { inject, injectable, postConstruct, named } from '@theia/core/shared/inversify';
|
|
23
23
|
import { WebviewExternalEndpoint } from '../common/webview-protocol';
|
|
@@ -59,7 +59,6 @@ export class DocumentDataExt {
|
|
|
59
59
|
|
|
60
60
|
// Update my lines
|
|
61
61
|
const changes = e.changes;
|
|
62
|
-
// tslint:disable-next-line:one-variable-per-declaration
|
|
63
62
|
for (let i = 0, len = changes.length; i < len; i++) {
|
|
64
63
|
const change = changes[i];
|
|
65
64
|
this.acceptDeleteRange(change.range);
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
/* eslint-disable max-len */
|
|
27
27
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
28
28
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
29
|
-
/* eslint-disable @
|
|
29
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
30
30
|
|
|
31
31
|
import { Emitter, Event as EventNamespace, WaitUntilEvent, AsyncEmitter, WaitUntilData } from '@theia/core/lib/common/event';
|
|
32
32
|
import { GLOB_SPLIT, GLOBSTAR, parse } from '@theia/core/lib/common/glob';
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/* eslint-disable arrow-body-style */
|
|
27
|
-
/* eslint-disable @
|
|
28
|
-
/* eslint-disable @typescript-eslint/tslint/config */
|
|
27
|
+
/* eslint-disable @stylistic/quotes */
|
|
29
28
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
29
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
30
30
|
|
|
31
31
|
import { Schemes as Schemas, UriComponents } from '../common/uri-components';
|
|
32
32
|
import { FileChangeType, FileSystemError, URI } from './types-impl';
|
|
@@ -366,9 +366,9 @@ export namespace KnownCommands {
|
|
|
366
366
|
return L.create(l.uri.toString(), fromRangeToR(l.range));
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @
|
|
369
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @theia/explicit-return-type
|
|
370
370
|
function vscodeToMonacoArgsConverter(args: any[]) {
|
|
371
|
-
//
|
|
371
|
+
// eslint-disable-next-line @theia/explicit-return-type
|
|
372
372
|
return cloneAndChange(args, function (value) {
|
|
373
373
|
if (CallHierarchyItem.isCallHierarchyItem(value)) {
|
|
374
374
|
return fromCallHierarchyItem(value);
|
|
@@ -394,9 +394,9 @@ export namespace KnownCommands {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @
|
|
397
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @theia/explicit-return-type
|
|
398
398
|
function monacoToVscodeArgsConverter(args: any[]) {
|
|
399
|
-
//
|
|
399
|
+
// eslint-disable-next-line @theia/explicit-return-type
|
|
400
400
|
return cloneAndChange(args, function (value) {
|
|
401
401
|
if (isModelCallHierarchyItem(value)) {
|
|
402
402
|
return toCallHierarchyItem(value);
|
|
@@ -422,7 +422,7 @@ export namespace KnownCommands {
|
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
function toArrayConversion<T, U>(f: (a: T) => U): (a: T[]) => U[] {
|
|
425
|
-
//
|
|
425
|
+
// eslint-disable-next-line @theia/explicit-return-type
|
|
426
426
|
return function (a: T[]) {
|
|
427
427
|
return a.map(f);
|
|
428
428
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
18
|
-
/*
|
|
18
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
19
19
|
|
|
20
20
|
import type * as theia from '@theia/plugin';
|
|
21
21
|
import { CommandRegistryImpl } from './command-registry';
|
|
@@ -504,7 +504,7 @@ export function createAPIFactory(
|
|
|
504
504
|
preserveFocus?: boolean
|
|
505
505
|
): Promise<theia.TextEditor> {
|
|
506
506
|
let documentOptions: theia.TextDocumentShowOptions | undefined;
|
|
507
|
-
const uri: URI = documentArg
|
|
507
|
+
const uri: URI = URI.isUri(documentArg) ? URI.revive(documentArg) : documentArg.uri;
|
|
508
508
|
if (typeof columnOrOptions === 'number') {
|
|
509
509
|
documentOptions = {
|
|
510
510
|
viewColumn: columnOrOptions
|
|
@@ -1698,7 +1698,7 @@ export class Plugin<T> implements theia.Plugin<T> {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
|
|
1700
1700
|
get exports(): T {
|
|
1701
|
-
return
|
|
1701
|
+
return this.#pluginManager.getPluginExport(this.id) as T;
|
|
1702
1702
|
}
|
|
1703
1703
|
|
|
1704
1704
|
activate(): PromiseLike<T> {
|
|
@@ -1729,7 +1729,7 @@ export class PluginExt<T> extends Plugin<T> implements ExtensionPlugin<T> {
|
|
|
1729
1729
|
}
|
|
1730
1730
|
|
|
1731
1731
|
override get exports(): T {
|
|
1732
|
-
return
|
|
1732
|
+
return this.#pluginManager.getPluginExport(this.id) as T;
|
|
1733
1733
|
}
|
|
1734
1734
|
|
|
1735
1735
|
override activate(): PromiseLike<T> {
|
|
@@ -306,7 +306,7 @@ export abstract class AbstractPluginManagerExtImpl<P extends Record<string, any>
|
|
|
306
306
|
throw new Error(`Dependent plugin '${dependency.model.displayName || dependency.model.id}' failed to activate.`);
|
|
307
307
|
}
|
|
308
308
|
} else {
|
|
309
|
-
throw new Error(`Dependent plugin '${dependencyId}' is not installed.`);
|
|
309
|
+
throw new Error(`Dependent plugin '${dependencyId}' is not installed or disabled.`);
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
}
|
package/src/plugin/scm.spec.ts
CHANGED
|
@@ -24,7 +24,13 @@
|
|
|
24
24
|
import * as assert from 'assert';
|
|
25
25
|
import { Emitter } from '@theia/core/lib/common/event';
|
|
26
26
|
import { DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
27
|
-
import { ScmCommandArg, ScmHistoryItemCommandArg } from '../common/plugin-api-rpc';
|
|
27
|
+
import { ScmCommandArg, ScmHistoryItemCommandArg, ScmMain, ScmRawResourceSplices } from '../common/plugin-api-rpc';
|
|
28
|
+
import { ScmExtImpl } from './scm';
|
|
29
|
+
import { RPCProtocol } from '../common/rpc-protocol';
|
|
30
|
+
import { CommandRegistryImpl } from './command-registry';
|
|
31
|
+
import { Plugin } from '../common';
|
|
32
|
+
import { URI } from './types-impl';
|
|
33
|
+
import { SourceControlResourceGroup, SourceControlResourceState } from '@theia/plugin';
|
|
28
34
|
|
|
29
35
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
30
36
|
|
|
@@ -152,6 +158,66 @@ class HistoryProviderBridge {
|
|
|
152
158
|
}
|
|
153
159
|
}
|
|
154
160
|
|
|
161
|
+
describe('SCM multi-diff resource snapshots (plugin side)', () => {
|
|
162
|
+
let group: SourceControlResourceGroup;
|
|
163
|
+
let updates: ScmRawResourceSplices[][];
|
|
164
|
+
|
|
165
|
+
beforeEach(() => {
|
|
166
|
+
updates = [];
|
|
167
|
+
const proxy = new Proxy({}, {
|
|
168
|
+
get: (_target, name) => name === '$spliceResourceStates'
|
|
169
|
+
? (_handle: number, splices: ScmRawResourceSplices[]): void => { updates.push(splices); }
|
|
170
|
+
: (): void => { }
|
|
171
|
+
}) as ScmMain;
|
|
172
|
+
const scm = new ScmExtImpl(
|
|
173
|
+
{ getProxy: () => proxy } as unknown as RPCProtocol,
|
|
174
|
+
{ registerArgumentProcessor: () => { } } as unknown as CommandRegistryImpl
|
|
175
|
+
);
|
|
176
|
+
const sourceControl = scm.createSourceControl({ model: { id: 'test' } } as Plugin, 'git', 'Git', undefined);
|
|
177
|
+
group = sourceControl.createResourceGroup('changes', 'Changes');
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it('serializes added and deleted sides using the proposed modified field name', () => {
|
|
181
|
+
const added = URI.parse('file:///repo/added.txt');
|
|
182
|
+
const deleted = URI.parse('git:/repo/deleted.txt?ref=HEAD#original');
|
|
183
|
+
group.resourceStates = [
|
|
184
|
+
{ resourceUri: added, multiFileDiffEditorModifiedUri: added },
|
|
185
|
+
{ resourceUri: URI.file('/repo/deleted.txt'), multiDiffEditorOriginalUri: deleted }
|
|
186
|
+
];
|
|
187
|
+
const resources = updates[0][0].splices[0].rawResources;
|
|
188
|
+
assert.strictEqual(resources[0].multiDiffEditorOriginalUri, undefined);
|
|
189
|
+
assert.strictEqual(resources[0].multiDiffEditorModifiedUri?.toString(), added.toString());
|
|
190
|
+
assert.strictEqual(resources[1].multiDiffEditorOriginalUri?.toString(), deleted.toString());
|
|
191
|
+
assert.strictEqual(resources[1].multiDiffEditorModifiedUri, undefined);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
for (const field of ['multiDiffEditorOriginalUri', 'multiFileDiffEditorModifiedUri'] as const) {
|
|
195
|
+
it(`detects ${field}-only additions, changes and removals, but ignores equal URIs`, () => {
|
|
196
|
+
const resourceUri = URI.file('/repo/file.txt');
|
|
197
|
+
const state: SourceControlResourceState = { resourceUri };
|
|
198
|
+
group.resourceStates = [state];
|
|
199
|
+
updates.length = 0;
|
|
200
|
+
group.resourceStates = [{ ...state }];
|
|
201
|
+
assert.strictEqual(updates.length, 0);
|
|
202
|
+
|
|
203
|
+
for (const uri of [URI.parse('git:/repo/file.txt?ref=HEAD'), URI.parse('git:/repo/file.txt?ref=HEAD~1#changed'), undefined]) {
|
|
204
|
+
const nextState = { ...state, [field]: uri };
|
|
205
|
+
group.resourceStates = [nextState];
|
|
206
|
+
assert.strictEqual(updates.length, 1);
|
|
207
|
+
const splices = updates[0][0].splices;
|
|
208
|
+
assert.strictEqual(splices.reduce((count, splice) => count + splice.deleteCount, 0), 1);
|
|
209
|
+
const resources = splices.flatMap(splice => splice.rawResources);
|
|
210
|
+
assert.strictEqual(resources.length, 1);
|
|
211
|
+
const rawField = field === 'multiFileDiffEditorModifiedUri' ? 'multiDiffEditorModifiedUri' : field;
|
|
212
|
+
assert.strictEqual(resources[0][rawField]?.toString(), uri?.toString());
|
|
213
|
+
updates.length = 0;
|
|
214
|
+
group.resourceStates = [{ ...nextState, [field]: uri ? URI.parse(uri.toString()) : undefined }];
|
|
215
|
+
assert.strictEqual(updates.length, 0);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
155
221
|
describe('SCM history provider bridge (plugin side)', () => {
|
|
156
222
|
let bridge: HistoryProviderBridge;
|
|
157
223
|
let bridgeDisposables: DisposableCollection;
|
package/src/plugin/scm.ts
CHANGED
|
@@ -68,6 +68,10 @@ function getIconResource(decorations?: theia.SourceControlResourceThemableDecora
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
function comparePaths(one: string, other: string, caseSensitive = false): number {
|
|
71
|
+
if (one === other) {
|
|
72
|
+
return 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
const oneParts = one.split(sep);
|
|
72
76
|
const otherParts = other.split(sep);
|
|
73
77
|
|
|
@@ -225,6 +229,17 @@ function compareResourceStates(a: theia.SourceControlResourceState, b: theia.Sou
|
|
|
225
229
|
return result;
|
|
226
230
|
}
|
|
227
231
|
|
|
232
|
+
result = (a.multiDiffEditorOriginalUri?.toString() ?? '').localeCompare(b.multiDiffEditorOriginalUri?.toString() ?? '');
|
|
233
|
+
if (result !== 0) {
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
result = (a.multiFileDiffEditorModifiedUri?.toString() ?? '').localeCompare(b.multiFileDiffEditorModifiedUri?.toString() ?? '');
|
|
238
|
+
|
|
239
|
+
if (result !== 0) {
|
|
240
|
+
return result;
|
|
241
|
+
}
|
|
242
|
+
|
|
228
243
|
if (a.command && b.command) {
|
|
229
244
|
result = compareCommands(a.command, b.command);
|
|
230
245
|
} else if (a.command) {
|
|
@@ -494,7 +509,9 @@ class ScmResourceGroupImpl implements theia.SourceControlResourceGroup {
|
|
|
494
509
|
const rawResource = {
|
|
495
510
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
496
511
|
handle, sourceUri, letter: (r as any).letter, colorId: (r as any).color?.id, icons,
|
|
497
|
-
tooltip, strikeThrough, faded, contextValue, command
|
|
512
|
+
tooltip, strikeThrough, faded, contextValue, command,
|
|
513
|
+
multiDiffEditorOriginalUri: r.multiDiffEditorOriginalUri,
|
|
514
|
+
multiDiffEditorModifiedUri: r.multiFileDiffEditorModifiedUri
|
|
498
515
|
} as ScmRawResource;
|
|
499
516
|
|
|
500
517
|
return { rawResource, handle };
|
package/src/plugin/tests.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
// /* eslint-disable */
|
|
25
25
|
|
|
26
|
-
/*
|
|
26
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
27
27
|
|
|
28
28
|
import * as theia from '@theia/plugin';
|
|
29
29
|
import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
|
|
@@ -318,7 +318,7 @@ export class TestRun implements theia.TestRun {
|
|
|
318
318
|
return true;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
private updateTestState<T extends TestStateChangeDTO>(item: theia.TestItem, state: T) {
|
|
321
|
+
private updateTestState<T extends TestStateChangeDTO>(item: theia.TestItem, state: T): void {
|
|
322
322
|
if (this.checkNotEnded(item)) {
|
|
323
323
|
this.testStateDeltas.set(item, state);
|
|
324
324
|
this.changeBatcher.changeOccurred();
|
|
@@ -93,7 +93,7 @@ export class TreeViewsExtImpl implements TreeViewsExt {
|
|
|
93
93
|
this.treeViews.set(treeViewId, treeView);
|
|
94
94
|
|
|
95
95
|
return {
|
|
96
|
-
|
|
96
|
+
/* eslint-disable @theia/explicit-return-type */
|
|
97
97
|
get onDidExpandElement() {
|
|
98
98
|
return treeView.onDidExpandElement;
|
|
99
99
|
},
|
|
@@ -115,6 +115,7 @@ export class TreeViewsExtImpl implements TreeViewsExt {
|
|
|
115
115
|
get onDidChangeCheckboxState() {
|
|
116
116
|
return treeView.onDidChangeCheckboxState;
|
|
117
117
|
},
|
|
118
|
+
/* eslint-enable @theia/explicit-return-type */
|
|
118
119
|
get message(): string {
|
|
119
120
|
return treeView.message;
|
|
120
121
|
},
|
|
@@ -150,7 +150,7 @@ describe('Type converters:', () => {
|
|
|
150
150
|
|
|
151
151
|
it('should convert array of markups to model markdown', () => {
|
|
152
152
|
// given
|
|
153
|
-
// eslint-disable-next-line
|
|
153
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
154
154
|
const markups: (theia.MarkdownString | theia.MarkedString)[] = [
|
|
155
155
|
pluginMarkdown,
|
|
156
156
|
aStringWithMarkdown,
|
|
@@ -65,6 +65,31 @@ describe('API Type Implementations:', () => {
|
|
|
65
65
|
types.URI.joinPath(types.URI.from({ scheme: 'myScheme', authority: 'authority', path: '/path', query: 'query', fragment: 'fragment' }), '/file.js').toString(),
|
|
66
66
|
'myScheme://authority/path/file.js?query#fragment');
|
|
67
67
|
});
|
|
68
|
+
|
|
69
|
+
// Issue: #14976
|
|
70
|
+
it('should return an instance of the API URI class from every factory', () => {
|
|
71
|
+
const components = { scheme: 'file', authority: '', path: '/foo/bar.js', query: '', fragment: '' };
|
|
72
|
+
assert.ok(types.URI.parse('file:///foo/bar.js') instanceof types.URI, 'parse');
|
|
73
|
+
assert.ok(types.URI.file('/foo/bar.js') instanceof types.URI, 'file');
|
|
74
|
+
assert.ok(types.URI.revive(components) instanceof types.URI, 'revive');
|
|
75
|
+
assert.ok(types.URI.from(components) instanceof types.URI, 'from');
|
|
76
|
+
assert.ok(types.URI.joinPath(types.URI.file('/foo'), 'bar.js') instanceof types.URI, 'joinPath');
|
|
77
|
+
assert.ok(types.URI.file('/foo/bar.js').with({ fragment: 'baz' }) instanceof types.URI, 'with');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('should build an equivalent URI with from()', () => {
|
|
81
|
+
const uriString = 'scheme://authority.com/foo/bar/zoz?query#fragment';
|
|
82
|
+
const uri = types.URI.parse(uriString);
|
|
83
|
+
const from = types.URI.from({
|
|
84
|
+
scheme: uri.scheme,
|
|
85
|
+
authority: uri.authority,
|
|
86
|
+
path: uri.path,
|
|
87
|
+
query: uri.query,
|
|
88
|
+
fragment: uri.fragment
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
assert.strictEqual(from.toString(), uriString);
|
|
92
|
+
});
|
|
68
93
|
});
|
|
69
94
|
|
|
70
95
|
describe('RelativePattern:', () => {
|
package/src/plugin/types-impl.ts
CHANGED
|
@@ -95,6 +95,13 @@ export class URI extends CodeURI implements theia.Uri {
|
|
|
95
95
|
return new URI(CodeURI.file(path));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Override to create the correct class.
|
|
100
|
+
*/
|
|
101
|
+
static override from(components: { scheme: string; authority?: string; path?: string; query?: string; fragment?: string }): URI {
|
|
102
|
+
return new URI(CodeURI.from(components));
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
/**
|
|
99
106
|
* There is quite some magic in to vscode URI class related to
|
|
100
107
|
* transferring via JSON.stringify(). Making the CodeURI instance
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-file-system-event-service.spec.d.ts","sourceRoot":"","sources":["../../../src/main/browser/main-file-system-event-service.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2026 Safi Seid-Ahmad, K2view and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const jsdom_1 = require("@theia/core/lib/browser/test/jsdom");
|
|
19
|
-
const disableJSDOM = (0, jsdom_1.enableJSDOM)();
|
|
20
|
-
const frontend_application_config_provider_1 = require("@theia/core/lib/browser/frontend-application-config-provider");
|
|
21
|
-
frontend_application_config_provider_1.FrontendApplicationConfigProvider.set({});
|
|
22
|
-
const assert = require("assert");
|
|
23
|
-
const core_1 = require("@theia/core");
|
|
24
|
-
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
25
|
-
const main_file_system_event_service_1 = require("./main-file-system-event-service");
|
|
26
|
-
disableJSDOM();
|
|
27
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
28
|
-
// A language server (e.g. `redhat.java` / JDT-LS) registers a watcher rooted at the PARENT of the
|
|
29
|
-
// workspace folder - `RelativePattern(parentDir, folderName)` - purely to detect deletion of the
|
|
30
|
-
// workspace folder itself. The pattern has no globstar, so `ensureWatching` sends it as a
|
|
31
|
-
// NON-recursive `$watch` on `parentDir`. Theia's backend ignores the `recursive` flag and always
|
|
32
|
-
// watches recursively, so this turns into a recursive crawl of every sibling subtree under the
|
|
33
|
-
// parent - thousands of inodes the workspace does not own - which can exhaust the OS file-watch
|
|
34
|
-
// budget. `files.watcherExclude` cannot bound it because the root is outside the workspace.
|
|
35
|
-
//
|
|
36
|
-
// These tests pin the fix: a non-recursive watch rooted at a strict ancestor of a workspace root is
|
|
37
|
-
// not registered, while watches on/inside the workspace and explicit recursive requests are
|
|
38
|
-
// untouched.
|
|
39
|
-
describe('MainFileSystemEventService ancestor-of-workspace watch handling', () => {
|
|
40
|
-
function componentsFor(path) {
|
|
41
|
-
return { scheme: 'file', authority: '', path, query: '', fragment: '' };
|
|
42
|
-
}
|
|
43
|
-
function createService(rootUris, watchCalls) {
|
|
44
|
-
const fileService = {
|
|
45
|
-
onDidFilesChange: () => disposable_1.Disposable.NULL,
|
|
46
|
-
onDidRunUserOperation: () => disposable_1.Disposable.NULL,
|
|
47
|
-
addFileOperationParticipant: () => disposable_1.Disposable.NULL,
|
|
48
|
-
watch: (resource) => {
|
|
49
|
-
watchCalls.push(resource);
|
|
50
|
-
return disposable_1.Disposable.NULL;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const workspaceService = { tryGetRoots: () => rootUris.map(uri => ({ resource: new core_1.URI(uri) })) };
|
|
54
|
-
const rpc = { getProxy: () => ({}) };
|
|
55
|
-
return new main_file_system_event_service_1.MainFileSystemEventService(rpc, {}, fileService, workspaceService);
|
|
56
|
-
}
|
|
57
|
-
it('skips a non-recursive watch rooted at a strict ancestor of a workspace root', () => {
|
|
58
|
-
const watchCalls = [];
|
|
59
|
-
const service = createService(['file:///projects/my-app'], watchCalls);
|
|
60
|
-
service.$watch(1, componentsFor('/projects'), { recursive: false, excludes: [] });
|
|
61
|
-
assert.strictEqual(watchCalls.length, 0, 'ancestor-of-workspace watch must not be registered');
|
|
62
|
-
});
|
|
63
|
-
it('still registers a non-recursive watch on the workspace root itself', () => {
|
|
64
|
-
const watchCalls = [];
|
|
65
|
-
const service = createService(['file:///projects/my-app'], watchCalls);
|
|
66
|
-
service.$watch(1, componentsFor('/projects/my-app'), { recursive: false, excludes: [] });
|
|
67
|
-
assert.strictEqual(watchCalls.length, 1);
|
|
68
|
-
});
|
|
69
|
-
it('still registers a non-recursive watch on an outer root that is itself the parent of another root', () => {
|
|
70
|
-
const watchCalls = [];
|
|
71
|
-
// Multi-root workspace where `/projects` is a root AND the parent of the `/projects/my-app` root.
|
|
72
|
-
// The outer root is explicitly opened by the user, so its watch must not be dropped as an
|
|
73
|
-
// "ancestor of the workspace".
|
|
74
|
-
const service = createService(['file:///projects', 'file:///projects/my-app'], watchCalls);
|
|
75
|
-
service.$watch(1, componentsFor('/projects'), { recursive: false, excludes: [] });
|
|
76
|
-
assert.strictEqual(watchCalls.length, 1, 'a folder that is itself a workspace root must be watched, even if it is an ancestor of another root');
|
|
77
|
-
});
|
|
78
|
-
it('still registers a non-recursive watch inside the workspace', () => {
|
|
79
|
-
const watchCalls = [];
|
|
80
|
-
const service = createService(['file:///projects/my-app'], watchCalls);
|
|
81
|
-
service.$watch(1, componentsFor('/projects/my-app/src'), { recursive: false, excludes: [] });
|
|
82
|
-
assert.strictEqual(watchCalls.length, 1);
|
|
83
|
-
});
|
|
84
|
-
it('does not skip an explicit recursive watch on an ancestor (honored as requested)', () => {
|
|
85
|
-
const watchCalls = [];
|
|
86
|
-
const service = createService(['file:///projects/my-app'], watchCalls);
|
|
87
|
-
service.$watch(1, componentsFor('/projects'), { recursive: true, excludes: [] });
|
|
88
|
-
assert.strictEqual(watchCalls.length, 1);
|
|
89
|
-
});
|
|
90
|
-
it('frees the session for a skipped watch so $unwatch and re-watch do not throw', () => {
|
|
91
|
-
const watchCalls = [];
|
|
92
|
-
const service = createService(['file:///projects/my-app'], watchCalls);
|
|
93
|
-
service.$watch(1, componentsFor('/projects'), { recursive: false, excludes: [] });
|
|
94
|
-
service.$unwatch(1);
|
|
95
|
-
// Re-using the same session id must not throw "already a watch request".
|
|
96
|
-
service.$watch(1, componentsFor('/projects'), { recursive: false, excludes: [] });
|
|
97
|
-
assert.strictEqual(watchCalls.length, 0);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
//# sourceMappingURL=main-file-system-event-service.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main-file-system-event-service.spec.js","sourceRoot":"","sources":["../../../src/main/browser/main-file-system-event-service.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yDAAyD;AACzD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,8DAAiE;AACjE,MAAM,YAAY,GAAG,IAAA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