@theia/plugin-ext 1.60.2 → 1.61.0
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/README.md +4 -3
- package/lib/common/plugin-api-rpc-model.d.ts +0 -1
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +2 -2
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-protocol.d.ts +22 -17
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js +0 -3
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/common/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/common/hosted-plugin.js +5 -4
- package/lib/hosted/common/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.d.ts +1 -9
- package/lib/hosted/node/hosted-plugin-process.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-process.js +0 -12
- package/lib/hosted/node/hosted-plugin-process.js.map +1 -1
- package/lib/hosted/node/hosted-plugin.d.ts +1 -9
- package/lib/hosted/node/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin.js +0 -12
- package/lib/hosted/node/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/metadata-scanner.d.ts +1 -1
- package/lib/hosted/node/metadata-scanner.d.ts.map +1 -1
- package/lib/hosted/node/metadata-scanner.js +3 -2
- package/lib/hosted/node/metadata-scanner.js.map +1 -1
- package/lib/hosted/node/{hosted-plugin-deployer-handler.d.ts → plugin-deployer-handler-impl.d.ts} +5 -2
- package/lib/hosted/node/plugin-deployer-handler-impl.d.ts.map +1 -0
- package/lib/hosted/node/{hosted-plugin-deployer-handler.js → plugin-deployer-handler-impl.js} +22 -13
- package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -0
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js +3 -3
- package/lib/hosted/node/plugin-ext-hosted-backend-module.js.map +1 -1
- package/lib/hosted/node/plugin-reader.d.ts +2 -1
- package/lib/hosted/node/plugin-reader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-reader.js +2 -2
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/plugin-service.d.ts +12 -6
- package/lib/hosted/node/plugin-service.d.ts.map +1 -1
- package/lib/hosted/node/plugin-service.js +50 -41
- package/lib/hosted/node/plugin-service.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +0 -1
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +0 -1
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +0 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +0 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts +2 -0
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +4 -0
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +0 -1
- package/lib/main/browser/languages-main.d.ts.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 +2 -1
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +0 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +2 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js +14 -2
- package/lib/main/browser/notebooks/renderers/cell-output-webview.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 +5 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +5 -1
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +0 -1
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +0 -1
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/text-editor-main.d.ts +2 -0
- package/lib/main/browser/text-editor-main.d.ts.map +1 -1
- package/lib/main/browser/text-editor-main.js +7 -0
- package/lib/main/browser/text-editor-main.js.map +1 -1
- package/lib/main/browser/text-editors-main.d.ts +2 -0
- package/lib/main/browser/text-editors-main.d.ts.map +1 -1
- package/lib/main/browser/text-editors-main.js +3 -0
- package/lib/main/browser/text-editors-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +0 -1
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +0 -1
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +0 -1
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +0 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +0 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +0 -1
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +0 -1
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.d.ts +2 -0
- package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +6 -0
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +2 -2
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/main/node/plugin-mgmt-cli-contribution.d.ts +2 -2
- package/lib/main/node/plugin-mgmt-cli-contribution.d.ts.map +1 -1
- package/lib/main/node/plugin-mgmt-cli-contribution.js +3 -3
- package/lib/main/node/plugin-mgmt-cli-contribution.js.map +1 -1
- package/lib/main/node/plugin-server-impl.d.ts +24 -0
- package/lib/main/node/plugin-server-impl.d.ts.map +1 -0
- package/lib/main/node/{plugin-server-handler.js → plugin-server-impl.js} +34 -13
- package/lib/main/node/plugin-server-impl.js.map +1 -0
- package/lib/main/node/plugin-service.d.ts +1 -0
- package/lib/main/node/plugin-service.d.ts.map +1 -1
- package/lib/main/node/plugin-uninstallation-manager.d.ts +19 -7
- package/lib/main/node/plugin-uninstallation-manager.d.ts.map +1 -1
- package/lib/main/node/plugin-uninstallation-manager.js +79 -27
- package/lib/main/node/plugin-uninstallation-manager.js.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +0 -1
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +0 -1
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +0 -1
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +0 -1
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +0 -1
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +0 -1
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +0 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +0 -1
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +0 -1
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +0 -1
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +0 -1
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +0 -1
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +1 -2
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.js +2 -2
- package/lib/plugin/file-system-event-service-ext-impl.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +0 -1
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/label-service.d.ts +0 -1
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +0 -1
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +0 -1
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +0 -1
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +0 -1
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +0 -1
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +0 -1
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +0 -1
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +0 -1
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +0 -1
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +0 -1
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +0 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +0 -1
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +0 -1
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +0 -1
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +0 -1
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +0 -1
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +0 -1
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +0 -1
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +0 -1
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +0 -1
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +0 -1
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +0 -1
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +0 -1
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +0 -1
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +0 -1
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +0 -1
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +0 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +0 -1
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +0 -1
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +0 -1
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +0 -1
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +0 -1
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +0 -1
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +0 -1
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +0 -1
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +0 -1
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +0 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +0 -1
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +0 -1
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +0 -1
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +0 -1
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +0 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +0 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +0 -1
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notification.d.ts +0 -1
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +0 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +0 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +0 -1
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +0 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +15 -11
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +0 -1
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +0 -1
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +0 -1
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +0 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/scm.d.ts +0 -1
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +0 -1
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +0 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +0 -1
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/tabs.d.ts +0 -1
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +0 -1
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.js +1 -1
- package/lib/plugin/tasks/task-provider.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +0 -1
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +3 -3
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +0 -1
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/test-item.d.ts +0 -1
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +0 -1
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/text-editor.d.ts +1 -1
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editor.js +3 -0
- package/lib/plugin/text-editor.js.map +1 -1
- package/lib/plugin/text-editors.d.ts +1 -1
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/text-editors.js +7 -0
- package/lib/plugin/text-editors.js.map +1 -1
- package/lib/plugin/timeline.d.ts +0 -1
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +0 -1
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/type-converters.d.ts +0 -1
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +7 -7
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/type-converters.spec.js +2 -2
- package/lib/plugin/type-converters.spec.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +0 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/uri-ext.d.ts +0 -1
- package/lib/plugin/uri-ext.d.ts.map +1 -1
- package/lib/plugin/webview-views.d.ts +0 -1
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +0 -1
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/window-state.d.ts +0 -1
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +0 -1
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/common/plugin-api-rpc.ts +2 -2
- package/src/common/plugin-protocol.ts +28 -20
- package/src/hosted/common/hosted-plugin.ts +7 -4
- package/src/hosted/node/hosted-plugin-process.ts +1 -15
- package/src/hosted/node/hosted-plugin.ts +1 -15
- package/src/hosted/node/metadata-scanner.ts +3 -2
- package/src/hosted/node/{hosted-plugin-deployer-handler.ts → plugin-deployer-handler-impl.ts} +15 -4
- package/src/hosted/node/plugin-ext-hosted-backend-module.ts +3 -3
- package/src/hosted/node/plugin-reader.ts +2 -2
- package/src/hosted/node/plugin-service.ts +57 -43
- package/src/main/browser/editors-and-documents-main.ts +6 -0
- package/src/main/browser/menus/menus-contribution-handler.ts +2 -1
- package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +11 -0
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +6 -2
- package/src/main/browser/notebooks/renderers/webview-communication.ts +6 -0
- package/src/main/browser/text-editor-main.ts +9 -0
- package/src/main/browser/text-editors-main.ts +5 -0
- package/src/main/node/plugin-deployer-impl.ts +8 -0
- package/src/main/node/plugin-ext-backend-module.ts +2 -2
- package/src/main/node/plugin-mgmt-cli-contribution.ts +3 -3
- package/src/main/node/{plugin-server-handler.ts → plugin-server-impl.ts} +33 -7
- package/src/main/node/plugin-uninstallation-manager.ts +84 -26
- package/src/plugin/file-system-event-service-ext-impl.ts +2 -2
- package/src/plugin/plugin-context.ts +22 -17
- package/src/plugin/tasks/task-provider.ts +1 -1
- package/src/plugin/tasks/tasks.ts +3 -3
- package/src/plugin/text-editor.ts +4 -0
- package/src/plugin/text-editors.ts +8 -0
- package/src/plugin/type-converters.spec.ts +2 -2
- package/src/plugin/type-converters.ts +7 -7
- package/lib/hosted/node/hosted-plugin-deployer-handler.d.ts.map +0 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +0 -1
- package/lib/main/node/plugin-server-handler.d.ts +0 -17
- package/lib/main/node/plugin-server-handler.d.ts.map +0 -1
- package/lib/main/node/plugin-server-handler.js.map +0 -1
|
@@ -14,14 +14,15 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
import { injectable, inject, named, optional, postConstruct } from '@theia/core/shared/inversify';
|
|
17
|
-
import { HostedPluginServer, HostedPluginClient, PluginDeployer,
|
|
17
|
+
import { HostedPluginServer, HostedPluginClient, PluginDeployer, DeployedPlugin, PluginIdentifiers } from '../../common/plugin-protocol';
|
|
18
18
|
import { HostedPluginSupport } from './hosted-plugin';
|
|
19
19
|
import { ILogger, Disposable, ContributionProvider, DisposableCollection } from '@theia/core';
|
|
20
20
|
import { ExtPluginApiProvider, ExtPluginApi } from '../../common/plugin-ext-api-contribution';
|
|
21
|
-
import {
|
|
21
|
+
import { PluginDeployerHandlerImpl } from './plugin-deployer-handler-impl';
|
|
22
22
|
import { PluginDeployerImpl } from '../../main/node/plugin-deployer-impl';
|
|
23
23
|
import { HostedPluginLocalizationService } from './hosted-plugin-localization-service';
|
|
24
24
|
import { PluginUninstallationManager } from '../../main/node/plugin-uninstallation-manager';
|
|
25
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
25
26
|
|
|
26
27
|
export const BackendPluginHostableFilter = Symbol('BackendPluginHostableFilter');
|
|
27
28
|
/**
|
|
@@ -31,13 +32,16 @@ export const BackendPluginHostableFilter = Symbol('BackendPluginHostableFilter')
|
|
|
31
32
|
*/
|
|
32
33
|
export type BackendPluginHostableFilter = (plugin: DeployedPlugin) => boolean;
|
|
33
34
|
|
|
35
|
+
/**
|
|
36
|
+
* This class implements the per-front-end services for plugin management and communication
|
|
37
|
+
*/
|
|
34
38
|
@injectable()
|
|
35
39
|
export class HostedPluginServerImpl implements HostedPluginServer {
|
|
36
40
|
@inject(ILogger)
|
|
37
41
|
protected readonly logger: ILogger;
|
|
38
42
|
|
|
39
|
-
@inject(
|
|
40
|
-
protected readonly deployerHandler:
|
|
43
|
+
@inject(PluginDeployerHandlerImpl)
|
|
44
|
+
protected readonly deployerHandler: PluginDeployerHandlerImpl;
|
|
41
45
|
|
|
42
46
|
@inject(PluginDeployer)
|
|
43
47
|
protected readonly pluginDeployer: PluginDeployerImpl;
|
|
@@ -58,18 +62,13 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
58
62
|
protected client: HostedPluginClient | undefined;
|
|
59
63
|
protected toDispose = new DisposableCollection();
|
|
60
64
|
|
|
61
|
-
protected
|
|
62
|
-
|
|
63
|
-
// We ignore any plugins that are marked as uninstalled the first time the frontend requests information about deployed plugins.
|
|
64
|
-
protected get ignoredPlugins(): Set<PluginIdentifiers.VersionedId> {
|
|
65
|
-
if (!this._ignoredPlugins) {
|
|
66
|
-
this._ignoredPlugins = new Set(this.uninstallationManager.getUninstalledPluginIds());
|
|
67
|
-
}
|
|
68
|
-
return this._ignoredPlugins;
|
|
69
|
-
}
|
|
65
|
+
protected uninstalledPlugins: Set<PluginIdentifiers.VersionedId>;
|
|
66
|
+
protected disabledPlugins: Set<PluginIdentifiers.VersionedId>;
|
|
70
67
|
|
|
71
68
|
protected readonly pluginVersions = new Map<PluginIdentifiers.UnversionedId, string>();
|
|
72
69
|
|
|
70
|
+
protected readonly initialized = new Deferred<void>();
|
|
71
|
+
|
|
73
72
|
constructor(
|
|
74
73
|
@inject(HostedPluginSupport) private readonly hostedPlugin: HostedPluginSupport) {
|
|
75
74
|
}
|
|
@@ -80,21 +79,40 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
80
79
|
this.backendPluginHostableFilter = () => true;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
this.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
this.uninstalledPlugins = new Set(this.uninstallationManager.getUninstalledPluginIds());
|
|
83
|
+
|
|
84
|
+
const asyncInit = async () => {
|
|
85
|
+
this.disabledPlugins = new Set(await this.uninstallationManager.getDisabledPluginIds());
|
|
86
|
+
|
|
87
|
+
this.toDispose.pushAll([
|
|
88
|
+
this.pluginDeployer.onDidDeploy(() => this.client?.onDidDeploy()),
|
|
89
|
+
this.uninstallationManager.onDidChangeUninstalledPlugins(currentUninstalled => {
|
|
90
|
+
if (this.uninstalledPlugins) {
|
|
91
|
+
const uninstalled = new Set(currentUninstalled);
|
|
92
|
+
for (const previouslyUninstalled of this.uninstalledPlugins) {
|
|
93
|
+
if (!uninstalled.has(previouslyUninstalled)) {
|
|
94
|
+
this.uninstalledPlugins.delete(previouslyUninstalled);
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
this.client?.onDidDeploy();
|
|
99
|
+
}),
|
|
100
|
+
this.uninstallationManager.onDidChangeDisabledPlugins(currentlyDisabled => {
|
|
101
|
+
if (this.disabledPlugins) {
|
|
102
|
+
const disabled = new Set(currentlyDisabled);
|
|
103
|
+
for (const previouslyUninstalled of this.disabledPlugins) {
|
|
104
|
+
if (!disabled.has(previouslyUninstalled)) {
|
|
105
|
+
this.disabledPlugins.delete(previouslyUninstalled);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
this.client?.onDidDeploy();
|
|
110
|
+
}),
|
|
111
|
+
Disposable.create(() => this.hostedPlugin.clientClosed()),
|
|
112
|
+
]);
|
|
113
|
+
this.initialized.resolve();
|
|
114
|
+
};
|
|
115
|
+
asyncInit();
|
|
98
116
|
}
|
|
99
117
|
|
|
100
118
|
protected getServerName(): string {
|
|
@@ -111,6 +129,7 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
111
129
|
}
|
|
112
130
|
|
|
113
131
|
async getDeployedPluginIds(): Promise<PluginIdentifiers.VersionedId[]> {
|
|
132
|
+
await this.initialized.promise;
|
|
114
133
|
const backendPlugins = (await this.deployerHandler.getDeployedBackendPlugins())
|
|
115
134
|
.filter(this.backendPluginHostableFilter);
|
|
116
135
|
if (backendPlugins.length > 0) {
|
|
@@ -126,7 +145,6 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
126
145
|
};
|
|
127
146
|
addIds(await this.deployerHandler.getDeployedFrontendPluginIds());
|
|
128
147
|
addIds(await this.deployerHandler.getDeployedBackendPluginIds());
|
|
129
|
-
addIds(await this.hostedPlugin.getExtraDeployedPluginIds());
|
|
130
148
|
return Array.from(plugins);
|
|
131
149
|
}
|
|
132
150
|
|
|
@@ -146,7 +164,11 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
146
164
|
if (knownVersion !== undefined && knownVersion !== versionAndId.version) {
|
|
147
165
|
return false;
|
|
148
166
|
}
|
|
149
|
-
if (this.
|
|
167
|
+
if (this.uninstalledPlugins.has(identifier)) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (this.disabledPlugins.has(identifier)) {
|
|
150
172
|
return false;
|
|
151
173
|
}
|
|
152
174
|
if (knownVersion === undefined) {
|
|
@@ -159,26 +181,18 @@ export class HostedPluginServerImpl implements HostedPluginServer {
|
|
|
159
181
|
return Promise.resolve(this.uninstallationManager.getUninstalledPluginIds());
|
|
160
182
|
}
|
|
161
183
|
|
|
162
|
-
|
|
184
|
+
getDisabledPluginIds(): Promise<readonly PluginIdentifiers.VersionedId[]> {
|
|
185
|
+
return Promise.resolve(this.uninstallationManager.getDisabledPluginIds());
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
async getDeployedPlugins(pluginIds: PluginIdentifiers.VersionedId[]): Promise<DeployedPlugin[]> {
|
|
163
189
|
if (!pluginIds.length) {
|
|
164
190
|
return [];
|
|
165
191
|
}
|
|
166
192
|
const plugins: DeployedPlugin[] = [];
|
|
167
|
-
let extraDeployedPlugins: Map<string, DeployedPlugin> | undefined;
|
|
168
193
|
for (const versionedId of pluginIds) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
let plugin = this.deployerHandler.getDeployedPlugin(versionedId);
|
|
173
|
-
if (!plugin) {
|
|
174
|
-
if (!extraDeployedPlugins) {
|
|
175
|
-
extraDeployedPlugins = new Map<string, DeployedPlugin>();
|
|
176
|
-
for (const extraDeployedPlugin of await this.hostedPlugin.getExtraDeployedPlugins()) {
|
|
177
|
-
extraDeployedPlugins.set(PluginIdentifiers.componentsToVersionedId(extraDeployedPlugin.metadata.model), extraDeployedPlugin);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
plugin = extraDeployedPlugins.get(versionedId);
|
|
181
|
-
}
|
|
194
|
+
const plugin = this.deployerHandler.getDeployedPlugin(versionedId);
|
|
195
|
+
|
|
182
196
|
if (plugin) {
|
|
183
197
|
plugins.push(plugin);
|
|
184
198
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
18
18
|
import * as monaco from '@theia/monaco-editor-core';
|
|
19
|
+
import { type ILineChange } from '@theia/monaco-editor-core/esm/vs/editor/common/diff/legacyLinesDiffComputer';
|
|
19
20
|
import { RPCProtocol } from '../../common/rpc-protocol';
|
|
20
21
|
import {
|
|
21
22
|
MAIN_RPC_CONTEXT,
|
|
@@ -212,6 +213,11 @@ export class EditorsAndDocumentsMain implements Disposable {
|
|
|
212
213
|
}
|
|
213
214
|
return Promise.resolve();
|
|
214
215
|
}
|
|
216
|
+
|
|
217
|
+
getDiffInformation(id: string): ILineChange[] {
|
|
218
|
+
const editor = this.getEditor(id);
|
|
219
|
+
return editor?.diffInformation || [];
|
|
220
|
+
}
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
class EditorAndDocumentStateComputer implements Disposable {
|
|
@@ -121,7 +121,8 @@ export class MenusContributionPointHandler {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
} catch (error) {
|
|
124
|
-
console.warn(`Failed to register a menu item for plugin ${plugin.metadata.model.id} contributed to ${contributionPoint}`, item
|
|
124
|
+
console.warn(`Failed to register a menu item for plugin ${plugin.metadata.model.id} contributed to ${contributionPoint}`, item);
|
|
125
|
+
console.debug(error);
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
}
|
|
@@ -43,6 +43,8 @@ import { NotebookCellModel } from '@theia/notebook/lib/browser/view-model/notebo
|
|
|
43
43
|
import { CellOutput, NotebookCellsChangeType } from '@theia/notebook/lib/common';
|
|
44
44
|
import { NotebookCellOutputModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-output-model';
|
|
45
45
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
46
|
+
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
47
|
+
import { NOTEBOOK_OUTPUT_FOCUSED } from '@theia/notebook/lib/browser/contributions/notebook-context-keys';
|
|
46
48
|
|
|
47
49
|
export const AdditionalNotebookCellOutputCss = Symbol('AdditionalNotebookCellOutputCss');
|
|
48
50
|
|
|
@@ -228,6 +230,9 @@ export class CellOutputWebviewImpl implements CellOutputWebview, Disposable {
|
|
|
228
230
|
@inject(NotebookOptionsService)
|
|
229
231
|
protected readonly notebookOptionsService: NotebookOptionsService;
|
|
230
232
|
|
|
233
|
+
@inject(ContextKeyService)
|
|
234
|
+
protected readonly contextKeyService: ContextKeyService;
|
|
235
|
+
|
|
231
236
|
// returns the output Height
|
|
232
237
|
protected readonly onDidRenderOutputEmitter = new Emitter<OutputRenderEvent>();
|
|
233
238
|
readonly onDidRenderOutput = this.onDidRenderOutputEmitter.event;
|
|
@@ -524,6 +529,12 @@ export class CellOutputWebviewImpl implements CellOutputWebview, Disposable {
|
|
|
524
529
|
this.notebook.setSelectedCell(selectedCell);
|
|
525
530
|
}
|
|
526
531
|
break;
|
|
532
|
+
case 'webviewFocusChanged':
|
|
533
|
+
if (message.focused) {
|
|
534
|
+
window.getSelection()?.empty();
|
|
535
|
+
}
|
|
536
|
+
this.contextKeyService.setContext(NOTEBOOK_OUTPUT_FOCUSED, message.focused);
|
|
537
|
+
break;
|
|
527
538
|
case 'cellHeightRequest':
|
|
528
539
|
const cellHeight = this.notebook.getCellByHandle(message.cellHandle)?.cellHeight ?? 0;
|
|
529
540
|
this.webviewWidget.sendMessage({
|
|
@@ -801,11 +801,15 @@ export async function outputWebviewPreload(ctx: PreloadContext): Promise<void> {
|
|
|
801
801
|
theia.postMessage({ type: 'inputFocusChanged', focused: focus } as webviewCommunication.InputFocusChange);
|
|
802
802
|
}
|
|
803
803
|
};
|
|
804
|
-
|
|
805
804
|
window.addEventListener('focusin', (event: FocusEvent) => focusChange(event, true));
|
|
806
|
-
|
|
807
805
|
window.addEventListener('focusout', (event: FocusEvent) => focusChange(event, false));
|
|
808
806
|
|
|
807
|
+
const webviewFocuseChange = (focus: boolean) => {
|
|
808
|
+
theia.postMessage({ type: 'webviewFocusChanged', focused: focus } as webviewCommunication.WebviewFocusChange);
|
|
809
|
+
};
|
|
810
|
+
window.addEventListener('focus', () => webviewFocuseChange(true));
|
|
811
|
+
window.addEventListener('blur', () => webviewFocuseChange(false));
|
|
812
|
+
|
|
809
813
|
new ResizeObserver(() => {
|
|
810
814
|
theia.postMessage({
|
|
811
815
|
type: 'bodyHeightChange',
|
|
@@ -150,6 +150,11 @@ export interface CellOuputFocus {
|
|
|
150
150
|
readonly cellHandle: number;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
export interface WebviewFocusChange {
|
|
154
|
+
readonly type: 'webviewFocusChanged';
|
|
155
|
+
readonly focused: boolean;
|
|
156
|
+
}
|
|
157
|
+
|
|
153
158
|
export interface CellHeightRequest {
|
|
154
159
|
readonly type: 'cellHeightRequest';
|
|
155
160
|
readonly cellHandle: number;
|
|
@@ -167,6 +172,7 @@ export type FromWebviewMessage = WebviewInitialized
|
|
|
167
172
|
| KernelMessage
|
|
168
173
|
| InputFocusChange
|
|
169
174
|
| CellOuputFocus
|
|
175
|
+
| WebviewFocusChange
|
|
170
176
|
| CellHeightRequest
|
|
171
177
|
| BodyHeightChange;
|
|
172
178
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as monaco from '@theia/monaco-editor-core';
|
|
18
18
|
import { StandaloneCodeEditor } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneCodeEditor';
|
|
19
|
+
import { type ILineChange } from '@theia/monaco-editor-core/esm/vs/editor/common/diff/legacyLinesDiffComputer';
|
|
19
20
|
import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
|
|
20
21
|
import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor';
|
|
21
22
|
import {
|
|
@@ -34,6 +35,7 @@ import { Emitter, Event } from '@theia/core';
|
|
|
34
35
|
import { TextEditorCursorStyle, cursorStyleToString } from '../../common/editor-options';
|
|
35
36
|
import { TextEditorLineNumbersStyle, EndOfLine } from '../../plugin/types-impl';
|
|
36
37
|
import { SimpleMonacoEditor } from '@theia/monaco/lib/browser/simple-monaco-editor';
|
|
38
|
+
import { MonacoDiffEditor } from '@theia/monaco/lib/browser/monaco-diff-editor';
|
|
37
39
|
import { EndOfLineSequence, ITextModel } from '@theia/monaco-editor-core/esm/vs/editor/common/model';
|
|
38
40
|
import { EditorOption, RenderLineNumbersType } from '@theia/monaco-editor-core/esm/vs/editor/common/config/editorOptions';
|
|
39
41
|
|
|
@@ -130,6 +132,13 @@ export class TextEditorMain implements Disposable {
|
|
|
130
132
|
return this.onPropertiesChangedEmitter.event;
|
|
131
133
|
}
|
|
132
134
|
|
|
135
|
+
get diffInformation(): ILineChange[] | undefined {
|
|
136
|
+
if (!(this.editor instanceof MonacoDiffEditor)) {
|
|
137
|
+
return [];
|
|
138
|
+
}
|
|
139
|
+
return this.editor.diffInformation;
|
|
140
|
+
}
|
|
141
|
+
|
|
133
142
|
setSelections(selections: Selection[]): void {
|
|
134
143
|
if (this.editor) {
|
|
135
144
|
this.editor.getControl().setSelections(selections);
|
|
@@ -47,6 +47,7 @@ import { ResourceEdit } from '@theia/monaco-editor-core/esm/vs/editor/browser/se
|
|
|
47
47
|
import { IDecorationRenderOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/editorCommon';
|
|
48
48
|
import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
|
|
49
49
|
import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
|
|
50
|
+
import { type ILineChange } from '@theia/monaco-editor-core/esm/vs/editor/common/diff/legacyLinesDiffComputer';
|
|
50
51
|
import { ArrayUtils, URI } from '@theia/core';
|
|
51
52
|
import { toNotebookWorspaceEdit } from './notebooks/notebooks-main';
|
|
52
53
|
import { interfaces } from '@theia/core/shared/inversify';
|
|
@@ -231,4 +232,8 @@ export class TextEditorsMainImpl implements TextEditorsMain, Disposable {
|
|
|
231
232
|
return this.editorsAndDocuments.saveAll(includeUntitled);
|
|
232
233
|
}
|
|
233
234
|
|
|
235
|
+
$getDiffInformation(id: string): Promise<ILineChange[]> {
|
|
236
|
+
return Promise.resolve(this.editorsAndDocuments.getDiffInformation(id));
|
|
237
|
+
}
|
|
238
|
+
|
|
234
239
|
}
|
|
@@ -141,6 +141,14 @@ export class PluginDeployerImpl implements PluginDeployer {
|
|
|
141
141
|
await this.pluginDeployerHandler.uninstallPlugin(pluginId);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
enablePlugin(pluginId: PluginIdentifiers.VersionedId): Promise<boolean> {
|
|
145
|
+
return this.pluginDeployerHandler.enablePlugin(pluginId);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
disablePlugin(pluginId: PluginIdentifiers.VersionedId): Promise<boolean> {
|
|
149
|
+
return this.pluginDeployerHandler.disablePlugin(pluginId);
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
async undeploy(pluginId: PluginIdentifiers.VersionedId): Promise<void> {
|
|
145
153
|
if (await this.pluginDeployerHandler.undeployPlugin(pluginId)) {
|
|
146
154
|
this.onDidDeployEmitter.fire();
|
|
@@ -33,7 +33,7 @@ import { HttpPluginDeployerResolver } from './plugin-http-resolver';
|
|
|
33
33
|
import { ConnectionHandler, RpcConnectionHandler, bindContributionProvider } from '@theia/core';
|
|
34
34
|
import { PluginPathsService, pluginPathsServicePath } from '../common/plugin-paths-protocol';
|
|
35
35
|
import { PluginPathsServiceImpl } from './paths/plugin-paths-service';
|
|
36
|
-
import {
|
|
36
|
+
import { PluginServerImpl } from './plugin-server-impl';
|
|
37
37
|
import { PluginCliContribution } from './plugin-cli-contribution';
|
|
38
38
|
import { PluginTheiaEnvironment } from '../common/plugin-theia-environment';
|
|
39
39
|
import { PluginTheiaDeployerParticipant } from './plugin-theia-deployer-participant';
|
|
@@ -70,7 +70,7 @@ export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind
|
|
|
70
70
|
bind(PluginDeployerFileHandler).to(PluginTheiaFileHandler).inSingletonScope();
|
|
71
71
|
bind(PluginDeployerDirectoryHandler).to(PluginTheiaDirectoryHandler).inSingletonScope();
|
|
72
72
|
|
|
73
|
-
bind(PluginServer).to(
|
|
73
|
+
bind(PluginServer).to(PluginServerImpl).inSingletonScope();
|
|
74
74
|
|
|
75
75
|
bind(PluginsKeyValueStorage).toSelf().inSingletonScope();
|
|
76
76
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
18
|
import { Argv, Arguments } from '@theia/core/shared/yargs';
|
|
19
19
|
import { CliContribution } from '@theia/core/lib/node/cli';
|
|
20
|
-
import {
|
|
20
|
+
import { PluginDeployerHandlerImpl } from '../../hosted/node/plugin-deployer-handler-impl';
|
|
21
21
|
import { PluginType } from '../../common';
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
@@ -27,8 +27,8 @@ export class PluginMgmtCliContribution implements CliContribution {
|
|
|
27
27
|
static SHOW_VERSIONS = '--show-versions';
|
|
28
28
|
static SHOW_BUILTINS = '--show-builtins';
|
|
29
29
|
|
|
30
|
-
@inject(
|
|
31
|
-
protected deployerHandler:
|
|
30
|
+
@inject(PluginDeployerHandlerImpl)
|
|
31
|
+
protected deployerHandler: PluginDeployerHandlerImpl;
|
|
32
32
|
|
|
33
33
|
configure(conf: Argv): void {
|
|
34
34
|
conf.command([PluginMgmtCliContribution.LIST_PLUGINS, 'list-extensions'],
|
|
@@ -18,21 +18,31 @@ import { injectable, inject } from '@theia/core/shared/inversify';
|
|
|
18
18
|
import { CancellationToken } from '@theia/core/lib/common/cancellation';
|
|
19
19
|
import { PluginDeployerImpl } from './plugin-deployer-impl';
|
|
20
20
|
import { PluginsKeyValueStorage } from './plugins-key-value-storage';
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
PluginServer, PluginDeployer, PluginStorageKind, PluginType, UnresolvedPluginEntry, PluginIdentifiers,
|
|
23
|
+
PluginDeployOptions, PluginDeployerHandler
|
|
24
|
+
} from '../../common/plugin-protocol';
|
|
22
25
|
import { KeysToAnyValues, KeysToKeysToAnyValue } from '../../common/types';
|
|
26
|
+
import { PluginUninstallationManager } from './plugin-uninstallation-manager';
|
|
23
27
|
|
|
24
28
|
@injectable()
|
|
25
|
-
export class
|
|
29
|
+
export class PluginServerImpl implements PluginServer {
|
|
26
30
|
|
|
27
31
|
@inject(PluginDeployer)
|
|
28
32
|
protected readonly pluginDeployer: PluginDeployerImpl;
|
|
29
33
|
|
|
34
|
+
@inject(PluginDeployerHandler)
|
|
35
|
+
protected readonly pluginDeployerHandler: PluginDeployerHandler;
|
|
36
|
+
|
|
30
37
|
@inject(PluginsKeyValueStorage)
|
|
31
38
|
protected readonly pluginsKeyValueStorage: PluginsKeyValueStorage;
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
@inject(PluginUninstallationManager)
|
|
41
|
+
protected readonly uninstallationManager: PluginUninstallationManager;
|
|
42
|
+
|
|
43
|
+
async install(pluginEntry: string, arg2?: PluginType | CancellationToken, options?: PluginDeployOptions): Promise<void> {
|
|
34
44
|
const type = typeof arg2 === 'number' ? arg2 as PluginType : undefined;
|
|
35
|
-
const successfulDeployments = await this.
|
|
45
|
+
const successfulDeployments = await this.doInstall({
|
|
36
46
|
id: pluginEntry,
|
|
37
47
|
type: type ?? PluginType.User
|
|
38
48
|
}, options);
|
|
@@ -42,16 +52,32 @@ export class PluginServerHandler implements PluginServer {
|
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
54
|
|
|
45
|
-
protected
|
|
55
|
+
protected doInstall(pluginEntry: UnresolvedPluginEntry, options?: PluginDeployOptions): Promise<number> {
|
|
46
56
|
return this.pluginDeployer.deploy(pluginEntry, options);
|
|
47
57
|
}
|
|
48
58
|
|
|
59
|
+
getInstalledPlugins(): Promise<readonly PluginIdentifiers.VersionedId[]> {
|
|
60
|
+
return Promise.resolve(this.pluginDeployerHandler.getDeployedPluginIds());
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getUninstalledPlugins(): Promise<readonly PluginIdentifiers.VersionedId[]> {
|
|
64
|
+
return Promise.resolve(this.uninstallationManager.getUninstalledPluginIds());
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getDisabledPlugins(): Promise<readonly PluginIdentifiers.VersionedId[]> {
|
|
68
|
+
return Promise.resolve(this.uninstallationManager.getDisabledPluginIds());
|
|
69
|
+
}
|
|
70
|
+
|
|
49
71
|
uninstall(pluginId: PluginIdentifiers.VersionedId): Promise<void> {
|
|
50
72
|
return this.pluginDeployer.uninstall(pluginId);
|
|
51
73
|
}
|
|
52
74
|
|
|
53
|
-
|
|
54
|
-
return this.pluginDeployer.
|
|
75
|
+
enablePlugin(pluginId: PluginIdentifiers.VersionedId): Promise<boolean> {
|
|
76
|
+
return this.pluginDeployer.enablePlugin(pluginId);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
disablePlugin(pluginId: PluginIdentifiers.VersionedId): Promise<boolean> {
|
|
80
|
+
return this.pluginDeployer.disablePlugin(pluginId);
|
|
55
81
|
}
|
|
56
82
|
|
|
57
83
|
setStorageValue(key: string, value: KeysToAnyValues, kind: PluginStorageKind): Promise<boolean> {
|
|
@@ -15,60 +15,118 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { Emitter, Event } from '@theia/core';
|
|
18
|
-
import { injectable } from '@theia/core/shared/inversify';
|
|
18
|
+
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
19
19
|
import { PluginIdentifiers } from '../../common';
|
|
20
|
+
import { SettingService } from '@theia/core/lib/node';
|
|
21
|
+
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
20
22
|
|
|
21
23
|
@injectable()
|
|
22
24
|
export class PluginUninstallationManager {
|
|
25
|
+
static DISABLED_PLUGINS = 'installedPlugins.disabledPlugins';
|
|
26
|
+
|
|
27
|
+
@inject(SettingService)
|
|
28
|
+
protected readonly settingService: SettingService;
|
|
29
|
+
|
|
23
30
|
protected readonly onDidChangeUninstalledPluginsEmitter = new Emitter<readonly PluginIdentifiers.VersionedId[]>();
|
|
31
|
+
onDidChangeUninstalledPlugins: Event<readonly PluginIdentifiers.VersionedId[]> = this.onDidChangeUninstalledPluginsEmitter.event;
|
|
32
|
+
|
|
33
|
+
protected readonly onDidChangeDisabledPluginsEmitter = new Emitter<readonly PluginIdentifiers.VersionedId[]>();
|
|
34
|
+
onDidChangeDisabledPlugins: Event<readonly PluginIdentifiers.VersionedId[]> = this.onDidChangeDisabledPluginsEmitter.event;
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
36
|
+
protected uninstalledPlugins: Set<PluginIdentifiers.VersionedId> = new Set();
|
|
37
|
+
protected disabledPlugins: Set<PluginIdentifiers.VersionedId> = new Set();
|
|
38
|
+
|
|
39
|
+
protected readonly initialized = new Deferred<void>();
|
|
40
|
+
|
|
41
|
+
@postConstruct()
|
|
42
|
+
init(): void {
|
|
43
|
+
this.load().then(() => this.initialized.resolve());
|
|
27
44
|
}
|
|
28
45
|
|
|
29
|
-
protected
|
|
46
|
+
protected async load(): Promise<void> {
|
|
47
|
+
try {
|
|
48
|
+
const disabled: PluginIdentifiers.VersionedId[] = JSON.parse(await this.settingService.get(PluginUninstallationManager.DISABLED_PLUGINS) || '[]');
|
|
49
|
+
disabled.forEach(id => this.disabledPlugins.add(id));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
// settings may be corrupt; just carry on
|
|
52
|
+
console.warn(e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
30
55
|
|
|
31
|
-
protected
|
|
32
|
-
this.
|
|
56
|
+
protected async save(): Promise<void> {
|
|
57
|
+
await this.settingService.set(PluginUninstallationManager.DISABLED_PLUGINS, JSON.stringify(await this.getDisabledPluginIds()));
|
|
33
58
|
}
|
|
34
59
|
|
|
35
|
-
markAsUninstalled(...pluginIds: PluginIdentifiers.VersionedId[]): boolean {
|
|
60
|
+
async markAsUninstalled(...pluginIds: PluginIdentifiers.VersionedId[]): Promise<boolean> {
|
|
36
61
|
let didChange = false;
|
|
37
|
-
for (const id of pluginIds) {
|
|
38
|
-
|
|
62
|
+
for (const id of pluginIds) {
|
|
63
|
+
if (!this.uninstalledPlugins.has(id)) {
|
|
64
|
+
didChange = true;
|
|
65
|
+
this.uninstalledPlugins.add(id);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (didChange) {
|
|
69
|
+
this.onDidChangeUninstalledPluginsEmitter.fire(this.getUninstalledPluginIds());
|
|
70
|
+
}
|
|
71
|
+
this.markAsEnabled(...pluginIds);
|
|
39
72
|
return didChange;
|
|
40
73
|
}
|
|
41
74
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
75
|
+
async markAsInstalled(...pluginIds: PluginIdentifiers.VersionedId[]): Promise<boolean> {
|
|
76
|
+
let didChange = false;
|
|
77
|
+
for (const id of pluginIds) {
|
|
78
|
+
didChange = this.uninstalledPlugins.delete(id) || didChange;
|
|
79
|
+
}
|
|
80
|
+
if (didChange) {
|
|
81
|
+
this.onDidChangeUninstalledPluginsEmitter.fire(this.getUninstalledPluginIds());
|
|
46
82
|
}
|
|
47
|
-
return
|
|
83
|
+
return didChange;
|
|
48
84
|
}
|
|
49
85
|
|
|
50
|
-
|
|
86
|
+
isUninstalled(pluginId: PluginIdentifiers.VersionedId): boolean {
|
|
87
|
+
return this.uninstalledPlugins.has(pluginId);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getUninstalledPluginIds(): readonly PluginIdentifiers.VersionedId[] {
|
|
91
|
+
return [...this.uninstalledPlugins];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async markAsDisabled(...pluginIds: PluginIdentifiers.VersionedId[]): Promise<boolean> {
|
|
95
|
+
await this.initialized.promise;
|
|
51
96
|
let didChange = false;
|
|
52
|
-
for (const id of pluginIds) {
|
|
53
|
-
|
|
97
|
+
for (const id of pluginIds) {
|
|
98
|
+
if (!this.disabledPlugins.has(id)) {
|
|
99
|
+
this.disabledPlugins.add(id);
|
|
100
|
+
didChange = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (didChange) {
|
|
104
|
+
await this.save();
|
|
105
|
+
this.onDidChangeDisabledPluginsEmitter.fire([...this.disabledPlugins]);
|
|
106
|
+
}
|
|
54
107
|
return didChange;
|
|
55
108
|
}
|
|
56
109
|
|
|
57
|
-
|
|
58
|
-
|
|
110
|
+
async markAsEnabled(...pluginIds: PluginIdentifiers.VersionedId[]): Promise<boolean> {
|
|
111
|
+
await this.initialized.promise;
|
|
59
112
|
let didChange = false;
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
|
|
113
|
+
for (const id of pluginIds) {
|
|
114
|
+
didChange = this.disabledPlugins.delete(id) || didChange;
|
|
115
|
+
}
|
|
116
|
+
if (didChange) {
|
|
117
|
+
await this.save();
|
|
118
|
+
this.onDidChangeDisabledPluginsEmitter.fire([...this.disabledPlugins]);
|
|
63
119
|
}
|
|
64
120
|
return didChange;
|
|
65
121
|
}
|
|
66
122
|
|
|
67
|
-
|
|
68
|
-
|
|
123
|
+
async isDisabled(pluginId: PluginIdentifiers.VersionedId): Promise<boolean> {
|
|
124
|
+
await this.initialized.promise;
|
|
125
|
+
return this.disabledPlugins.has(pluginId);
|
|
69
126
|
}
|
|
70
127
|
|
|
71
|
-
|
|
72
|
-
|
|
128
|
+
async getDisabledPluginIds(): Promise<readonly PluginIdentifiers.VersionedId[]> {
|
|
129
|
+
await this.initialized.promise;
|
|
130
|
+
return [...this.disabledPlugins];
|
|
73
131
|
}
|
|
74
132
|
}
|
|
@@ -163,8 +163,8 @@ export class ExtHostFileSystemEventService implements ExtHostFileSystemEventServ
|
|
|
163
163
|
// --- file events
|
|
164
164
|
|
|
165
165
|
createFileSystemWatcher(globPattern: string | IRelativePattern, ignoreCreateEvents?: boolean,
|
|
166
|
-
ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean
|
|
167
|
-
return new FileSystemWatcher(this._onFileSystemEvent.event, globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents
|
|
166
|
+
ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): vscode.FileSystemWatcher {
|
|
167
|
+
return new FileSystemWatcher(this._onFileSystemEvent.event, globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
$onFileEvent(events: FileSystemEvents) {
|