@theia/plugin-ext 1.53.0-next.6 → 1.53.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/lib/common/plugin-api-rpc-model.d.ts +1 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +13 -2
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +4 -2
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/rpc-protocol.d.ts +14 -13
- package/lib/common/rpc-protocol.d.ts.map +1 -1
- package/lib/common/rpc-protocol.js +56 -53
- package/lib/common/rpc-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +1 -0
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +13 -3
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +13 -1
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/authentication-main.d.ts +1 -0
- package/lib/main/browser/authentication-main.d.ts.map +1 -1
- package/lib/main/browser/command-registry-main.d.ts +1 -0
- package/lib/main/browser/command-registry-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +5 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-opener.js +107 -31
- package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +7 -4
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +21 -7
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -4
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +5 -55
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +3 -3
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +19 -15
- package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +1 -0
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/languages-main.d.ts +1 -0
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +3 -0
- package/lib/main/browser/main-context.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 -1
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
- package/lib/main/browser/menus/plugin-menu-command-adapter.js +1 -0
- package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts +2 -2
- package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -1
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js +2 -0
- package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-main.js +22 -3
- package/lib/main/browser/notebooks/notebook-documents-main.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts +1 -1
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts.map +1 -1
- package/lib/main/browser/notebooks/notebook-editors-main.js +16 -2
- package/lib/main/browser/notebooks/notebook-editors-main.js.map +1 -1
- package/lib/main/browser/notebooks/notebooks-main.d.ts +1 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +18 -0
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/quick-open-main.d.ts +1 -0
- package/lib/main/browser/quick-open-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +1 -0
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/uri-main.d.ts +16 -0
- package/lib/main/browser/uri-main.d.ts.map +1 -0
- package/lib/main/browser/uri-main.js +64 -0
- package/lib/main/browser/uri-main.js.map +1 -0
- package/lib/main/browser/view/tree-view-decorator-service.d.ts +1 -0
- package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +1 -0
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +1 -0
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +2 -3
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +5 -4
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/webview-views/webview-views-main.d.ts +1 -0
- package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.d.ts +1 -0
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.js +6 -1
- package/lib/main/browser/webviews-main.js.map +1 -1
- package/lib/main/browser/workspace-main.d.ts +1 -0
- package/lib/main/browser/workspace-main.d.ts.map +1 -1
- package/lib/plugin/authentication-ext.d.ts +1 -0
- package/lib/plugin/authentication-ext.d.ts.map +1 -1
- package/lib/plugin/clipboard-ext.d.ts +1 -0
- package/lib/plugin/clipboard-ext.d.ts.map +1 -1
- package/lib/plugin/command-registry.d.ts +1 -0
- package/lib/plugin/command-registry.d.ts.map +1 -1
- package/lib/plugin/comments.d.ts +1 -0
- package/lib/plugin/comments.d.ts.map +1 -1
- package/lib/plugin/custom-editors.d.ts +3 -4
- package/lib/plugin/custom-editors.d.ts.map +1 -1
- package/lib/plugin/custom-editors.js +5 -7
- package/lib/plugin/custom-editors.js.map +1 -1
- package/lib/plugin/debug/debug-ext.d.ts +1 -0
- package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +1 -0
- package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +1 -0
- package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +1 -0
- package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
- package/lib/plugin/decorations.d.ts +1 -0
- package/lib/plugin/decorations.d.ts.map +1 -1
- package/lib/plugin/dialogs.d.ts +1 -0
- package/lib/plugin/dialogs.d.ts.map +1 -1
- package/lib/plugin/document-data.d.ts +1 -0
- package/lib/plugin/document-data.d.ts.map +1 -1
- package/lib/plugin/documents.d.ts +1 -0
- package/lib/plugin/documents.d.ts.map +1 -1
- package/lib/plugin/env.d.ts +3 -0
- package/lib/plugin/env.d.ts.map +1 -1
- package/lib/plugin/env.js +4 -1
- package/lib/plugin/env.js.map +1 -1
- package/lib/plugin/file-system-event-service-ext-impl.d.ts +1 -0
- package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +1 -0
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/known-commands.d.ts.map +1 -1
- package/lib/plugin/known-commands.js +1 -0
- package/lib/plugin/known-commands.js.map +1 -1
- package/lib/plugin/label-service.d.ts +1 -0
- package/lib/plugin/label-service.d.ts.map +1 -1
- package/lib/plugin/languages/call-hierarchy.d.ts +1 -0
- package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/code-action.d.ts +1 -0
- package/lib/plugin/languages/code-action.d.ts.map +1 -1
- package/lib/plugin/languages/color.d.ts +1 -0
- package/lib/plugin/languages/color.d.ts.map +1 -1
- package/lib/plugin/languages/completion.d.ts +1 -0
- package/lib/plugin/languages/completion.d.ts.map +1 -1
- package/lib/plugin/languages/declaration.d.ts +1 -0
- package/lib/plugin/languages/declaration.d.ts.map +1 -1
- package/lib/plugin/languages/definition.d.ts +1 -0
- package/lib/plugin/languages/definition.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +1 -0
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/document-drop-edit.d.ts +1 -0
- package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
- package/lib/plugin/languages/document-formatting.d.ts +1 -0
- package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/document-highlight.d.ts +1 -0
- package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
- package/lib/plugin/languages/evaluatable-expression.d.ts +1 -0
- package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
- package/lib/plugin/languages/folding.d.ts +1 -0
- package/lib/plugin/languages/folding.d.ts.map +1 -1
- package/lib/plugin/languages/hover.d.ts +1 -0
- package/lib/plugin/languages/hover.d.ts.map +1 -1
- package/lib/plugin/languages/implementation.d.ts +1 -0
- package/lib/plugin/languages/implementation.d.ts.map +1 -1
- package/lib/plugin/languages/inlay-hints.d.ts +1 -0
- package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +1 -0
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
- package/lib/plugin/languages/inline-values.d.ts +1 -0
- package/lib/plugin/languages/inline-values.d.ts.map +1 -1
- package/lib/plugin/languages/lens.d.ts +1 -0
- package/lib/plugin/languages/lens.d.ts.map +1 -1
- package/lib/plugin/languages/link-provider.d.ts +1 -0
- package/lib/plugin/languages/link-provider.d.ts.map +1 -1
- package/lib/plugin/languages/linked-editing-range.d.ts +1 -0
- package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
- package/lib/plugin/languages/on-type-formatting.d.ts +1 -0
- package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/outline.d.ts +1 -0
- package/lib/plugin/languages/outline.d.ts.map +1 -1
- package/lib/plugin/languages/range-formatting.d.ts +1 -0
- package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
- package/lib/plugin/languages/reference.d.ts +1 -0
- package/lib/plugin/languages/reference.d.ts.map +1 -1
- package/lib/plugin/languages/rename.d.ts +1 -0
- package/lib/plugin/languages/rename.d.ts.map +1 -1
- package/lib/plugin/languages/selection-range.d.ts +1 -0
- package/lib/plugin/languages/selection-range.d.ts.map +1 -1
- package/lib/plugin/languages/semantic-highlighting.d.ts +1 -0
- package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
- package/lib/plugin/languages/signature.d.ts +1 -0
- package/lib/plugin/languages/signature.d.ts.map +1 -1
- package/lib/plugin/languages/type-definition.d.ts +1 -0
- package/lib/plugin/languages/type-definition.d.ts.map +1 -1
- package/lib/plugin/languages/type-hierarchy.d.ts +1 -0
- package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
- package/lib/plugin/languages/util.d.ts +1 -0
- package/lib/plugin/languages/util.d.ts.map +1 -1
- package/lib/plugin/languages/workspace-symbol.d.ts +1 -0
- package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
- package/lib/plugin/languages-utils.d.ts +1 -0
- package/lib/plugin/languages-utils.d.ts.map +1 -1
- package/lib/plugin/languages.d.ts +1 -0
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/markdown-string.d.ts +1 -0
- package/lib/plugin/markdown-string.d.ts.map +1 -1
- package/lib/plugin/message-registry.d.ts +1 -0
- package/lib/plugin/message-registry.d.ts.map +1 -1
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +1 -0
- package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +1 -0
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-documents.d.ts +1 -0
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editor.d.ts +1 -0
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-editors.d.ts +1 -0
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-kernels.d.ts +1 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
- package/lib/plugin/notebook/notebook-renderers.d.ts +1 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
- package/lib/plugin/notebook/notebooks.d.ts +1 -0
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
- package/lib/plugin/notification.d.ts +1 -0
- package/lib/plugin/notification.d.ts.map +1 -1
- package/lib/plugin/output-channel/log-output-channel.d.ts +1 -0
- package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
- package/lib/plugin/output-channel/output-channel-item.d.ts +1 -0
- package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
- package/lib/plugin/output-channel-registry.d.ts +1 -0
- package/lib/plugin/output-channel-registry.d.ts.map +1 -1
- package/lib/plugin/plugin-context.d.ts +1 -0
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +14 -6
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +1 -0
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +2 -1
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/plugin-storage.d.ts +1 -0
- package/lib/plugin/plugin-storage.d.ts.map +1 -1
- package/lib/plugin/preference-registry.d.ts +1 -0
- package/lib/plugin/preference-registry.d.ts.map +1 -1
- package/lib/plugin/quick-open.d.ts +1 -0
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/scm.d.ts +1 -0
- package/lib/plugin/scm.d.ts.map +1 -1
- package/lib/plugin/secrets-ext.d.ts +1 -0
- package/lib/plugin/secrets-ext.d.ts.map +1 -1
- package/lib/plugin/status-bar/status-bar-item.d.ts +1 -0
- package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
- package/lib/plugin/status-bar-message-registry.d.ts +1 -0
- package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
- package/lib/plugin/tabs.d.ts +1 -0
- package/lib/plugin/tabs.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +1 -0
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +1 -0
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +2 -0
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +1 -0
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/test-item.d.ts +1 -0
- package/lib/plugin/test-item.d.ts.map +1 -1
- package/lib/plugin/tests.d.ts +1 -0
- package/lib/plugin/tests.d.ts.map +1 -1
- package/lib/plugin/text-editor.d.ts +1 -0
- package/lib/plugin/text-editor.d.ts.map +1 -1
- package/lib/plugin/text-editors.d.ts +1 -0
- package/lib/plugin/text-editors.d.ts.map +1 -1
- package/lib/plugin/timeline.d.ts +1 -0
- package/lib/plugin/timeline.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +1 -0
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/type-converters.d.ts +1 -0
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/types-impl.d.ts +6 -0
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +9 -1
- package/lib/plugin/types-impl.js.map +1 -1
- package/lib/plugin/uri-ext.d.ts +38 -0
- package/lib/plugin/uri-ext.d.ts.map +1 -0
- package/lib/plugin/uri-ext.js +50 -0
- package/lib/plugin/uri-ext.js.map +1 -0
- package/lib/plugin/webview-views.d.ts +1 -0
- package/lib/plugin/webview-views.d.ts.map +1 -1
- package/lib/plugin/webviews.d.ts +1 -0
- package/lib/plugin/webviews.d.ts.map +1 -1
- package/lib/plugin/webviews.js +1 -1
- package/lib/plugin/webviews.js.map +1 -1
- package/lib/plugin/window-state.d.ts +1 -0
- package/lib/plugin/window-state.d.ts.map +1 -1
- package/lib/plugin/workspace.d.ts +1 -0
- package/lib/plugin/workspace.d.ts.map +1 -1
- package/package.json +29 -29
- package/src/common/plugin-api-rpc.ts +17 -4
- package/src/common/rpc-protocol.ts +62 -66
- package/src/hosted/browser/hosted-plugin.ts +16 -5
- package/src/hosted/node/scanners/scanner-theia.ts +12 -1
- package/src/main/browser/custom-editors/custom-editor-opener.tsx +110 -25
- package/src/main/browser/custom-editors/custom-editor-widget.ts +20 -11
- package/src/main/browser/custom-editors/custom-editors-main.ts +11 -70
- package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +15 -13
- package/src/main/browser/main-context.ts +4 -0
- package/src/main/browser/menus/menus-contribution-handler.ts +2 -1
- package/src/main/browser/menus/plugin-menu-command-adapter.ts +1 -0
- package/src/main/browser/menus/vscode-theia-menu-mappings.ts +3 -1
- package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +1 -1
- package/src/main/browser/notebooks/notebook-documents-main.ts +24 -4
- package/src/main/browser/notebooks/notebook-editors-main.ts +15 -2
- package/src/main/browser/plugin-ext-frontend-module.ts +23 -4
- package/src/main/browser/uri-main.ts +72 -0
- package/src/main/browser/webview/pre/service-worker.js +2 -1
- package/src/main/browser/webview/webview.ts +5 -6
- package/src/main/browser/webviews-main.ts +6 -1
- package/src/plugin/custom-editors.ts +8 -10
- package/src/plugin/env.ts +6 -1
- package/src/plugin/known-commands.ts +1 -0
- package/src/plugin/plugin-context.ts +16 -8
- package/src/plugin/plugin-manager.ts +2 -1
- package/src/plugin/terminal-ext.ts +2 -0
- package/src/plugin/types-impl.ts +10 -0
- package/src/plugin/uri-ext.ts +60 -0
- package/src/plugin/webviews.ts +1 -1
- package/lib/common/proxy-handler.d.ts +0 -73
- package/lib/common/proxy-handler.d.ts.map +0 -1
- package/lib/common/proxy-handler.js +0 -106
- package/lib/common/proxy-handler.js.map +0 -1
- package/src/common/proxy-handler.ts +0 -143
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-handler.js","sourceRoot":"","sources":["../../src/common/proxy-handler.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,uDAAuD;AACvD,uCAAwE;AAExE,sEAA+D;AAqB/D;;;GAGG;AACH,MAAa,kBAAkB;IAU3B,YAAY,OAA4B;QAThC,gBAAW,GAA0B,IAAI,uBAAQ,EAAE,CAAC;QACpD,qBAAgB,GAAG,KAAK,CAAC;QAS7B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAEO,aAAa;QACjB,iGAAiG;QACjG,kEAAkE;QAClE,IAAI,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QACnG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,MAAM,aAAa,GAAuB,EAAE,OAAO,EAAE,I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EAAE,IAAW;QAC/C,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC;IAES,cAAc,CAAC,MAAc,EAAE,IAAW;QAChD,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA5BD,oDA4BC"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/********************************************************************************
|
|
2
|
-
* Copyright (C) 2022 STMicroelectronics and others.
|
|
3
|
-
*
|
|
4
|
-
* This program and the accompanying materials are made available under the
|
|
5
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
*
|
|
8
|
-
* This Source Code may also be made available under the following Secondary
|
|
9
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
* with the GNU Classpath Exception which is available at
|
|
12
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
*
|
|
14
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
********************************************************************************/
|
|
16
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
|
-
import { Channel, RpcProtocol, RpcProtocolOptions } from '@theia/core/';
|
|
18
|
-
import { RpcMessageDecoder, RpcMessageEncoder } from '@theia/core/lib/common/message-rpc/rpc-message-encoder';
|
|
19
|
-
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
20
|
-
|
|
21
|
-
export interface RpcHandlerOptions {
|
|
22
|
-
id: string
|
|
23
|
-
encoder: RpcMessageEncoder,
|
|
24
|
-
decoder: RpcMessageDecoder
|
|
25
|
-
}
|
|
26
|
-
export interface ProxyHandlerOptions extends RpcHandlerOptions {
|
|
27
|
-
channelProvider: () => Promise<Channel>,
|
|
28
|
-
proxySynchronizer: ProxySynchronizer,
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface InvocationHandlerOptions extends RpcHandlerOptions {
|
|
32
|
-
target: any
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface ProxySynchronizer {
|
|
36
|
-
startProxyInitialization(id: string, init: Promise<void>): void
|
|
37
|
-
pendingProxyInitializations(): Promise<void>
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* A proxy handler that will send any method invocation on the proxied object
|
|
42
|
-
* as a rcp protocol message over a channel.
|
|
43
|
-
*/
|
|
44
|
-
export class ClientProxyHandler<T extends object> implements ProxyHandler<T> {
|
|
45
|
-
private rpcDeferred: Deferred<RpcProtocol> = new Deferred();
|
|
46
|
-
private isRpcInitialized = false;
|
|
47
|
-
|
|
48
|
-
readonly id: string;
|
|
49
|
-
private readonly channelProvider: () => Promise<Channel>;
|
|
50
|
-
private readonly proxySynchronizer: ProxySynchronizer;
|
|
51
|
-
private readonly encoder: RpcMessageEncoder;
|
|
52
|
-
private readonly decoder: RpcMessageDecoder;
|
|
53
|
-
|
|
54
|
-
constructor(options: ProxyHandlerOptions) {
|
|
55
|
-
Object.assign(this, options);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
private initializeRpc(): void {
|
|
59
|
-
// we need to set the flag to true before waiting for the channel provider. Otherwise `get` might
|
|
60
|
-
// get called again and we'll try to open a channel more than once
|
|
61
|
-
this.proxySynchronizer.startProxyInitialization(this.id, this.rpcDeferred.promise.then(() => { }));
|
|
62
|
-
this.isRpcInitialized = true;
|
|
63
|
-
const clientOptions: RpcProtocolOptions = { encoder: this.encoder, decoder: this.decoder, mode: 'clientOnly' };
|
|
64
|
-
this.channelProvider().then(channel => {
|
|
65
|
-
const rpc = new RpcProtocol(channel, undefined, clientOptions);
|
|
66
|
-
this.rpcDeferred.resolve(rpc);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
get(target: any, name: string, receiver: any): any {
|
|
71
|
-
if (!this.isRpcInitialized) {
|
|
72
|
-
this.initializeRpc();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if (target[name] || name.charCodeAt(0) !== 36 /* CharCode.DollarSign */) {
|
|
76
|
-
return target[name];
|
|
77
|
-
}
|
|
78
|
-
const isNotify = this.isNotification(name);
|
|
79
|
-
return (...args: any[]) => {
|
|
80
|
-
const method = name.toString();
|
|
81
|
-
return this.sendWhenNoInit(async (connection: RpcProtocol) => {
|
|
82
|
-
if (isNotify) {
|
|
83
|
-
connection.sendNotification(method, args);
|
|
84
|
-
} else {
|
|
85
|
-
return await connection.sendRequest(method, args) as Promise<any>;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
private sendWhenNoInit(send: (connection: RpcProtocol) => Promise<any>): Promise<any> {
|
|
92
|
-
return this.proxySynchronizer.pendingProxyInitializations().then(() => this.rpcDeferred.promise.then(send));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Return whether the given property represents a notification. If true,
|
|
97
|
-
* the promise returned from the invocation will resolve immediately to `undefined`
|
|
98
|
-
*
|
|
99
|
-
* A property leads to a notification rather than a method call if its name
|
|
100
|
-
* begins with `notify` or `on`.
|
|
101
|
-
*
|
|
102
|
-
* @param p - The property being called on the proxy.
|
|
103
|
-
* @return Whether `p` represents a notification.
|
|
104
|
-
*/
|
|
105
|
-
protected isNotification(p: PropertyKey): boolean {
|
|
106
|
-
let propertyString = p.toString();
|
|
107
|
-
if (propertyString.charCodeAt(0) === 36/* CharCode.DollarSign */) {
|
|
108
|
-
propertyString = propertyString.substring(1);
|
|
109
|
-
}
|
|
110
|
-
return propertyString.startsWith('notify') || propertyString.startsWith('on');
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export class RpcInvocationHandler {
|
|
115
|
-
readonly id: string;
|
|
116
|
-
readonly target: any;
|
|
117
|
-
|
|
118
|
-
private rpcDeferred: Deferred<RpcProtocol> = new Deferred();
|
|
119
|
-
private readonly encoder: RpcMessageEncoder;
|
|
120
|
-
private readonly decoder: RpcMessageDecoder;
|
|
121
|
-
|
|
122
|
-
constructor(options: InvocationHandlerOptions) {
|
|
123
|
-
Object.assign(this, options);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
listen(channel: Channel): void {
|
|
127
|
-
const serverOptions: RpcProtocolOptions = { encoder: this.encoder, decoder: this.decoder, mode: 'serverOnly' };
|
|
128
|
-
const server = new RpcProtocol(channel, (method: string, args: any[]) => this.handleRequest(method, args), serverOptions);
|
|
129
|
-
server.onNotification((e: { method: string, args: any }) => this.onNotification(e.method, e.args));
|
|
130
|
-
this.rpcDeferred.resolve(server);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
protected handleRequest(method: string, args: any[]): Promise<any> {
|
|
134
|
-
return this.rpcDeferred.promise.then(() => this.target[method](...args));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
protected onNotification(method: string, args: any[]): void {
|
|
138
|
-
this.rpcDeferred.promise.then(() => {
|
|
139
|
-
this.target[method](...args);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|