From 96930a2edcc4c706d41ab8486500de7979d01283 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 23 Feb 2021 11:38:48 -0500 Subject: [PATCH] re-export common packages Enable errors for import/no-extraneous-dependencies. Relying on hoisting makes building Theia application somewhat unstable. In general cases, everything is fine. But as soon as Yarn decides to hoist things differently then it can become difficult to fix. This commit fixes the issue by re-exporting dependencies from @theia/core, this way instead of relying on implicit dependencies one can directly import what @theia/core uses like: import * as dep from '@theia/core/shared/dep' To make this work I added a 'shared' folder under 'packages/core' with js scripts that re-export everything from their matching library. To ease with the development there is a script named 'packages/core/scripts/generate-shared.js' that will read values from 'packages/core/package.json#theiaReExports' in order to more easily add new packages. Depending on how the package exports things we need to re-export things the same way. This same script generates the README.md to list all re-exported packages. It uses README.in.md as a base. @theia/electron now re-exports all members from electron. This prevents having to use electron as an implicit dependency. @theia/electron now also is a @theia/core optional peer dependency. This directly represent the use case we have for this package where we will only use electron features if this package is installed by application makers. If people don't know about this way to consume @theia/core's shared dependencies then nothing will change and they might keep using implicit dependencies. But the new recommended method is to use those re-exports in order to make builds more stable in the face of hoisting and other dependency tree optimizations. Noteworthy: There was an issue with sharing @theia/application-package since I only re-export the main 'index.js' it tried to include Node-specific code in frontend applications. I fixed this by re-exporting @theia/application-package/lib/environment separately. eslint: add @theia/eslint-plugin package Add a new package @theia/eslint-plugin to provide rules for downstream projects to re-use. The goal was simply to give better error messages if committers used implicit dependencies again, by notifying when a shared package is depended upon without going through @theia/core/shared/... It turned out that implementing that rule revealed places where import/no-extraneous-dependencies simply didn't catch. The reason might be that the plugin wasn't designed to work on TS sources. This commit fixes those newly found occurences of implicit dependencies. Signed-off-by: Paul --- configs/base.eslintrc.json | 1 + configs/errors.eslintrc.json | 20 +- dev-packages/application-manager/package.json | 3 +- .../application-manager/src/expose-loader.ts | 4 +- dev-packages/electron/README.md | 5 + dev-packages/electron/index.d.ts | 2 + dev-packages/electron/index.js | 1 + dev-packages/electron/native-keymap.d.ts | 1 + dev-packages/electron/native-keymap.js | 1 + dev-packages/eslint-plugin/index.js | 21 ++ dev-packages/eslint-plugin/package.json | 9 + .../rules/shared-dependencies.js | 171 ++++++++++++++++ examples/api-samples/compile.tsconfig.json | 6 + examples/api-samples/package.json | 2 + .../browser/api-samples-frontend-module.ts | 2 +- .../sample-file-watching-contribution.ts | 2 +- ...mic-label-provider-command-contribution.ts | 3 +- ...ple-dynamic-label-provider-contribution.ts | 2 +- .../menu/sample-browser-menu-module.ts | 4 +- .../browser/menu/sample-menu-contribution.ts | 2 +- .../sample-output-channel-with-severity.ts | 2 +- .../sample-unclosable-view-contribution.ts | 2 +- .../browser/view/sample-unclosable-view.tsx | 4 +- .../vsx/sample-vsx-command-contribution.ts | 2 +- .../menu/sample-electron-menu-module.ts | 2 +- .../sample-updater-frontend-contribution.ts | 4 +- .../updater/sample-updater-frontend-module.ts | 2 +- .../update/sample-updater-impl.ts | 2 +- .../update/sample-updater-main-module.ts | 2 +- package.json | 2 +- .../src/browser/bulk-edit-contribution.ts | 2 +- .../src/browser/bulk-edit-frontend-module.ts | 2 +- .../browser/bulk-edit-tree-label-provider.ts | 2 +- .../bulk-edit-tree-container.ts | 2 +- .../bulk-edit-tree/bulk-edit-tree-model.ts | 2 +- .../bulk-edit-tree/bulk-edit-tree-widget.tsx | 4 +- .../bulk-edit-tree/bulk-edit-tree.spec.ts | 2 +- .../browser/bulk-edit-tree/bulk-edit-tree.ts | 2 +- .../bulk-edit-tree/in-memory-text-resource.ts | 2 +- .../src/browser/callhierarchy-contribution.ts | 2 +- .../browser/callhierarchy-frontend-module.ts | 2 +- .../src/browser/callhierarchy-service.ts | 4 +- .../callhierarchy-tree-container.ts | 2 +- .../callhierarchy-tree-model.ts | 4 +- .../callhierarchy-tree-widget.tsx | 6 +- .../callhierarchy-tree/callhierarchy-tree.ts | 2 +- .../src/browser/callhierarchy.ts | 2 +- .../src/browser/current-editor-access.ts | 4 +- packages/callhierarchy/src/browser/utils.ts | 2 +- .../console/src/browser/ansi-console-item.tsx | 2 +- .../src/browser/console-content-widget.tsx | 4 +- .../src/browser/console-contribution.ts | 2 +- .../src/browser/console-frontend-module.ts | 2 +- .../console/src/browser/console-history.ts | 2 +- .../browser/console-keybinding-contexts.ts | 2 +- .../console/src/browser/console-manager.ts | 2 +- .../console/src/browser/console-session.ts | 2 +- .../console/src/browser/console-widget.ts | 4 +- packages/core/README.in.md | 131 ++++++++++++ packages/core/README.md | 49 +++++ packages/core/package.json | 56 +++++- packages/core/scripts/generate-shared.js | 186 ++++++++++++++++++ packages/core/shared/@phosphor/algorithm.d.ts | 1 + packages/core/shared/@phosphor/algorithm.js | 1 + packages/core/shared/@phosphor/commands.d.ts | 1 + packages/core/shared/@phosphor/commands.js | 1 + packages/core/shared/@phosphor/coreutils.d.ts | 1 + packages/core/shared/@phosphor/coreutils.js | 1 + packages/core/shared/@phosphor/domutils.d.ts | 1 + packages/core/shared/@phosphor/domutils.js | 1 + packages/core/shared/@phosphor/dragdrop.d.ts | 1 + packages/core/shared/@phosphor/dragdrop.js | 1 + packages/core/shared/@phosphor/messaging.d.ts | 1 + packages/core/shared/@phosphor/messaging.js | 1 + .../core/shared/@phosphor/properties.d.ts | 1 + packages/core/shared/@phosphor/properties.js | 1 + packages/core/shared/@phosphor/signaling.d.ts | 1 + packages/core/shared/@phosphor/signaling.js | 1 + .../core/shared/@phosphor/virtualdom.d.ts | 1 + packages/core/shared/@phosphor/virtualdom.js | 1 + packages/core/shared/@phosphor/widgets.d.ts | 1 + packages/core/shared/@phosphor/widgets.js | 1 + .../@theia/application-package/index.d.ts | 1 + .../@theia/application-package/index.js | 1 + packages/core/shared/electron.d.ts | 2 + packages/core/shared/electron.js | 1 + packages/core/shared/express.d.ts | 2 + packages/core/shared/express.js | 1 + packages/core/shared/fs-extra.d.ts | 1 + packages/core/shared/fs-extra.js | 1 + packages/core/shared/fuzzy.d.ts | 1 + packages/core/shared/fuzzy.js | 1 + packages/core/shared/index.js | 111 +++++++++++ packages/core/shared/inversify.d.ts | 1 + packages/core/shared/inversify.js | 1 + packages/core/shared/lodash.debounce.d.ts | 2 + packages/core/shared/lodash.debounce.js | 1 + packages/core/shared/lodash.throttle.d.ts | 2 + packages/core/shared/lodash.throttle.js | 1 + packages/core/shared/nsfw.d.ts | 2 + packages/core/shared/nsfw.js | 1 + packages/core/shared/react-dom.d.ts | 1 + packages/core/shared/react-dom.js | 1 + packages/core/shared/react-virtualized.d.ts | 1 + packages/core/shared/react-virtualized.js | 1 + packages/core/shared/react.d.ts | 2 + packages/core/shared/react.js | 1 + .../vscode-languageserver-protocol.d.ts | 1 + .../shared/vscode-languageserver-protocol.js | 1 + .../shared/vscode-languageserver-types.d.ts | 1 + .../shared/vscode-languageserver-types.js | 1 + packages/core/shared/vscode-uri.d.ts | 1 + packages/core/shared/vscode-uri.js | 1 + packages/core/shared/vscode-ws-jsonrpc.d.ts | 1 + packages/core/shared/vscode-ws-jsonrpc.js | 1 + packages/core/shared/ws.d.ts | 2 + packages/core/shared/ws.js | 1 + packages/core/shared/yargs.d.ts | 2 + packages/core/shared/yargs.js | 1 + .../core/src/browser/encoding-registry.ts | 2 +- .../browser-keyboard-layout-provider.spec.ts | 2 +- .../browser-keyboard-layout-provider.ts | 4 +- .../keyboard/keyboard-layout-service.ts | 2 +- .../preferences/preference-provider.ts | 2 +- .../src/browser/progress-status-bar-item.ts | 2 +- packages/core/src/browser/test/jsdom.ts | 1 + .../keyboard/keyboard-layout-provider.ts | 2 +- .../messaging/connection-error-handler.ts | 2 +- packages/core/src/common/messaging/handler.ts | 2 +- .../src/common/messaging/proxy-factory.ts | 2 +- packages/core/src/common/test/expect.ts | 1 + .../electron-clipboard-service.ts | 1 + ...lectron-keyboard-layout-change-notifier.ts | 2 +- .../menu/electron-context-menu-renderer.ts | 2 +- .../menu/electron-main-menu-factory.ts | 2 +- .../menu/electron-menu-contribution.ts | 2 +- .../electron-ipc-connection-provider.ts | 2 +- .../token/electron-token-frontend-module.ts | 2 +- .../window/electron-window-service.ts | 2 +- .../electron-main-application.ts | 4 +- .../electron-main-window-service-impl.ts | 2 +- .../electron-main/electron-native-keymap.ts | 4 +- .../electron-security-token-service.ts | 2 +- .../electron-messaging-contribution.ts | 4 +- .../electron-keyboard-layout-provider.ts | 2 +- .../core/src/node/messaging/ipc-bootstrap.ts | 2 +- .../node/messaging/ipc-connection-provider.ts | 2 +- .../core/src/node/messaging/ipc-protocol.ts | 2 +- packages/core/src/node/messaging/logger.ts | 2 +- .../node/messaging/messaging-contribution.ts | 2 +- .../src/node/messaging/messaging-service.ts | 2 +- packages/debug/compile.tsconfig.json | 3 - packages/debug/package.json | 1 - .../browser/breakpoint/breakpoint-manager.ts | 2 +- .../browser/breakpoint/breakpoint-marker.ts | 2 +- .../console/debug-console-contribution.tsx | 4 +- .../browser/console/debug-console-items.tsx | 2 +- .../browser/console/debug-console-session.ts | 4 +- .../browser/debug-configuration-manager.ts | 2 +- ...debug-frontend-application-contribution.ts | 18 +- .../src/browser/debug-frontend-module.ts | 2 +- .../src/browser/debug-keybinding-contexts.ts | 2 +- .../debug/src/browser/debug-preferences.ts | 2 +- .../src/browser/debug-prefix-configuration.ts | 2 +- packages/debug/src/browser/debug-resource.ts | 2 +- .../debug/src/browser/debug-schema-updater.ts | 2 +- .../src/browser/debug-session-connection.ts | 2 +- .../src/browser/debug-session-contribution.ts | 4 +- .../src/browser/debug-session-manager.ts | 2 +- packages/debug/src/browser/debug-session.tsx | 2 +- .../src/browser/debug-tab-bar-decorator.ts | 2 +- .../debug/src/browser/debug-watch-manager.ts | 2 +- .../editor/debug-breakpoint-widget.tsx | 6 +- .../src/browser/editor/debug-editor-model.ts | 2 +- .../browser/editor/debug-editor-service.ts | 2 +- .../browser/editor/debug-exception-widget.tsx | 6 +- .../editor/debug-expression-provider.ts | 2 +- .../src/browser/editor/debug-hover-source.tsx | 4 +- .../src/browser/editor/debug-hover-widget.ts | 8 +- .../editor/debug-inline-value-decorator.ts | 2 +- .../src/browser/model/debug-breakpoint.tsx | 2 +- .../model/debug-function-breakpoint.tsx | 2 +- .../browser/model/debug-source-breakpoint.tsx | 2 +- .../debug/src/browser/model/debug-source.ts | 2 +- .../src/browser/model/debug-stack-frame.tsx | 2 +- .../debug/src/browser/model/debug-thread.tsx | 2 +- .../browser/preferences/launch-preferences.ts | 2 +- .../debug/src/browser/view/debug-action.tsx | 2 +- .../browser/view/debug-breakpoints-source.tsx | 2 +- .../browser/view/debug-breakpoints-widget.ts | 2 +- .../view/debug-configuration-widget.tsx | 4 +- .../view/debug-exception-breakpoint.tsx | 2 +- .../src/browser/view/debug-session-widget.ts | 2 +- .../view/debug-stack-frames-source.tsx | 4 +- .../browser/view/debug-stack-frames-widget.ts | 2 +- .../src/browser/view/debug-threads-source.tsx | 2 +- .../src/browser/view/debug-threads-widget.ts | 2 +- .../src/browser/view/debug-toolbar-widget.tsx | 4 +- .../browser/view/debug-variables-source.ts | 2 +- .../browser/view/debug-variables-widget.ts | 2 +- .../src/browser/view/debug-view-model.ts | 2 +- .../browser/view/debug-watch-expression.tsx | 2 +- .../src/browser/view/debug-watch-source.ts | 2 +- .../src/browser/view/debug-watch-widget.ts | 2 +- .../debug/src/browser/view/debug-widget.ts | 2 +- .../debug-adapter-contribution-registry.ts | 2 +- .../debug/src/node/debug-adapter-factory.ts | 4 +- .../src/node/debug-adapter-session-manager.ts | 4 +- .../debug/src/node/debug-adapter-session.ts | 2 +- .../debug/src/node/debug-backend-module.ts | 2 +- packages/debug/src/node/debug-service-impl.ts | 2 +- .../vscode-debug-adapter-contribution.ts | 6 +- .../browser/editor-preview-factory.spec.ts | 2 +- .../src/browser/editor-preview-factory.ts | 4 +- .../browser/editor-preview-frontend-module.ts | 2 +- .../browser/editor-preview-manager.spec.ts | 2 +- .../src/browser/editor-preview-manager.ts | 2 +- .../src/browser/editor-preview-preferences.ts | 2 +- .../src/browser/editor-preview-widget.ts | 4 +- .../browser/decorations/editor-decorator.ts | 2 +- packages/editor/src/browser/editor-command.ts | 2 +- .../editor/src/browser/editor-contribution.ts | 2 +- .../src/browser/editor-frontend-module.ts | 2 +- .../src/browser/editor-keybinding-contexts.ts | 2 +- .../editor/src/browser/editor-keybinding.ts | 2 +- packages/editor/src/browser/editor-manager.ts | 2 +- packages/editor/src/browser/editor-menu.ts | 2 +- .../browser/editor-navigation-contribution.ts | 2 +- .../editor/src/browser/editor-preferences.ts | 2 +- .../src/browser/editor-quick-open-service.ts | 2 +- .../browser/editor-variable-contribution.ts | 2 +- .../src/browser/editor-widget-factory.ts | 2 +- packages/editor/src/browser/editor.ts | 4 +- .../navigation-location-service.spec.ts | 2 +- .../navigation/navigation-location-service.ts | 2 +- .../navigation-location-similarity.ts | 2 +- .../navigation/navigation-location-updater.ts | 2 +- .../external-terminal-contribution.ts | 2 +- .../external-terminal-frontend-module.ts | 2 +- .../external-terminal-preference.ts | 2 +- .../external-terminal-backend-module.ts | 2 +- .../linux-external-terminal-service.ts | 4 +- .../mac-external-terminal-service.ts | 2 +- .../windows-external-terminal-service.ts | 2 +- packages/file-search/package.json | 1 - .../browser/file-search-frontend-module.ts | 2 +- .../browser/quick-file-open-contribution.ts | 2 +- .../src/browser/quick-file-open.ts | 4 +- .../src/node/file-search-backend-module.ts | 2 +- .../src/node/file-search-service-impl.spec.ts | 2 +- .../src/node/file-search-service-impl.ts | 4 +- packages/filesystem/compile.tsconfig.json | 3 - packages/filesystem/package.json | 1 - .../file-download-command-contribution.ts | 4 +- .../download/file-download-frontend-module.ts | 2 +- .../browser/download/file-download-service.ts | 2 +- .../file-dialog/file-dialog-container.ts | 2 +- .../browser/file-dialog/file-dialog-model.ts | 2 +- .../browser/file-dialog/file-dialog-module.ts | 2 +- .../file-dialog/file-dialog-service.ts | 2 +- .../file-dialog-tree-filters-renderer.tsx | 2 +- .../browser/file-dialog/file-dialog-tree.ts | 2 +- .../browser/file-dialog/file-dialog-widget.ts | 2 +- .../src/browser/file-dialog/file-dialog.ts | 6 +- .../filesystem/src/browser/file-resource.ts | 2 +- .../filesystem/src/browser/file-service.ts | 4 +- .../browser/file-tree/file-tree-container.ts | 2 +- .../file-tree/file-tree-label-provider.ts | 2 +- .../src/browser/file-tree/file-tree-model.ts | 2 +- .../browser/file-tree/file-tree-widget.tsx | 4 +- .../src/browser/file-tree/file-tree.ts | 2 +- .../src/browser/file-upload-service.ts | 4 +- .../filesystem-frontend-contribution.ts | 4 +- .../src/browser/filesystem-frontend-module.ts | 4 +- .../src/browser/filesystem-preferences.ts | 4 +- .../filesystem-watcher-error-handler.ts | 4 +- .../src/browser/filesystem-watcher.ts | 2 +- .../browser/location/location-renderer.tsx | 4 +- .../remote-file-service-contribution.ts | 2 +- .../common/delegating-file-system-provider.ts | 2 +- packages/filesystem/src/common/files.ts | 2 +- .../src/common/filesystem-watcher-protocol.ts | 2 +- packages/filesystem/src/common/filesystem.ts | 2 +- .../src/common/remote-file-system-provider.ts | 4 +- .../electron-file-dialog-module.ts | 2 +- .../electron-file-dialog-service.ts | 4 +- .../src/node/disk-file-system-provider.ts | 4 +- .../node/download/directory-archiver.spec.ts | 2 +- .../src/node/download/directory-archiver.ts | 4 +- .../download/file-download-backend-module.ts | 2 +- .../src/node/download/file-download-cache.ts | 2 +- .../node/download/file-download-endpoint.ts | 4 +- .../node/download/file-download-handler.ts | 6 +- .../src/node/filesystem-backend-module.ts | 2 +- .../src/node/filesystem-watcher-client.ts | 2 +- .../src/node/filesystem-watcher-dispatcher.ts | 2 +- .../src/node/node-file-upload-service.ts | 4 +- .../filesystem/src/node/node-file-upload.ts | 2 +- .../filesystem/src/node/nsfw-watcher/index.ts | 2 +- .../nsfw-watcher/nsfw-filesystem-service.ts | 2 +- .../nsfw-filesystem-watcher.spec.ts | 2 +- .../nsfw-watcher/nsfw-filesystem-watcher.ts | 4 +- .../src/node/nsfw-watcher/nsfw-options.ts | 2 +- .../browser/getting-started-contribution.ts | 2 +- .../getting-started-frontend-module.ts | 2 +- .../src/browser/getting-started-widget.tsx | 4 +- .../src/browser/blame/blame-contribution.ts | 4 +- .../git/src/browser/blame/blame-decorator.ts | 2 +- .../git/src/browser/blame/blame-manager.ts | 2 +- .../git/src/browser/blame/blame-module.ts | 2 +- .../src/browser/diff/git-diff-contribution.ts | 4 +- .../browser/diff/git-diff-frontend-module.ts | 4 +- .../browser/diff/git-diff-header-widget.tsx | 4 +- .../src/browser/diff/git-diff-tree-model.tsx | 2 +- .../git/src/browser/diff/git-diff-widget.tsx | 2 +- .../diff/git-opener-in-primary-area.ts | 2 +- .../dirty-diff/dirty-diff-contribution.ts | 2 +- .../browser/dirty-diff/dirty-diff-manager.ts | 4 +- .../browser/dirty-diff/dirty-diff-module.ts | 2 +- .../browser/git-commit-message-validator.ts | 2 +- packages/git/src/browser/git-contribution.ts | 4 +- packages/git/src/browser/git-decorator.ts | 2 +- packages/git/src/browser/git-error-handler.ts | 2 +- .../git/src/browser/git-frontend-module.ts | 2 +- packages/git/src/browser/git-preferences.ts | 2 +- .../git/src/browser/git-quick-open-service.ts | 2 +- .../browser/git-repository-provider.spec.ts | 2 +- .../src/browser/git-repository-provider.ts | 4 +- .../git/src/browser/git-repository-tracker.ts | 4 +- .../git/src/browser/git-resource-resolver.ts | 2 +- packages/git/src/browser/git-scm-provider.ts | 2 +- packages/git/src/browser/git-sync-service.ts | 2 +- .../src/browser/git-uri-label-contribution.ts | 2 +- .../git-commit-detail-header-widget.tsx | 4 +- .../history/git-commit-detail-open-handler.ts | 2 +- .../history/git-commit-detail-widget.tsx | 4 +- .../history/git-history-frontend-module.ts | 2 +- .../browser/history/git-history-support.ts | 2 +- .../history/git-opener-in-secondary-area.ts | 4 +- .../src/browser/prompt/git-prompt-module.ts | 2 +- packages/git/src/common/git-prompt.ts | 2 +- packages/git/src/common/git-watcher.ts | 2 +- .../prompt/electron-git-prompt-module.ts | 2 +- .../prompt/git-quick-open-prompt.ts | 2 +- .../git/src/electron-node/askpass/askpass.ts | 2 +- .../env/electron-git-env-module.ts | 2 +- .../env/electron-git-env-provider.ts | 2 +- packages/git/src/node/dugite-git-prompt.ts | 2 +- .../src/node/dugite-git-watcher.slow-spec.ts | 2 +- packages/git/src/node/dugite-git-watcher.ts | 2 +- packages/git/src/node/dugite-git.spec.ts | 2 +- packages/git/src/node/dugite-git.ts | 4 +- packages/git/src/node/env/git-env-module.ts | 2 +- packages/git/src/node/env/git-env-provider.ts | 2 +- packages/git/src/node/git-backend-module.ts | 2 +- packages/git/src/node/git-exec-provider.ts | 2 +- .../node/git-locator/git-locator-client.ts | 2 +- .../src/node/git-locator/git-locator-impl.ts | 2 +- .../git/src/node/git-repository-manager.ts | 2 +- .../git/src/node/git-repository-watcher.ts | 2 +- packages/git/src/node/init/git-init.ts | 4 +- packages/git/src/node/test/binding-helper.ts | 2 +- .../node/test/no-sync-repository-manager.ts | 2 +- packages/keymaps/package.json | 4 +- .../src/browser/keybindings-widget.tsx | 8 +- .../browser/keymaps-frontend-contribution.ts | 2 +- .../src/browser/keymaps-frontend-module.ts | 2 +- .../keymaps/src/browser/keymaps-service.ts | 2 +- .../markers/src/browser/marker-manager.ts | 2 +- .../marker-tree-label-provider.spec.ts | 4 +- .../src/browser/marker-tree-label-provider.ts | 2 +- .../markers/src/browser/marker-tree-model.ts | 2 +- packages/markers/src/browser/marker-tree.ts | 2 +- .../src/browser/problem/problem-container.ts | 2 +- .../browser/problem/problem-contribution.ts | 4 +- .../src/browser/problem/problem-decorator.ts | 4 +- .../problem/problem-frontend-module.ts | 2 +- .../problem/problem-layout-migrations.ts | 2 +- .../browser/problem/problem-manager.spec.ts | 4 +- .../src/browser/problem/problem-manager.ts | 4 +- .../browser/problem/problem-preferences.ts | 2 +- .../problem/problem-tabbar-decorator.ts | 6 +- .../problem/problem-tree-model.spec.ts | 4 +- .../src/browser/problem/problem-tree-model.ts | 4 +- .../src/browser/problem/problem-utils.ts | 2 +- .../problem-widget-tab-bar-decorator.ts | 2 +- .../src/browser/problem/problem-widget.tsx | 6 +- packages/markers/src/common/problem-marker.ts | 2 +- packages/messages/package.json | 1 - .../src/browser/messages-frontend-module.ts | 2 +- .../browser/notification-center-component.tsx | 2 +- .../src/browser/notification-component.tsx | 2 +- .../browser/notification-content-renderer.ts | 2 +- .../src/browser/notification-preferences.ts | 2 +- .../browser/notification-toasts-component.tsx | 2 +- .../src/browser/notifications-contribution.ts | 2 +- .../src/browser/notifications-manager.ts | 4 +- .../src/browser/notifications-renderer.tsx | 6 +- packages/metrics/compile.tsconfig.json | 3 - packages/metrics/package.json | 1 - .../node/extensions-metrics-contribution.ts | 4 +- ...etrics-backend-application-contribution.ts | 4 +- .../src/node/metrics-backend-module.ts | 2 +- .../src/node/node-metrics-contribution.ts | 2 +- .../mini-browser-environment-module.ts | 2 +- .../environment/mini-browser-environment.ts | 2 +- .../src/browser/location-mapper-service.ts | 2 +- .../src/browser/mini-browser-content.ts | 6 +- .../browser/mini-browser-frontend-module.ts | 2 +- .../src/browser/mini-browser-open-handler.ts | 4 +- .../mini-browser/src/browser/mini-browser.ts | 4 +- ...lectron-mini-browser-environment-module.ts | 2 +- .../electron-mini-browser-environment.ts | 4 +- ...mini-browser-electron-main-contribution.ts | 42 ++++ .../src/node/mini-browser-backend-module.ts | 2 +- .../src/node/mini-browser-endpoint.ts | 8 +- .../src/node/mini-browser-ws-validator.ts | 2 +- .../src/browser/monaco-browser-module.ts | 2 +- .../src/browser/monaco-bulk-edit-service.ts | 2 +- .../src/browser/monaco-color-registry.ts | 2 +- .../src/browser/monaco-command-registry.ts | 2 +- .../src/browser/monaco-command-service.ts | 2 +- packages/monaco/src/browser/monaco-command.ts | 4 +- .../src/browser/monaco-context-key-service.ts | 2 +- .../monaco/src/browser/monaco-context-menu.ts | 6 +- .../browser/monaco-diagnostic-collection.ts | 2 +- .../browser/monaco-diff-navigator-factory.ts | 2 +- .../monaco/src/browser/monaco-editor-model.ts | 6 +- .../src/browser/monaco-editor-provider.ts | 4 +- .../src/browser/monaco-editor-service.ts | 2 +- packages/monaco/src/browser/monaco-editor.ts | 6 +- .../browser/monaco-formatting-conflicts.ts | 2 +- ...onaco-frontend-application-contribution.ts | 2 +- .../src/browser/monaco-frontend-module.ts | 2 +- .../src/browser/monaco-keybinding-contexts.ts | 2 +- .../monaco/src/browser/monaco-keybinding.ts | 2 +- .../monaco/src/browser/monaco-languages.ts | 8 +- packages/monaco/src/browser/monaco-menu.ts | 2 +- .../monaco/src/browser/monaco-mime-service.ts | 4 +- .../browser/monaco-outline-contribution.ts | 4 +- .../src/browser/monaco-outline-decorator.ts | 2 +- .../src/browser/monaco-quick-open-service.ts | 2 +- .../monaco-snippet-suggest-provider.ts | 2 +- .../browser/monaco-status-bar-contribution.ts | 2 +- .../src/browser/monaco-text-model-service.ts | 2 +- .../src/browser/monaco-theming-service.ts | 2 +- .../browser/monaco-to-protocol-converter.ts | 4 +- .../monaco/src/browser/monaco-workspace.ts | 4 +- .../browser/protocol-to-monaco-converter.ts | 4 +- .../monaco-textmate-frontend-bindings.ts | 2 +- .../textmate/monaco-textmate-service.ts | 2 +- .../browser/textmate/monaco-theme-registry.ts | 2 +- .../src/browser/textmate/textmate-registry.ts | 2 +- .../src/browser/workspace-symbol-command.ts | 8 +- .../monaco-electron-module.ts | 2 +- packages/navigator/package.json | 1 - .../src/browser/navigator-container.ts | 2 +- .../browser/navigator-context-key-service.ts | 2 +- .../src/browser/navigator-contribution.ts | 2 +- .../browser/navigator-decorator-service.ts | 2 +- .../src/browser/navigator-diff.spec.ts | 2 +- .../navigator/src/browser/navigator-diff.ts | 2 +- .../navigator/src/browser/navigator-filter.ts | 2 +- .../src/browser/navigator-frontend-module.ts | 2 +- .../browser/navigator-keybinding-context.ts | 2 +- .../browser/navigator-layout-migrations.ts | 2 +- .../navigator/src/browser/navigator-model.ts | 2 +- .../src/browser/navigator-preferences.ts | 2 +- .../browser/navigator-tab-bar-decorator.ts | 2 +- .../navigator/src/browser/navigator-tree.ts | 2 +- .../src/browser/navigator-widget-factory.ts | 2 +- .../src/browser/navigator-widget.tsx | 6 +- .../src/browser/outline-decorator-service.ts | 2 +- .../src/browser/outline-view-contribution.ts | 2 +- .../browser/outline-view-frontend-module.ts | 2 +- .../src/browser/outline-view-service.ts | 4 +- .../src/browser/outline-view-tree.ts | 2 +- .../src/browser/outline-view-widget.tsx | 6 +- .../output/src/browser/output-context-menu.ts | 2 +- .../output/src/browser/output-contribution.ts | 2 +- .../src/browser/output-editor-factory.ts | 2 +- .../browser/output-editor-model-factory.ts | 2 +- .../src/browser/output-frontend-module.ts | 2 +- .../browser/output-toolbar-contribution.tsx | 4 +- packages/output/src/browser/output-widget.ts | 6 +- packages/output/src/common/output-channel.ts | 2 +- .../output/src/common/output-preferences.ts | 2 +- .../src/browser/hosted-plugin-controller.ts | 6 +- .../hosted-plugin-frontend-contribution.ts | 2 +- .../src/browser/hosted-plugin-informer.ts | 2 +- .../src/browser/hosted-plugin-log-viewer.ts | 2 +- .../browser/hosted-plugin-manager-client.ts | 2 +- .../src/browser/hosted-plugin-preferences.ts | 2 +- .../src/browser/plugin-dev-frontend-module.ts | 2 +- .../plugin-dev-electron-backend-module.ts | 2 +- .../src/node/hosted-instance-manager.ts | 2 +- .../src/node/hosted-plugin-reader.ts | 2 +- .../src/node/hosted-plugin-service.ts | 2 +- .../src/node/hosted-plugins-manager.ts | 2 +- .../src/node/plugin-dev-backend-module.ts | 2 +- .../plugin-ext-vscode/compile.tsconfig.json | 9 + packages/plugin-ext-vscode/package.json | 3 + .../plugin-vscode-commands-contribution.ts | 4 +- .../src/browser/plugin-vscode-contribution.ts | 2 +- .../browser/plugin-vscode-frontend-module.ts | 2 +- .../src/common/plugin-vscode-environment.ts | 2 +- .../src/node/plugin-vscode-backend-module.ts | 2 +- .../node/plugin-vscode-cli-contribution.ts | 4 +- .../plugin-vscode-deployer-participant.ts | 2 +- .../node/plugin-vscode-directory-handler.ts | 2 +- .../src/node/plugin-vscode-file-handler.ts | 4 +- .../src/node/scanner-vscode.ts | 2 +- packages/plugin-ext/compile.tsconfig.json | 3 + packages/plugin-ext/package.json | 1 + packages/plugin-ext/src/common/connection.ts | 4 +- .../src/common/plugin-api-rpc-model.ts | 2 +- .../plugin-ext/src/common/plugin-api-rpc.ts | 2 +- .../src/common/plugin-ext-api-contribution.ts | 2 +- .../src/common/plugin-message-reader.ts | 41 +++- .../src/common/plugin-message-writer.ts | 35 +++- .../plugin-ext/src/common/rpc-protocol.ts | 4 +- .../hosted/browser/hosted-plugin-watcher.ts | 2 +- .../src/hosted/browser/hosted-plugin.ts | 8 +- ...ugin-ext-hosted-electron-backend-module.ts | 2 +- .../node-electron/scanner-theia-electron.ts | 2 +- .../node/hosted-plugin-cli-contribution.ts | 4 +- .../node/hosted-plugin-deployer-handler.ts | 4 +- .../src/hosted/node/hosted-plugin-process.ts | 2 +- .../src/hosted/node/hosted-plugin.ts | 2 +- .../src/hosted/node/metadata-scanner.ts | 2 +- .../node/plugin-ext-hosted-backend-module.ts | 2 +- .../src/hosted/node/plugin-manifest-loader.ts | 2 +- .../src/hosted/node/plugin-reader.ts | 4 +- .../src/hosted/node/plugin-service.ts | 2 +- .../node/scanners/file-plugin-uri-factory.ts | 2 +- .../hosted/node/scanners/grammars-reader.ts | 2 +- .../src/hosted/node/scanners/scanner-theia.ts | 2 +- .../src/main/browser/authentication-main.ts | 16 +- .../callhierarchy-type-converters.ts | 6 +- .../src/main/browser/clipboard-main.ts | 2 +- .../src/main/browser/command-registry-main.ts | 2 +- .../plugin-ext/src/main/browser/commands.ts | 2 +- .../comments/comment-thread-widget.tsx | 6 +- .../comments/comments-context-key-service.ts | 2 +- .../browser/comments/comments-contribution.ts | 78 ++++---- .../browser/comments/comments-decorator.ts | 6 +- .../main/browser/comments/comments-main.ts | 36 ++-- .../main/browser/comments/comments-service.ts | 4 +- .../custom-editor-contribution.ts | 2 +- .../custom-editors/custom-editor-opener.tsx | 2 +- .../custom-editors/custom-editor-service.ts | 2 +- .../custom-editor-widget-factory.ts | 2 +- .../custom-editors/custom-editor-widget.ts | 2 +- .../custom-editors/custom-editors-main.ts | 4 +- .../plugin-custom-editor-registry.ts | 2 +- .../custom-editors/undo-redo-service.ts | 2 +- .../src/main/browser/debug/debug-main.ts | 4 +- .../browser/debug/plugin-debug-service.ts | 2 +- ...gin-debug-session-contribution-registry.ts | 2 +- .../debug/plugin-debug-session-factory.ts | 2 +- .../browser/decorations/decorations-main.ts | 2 +- .../src/main/browser/dialogs-main.ts | 2 +- .../browser/dialogs/modal-notification.ts | 4 +- .../src/main/browser/documents-main.ts | 16 +- .../main/browser/editor/untitled-resource.ts | 4 +- .../browser/editors-and-documents-main.ts | 2 +- .../plugin-ext/src/main/browser/env-main.ts | 2 +- .../src/main/browser/file-system-main-impl.ts | 4 +- .../keybindings-contribution-handler.ts | 2 +- .../src/main/browser/label-service-main.ts | 2 +- .../src/main/browser/languages-main.ts | 6 +- .../src/main/browser/main-context.ts | 2 +- .../browser/main-file-system-event-service.ts | 2 +- .../menus/menus-contribution-handler.ts | 4 +- .../src/main/browser/message-registry-main.ts | 2 +- .../src/main/browser/notification-main.ts | 2 +- .../browser/output-channel-registry-main.ts | 2 +- .../browser/plugin-contribution-handler.ts | 2 +- .../main/browser/plugin-ext-deploy-command.ts | 2 +- .../browser/plugin-ext-frontend-module.ts | 2 +- .../src/main/browser/plugin-ext-widget.tsx | 6 +- .../browser/plugin-frontend-contribution.ts | 2 +- .../plugin-frontend-view-contribution.ts | 2 +- .../main/browser/plugin-icon-theme-service.ts | 4 +- .../src/main/browser/plugin-shared-style.ts | 2 +- .../src/main/browser/plugin-storage.ts | 2 +- .../src/main/browser/plugin-worker.ts | 2 +- .../main/browser/preference-registry-main.ts | 2 +- .../src/main/browser/quick-open-main.ts | 4 +- .../plugin-ext/src/main/browser/scm-main.ts | 18 +- .../browser/selection-provider-command.ts | 2 +- .../status-bar-message-registry-main.ts | 4 +- .../plugin-ext/src/main/browser/tasks-main.ts | 2 +- .../src/main/browser/terminal-main.ts | 2 +- .../main/browser/text-editor-model-service.ts | 2 +- .../src/main/browser/text-editors-main.ts | 2 +- .../src/main/browser/timeline-main.ts | 4 +- .../src/main/browser/view-column-service.ts | 6 +- .../plugin-tree-view-node-label-provider.ts | 2 +- .../main/browser/view/plugin-view-registry.ts | 2 +- .../main/browser/view/plugin-view-widget.ts | 6 +- .../main/browser/view/tree-view-widget.tsx | 6 +- .../src/main/browser/view/tree-views-main.ts | 2 +- .../browser/view/view-context-key-service.ts | 2 +- .../browser/webview/webview-environment.ts | 4 +- .../browser/webview/webview-preferences.ts | 2 +- .../browser/webview/webview-resource-cache.ts | 2 +- .../webview/webview-theme-data-provider.ts | 2 +- .../browser/webview/webview-widget-factory.ts | 2 +- .../src/main/browser/webview/webview.ts | 4 +- .../src/main/browser/webviews-main.ts | 8 +- .../src/main/browser/window-state-main.ts | 4 +- .../src/main/browser/workspace-main.ts | 4 +- .../main/common/plugin-theia-environment.ts | 2 +- .../plugin-ext-frontend-electron-module.ts | 2 +- .../electron-webview-widget-factory.ts | 2 +- .../plugin-theia-directory-handler.ts | 2 +- .../handlers/plugin-theia-file-handler.ts | 4 +- .../main/node/paths/plugin-paths-service.ts | 6 +- .../src/main/node/plugin-cli-contribution.ts | 4 +- .../main/node/plugin-deployer-contribution.ts | 2 +- .../src/main/node/plugin-deployer-impl.ts | 2 +- .../node/plugin-deployer-proxy-entry-impl.ts | 2 +- .../main/node/plugin-ext-backend-module.ts | 2 +- .../src/main/node/plugin-github-resolver.ts | 2 +- .../src/main/node/plugin-http-resolver.ts | 2 +- .../src/main/node/plugin-server-handler.ts | 2 +- .../src/main/node/plugin-service.ts | 6 +- .../node/plugin-theia-deployer-participant.ts | 2 +- .../main/node/plugins-key-value-storage.ts | 4 +- ...ocal-directory-plugin-deployer-resolver.ts | 4 +- .../local-file-plugin-deployer-resolver.ts | 2 +- .../local-plugin-deployer-resolver.ts | 4 +- .../src/plugin-ext-backend-electron-module.ts | 2 +- .../src/plugin-ext-backend-module.ts | 2 +- packages/plugin-ext/src/plugin/comments.ts | 2 +- .../plugin-ext/src/plugin/custom-editors.ts | 2 +- packages/plugin-ext/src/plugin/decorations.ts | 6 +- packages/plugin-ext/src/plugin/dialogs.ts | 2 +- .../plugin-ext/src/plugin/document-data.ts | 2 +- packages/plugin-ext/src/plugin/documents.ts | 14 +- .../src/plugin/editors-and-documents.ts | 2 +- .../file-system-event-service-ext-impl.ts | 2 +- .../src/plugin/file-system-ext-impl.ts | 2 +- .../src/plugin/known-commands.spec.ts | 2 +- .../plugin-ext/src/plugin/known-commands.ts | 4 +- packages/plugin-ext/src/plugin/languages.ts | 14 +- .../src/plugin/languages/call-hierarchy.ts | 2 +- .../src/plugin/languages/code-action.ts | 2 +- .../plugin-ext/src/plugin/languages/color.ts | 2 +- .../src/plugin/languages/completion.ts | 2 +- .../src/plugin/languages/declaration.ts | 2 +- .../src/plugin/languages/definition.ts | 2 +- .../src/plugin/languages/diagnostics.ts | 2 +- .../plugin/languages/document-formatting.ts | 2 +- .../plugin/languages/document-highlight.ts | 2 +- .../src/plugin/languages/folding.ts | 2 +- .../plugin-ext/src/plugin/languages/hover.ts | 2 +- .../src/plugin/languages/implementation.ts | 2 +- .../plugin-ext/src/plugin/languages/lens.ts | 2 +- .../src/plugin/languages/link-provider.ts | 2 +- .../plugin/languages/on-type-formatting.ts | 2 +- .../src/plugin/languages/outline.ts | 2 +- .../src/plugin/languages/range-formatting.ts | 2 +- .../src/plugin/languages/reference.ts | 2 +- .../plugin-ext/src/plugin/languages/rename.ts | 2 +- .../src/plugin/languages/selection-range.ts | 2 +- .../plugin/languages/semantic-highlighting.ts | 2 +- .../src/plugin/languages/signature.ts | 2 +- .../src/plugin/languages/type-definition.ts | 2 +- .../src/plugin/languages/workspace-symbol.ts | 2 +- .../plugin-ext/src/plugin/node/debug/debug.ts | 2 +- .../debug/plugin-debug-adapter-session.ts | 2 +- .../plugin-ext/src/plugin/plugin-context.ts | 2 +- .../plugin-ext/src/plugin/plugin-icon-path.ts | 2 +- .../plugin/preferences/configuration.spec.ts | 2 +- .../src/plugin/preferences/configuration.ts | 2 +- packages/plugin-ext/src/plugin/quick-open.ts | 2 +- packages/plugin-ext/src/plugin/scm.ts | 32 +-- .../src/plugin/status-bar/status-bar-item.ts | 2 +- .../plugin-ext/src/plugin/terminal-ext.ts | 2 +- packages/plugin-ext/src/plugin/timeline.ts | 2 +- .../plugin-ext/src/plugin/type-converters.ts | 10 +- packages/plugin-ext/src/plugin/types-impl.ts | 4 +- packages/plugin-ext/src/plugin/webviews.ts | 2 +- .../plugin-ext/src/plugin/window-state.ts | 2 +- packages/plugin-ext/src/plugin/workspace.ts | 2 +- packages/plugin-metrics/package.json | 3 +- .../src/browser/plugin-metrics-creator.ts | 2 +- .../browser/plugin-metrics-frontend-module.ts | 2 +- .../browser/plugin-metrics-languages-main.ts | 6 +- .../browser/plugin-metrics-output-registry.ts | 2 +- .../src/browser/plugin-metrics-resolver.ts | 2 +- .../plugin-metrics-time-count.ts | 2 +- .../metric-output/plugin-metrics-time-sum.ts | 2 +- .../src/node/metric-string-generator.ts | 2 +- .../src/node/metrics-contributor.spec.ts | 2 +- .../src/node/metrics-contributor.ts | 2 +- .../src/node/plugin-metrics-backend-module.ts | 2 +- .../src/node/plugin-metrics-impl.ts | 2 +- .../plugin-metrics/src/node/plugin-metrics.ts | 2 +- .../abstract-resource-preference-provider.ts | 5 +- .../src/browser/folder-preference-provider.ts | 2 +- .../browser/folders-preferences-provider.ts | 2 +- .../src/browser/preference-bindings.ts | 2 +- .../src/browser/preference-frontend-module.ts | 2 +- .../src/browser/preference-tree-model.ts | 4 +- .../src/browser/preferences-contribution.ts | 2 +- .../browser/preferences-decorator-service.ts | 2 +- .../src/browser/preferences-decorator.ts | 2 +- .../preferences-json-schema-contribution.ts | 2 +- .../browser/section-preference-provider.ts | 2 +- .../user-configs-preference-provider.ts | 2 +- .../src/browser/user-preference-provider.ts | 2 +- .../util/preference-scope-command-manager.ts | 2 +- .../util/preference-tree-generator.spec.ts | 2 +- .../browser/util/preference-tree-generator.ts | 4 +- .../components/preference-array-input.tsx | 2 +- .../components/preference-boolean-input.tsx | 2 +- .../components/preference-json-input.tsx | 2 +- .../components/preference-number-input.tsx | 2 +- .../components/preference-select-input.tsx | 2 +- .../components/preference-string-input.tsx | 2 +- .../single-preference-display-factory.tsx | 4 +- .../components/single-preference-wrapper.tsx | 2 +- .../views/preference-editor-widget.tsx | 8 +- .../views/preference-scope-tabbar-widget.tsx | 4 +- .../views/preference-searchbar-widget.tsx | 6 +- .../browser/views/preference-tree-widget.tsx | 4 +- .../views/preference-widget-bindings.ts | 2 +- .../src/browser/views/preference-widget.tsx | 4 +- .../workspace-file-preference-provider.ts | 2 +- .../browser/workspace-preference-provider.ts | 2 +- .../markdown/markdown-preview-handler.ts | 2 +- .../src/browser/preview-contribution.ts | 8 +- .../src/browser/preview-frontend-module.ts | 2 +- .../preview/src/browser/preview-handler.ts | 2 +- .../src/browser/preview-link-normalizer.ts | 2 +- .../src/browser/preview-preferences.ts | 2 +- .../preview/src/browser/preview-widget.ts | 6 +- .../src/common/process-common-module.ts | 2 +- .../src/common/shell-command-builder.ts | 2 +- .../process/src/node/multi-ring-buffer.ts | 2 +- .../src/node/process-backend-module.ts | 2 +- packages/process/src/node/process-manager.ts | 2 +- packages/process/src/node/process.ts | 2 +- packages/process/src/node/raw-process.ts | 2 +- packages/process/src/node/terminal-process.ts | 2 +- .../src/node/test/process-test-container.ts | 2 +- .../empty-property-view-widget-provider.tsx | 4 +- .../src/browser/property-view-contribution.ts | 2 +- .../browser/property-view-frontend-module.ts | 2 +- .../src/browser/property-view-service.ts | 2 +- .../browser/property-view-widget-provider.ts | 2 +- .../src/browser/property-view-widget.tsx | 4 +- .../resource-property-data-service.ts | 2 +- .../resource-property-view-label-provider.ts | 2 +- .../resource-property-view-tree-container.ts | 2 +- .../resource-property-view-tree-widget.tsx | 4 +- .../resource-property-view-widget-provider.ts | 2 +- .../history/scm-history-contribution.ts | 2 +- .../history/scm-history-frontend-module.ts | 2 +- .../browser/history/scm-history-widget.tsx | 8 +- .../src/browser/scm-extra-frontend-module.ts | 2 +- .../browser/scm-extra-layout-migrations.ts | 2 +- .../browser/scm-file-change-label-provider.ts | 2 +- .../src/browser/scm-navigable-list-widget.tsx | 8 +- .../decorations/scm-decorations-service.ts | 2 +- .../decorations/scm-navigator-decorator.ts | 2 +- .../decorations/scm-tab-bar-decorator.ts | 2 +- .../dirty-diff/dirty-diff-decorator.ts | 2 +- .../browser/dirty-diff/dirty-diff-module.ts | 2 +- .../scm/src/browser/scm-amend-component.tsx | 2 +- packages/scm/src/browser/scm-amend-widget.tsx | 4 +- .../scm/src/browser/scm-avatar-service.ts | 2 +- .../scm/src/browser/scm-commit-widget.tsx | 6 +- .../src/browser/scm-context-key-service.ts | 2 +- packages/scm/src/browser/scm-contribution.ts | 6 +- .../scm/src/browser/scm-frontend-module.ts | 2 +- .../scm/src/browser/scm-groups-tree-model.ts | 2 +- packages/scm/src/browser/scm-input.ts | 2 +- .../scm/src/browser/scm-layout-migrations.ts | 2 +- .../src/browser/scm-no-repository-widget.tsx | 4 +- packages/scm/src/browser/scm-preferences.ts | 3 +- .../scm/src/browser/scm-quick-open-service.ts | 2 +- packages/scm/src/browser/scm-service.ts | 2 +- .../src/browser/scm-tree-label-provider.ts | 2 +- packages/scm/src/browser/scm-tree-model.ts | 20 +- packages/scm/src/browser/scm-tree-widget.tsx | 4 +- packages/scm/src/browser/scm-widget.tsx | 4 +- .../src/browser/in-memory-text-resource.ts | 2 +- ...search-in-workspace-context-key-service.ts | 2 +- ...arch-in-workspace-frontend-contribution.ts | 4 +- .../search-in-workspace-frontend-module.ts | 2 +- .../search-in-workspace-label-provider.ts | 2 +- .../search-in-workspace-preferences.ts | 2 +- ...search-in-workspace-result-tree-widget.tsx | 6 +- .../browser/search-in-workspace-service.ts | 2 +- .../browser/search-in-workspace-widget.tsx | 6 +- ...ep-search-in-workspace-server.slow-spec.ts | 2 +- .../ripgrep-search-in-workspace-server.ts | 2 +- .../search-in-workspace-backend-module.ts | 2 +- packages/task/compile.tsconfig.json | 3 + packages/task/package.json | 1 + .../process/process-task-contribution.ts | 2 +- .../process/process-task-frontend-module.ts | 2 +- .../browser/process/process-task-resolver.ts | 2 +- .../provided-task-configurations.spec.ts | 2 +- .../browser/provided-task-configurations.ts | 2 +- packages/task/src/browser/quick-open-task.ts | 2 +- .../src/browser/task-configuration-manager.ts | 2 +- .../task/src/browser/task-configurations.ts | 2 +- .../task/src/browser/task-contribution.ts | 2 +- .../src/browser/task-definition-registry.ts | 2 +- .../src/browser/task-frontend-contribution.ts | 2 +- .../task/src/browser/task-frontend-module.ts | 2 +- .../task/src/browser/task-name-resolver.ts | 2 +- packages/task/src/browser/task-preferences.ts | 2 +- .../browser/task-problem-matcher-registry.ts | 2 +- .../browser/task-problem-pattern-registry.ts | 2 +- .../task/src/browser/task-schema-updater.ts | 2 +- packages/task/src/browser/task-service.ts | 14 +- .../task/src/browser/task-source-resolver.ts | 2 +- packages/task/src/browser/task-templates.ts | 2 +- .../browser/task-terminal-widget-manager.ts | 2 +- .../src/common/problem-matcher-protocol.ts | 4 +- .../task/src/common/task-common-module.ts | 2 +- packages/task/src/common/task-watcher.ts | 2 +- .../process-task-runner-backend-module.ts | 2 +- .../process-task-runner-contribution.ts | 2 +- .../src/node/process/process-task-runner.ts | 2 +- .../task/src/node/process/process-task.ts | 2 +- .../src/node/task-abstract-line-matcher.ts | 4 +- .../task-backend-application-contribution.ts | 2 +- packages/task/src/node/task-backend-module.ts | 2 +- packages/task/src/node/task-manager.ts | 2 +- .../src/node/task-problem-collector.spec.ts | 2 +- packages/task/src/node/task-runner.ts | 2 +- packages/task/src/node/task-server.ts | 2 +- packages/task/src/node/task.ts | 2 +- .../task/src/node/test/task-test-container.ts | 4 +- .../search/terminal-search-container.ts | 2 +- .../browser/search/terminal-search-widget.tsx | 4 +- .../terminal-copy-on-selection-handler.ts | 2 +- .../browser/terminal-frontend-contribution.ts | 2 +- .../src/browser/terminal-frontend-module.ts | 2 +- .../browser/terminal-keybinding-contexts.ts | 2 +- .../src/browser/terminal-linkmatcher-diff.ts | 2 +- .../src/browser/terminal-linkmatcher-files.ts | 2 +- .../src/browser/terminal-linkmatcher.ts | 2 +- .../src/browser/terminal-preferences.ts | 2 +- .../browser/terminal-quick-open-service.ts | 2 +- .../src/browser/terminal-theme-service.ts | 2 +- .../src/browser/terminal-widget-impl.ts | 4 +- .../src/common/terminal-common-module.ts | 2 +- .../terminal/src/common/terminal-watcher.ts | 2 +- .../terminal/src/node/base-terminal-server.ts | 2 +- packages/terminal/src/node/shell-process.ts | 2 +- .../src/node/shell-terminal-server.ts | 2 +- .../src/node/terminal-backend-contribution.ts | 2 +- .../src/node/terminal-backend-module.ts | 2 +- packages/terminal/src/node/terminal-server.ts | 2 +- .../src/node/test/terminal-test-container.ts | 4 +- .../browser/timeline-context-key-service.ts | 2 +- .../src/browser/timeline-contribution.ts | 12 +- .../src/browser/timeline-empty-widget.tsx | 4 +- .../src/browser/timeline-frontend-module.ts | 2 +- .../timeline/src/browser/timeline-service.ts | 4 +- .../src/browser/timeline-tree-model.ts | 18 +- .../src/browser/timeline-tree-widget.tsx | 4 +- .../timeline/src/browser/timeline-widget.tsx | 8 +- .../timeline/src/common/timeline-model.ts | 2 +- .../tree/typehierarchy-tree-container.ts | 2 +- .../browser/tree/typehierarchy-tree-model.ts | 2 +- .../tree/typehierarchy-tree-widget.tsx | 8 +- .../src/browser/tree/typehierarchy-tree.ts | 2 +- .../src/browser/typehierarchy-contribution.ts | 2 +- .../browser/typehierarchy-frontend-module.ts | 2 +- .../src/browser/typehierarchy-provider.ts | 7 +- .../src/browser/user-storage-contribution.ts | 2 +- .../browser/user-storage-frontend-module.ts | 2 +- .../browser/common-variable-contribution.ts | 2 +- .../browser/variable-quick-open-service.ts | 2 +- ...ble-resolver-frontend-contribution.spec.ts | 2 +- ...variable-resolver-frontend-contribution.ts | 2 +- .../variable-resolver-frontend-module.ts | 2 +- .../browser/variable-resolver-service.spec.ts | 2 +- .../src/browser/variable-resolver-service.ts | 4 +- .../src/browser/variable.spec.ts | 2 +- .../variable-resolver/src/browser/variable.ts | 2 +- packages/vsx-registry/compile.tsconfig.json | 6 + packages/vsx-registry/package.json | 3 +- .../vsx-api-version-provider-frontend-impl.ts | 2 +- .../browser/vsx-extension-editor-manager.ts | 2 +- .../src/browser/vsx-extension-editor.tsx | 4 +- .../src/browser/vsx-extension.tsx | 4 +- .../browser/vsx-extensions-contribution.ts | 2 +- .../src/browser/vsx-extensions-model.ts | 2 +- .../src/browser/vsx-extensions-search-bar.tsx | 4 +- .../browser/vsx-extensions-search-model.ts | 2 +- .../src/browser/vsx-extensions-source.ts | 2 +- .../browser/vsx-extensions-view-container.ts | 2 +- .../src/browser/vsx-extensions-widget.ts | 3 +- .../browser/vsx-registry-frontend-module.ts | 2 +- .../src/common/vsx-environment.tsx | 2 +- .../src/common/vsx-registry-api.spec.ts | 2 +- .../src/common/vsx-registry-api.ts | 2 +- .../vsx-api-version-provider-backend-impl.ts | 2 +- .../src/node/vsx-extension-resolver.ts | 4 +- .../src/node/vsx-registry-backend-module.ts | 2 +- .../workspace/src/browser/diff-service.ts | 2 +- .../src/browser/quick-open-workspace.ts | 2 +- .../src/browser/workspace-commands.ts | 2 +- .../src/browser/workspace-compare-handler.ts | 2 +- .../src/browser/workspace-delete-handler.ts | 2 +- .../browser/workspace-duplicate-handler.ts | 2 +- .../workspace-frontend-contribution.ts | 2 +- .../src/browser/workspace-frontend-module.ts | 2 +- .../src/browser/workspace-input-dialog.ts | 2 +- .../src/browser/workspace-preferences.ts | 2 +- .../src/browser/workspace-schema-updater.ts | 2 +- .../src/browser/workspace-service.ts | 2 +- .../src/browser/workspace-storage-service.ts | 2 +- .../workspace-uri-contribution.spec.ts | 4 +- .../src/browser/workspace-uri-contribution.ts | 2 +- .../workspace/src/browser/workspace-utils.ts | 2 +- .../workspace-variable-contribution.ts | 2 +- .../src/common/test/mock-workspace-server.ts | 2 +- .../src/node/default-workspace-server.ts | 6 +- .../src/node/workspace-backend-module.ts | 2 +- tsconfig.json | 3 + yarn.lock | 102 ++++++++-- 932 files changed, 2302 insertions(+), 1278 deletions(-) create mode 100644 dev-packages/electron/index.d.ts create mode 100644 dev-packages/electron/index.js create mode 100644 dev-packages/electron/native-keymap.d.ts create mode 100644 dev-packages/electron/native-keymap.js create mode 100644 dev-packages/eslint-plugin/index.js create mode 100644 dev-packages/eslint-plugin/package.json create mode 100644 dev-packages/eslint-plugin/rules/shared-dependencies.js create mode 100644 packages/core/README.in.md create mode 100644 packages/core/scripts/generate-shared.js create mode 100644 packages/core/shared/@phosphor/algorithm.d.ts create mode 100644 packages/core/shared/@phosphor/algorithm.js create mode 100644 packages/core/shared/@phosphor/commands.d.ts create mode 100644 packages/core/shared/@phosphor/commands.js create mode 100644 packages/core/shared/@phosphor/coreutils.d.ts create mode 100644 packages/core/shared/@phosphor/coreutils.js create mode 100644 packages/core/shared/@phosphor/domutils.d.ts create mode 100644 packages/core/shared/@phosphor/domutils.js create mode 100644 packages/core/shared/@phosphor/dragdrop.d.ts create mode 100644 packages/core/shared/@phosphor/dragdrop.js create mode 100644 packages/core/shared/@phosphor/messaging.d.ts create mode 100644 packages/core/shared/@phosphor/messaging.js create mode 100644 packages/core/shared/@phosphor/properties.d.ts create mode 100644 packages/core/shared/@phosphor/properties.js create mode 100644 packages/core/shared/@phosphor/signaling.d.ts create mode 100644 packages/core/shared/@phosphor/signaling.js create mode 100644 packages/core/shared/@phosphor/virtualdom.d.ts create mode 100644 packages/core/shared/@phosphor/virtualdom.js create mode 100644 packages/core/shared/@phosphor/widgets.d.ts create mode 100644 packages/core/shared/@phosphor/widgets.js create mode 100644 packages/core/shared/@theia/application-package/index.d.ts create mode 100644 packages/core/shared/@theia/application-package/index.js create mode 100644 packages/core/shared/electron.d.ts create mode 100644 packages/core/shared/electron.js create mode 100644 packages/core/shared/express.d.ts create mode 100644 packages/core/shared/express.js create mode 100644 packages/core/shared/fs-extra.d.ts create mode 100644 packages/core/shared/fs-extra.js create mode 100644 packages/core/shared/fuzzy.d.ts create mode 100644 packages/core/shared/fuzzy.js create mode 100644 packages/core/shared/index.js create mode 100644 packages/core/shared/inversify.d.ts create mode 100644 packages/core/shared/inversify.js create mode 100644 packages/core/shared/lodash.debounce.d.ts create mode 100644 packages/core/shared/lodash.debounce.js create mode 100644 packages/core/shared/lodash.throttle.d.ts create mode 100644 packages/core/shared/lodash.throttle.js create mode 100644 packages/core/shared/nsfw.d.ts create mode 100644 packages/core/shared/nsfw.js create mode 100644 packages/core/shared/react-dom.d.ts create mode 100644 packages/core/shared/react-dom.js create mode 100644 packages/core/shared/react-virtualized.d.ts create mode 100644 packages/core/shared/react-virtualized.js create mode 100644 packages/core/shared/react.d.ts create mode 100644 packages/core/shared/react.js create mode 100644 packages/core/shared/vscode-languageserver-protocol.d.ts create mode 100644 packages/core/shared/vscode-languageserver-protocol.js create mode 100644 packages/core/shared/vscode-languageserver-types.d.ts create mode 100644 packages/core/shared/vscode-languageserver-types.js create mode 100644 packages/core/shared/vscode-uri.d.ts create mode 100644 packages/core/shared/vscode-uri.js create mode 100644 packages/core/shared/vscode-ws-jsonrpc.d.ts create mode 100644 packages/core/shared/vscode-ws-jsonrpc.js create mode 100644 packages/core/shared/ws.d.ts create mode 100644 packages/core/shared/ws.js create mode 100644 packages/core/shared/yargs.d.ts create mode 100644 packages/core/shared/yargs.js create mode 100644 packages/mini-browser/src/electron-main/mini-browser-electron-main-contribution.ts diff --git a/configs/base.eslintrc.json b/configs/base.eslintrc.json index e44619dcfceb0..d0473556c05af 100644 --- a/configs/base.eslintrc.json +++ b/configs/base.eslintrc.json @@ -8,6 +8,7 @@ } }, "plugins": [ + "@theia", "@typescript-eslint", "@typescript-eslint/tslint", "import", diff --git a/configs/errors.eslintrc.json b/configs/errors.eslintrc.json index d4f9aa91da6e7..ddfa278fbe2b5 100644 --- a/configs/errors.eslintrc.json +++ b/configs/errors.eslintrc.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/eslintrc", "rules": { "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/indent": "off", @@ -34,7 +35,6 @@ "guard-for-in": "error", "id-blacklist": "off", "id-match": "off", - "import/no-extraneous-dependencies": "off", "max-len": [ "error", { @@ -129,6 +129,20 @@ ] } } - ] - } + ], + "@theia/shared-dependencies": "error", + "import/no-extraneous-dependencies": "error" + }, + "overrides": [ + { + "files": [ + "dev-packages", + "*.{spec,espec,slow-spec}.{js,ts}" + ], + "rules": { + "@theia/shared-dependencies": "off", + "import/no-extraneous-dependencies": "off" + } + } + ] } diff --git a/dev-packages/application-manager/package.json b/dev-packages/application-manager/package.json index b89559812aad0..7a79c5d6e5d98 100644 --- a/dev-packages/application-manager/package.json +++ b/dev-packages/application-manager/package.json @@ -53,7 +53,8 @@ "url-loader": "^1.1.2", "webpack": "^4.0.0", "webpack-cli": "2.0.12", - "worker-loader": "^1.1.1" + "worker-loader": "^1.1.1", + "yargs": "^15.3.1" }, "devDependencies": { "@theia/ext-scripts": "1.12.0" diff --git a/dev-packages/application-manager/src/expose-loader.ts b/dev-packages/application-manager/src/expose-loader.ts index e7e40472b6214..9cb6cdcd39378 100644 --- a/dev-packages/application-manager/src/expose-loader.ts +++ b/dev-packages/application-manager/src/expose-loader.ts @@ -16,8 +16,8 @@ import * as path from 'path'; import * as webpack from 'webpack'; -// tslint:disable:no-implicit-dependencies -import { RawSourceMap } from 'source-map'; +// eslint-disable-next-line import/no-extraneous-dependencies +import type { RawSourceMap } from 'source-map'; import { ApplicationPackage } from '@theia/application-package/lib/application-package'; const modulePackages: { dir: string, name?: string }[] = []; diff --git a/dev-packages/electron/README.md b/dev-packages/electron/README.md index 683b845ee86ea..1547b251ff747 100644 --- a/dev-packages/electron/README.md +++ b/dev-packages/electron/README.md @@ -29,6 +29,11 @@ The post-install scripts can be skipped by setting an environment variable: - Windows (cmd): `set THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1` - Windows (ps): `$env:THEIA_ELECTRON_SKIP_REPLACE_FFMPEG=1` +## Re-exports + +- `electron` through `@theia/electron` +- `native-keymap` through `@theia/electron/native-keymap` + ## Additional Information - [Theia - GitHub](https://github.com/eclipse-theia/theia) diff --git a/dev-packages/electron/index.d.ts b/dev-packages/electron/index.d.ts new file mode 100644 index 0000000000000..64410bb94a236 --- /dev/null +++ b/dev-packages/electron/index.d.ts @@ -0,0 +1,2 @@ +import Electron = require('electron'); +export = Electron; diff --git a/dev-packages/electron/index.js b/dev-packages/electron/index.js new file mode 100644 index 0000000000000..c430318bd47ee --- /dev/null +++ b/dev-packages/electron/index.js @@ -0,0 +1 @@ +module.exports = require('electron'); diff --git a/dev-packages/electron/native-keymap.d.ts b/dev-packages/electron/native-keymap.d.ts new file mode 100644 index 0000000000000..7881cf50e8918 --- /dev/null +++ b/dev-packages/electron/native-keymap.d.ts @@ -0,0 +1 @@ +export * from 'native-keymap' diff --git a/dev-packages/electron/native-keymap.js b/dev-packages/electron/native-keymap.js new file mode 100644 index 0000000000000..a7745c62077ab --- /dev/null +++ b/dev-packages/electron/native-keymap.js @@ -0,0 +1 @@ +module.exports = require('native-keymap'); diff --git a/dev-packages/eslint-plugin/index.js b/dev-packages/eslint-plugin/index.js new file mode 100644 index 0000000000000..e62d4cfe583ca --- /dev/null +++ b/dev-packages/eslint-plugin/index.js @@ -0,0 +1,21 @@ +// @ts-check +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +/** @type {{[ruleId: string]: import('eslint').Rule.RuleModule}} */ +exports.rules = { + "shared-dependencies": require('./rules/shared-dependencies'), +}; diff --git a/dev-packages/eslint-plugin/package.json b/dev-packages/eslint-plugin/package.json new file mode 100644 index 0000000000000..a4ad233d639c9 --- /dev/null +++ b/dev-packages/eslint-plugin/package.json @@ -0,0 +1,9 @@ +{ + "private": true, + "name": "@theia/eslint-plugin", + "version": "1.11.0", + "description": "Custom ESLint rules for developing Theia extensions and applications", + "dependencies": { + "@theia/core": "1.11.0" + } +} diff --git a/dev-packages/eslint-plugin/rules/shared-dependencies.js b/dev-packages/eslint-plugin/rules/shared-dependencies.js new file mode 100644 index 0000000000000..c1c7e702d1387 --- /dev/null +++ b/dev-packages/eslint-plugin/rules/shared-dependencies.js @@ -0,0 +1,171 @@ +// @ts-check +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +const fs = require('fs'); +const path = require('path'); + +const { + theiaCoreSharedPrefix, + isSharedModule, + getTheiaCoreSharedModule, +} = require('@theia/core/shared'); + +/** @type {import('eslint').Rule.RuleModule} */ +module.exports = { + meta: { + type: "problem", + fixable: 'code', + docs: { + description: 'Errors when a dependency shared by @theia/core is used implicitly, or when a package depends on a shared dependency instead of reusing it from @theia/core/shared. This rule only affects files from packages that depend on @theia/core.', + recommended: true, + }, + }, + create(context) { + const filename = context.getFilename(); + const packageJson = findPackageJson(filename); + if (packageJson && dependsOnTheiaCore(packageJson)) { + // Only show an error regarding the package.json file if this is the first + // time we detect the error, else it will error for every file of the package: + if (firstTime(packageJson.__filename)) { + const sharedModules = getSharedModuleDependencies(packageJson); + if (sharedModules.length > 0) { + context.report({ + loc: { line: 0, column: 0 }, + message: `"${packageJson.__filename}" depends on some @theia/core shared dependencies: [${sharedModules}]`, + }); + } + } + /** + * @param {import('estree').Literal} node + */ + function checkModuleImport(node) { + const module = /** @type {string} */(node.value); + if (isSharedModule(module)) { + context.report({ + node, + message: `"${module}" is a @theia/core shared dependency, please use "${theiaCoreSharedPrefix}${module}" instead.`, + fix(fixer) { + if (node.range) { + const [start, end] = node.range; + // Make sure to insert text between the first quote of the string and the rest: + return fixer.insertTextBeforeRange([start + 1, end], theiaCoreSharedPrefix); + } + } + }); + } else { + const shared = getTheiaCoreSharedModule(module); + if (shared && !isSharedModule(shared)) { + context.report({ + node, + message: `"${shared}" is not part of @theia/core shared dependencies.` + }); + } + } + } + return { + ImportDeclaration(node) { + checkModuleImport(node.source); + }, + TSExternalModuleReference(node) { + checkModuleImport(node.expression); + }, + }; + } + return {}; + }, +}; + +/** @type {Set} */ +const firstTimeCache = new Set(); +/** + * @param {string} key + * @returns {boolean} true if first time seeing `key` else false. + */ +function firstTime(key) { + if (firstTimeCache.has(key)) { + return false; + } else { + firstTimeCache.add(key); + return true; + } +} + +/** + * @typedef FoundPackageJson + * @property {string} __filename + * @property {{[package: string]: string}} [dependencies] + */ + +/** + * Keep a shortcut to a given package.json file based on previous crawls. + * @type {Map} + */ +const findPackageJsonCache = new Map(); +/** + * @param {string} from file path to start searching from + * @returns {FoundPackageJson | undefined} + */ +function findPackageJson(from) { + from = path.resolve(from); + let current = fs.statSync(from).isDirectory() ? from : path.dirname(from); + // Keep track of all paths tried before eventually finding a package.json file + const tried = [current]; + while (!isRoot(path.parse(from))) { + const cached = findPackageJsonCache.get(current); + if (cached) { + return cached; + } + const packageJsonPath = path.resolve(current, 'package.json'); + if (fs.existsSync(packageJsonPath)) { + const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' })); + for (const dir of tried) { + findPackageJsonCache.set(dir, packageJson); + } + packageJson['__filename'] = packageJsonPath; + return packageJson; + } + current = path.dirname(current); + tried.push(current); + } +} + +/** + * @param {path.ParsedPath} parsed + * @returns {boolean} + */ +function isRoot(parsed) { + return parsed.base === '' && parsed.dir === parsed.root; +} + +/** + * @param {object} packageJson + * @returns {boolean} + */ +function dependsOnTheiaCore(packageJson) { + return typeof packageJson.dependencies === 'object' + && '@theia/core' in packageJson.dependencies; +} + +/** + * @param {object} packageJson + * @return {string[]} + */ +function getSharedModuleDependencies(packageJson) { + return typeof packageJson.dependencies === 'object' + ? Object.keys(packageJson.dependencies).filter(dependency => isSharedModule(dependency)) + : []; +} diff --git a/examples/api-samples/compile.tsconfig.json b/examples/api-samples/compile.tsconfig.json index f82db1c097e92..8c8d2a2b5febe 100644 --- a/examples/api-samples/compile.tsconfig.json +++ b/examples/api-samples/compile.tsconfig.json @@ -17,6 +17,12 @@ }, { "path": "../../packages/vsx-registry/compile.tsconfig.json" + }, + { + "path": "../../packages/filesystem/compile.tsconfig.json" + }, + { + "path": "../../packages/workspace/compile.tsconfig.json" } ] } diff --git a/examples/api-samples/package.json b/examples/api-samples/package.json index 0a35a5bc910e2..5bad2a92d564f 100644 --- a/examples/api-samples/package.json +++ b/examples/api-samples/package.json @@ -5,7 +5,9 @@ "description": "Theia - Example code to demonstrate Theia API", "dependencies": { "@theia/core": "1.12.0", + "@theia/filesystem": "1.12.0", "@theia/output": "1.12.0", + "@theia/workspace": "1.12.0", "@theia/vsx-registry": "1.12.0" }, "theiaExtensions": [ diff --git a/examples/api-samples/src/browser/api-samples-frontend-module.ts b/examples/api-samples/src/browser/api-samples-frontend-module.ts index 887fa64b99270..d06b8fb0ea21e 100644 --- a/examples/api-samples/src/browser/api-samples-frontend-module.ts +++ b/examples/api-samples/src/browser/api-samples-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindDynamicLabelProvider } from './label/sample-dynamic-label-provider-command-contribution'; import { bindSampleUnclosableView } from './view/sample-unclosable-view-contribution'; import { bindSampleOutputChannelWithSeverity } from './output/sample-output-channel-with-severity'; diff --git a/examples/api-samples/src/browser/file-watching/sample-file-watching-contribution.ts b/examples/api-samples/src/browser/file-watching/sample-file-watching-contribution.ts index 3a12e7f6b4a97..0a6b66dd31907 100644 --- a/examples/api-samples/src/browser/file-watching/sample-file-watching-contribution.ts +++ b/examples/api-samples/src/browser/file-watching/sample-file-watching-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { postConstruct, injectable, inject, interfaces } from 'inversify'; +import { postConstruct, injectable, inject, interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, FrontendApplicationContribution, LabelProvider, PreferenceContribution, PreferenceProxy, PreferenceSchema, PreferenceService diff --git a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-command-contribution.ts b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-command-contribution.ts index ed941899eb03d..d00011441a746 100644 --- a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-command-contribution.ts +++ b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-command-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, interfaces } from 'inversify'; +import { injectable, inject, interfaces } from '@theia/core/shared/inversify'; import { Command, CommandContribution, CommandRegistry, CommandHandler } from '@theia/core'; import { FrontendApplicationContribution, LabelProviderContribution } from '@theia/core/lib/browser'; import { SampleDynamicLabelProviderContribution } from './sample-dynamic-label-provider-contribution'; @@ -59,4 +59,3 @@ export const bindDynamicLabelProvider = (bind: interfaces.Bind) => { bind(LabelProviderContribution).toService(SampleDynamicLabelProviderContribution); bind(CommandContribution).to(SampleDynamicLabelProviderCommandContribution).inSingletonScope(); }; - diff --git a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts index 887f8b8b7a1c1..de3a3f507c137 100644 --- a/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts +++ b/examples/api-samples/src/browser/label/sample-dynamic-label-provider-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { DefaultUriLabelProviderContribution, DidChangeLabelEvent } from '@theia/core/lib/browser/label-provider'; import URI from '@theia/core/lib/common/uri'; import { Emitter, Event } from '@theia/core'; diff --git a/examples/api-samples/src/browser/menu/sample-browser-menu-module.ts b/examples/api-samples/src/browser/menu/sample-browser-menu-module.ts index dd908ac816061..22f77c0f0c9ed 100644 --- a/examples/api-samples/src/browser/menu/sample-browser-menu-module.ts +++ b/examples/api-samples/src/browser/menu/sample-browser-menu-module.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, ContainerModule } from 'inversify'; -import { Menu as MenuWidget } from '@phosphor/widgets'; +import { injectable, ContainerModule } from '@theia/core/shared/inversify'; +import { Menu as MenuWidget } from '@theia/core/shared/@phosphor/widgets'; import { Disposable } from '@theia/core/lib/common/disposable'; import { MenuNode, CompositeMenuNode } from '@theia/core/lib/common/menu'; import { BrowserMainMenuFactory, MenuCommandRegistry, DynamicMenuWidget } from '@theia/core/lib/browser/menu/browser-menu-plugin'; diff --git a/examples/api-samples/src/browser/menu/sample-menu-contribution.ts b/examples/api-samples/src/browser/menu/sample-menu-contribution.ts index 4479fce7eb790..1c5ff84c22b5f 100644 --- a/examples/api-samples/src/browser/menu/sample-menu-contribution.ts +++ b/examples/api-samples/src/browser/menu/sample-menu-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Command, CommandContribution, CommandRegistry, MAIN_MENU_BAR, MenuContribution, MenuModelRegistry, MenuNode, SubMenuOptions } from '@theia/core/lib/common'; -import { injectable, interfaces } from 'inversify'; +import { injectable, interfaces } from '@theia/core/shared/inversify'; const SampleCommand: Command = { id: 'sample-command', diff --git a/examples/api-samples/src/browser/output/sample-output-channel-with-severity.ts b/examples/api-samples/src/browser/output/sample-output-channel-with-severity.ts index 26e23d1dd2445..94a7ef5d592e6 100644 --- a/examples/api-samples/src/browser/output/sample-output-channel-with-severity.ts +++ b/examples/api-samples/src/browser/output/sample-output-channel-with-severity.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { FrontendApplicationContribution } from '@theia/core/lib/browser'; -import { inject, injectable, interfaces } from 'inversify'; +import { inject, injectable, interfaces } from '@theia/core/shared/inversify'; import { OutputChannelManager, OutputChannelSeverity } from '@theia/output/lib/common/output-channel'; @injectable() diff --git a/examples/api-samples/src/browser/view/sample-unclosable-view-contribution.ts b/examples/api-samples/src/browser/view/sample-unclosable-view-contribution.ts index 4220487a59693..e5604eff16568 100644 --- a/examples/api-samples/src/browser/view/sample-unclosable-view-contribution.ts +++ b/examples/api-samples/src/browser/view/sample-unclosable-view-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, interfaces } from 'inversify'; +import { inject, injectable, interfaces } from '@theia/core/shared/inversify'; import { AbstractViewContribution, bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { Command, CommandRegistry, MessageService } from '@theia/core/lib/common'; diff --git a/examples/api-samples/src/browser/view/sample-unclosable-view.tsx b/examples/api-samples/src/browser/view/sample-unclosable-view.tsx index eb90c18c15180..1dceae779e703 100644 --- a/examples/api-samples/src/browser/view/sample-unclosable-view.tsx +++ b/examples/api-samples/src/browser/view/sample-unclosable-view.tsx @@ -15,8 +15,8 @@ ********************************************************************************/ import { ReactWidget } from '@theia/core/lib/browser'; -import { injectable, postConstruct } from 'inversify'; -import * as React from 'react'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; /** * This sample view is used to demo the behavior of "Widget.title.closable". diff --git a/examples/api-samples/src/browser/vsx/sample-vsx-command-contribution.ts b/examples/api-samples/src/browser/vsx/sample-vsx-command-contribution.ts index 843679255a3d6..38eb69eef3497 100644 --- a/examples/api-samples/src/browser/vsx/sample-vsx-command-contribution.ts +++ b/examples/api-samples/src/browser/vsx/sample-vsx-command-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, interfaces } from 'inversify'; +import { inject, injectable, interfaces } from '@theia/core/shared/inversify'; import { VSXEnvironment } from '@theia/vsx-registry/lib/common/vsx-environment'; import { Command, CommandContribution, CommandRegistry, MessageService } from '@theia/core/lib/common'; diff --git a/examples/api-samples/src/electron-browser/menu/sample-electron-menu-module.ts b/examples/api-samples/src/electron-browser/menu/sample-electron-menu-module.ts index b0ea990b64ec3..286a21484e134 100644 --- a/examples/api-samples/src/electron-browser/menu/sample-electron-menu-module.ts +++ b/examples/api-samples/src/electron-browser/menu/sample-electron-menu-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, ContainerModule } from 'inversify'; +import { injectable, ContainerModule } from '@theia/core/shared/inversify'; import { CompositeMenuNode } from '@theia/core/lib/common/menu'; import { ElectronMainMenuFactory, ElectronMenuOptions } from '@theia/core/lib/electron-browser/menu/electron-main-menu-factory'; import { PlaceholderMenuNode } from '../../browser/menu/sample-menu-contribution'; diff --git a/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-contribution.ts b/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-contribution.ts index c129c2133f4d0..9c9bff21aa780 100644 --- a/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-contribution.ts +++ b/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-contribution.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { remote, Menu, BrowserWindow } from 'electron'; -import { inject, injectable, postConstruct } from 'inversify'; +import { remote, Menu, BrowserWindow } from '@theia/core/shared/electron'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { isOSX } from '@theia/core/lib/common/os'; import { CommonMenus } from '@theia/core/lib/browser'; import { diff --git a/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-module.ts b/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-module.ts index 1120bd75bd3fa..47c503929534a 100644 --- a/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-module.ts +++ b/examples/api-samples/src/electron-browser/updater/sample-updater-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; import { SampleUpdater, SampleUpdaterPath, SampleUpdaterClient } from '../../common/updater/sample-updater'; diff --git a/examples/api-samples/src/electron-main/update/sample-updater-impl.ts b/examples/api-samples/src/electron-main/update/sample-updater-impl.ts index 369eea8e7e724..86f0889818fb7 100644 --- a/examples/api-samples/src/electron-main/update/sample-updater-impl.ts +++ b/examples/api-samples/src/electron-main/update/sample-updater-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ElectronMainApplication, ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; import { SampleUpdater, SampleUpdaterClient, UpdateStatus } from '../../common/updater/sample-updater'; diff --git a/examples/api-samples/src/electron-main/update/sample-updater-main-module.ts b/examples/api-samples/src/electron-main/update/sample-updater-main-module.ts index a5dcd13bbefcc..2be7b6323cd43 100644 --- a/examples/api-samples/src/electron-main/update/sample-updater-main-module.ts +++ b/examples/api-samples/src/electron-main/update/sample-updater-main-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory'; import { ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; import { ElectronConnectionHandler } from '@theia/core/lib/electron-common/messaging/electron-connection-handler'; diff --git a/package.json b/package.json index 13d4a13126c70..8ebecb2ab76ff 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "scripts": { "preinstall": "node-gyp install", "postinstall": "node scripts/post-install.js", - "prepare": "yarn prepare:references && yarn prepare:build && yarn prepare:hoisting && yarn download:plugins", + "prepare": "yarn prepare:references && yarn --cwd packages/core prepare && yarn prepare:build && yarn prepare:hoisting && yarn download:plugins", "prepare:references": "node scripts/compile-references.js", "prepare:build": "yarn build && run lint && run build \"@theia/example-*\" --stream --parallel", "prepare:hoisting": "theia check:hoisted -s", diff --git a/packages/bulk-edit/src/browser/bulk-edit-contribution.ts b/packages/bulk-edit/src/browser/bulk-edit-contribution.ts index 6df71716c3b16..b73e128e46bb9 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-contribution.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Widget } from '@theia/core/lib/browser/widgets/widget'; import { CommandRegistry } from '@theia/core/lib/common'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-frontend-module.ts b/packages/bulk-edit/src/browser/bulk-edit-frontend-module.ts index 6e6ce2364e9d3..b84537d330806 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-frontend-module.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-frontend-module.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { WidgetFactory } from '@theia/core/lib/browser/widget-manager'; import { BulkEditTreeWidget, BULK_EDIT_TREE_WIDGET_ID, createBulkEditTreeWidget, InMemoryTextResourceResolver } from './bulk-edit-tree'; import { FrontendApplicationContribution, LabelProviderContribution } from '@theia/core/lib/browser'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree-label-provider.ts b/packages/bulk-edit/src/browser/bulk-edit-tree-label-provider.ts index 30ce206136384..0d0ce62bba9e1 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree-label-provider.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProvider, LabelProviderContribution, DidChangeLabelEvent } from '@theia/core/lib/browser/label-provider'; import { BulkEditInfoNode } from './bulk-edit-tree'; import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-container.ts b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-container.ts index de824ea96b642..224ddb89404d3 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-container.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { BulkEditTreeWidget } from './bulk-edit-tree-widget'; import { BulkEditTree } from './bulk-edit-tree'; import { BulkEditTreeModel } from './bulk-edit-tree-model'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-model.ts b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-model.ts index 2571de1079460..0e05119b6f8a8 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-model.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { BulkEditNode, BulkEditTree } from './bulk-edit-tree'; import { TreeModelImpl, OpenerService, open, TreeNode } from '@theia/core/lib/browser'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-widget.tsx b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-widget.tsx index 323300d69acd1..7d0bf88ea4b44 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-widget.tsx +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree-widget.tsx @@ -14,12 +14,12 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { TreeWidget, TreeProps, ContextMenuRenderer, TreeNode, TreeModel, CompositeTreeNode, NodeProps } from '@theia/core/lib/browser'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { BulkEditInfoNode, BulkEditNode } from './bulk-edit-tree'; import { BulkEditTreeModel } from './bulk-edit-tree-model'; import { FileResourceResolver } from '@theia/filesystem/lib/browser'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.spec.ts b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.spec.ts index 71992038463cd..2a07d8c0801f8 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.spec.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.spec.ts @@ -26,7 +26,7 @@ FrontendApplicationConfigProvider.set({ ...ApplicationProps.DEFAULT.frontend.config }); -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { BulkEditInfoNode, BulkEditTree } from './bulk-edit-tree'; global.monaco = sinon.stub() as unknown as typeof monaco; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.ts b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.ts index 7c94a7dbc60ed..e9ac1eb00e84e 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/bulk-edit-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { TreeNode, CompositeTreeNode, SelectableTreeNode, ExpandableTreeNode, TreeImpl } from '@theia/core/lib/browser'; import { UriSelection } from '@theia/core/lib/common/selection'; import { BulkEditNodeSelection } from './bulk-edit-node-selection'; diff --git a/packages/bulk-edit/src/browser/bulk-edit-tree/in-memory-text-resource.ts b/packages/bulk-edit/src/browser/bulk-edit-tree/in-memory-text-resource.ts index 26821ac5114bd..c5012d9c68093 100644 --- a/packages/bulk-edit/src/browser/bulk-edit-tree/in-memory-text-resource.ts +++ b/packages/bulk-edit/src/browser/bulk-edit-tree/in-memory-text-resource.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Resource, ResourceResolver } from '@theia/core/lib/common'; import { MaybePromise } from '@theia/core'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-contribution.ts b/packages/callhierarchy/src/browser/callhierarchy-contribution.ts index 66e6eace8adac..4e7cdcdecef30 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-contribution.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MenuModelRegistry, Command, CommandRegistry } from '@theia/core/lib/common'; import { AbstractViewContribution, OpenViewArguments, KeybindingRegistry } from '@theia/core/lib/browser'; import { EDITOR_CONTEXT_MENU } from '@theia/editor/lib/browser'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-frontend-module.ts b/packages/callhierarchy/src/browser/callhierarchy-frontend-module.ts index c5c6c376b5d05..4be9415268b59 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-frontend-module.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-frontend-module.ts @@ -22,7 +22,7 @@ import { CALLHIERARCHY_ID } from './callhierarchy'; import { createHierarchyTreeWidget } from './callhierarchy-tree'; import { CurrentEditorAccess } from './current-editor-access'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import '../../src/browser/style/index.css'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-service.ts b/packages/callhierarchy/src/browser/callhierarchy-service.ts index c34330c6701a0..602e7f9d77451 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-service.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-service.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named, postConstruct } from 'inversify'; -import { Position, DocumentUri } from 'vscode-languageserver-types'; +import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify'; +import { Position, DocumentUri } from '@theia/core/shared/vscode-languageserver-types'; import { Definition, Caller, Callee } from './callhierarchy'; import { ContributionProvider } from '@theia/core/lib/common'; import { LanguageSelector, score } from '../common/language-selector'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-container.ts b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-container.ts index d2a9f741ad864..9780eba4eca53 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-container.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { createTreeContainer, Tree, TreeImpl, TreeModel, TreeModelImpl, TreeWidget } from '@theia/core/lib/browser'; import { CallHierarchyTree } from './callhierarchy-tree'; import { CallHierarchyTreeModel } from './callhierarchy-tree-model'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-model.ts b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-model.ts index d2cce3ca0c8a0..ece8b7e28a27c 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-model.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-model.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { TreeModelImpl, TreeNode } from '@theia/core/lib/browser'; import { CallHierarchyTree, DefinitionNode } from './callhierarchy-tree'; import { CallHierarchyServiceProvider } from '../callhierarchy-service'; -import { Position } from 'vscode-languageserver-types'; +import { Position } from '@theia/core/shared/vscode-languageserver-types'; import URI from '@theia/core/lib/common/uri'; import { CancellationTokenSource } from '@theia/core/lib/common/cancellation'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-widget.tsx b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-widget.tsx index c7e5c457b2f90..fe6859461ff6c 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-widget.tsx +++ b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ContextMenuRenderer, TreeWidget, NodeProps, TreeProps, TreeNode, TreeModel, DockPanel @@ -24,9 +24,9 @@ import { DefinitionNode, CallerNode } from './callhierarchy-tree'; import { CallHierarchyTreeModel } from './callhierarchy-tree-model'; import { CALLHIERARCHY_ID, Definition, Caller } from '../callhierarchy'; import URI from '@theia/core/lib/common/uri'; -import { Location, Range, SymbolKind, DocumentUri } from 'vscode-languageserver-types'; +import { Location, Range, SymbolKind, DocumentUri } from '@theia/core/shared/vscode-languageserver-types'; import { EditorManager } from '@theia/editor/lib/browser'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; export const HIERARCHY_TREE_CLASS = 'theia-CallHierarchyTree'; export const DEFINITION_NODE_CLASS = 'theia-CallHierarchyTreeNode'; diff --git a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree.ts b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree.ts index 917fdc8bcfeda..b93d188068138 100644 --- a/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree.ts +++ b/packages/callhierarchy/src/browser/callhierarchy-tree/callhierarchy-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { TreeNode, CompositeTreeNode, SelectableTreeNode, ExpandableTreeNode, TreeImpl } from '@theia/core/lib/browser'; import { Definition, Caller } from '../callhierarchy'; diff --git a/packages/callhierarchy/src/browser/callhierarchy.ts b/packages/callhierarchy/src/browser/callhierarchy.ts index bb489847dbfdb..3d67edc01a12d 100644 --- a/packages/callhierarchy/src/browser/callhierarchy.ts +++ b/packages/callhierarchy/src/browser/callhierarchy.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Range, SymbolKind, Location } from 'vscode-languageserver-types'; +import { Range, SymbolKind, Location } from '@theia/core/shared/vscode-languageserver-types'; export const CALLHIERARCHY_ID = 'callhierarchy'; diff --git a/packages/callhierarchy/src/browser/current-editor-access.ts b/packages/callhierarchy/src/browser/current-editor-access.ts index 5e4436a3412a7..613f78952624c 100644 --- a/packages/callhierarchy/src/browser/current-editor-access.ts +++ b/packages/callhierarchy/src/browser/current-editor-access.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { EditorManager, TextEditor } from '@theia/editor/lib/browser'; -import { Location } from 'vscode-languageserver-types'; +import { Location } from '@theia/core/shared/vscode-languageserver-types'; @injectable() export class CurrentEditorAccess { diff --git a/packages/callhierarchy/src/browser/utils.ts b/packages/callhierarchy/src/browser/utils.ts index a35940eacab5a..b7bde221bb7b0 100644 --- a/packages/callhierarchy/src/browser/utils.ts +++ b/packages/callhierarchy/src/browser/utils.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Location, Range, Position } from 'vscode-languageserver-types'; +import { Location, Range, Position } from '@theia/core/shared/vscode-languageserver-types'; /** * Test if `otherRange` is in `range`. If the ranges are equal, will return true. diff --git a/packages/console/src/browser/ansi-console-item.tsx b/packages/console/src/browser/ansi-console-item.tsx index 75f7e217e2b9b..801b92d23c1eb 100644 --- a/packages/console/src/browser/ansi-console-item.tsx +++ b/packages/console/src/browser/ansi-console-item.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { ConsoleItem } from './console-session'; import { Severity } from '@theia/core/lib/common/severity'; import Anser = require('anser'); diff --git a/packages/console/src/browser/console-content-widget.tsx b/packages/console/src/browser/console-content-widget.tsx index 414c66f145c74..e6c02ef4afb8f 100644 --- a/packages/console/src/browser/console-content-widget.tsx +++ b/packages/console/src/browser/console-content-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Message } from '@phosphor/messaging'; -import { interfaces, Container, injectable } from 'inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { interfaces, Container, injectable } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core'; import { TreeProps } from '@theia/core/lib/browser/tree'; import { TreeSourceNode } from '@theia/core/lib/browser/source-tree'; diff --git a/packages/console/src/browser/console-contribution.ts b/packages/console/src/browser/console-contribution.ts index 989011fb8bdaa..742de1bc874be 100644 --- a/packages/console/src/browser/console-contribution.ts +++ b/packages/console/src/browser/console-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Command, CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry, CommandHandler } from '@theia/core'; import { FrontendApplicationContribution, KeybindingContribution, KeybindingRegistry, CommonCommands } from '@theia/core/lib/browser'; import { ConsoleManager } from './console-manager'; diff --git a/packages/console/src/browser/console-frontend-module.ts b/packages/console/src/browser/console-frontend-module.ts index b3a763f66339d..1b42919836412 100644 --- a/packages/console/src/browser/console-frontend-module.ts +++ b/packages/console/src/browser/console-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { CommandContribution, MenuContribution } from '@theia/core'; import { FrontendApplicationContribution, KeybindingContext, KeybindingContribution } from '@theia/core/lib/browser'; import { ConsoleContribution } from './console-contribution'; diff --git a/packages/console/src/browser/console-history.ts b/packages/console/src/browser/console-history.ts index e1756e4989a65..8d5211d255838 100644 --- a/packages/console/src/browser/console-history.ts +++ b/packages/console/src/browser/console-history.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; @injectable() export class ConsoleHistory { diff --git a/packages/console/src/browser/console-keybinding-contexts.ts b/packages/console/src/browser/console-keybinding-contexts.ts index 76acae8d204a8..4fdfb6ffc4dd3 100644 --- a/packages/console/src/browser/console-keybinding-contexts.ts +++ b/packages/console/src/browser/console-keybinding-contexts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContext } from '@theia/core/lib/browser'; import { ConsoleManager } from './console-manager'; import { ConsoleWidget } from './console-widget'; diff --git a/packages/console/src/browser/console-manager.ts b/packages/console/src/browser/console-manager.ts index ff4a1b8ce35c8..ac99185f9155d 100644 --- a/packages/console/src/browser/console-manager.ts +++ b/packages/console/src/browser/console-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ApplicationShell } from '@theia/core/lib/browser'; import { ConsoleWidget } from './console-widget'; diff --git a/packages/console/src/browser/console-session.ts b/packages/console/src/browser/console-session.ts index ec87166955b65..6058d5e66ae18 100644 --- a/packages/console/src/browser/console-session.ts +++ b/packages/console/src/browser/console-session.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MaybePromise } from '@theia/core/lib/common/types'; import { TreeSource, TreeElement, CompositeTreeElement } from '@theia/core/lib/browser/source-tree'; import { Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/console/src/browser/console-widget.ts b/packages/console/src/browser/console-widget.ts index ff1a2d4b0efc5..e240ac9bd4a94 100644 --- a/packages/console/src/browser/console-widget.ts +++ b/packages/console/src/browser/console-widget.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ElementExt } from '@phosphor/domutils'; -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { ElementExt } from '@theia/core/shared/@phosphor/domutils'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { TreeSourceNode } from '@theia/core/lib/browser/source-tree'; import { ContextKey } from '@theia/core/lib/browser/context-key-service'; import { BaseWidget, PanelLayout, Widget, Message, MessageLoop, StatefulWidget, CompositeTreeNode } from '@theia/core/lib/browser'; diff --git a/packages/core/README.in.md b/packages/core/README.in.md new file mode 100644 index 0000000000000..ee40c7b60829a --- /dev/null +++ b/packages/core/README.in.md @@ -0,0 +1,131 @@ +
+ +
+ +theia-ext-logo + +

ECLIPSE THEIA - CORE EXTENSION

+ +
+ +
+ +## Description + +The `@theia/core` extension is the main extension for all Theia-based applications, and provides the main framework for all dependent extensions. +The extension provides the base APIs for all Theia-based applications, including: +- Application APIs +- Shell APIs +- Base Widgets +- Contribution Points (ex: commands, menu items, keybindings) + +## Theia Extension + +A Theia extension is a node package declaring `theiaExtensions` property in `package.json`: + +```json +{ + "theiaExtensions": [{ + "frontend": "lib/myExtension/browser/myextension-frontend-module", + "backend": "lib/myExtension/node/myextension-backend-module", + }, { + "frontend": "lib/myExtension2/browser/myextension2-browser-module", + "frontendElectron": "lib/myExtension2/electron-browser/myextension2-electron-browser-module", + "backend": "lib/myExtension2/node/myextension2-node-module", + "backendElectron": "lib/myExtension2/electron-main/myextension2-electron-main-module" + }] +} +``` + +Each extension can consist of the following modules: +- `frontend` is used in the browser env and as well in the electron if `frontendElectron` is not provided +- `frontendElectron` is used in the electron env +- `backend` is used in the node env and as well in the electron env if `backendElectron` is not provided +- `backendElectron` is used in the electron env + +An extension module should have a default export of `ContainerModule | Promise` type. + +## Theia Application + +A Theia application is a node package listing [Theia extensions](#theia-extension) as dependencies and managed with [Theia CLI](../../dev-packages/cli/README.md). + +## Re-exports + +In order to make application builds more stable `@theia/core` re-exports some common dependencies for Theia extensions to re-use. + +### Usage example + +Let's take inversify as an example since you will most likely use this package, you can import it by prefixing with `@theia/core/shared/`: + +```ts +import { injectable } from '@theia/core/shared/inversify'; + +@injectable() +export class SomeClass { + // ... +} +``` + +### List of re-exported packages + +{{RE-EXPORTS}} + +## Logging Configuration + +It's possible to change the log level for the entire Theia application by +passing it the `--log-level={fatal,error,warn,info,debug,trace}` option. For +more fine-grained adjustment, it's also possible to set the log level per +logger (i.e. per topic). The `root` logger is a special catch-all logger +through which go all messages not sent through a particular logger. To change +the log level of particular loggers, create a config file such as + +```json +{ + "defaultLevel": "info", + "levels": { + "terminal": "debug", + "task": "error" + } +} +``` + +where `levels` contains the logger-to-log-level mapping. `defaultLevel` +contains the log level to use for loggers not specified in `levels`. This file +can then be specified using the `--log-config` option. Theia will watch that +file for changes, so it's possible to change log levels at runtime by +modifying this file. + +It's unfortunately currently not possible to query Theia for the list of +existing loggers. However, each log message specifies from which logger it +comes from, which can give an idea, without having to read the code: + +``` +root INFO [nsfw-watcher: 10734] Started watching: /Users/captain.future/git/theia/CONTRIBUTING.md +^^^^ ^^^^ ^^^^^^^^^^^^^^^^^^^ +``` +Where `root` is the name of the logger and `INFO` is the log level. These are optionally followed by the name of a child process and the process ID. + +## Environment Variables + +- `THEIA_HOSTS` + - A comma-separated list of hosts expected to resolve to the current application. + - e.g: `theia.app.com,some.other.domain:3000` + - The port number is important if your application is not hosted on either `80` or `443`. + - If possible, you should set this environment variable: + - When not set, Theia will allow any origin to access the WebSocket services. + - When set, Theia will only allow the origins defined in this environment variable. + +## Additional Information + +- [API documentation for `@theia/core`](https://eclipse-theia.github.io/theia/docs/next/modules/core.html) +- [Theia - GitHub](https://github.com/eclipse-theia/theia) +- [Theia - Website](https://theia-ide.org/) + +## License + +- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/) +- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp) + +## Trademark +"Theia" is a trademark of the Eclipse Foundation +https://www.eclipse.org/theia diff --git a/packages/core/README.md b/packages/core/README.md index 3634d2e6d342b..4b3073765a860 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -49,6 +49,55 @@ An extension module should have a default export of `ContainerModule | Promise { + console.error(error); + process.exitCode = 1; +}); + +async function main() { + await mkdirp(shared); + await Promise.all([ + generateExportTheiaElectron(), + Promise.all(exportStar.map(entry => generateExportStar(entry.module, entry.alias))), + Promise.all(exportEqual.map(entry => generateExportEqual(entry.module, entry.namespace))), + generateReadme(sharedModules), + ]); +} + +/** + * The README.md lists all shared dependencies and it is generated based on README.in.md + */ +async function generateReadme(reExports) { + const input = path.resolve(__dirname, '../README.in.md'); + const output = path.resolve(__dirname, '../README.md'); + const readme = await fsp.readFile(input, { encoding: 'utf8' }); + await fsp.writeFile(output, readme.replace('{{RE-EXPORTS}}', reExports.map( + module => ` - [\`${module}@${getPackageRange(module)}\`](${getNpmUrl(module)})` + ).join(getEOL(readme)))); +} + +/** + * Special re-export case: The `electron` module comes from `@theia/electron`, + * but instead of re-exporting it like `@theia/core/shared/@theia/electron` we'll + * simplify this to `@theia/core/shared/electron`. + */ +async function generateExportTheiaElectron() { + const base = path.resolve(shared, 'electron'); + await Promise.all([ + writeFileIfMissing(`${base}.js`, `\ +module.exports = require('@theia/electron'); +`), + writeFileIfMissing(`${base}.d.ts`, `\ +import Electron = require('@theia/electron'); +export = Electron; +`), + ]); +} + +async function generateExportStar(module, alias) { + const base = await prepareSharedModule(alias); + await Promise.all([ + writeFileIfMissing(`${base}.js`, `\ +module.exports = require('${module}'); +`), + writeFileIfMissing(`${base}.d.ts`, `\ +export * from '${module}'; +`), + ]); +} + +async function generateExportEqual(module, namespace) { + const base = await prepareSharedModule(module); + await Promise.all([ + writeFileIfMissing(`${base}.js`, `\ +module.exports = require('${module}'); +`), + writeFileIfMissing(`${base}.d.ts`, `\ +import ${namespace} = require('${module}'); +export = ${namespace}; +`), + ]); +} + +/** + * @param {string} module + * @returns {string} target filename without extension (base) + */ +async function prepareSharedModule(module) { + const base = path.resolve(shared, module); + // Handle case like '@a/b/c/d.js' => mkdirp('@a/b/c') + await mkdirp(path.dirname(base)); + return base; +} + +async function mkdirp(directory) { + await fsp.mkdir(directory, { recursive: true }); +} + +async function writeFileIfMissing(file, content) { + if (await fsp.access(file).then(() => false, error => true)) { + await writeFile(file, content); + } +} + +async function writeFile(file, content) { + if (process.platform === 'win32' && getEOL(content) !== '\r\n') { + // JS strings always use `\n` even on Windows, but when + // writing to a file we want to use the system's EOL. + content = content.replace(/\n/g, '\r\n'); + } + await fsp.writeFile(file, content); +} + +/** + * Detects the EOL from the content of a string. + * Will only look at the first line. + * @param {string} content + * @returns {string} EOL + */ +function getEOL(content) { + const split = content.split('\n', 2); + if (split.length === 1) { + // There's no newlines, use the system's default + return os.EOL + } + return split[0].endsWith('\r') + ? '\r\n' + : '\n'; +} + +/** + * @param {string} package + * @returns {string} NPM URL + */ +function getNpmUrl(package) { + return `https://www.npmjs.com/package/${getPackageName(package)}`; +} + +/** + * @param {string} module + * @returns {string} range like `^1.2.3` + */ +function getPackageRange(module) { + const name = getPackageName(module); + if (name === 'electron') { + // In this case we are doing something weird, @theia/core does not depend on electron, + // but rather we depend on an optional peer dependency @theia/electron which itself depends + // on electron. For practical purposes, we re-export electron through @theia/electron own re-exports. + // The exports look like this: electron -> @theia/electron (optional) -> @theia/core/shared/electron + return require('@theia/electron/package.json').dependencies.electron; + } + return dependencies[name] || devDependencies[name] || peerDependencies[name]; +} + +/** + * Only keep the first two parts of the package name + * e.g. @a/b/c => @a/b + * @param {string} module + * @returns {string} package name + */ +function getPackageName(module) { + const slice = module.startsWith('@') ? 2 : 1; + return module.split('/') + .slice(0, slice) + .join('/'); +} diff --git a/packages/core/shared/@phosphor/algorithm.d.ts b/packages/core/shared/@phosphor/algorithm.d.ts new file mode 100644 index 0000000000000..9efacfa84ec28 --- /dev/null +++ b/packages/core/shared/@phosphor/algorithm.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/algorithm'; diff --git a/packages/core/shared/@phosphor/algorithm.js b/packages/core/shared/@phosphor/algorithm.js new file mode 100644 index 0000000000000..933da4a50ae90 --- /dev/null +++ b/packages/core/shared/@phosphor/algorithm.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/algorithm'); diff --git a/packages/core/shared/@phosphor/commands.d.ts b/packages/core/shared/@phosphor/commands.d.ts new file mode 100644 index 0000000000000..3fd8f3f6097c8 --- /dev/null +++ b/packages/core/shared/@phosphor/commands.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/commands'; diff --git a/packages/core/shared/@phosphor/commands.js b/packages/core/shared/@phosphor/commands.js new file mode 100644 index 0000000000000..363437779c5af --- /dev/null +++ b/packages/core/shared/@phosphor/commands.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/commands'); diff --git a/packages/core/shared/@phosphor/coreutils.d.ts b/packages/core/shared/@phosphor/coreutils.d.ts new file mode 100644 index 0000000000000..a3296097054c9 --- /dev/null +++ b/packages/core/shared/@phosphor/coreutils.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/coreutils'; diff --git a/packages/core/shared/@phosphor/coreutils.js b/packages/core/shared/@phosphor/coreutils.js new file mode 100644 index 0000000000000..1e024a732f5b1 --- /dev/null +++ b/packages/core/shared/@phosphor/coreutils.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/coreutils'); diff --git a/packages/core/shared/@phosphor/domutils.d.ts b/packages/core/shared/@phosphor/domutils.d.ts new file mode 100644 index 0000000000000..dccdd4e049958 --- /dev/null +++ b/packages/core/shared/@phosphor/domutils.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/domutils'; diff --git a/packages/core/shared/@phosphor/domutils.js b/packages/core/shared/@phosphor/domutils.js new file mode 100644 index 0000000000000..46cfdb0fc69c2 --- /dev/null +++ b/packages/core/shared/@phosphor/domutils.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/domutils'); diff --git a/packages/core/shared/@phosphor/dragdrop.d.ts b/packages/core/shared/@phosphor/dragdrop.d.ts new file mode 100644 index 0000000000000..c55e5a3d528b4 --- /dev/null +++ b/packages/core/shared/@phosphor/dragdrop.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/dragdrop'; diff --git a/packages/core/shared/@phosphor/dragdrop.js b/packages/core/shared/@phosphor/dragdrop.js new file mode 100644 index 0000000000000..9023ee3f6faac --- /dev/null +++ b/packages/core/shared/@phosphor/dragdrop.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/dragdrop'); diff --git a/packages/core/shared/@phosphor/messaging.d.ts b/packages/core/shared/@phosphor/messaging.d.ts new file mode 100644 index 0000000000000..70057b7d1ded2 --- /dev/null +++ b/packages/core/shared/@phosphor/messaging.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/messaging'; diff --git a/packages/core/shared/@phosphor/messaging.js b/packages/core/shared/@phosphor/messaging.js new file mode 100644 index 0000000000000..21dba76379a7c --- /dev/null +++ b/packages/core/shared/@phosphor/messaging.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/messaging'); diff --git a/packages/core/shared/@phosphor/properties.d.ts b/packages/core/shared/@phosphor/properties.d.ts new file mode 100644 index 0000000000000..2a6bbe1bc6e62 --- /dev/null +++ b/packages/core/shared/@phosphor/properties.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/properties'; diff --git a/packages/core/shared/@phosphor/properties.js b/packages/core/shared/@phosphor/properties.js new file mode 100644 index 0000000000000..6ec7304ff4a29 --- /dev/null +++ b/packages/core/shared/@phosphor/properties.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/properties'); diff --git a/packages/core/shared/@phosphor/signaling.d.ts b/packages/core/shared/@phosphor/signaling.d.ts new file mode 100644 index 0000000000000..addc9b7ed5d34 --- /dev/null +++ b/packages/core/shared/@phosphor/signaling.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/signaling'; diff --git a/packages/core/shared/@phosphor/signaling.js b/packages/core/shared/@phosphor/signaling.js new file mode 100644 index 0000000000000..e5a6f405891c4 --- /dev/null +++ b/packages/core/shared/@phosphor/signaling.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/signaling'); diff --git a/packages/core/shared/@phosphor/virtualdom.d.ts b/packages/core/shared/@phosphor/virtualdom.d.ts new file mode 100644 index 0000000000000..3812e0a30ae1c --- /dev/null +++ b/packages/core/shared/@phosphor/virtualdom.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/virtualdom'; diff --git a/packages/core/shared/@phosphor/virtualdom.js b/packages/core/shared/@phosphor/virtualdom.js new file mode 100644 index 0000000000000..7ee6cd8c6955b --- /dev/null +++ b/packages/core/shared/@phosphor/virtualdom.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/virtualdom'); diff --git a/packages/core/shared/@phosphor/widgets.d.ts b/packages/core/shared/@phosphor/widgets.d.ts new file mode 100644 index 0000000000000..675da0421a86e --- /dev/null +++ b/packages/core/shared/@phosphor/widgets.d.ts @@ -0,0 +1 @@ +export * from '@phosphor/widgets'; diff --git a/packages/core/shared/@phosphor/widgets.js b/packages/core/shared/@phosphor/widgets.js new file mode 100644 index 0000000000000..b9a8778874ea9 --- /dev/null +++ b/packages/core/shared/@phosphor/widgets.js @@ -0,0 +1 @@ +module.exports = require('@phosphor/widgets'); diff --git a/packages/core/shared/@theia/application-package/index.d.ts b/packages/core/shared/@theia/application-package/index.d.ts new file mode 100644 index 0000000000000..b1ff507170bf0 --- /dev/null +++ b/packages/core/shared/@theia/application-package/index.d.ts @@ -0,0 +1 @@ +export * from '@theia/application-package'; diff --git a/packages/core/shared/@theia/application-package/index.js b/packages/core/shared/@theia/application-package/index.js new file mode 100644 index 0000000000000..52ba361bce84b --- /dev/null +++ b/packages/core/shared/@theia/application-package/index.js @@ -0,0 +1 @@ +module.exports = require('@theia/application-package'); diff --git a/packages/core/shared/electron.d.ts b/packages/core/shared/electron.d.ts new file mode 100644 index 0000000000000..cf272da9e03c0 --- /dev/null +++ b/packages/core/shared/electron.d.ts @@ -0,0 +1,2 @@ +import Electron = require('@theia/electron'); +export = Electron; diff --git a/packages/core/shared/electron.js b/packages/core/shared/electron.js new file mode 100644 index 0000000000000..a9dc55dfaf321 --- /dev/null +++ b/packages/core/shared/electron.js @@ -0,0 +1 @@ +module.exports = require('@theia/electron'); diff --git a/packages/core/shared/express.d.ts b/packages/core/shared/express.d.ts new file mode 100644 index 0000000000000..fe3deaff8e0ba --- /dev/null +++ b/packages/core/shared/express.d.ts @@ -0,0 +1,2 @@ +import express = require('express'); +export = express; diff --git a/packages/core/shared/express.js b/packages/core/shared/express.js new file mode 100644 index 0000000000000..ec32af7ccfa99 --- /dev/null +++ b/packages/core/shared/express.js @@ -0,0 +1 @@ +module.exports = require('express'); diff --git a/packages/core/shared/fs-extra.d.ts b/packages/core/shared/fs-extra.d.ts new file mode 100644 index 0000000000000..3cf973764fbc7 --- /dev/null +++ b/packages/core/shared/fs-extra.d.ts @@ -0,0 +1 @@ +export * from 'fs-extra'; diff --git a/packages/core/shared/fs-extra.js b/packages/core/shared/fs-extra.js new file mode 100644 index 0000000000000..56937d340ba34 --- /dev/null +++ b/packages/core/shared/fs-extra.js @@ -0,0 +1 @@ +module.exports = require('fs-extra'); diff --git a/packages/core/shared/fuzzy.d.ts b/packages/core/shared/fuzzy.d.ts new file mode 100644 index 0000000000000..2e0353f622e14 --- /dev/null +++ b/packages/core/shared/fuzzy.d.ts @@ -0,0 +1 @@ +export * from 'fuzzy'; diff --git a/packages/core/shared/fuzzy.js b/packages/core/shared/fuzzy.js new file mode 100644 index 0000000000000..f8737bd432740 --- /dev/null +++ b/packages/core/shared/fuzzy.js @@ -0,0 +1 @@ +module.exports = require('fuzzy'); diff --git a/packages/core/shared/index.js b/packages/core/shared/index.js new file mode 100644 index 0000000000000..4eb9f77d849a1 --- /dev/null +++ b/packages/core/shared/index.js @@ -0,0 +1,111 @@ +// @ts-check +"use-strict"; +/******************************************************************************** + * Copyright (C) 2021 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +/** + * @file Common data and functions to manage shared core dependencies. + */ + +const { theiaReExports } = require('../package.json'); + +/** + * Path prefix used to require shared dependencies such as + * ```ts + * const sharedDep = require(theiaCoreSharedPrefix + 'sharedDep') + * ``` + * @type {string} + */ +const theiaCoreSharedPrefix = '@theia/core/shared/'; +/** + * List of modules exported like + * ```ts + * export * from 'module'; + * ``` + * @type {{module: string, alias: string}[]} + */ +const exportStar = theiaReExports['export *'].map(entry => { + const [module, alias = entry] = entry.split(':', 2); + return { module, alias }; +}); +/** + * List of modules exported via namespace like + * ```ts + * import namespace = require('module'); + * export = namespace; + * ``` + * @type {{module: string, namespace: string}[]} + */ +const exportEqual = theiaReExports['export ='].map(entry => { + const [module, namespace = entry] = entry.split(' as ', 2); + return { module, namespace }; +}); +/** + * List of all shared modules. + * @type {string[]} + */ +const sharedModules = [ + 'electron', + ...exportStar.map(entry => entry.module), + ...exportEqual.map(entry => entry.module), +].sort(); + +module.exports = { + exportStar, + exportEqual, + sharedModules, + theiaCoreSharedPrefix, + getPackageName, + isSharedModule, + getTheiaCoreSharedModule, +}; + +/** + * Only keep the first two parts of the package name e.g., + * - `@a/b/c/...` => `@a/b` + * - `a/b/c/...` => `a` + * @param {string} package + * @returns {string} + */ +function getPackageName(package) { + const slice = package.startsWith('@') ? 2 : 1; + return package.split('/', slice + 1) + .slice(0, slice) + .join('/'); +} + +/** + * @param {string} module + * @returns {boolean} is the module part of the shared dependencies + */ +function isSharedModule(module) { + return sharedModules.includes(module); +} + +/** + * Given an import like `@theia/core/shared/a/b/c` it will return `a/b/c`. + * If the import is not from `@theia/core/shared/` it will return undefined. + * @param {string} module + * @returns {string | undefined} + */ +function getTheiaCoreSharedModule(module) { + if (module.startsWith(theiaCoreSharedPrefix)) { + const shared = module.substr(theiaCoreSharedPrefix.length); + if (shared.length > 0) { + return shared; + } + } +} diff --git a/packages/core/shared/inversify.d.ts b/packages/core/shared/inversify.d.ts new file mode 100644 index 0000000000000..4afe0debb673d --- /dev/null +++ b/packages/core/shared/inversify.d.ts @@ -0,0 +1 @@ +export * from 'inversify'; diff --git a/packages/core/shared/inversify.js b/packages/core/shared/inversify.js new file mode 100644 index 0000000000000..bbbb255194585 --- /dev/null +++ b/packages/core/shared/inversify.js @@ -0,0 +1 @@ +module.exports = require('inversify'); diff --git a/packages/core/shared/lodash.debounce.d.ts b/packages/core/shared/lodash.debounce.d.ts new file mode 100644 index 0000000000000..6f86c9a43a69e --- /dev/null +++ b/packages/core/shared/lodash.debounce.d.ts @@ -0,0 +1,2 @@ +import debounce = require('lodash.debounce'); +export = debounce; diff --git a/packages/core/shared/lodash.debounce.js b/packages/core/shared/lodash.debounce.js new file mode 100644 index 0000000000000..29aa77906c76c --- /dev/null +++ b/packages/core/shared/lodash.debounce.js @@ -0,0 +1 @@ +module.exports = require('lodash.debounce'); diff --git a/packages/core/shared/lodash.throttle.d.ts b/packages/core/shared/lodash.throttle.d.ts new file mode 100644 index 0000000000000..c24f9054e6652 --- /dev/null +++ b/packages/core/shared/lodash.throttle.d.ts @@ -0,0 +1,2 @@ +import throttle = require('lodash.throttle'); +export = throttle; diff --git a/packages/core/shared/lodash.throttle.js b/packages/core/shared/lodash.throttle.js new file mode 100644 index 0000000000000..b90672740e1cf --- /dev/null +++ b/packages/core/shared/lodash.throttle.js @@ -0,0 +1 @@ +module.exports = require('lodash.throttle'); diff --git a/packages/core/shared/nsfw.d.ts b/packages/core/shared/nsfw.d.ts new file mode 100644 index 0000000000000..d354af1682797 --- /dev/null +++ b/packages/core/shared/nsfw.d.ts @@ -0,0 +1,2 @@ +import nsfw = require('nsfw'); +export = nsfw; diff --git a/packages/core/shared/nsfw.js b/packages/core/shared/nsfw.js new file mode 100644 index 0000000000000..fd3d1ddea09d5 --- /dev/null +++ b/packages/core/shared/nsfw.js @@ -0,0 +1 @@ +module.exports = require('nsfw'); diff --git a/packages/core/shared/react-dom.d.ts b/packages/core/shared/react-dom.d.ts new file mode 100644 index 0000000000000..2a69d4b000752 --- /dev/null +++ b/packages/core/shared/react-dom.d.ts @@ -0,0 +1 @@ +export * from 'react-dom'; diff --git a/packages/core/shared/react-dom.js b/packages/core/shared/react-dom.js new file mode 100644 index 0000000000000..1ca791c238a93 --- /dev/null +++ b/packages/core/shared/react-dom.js @@ -0,0 +1 @@ +module.exports = require('react-dom'); diff --git a/packages/core/shared/react-virtualized.d.ts b/packages/core/shared/react-virtualized.d.ts new file mode 100644 index 0000000000000..ec9267289b407 --- /dev/null +++ b/packages/core/shared/react-virtualized.d.ts @@ -0,0 +1 @@ +export * from 'react-virtualized'; diff --git a/packages/core/shared/react-virtualized.js b/packages/core/shared/react-virtualized.js new file mode 100644 index 0000000000000..760c203cf32da --- /dev/null +++ b/packages/core/shared/react-virtualized.js @@ -0,0 +1 @@ +module.exports = require('react-virtualized'); diff --git a/packages/core/shared/react.d.ts b/packages/core/shared/react.d.ts new file mode 100644 index 0000000000000..3190a0b35fc37 --- /dev/null +++ b/packages/core/shared/react.d.ts @@ -0,0 +1,2 @@ +import React = require('react'); +export = React; diff --git a/packages/core/shared/react.js b/packages/core/shared/react.js new file mode 100644 index 0000000000000..01a540cc45938 --- /dev/null +++ b/packages/core/shared/react.js @@ -0,0 +1 @@ +module.exports = require('react'); diff --git a/packages/core/shared/vscode-languageserver-protocol.d.ts b/packages/core/shared/vscode-languageserver-protocol.d.ts new file mode 100644 index 0000000000000..c45d2d357875d --- /dev/null +++ b/packages/core/shared/vscode-languageserver-protocol.d.ts @@ -0,0 +1 @@ +export * from 'vscode-languageserver-protocol'; diff --git a/packages/core/shared/vscode-languageserver-protocol.js b/packages/core/shared/vscode-languageserver-protocol.js new file mode 100644 index 0000000000000..94814702e15a9 --- /dev/null +++ b/packages/core/shared/vscode-languageserver-protocol.js @@ -0,0 +1 @@ +module.exports = require('vscode-languageserver-protocol'); diff --git a/packages/core/shared/vscode-languageserver-types.d.ts b/packages/core/shared/vscode-languageserver-types.d.ts new file mode 100644 index 0000000000000..70f5f9dc1d06d --- /dev/null +++ b/packages/core/shared/vscode-languageserver-types.d.ts @@ -0,0 +1 @@ +export * from 'vscode-languageserver-types'; diff --git a/packages/core/shared/vscode-languageserver-types.js b/packages/core/shared/vscode-languageserver-types.js new file mode 100644 index 0000000000000..ab714fcdb9c99 --- /dev/null +++ b/packages/core/shared/vscode-languageserver-types.js @@ -0,0 +1 @@ +module.exports = require('vscode-languageserver-types'); diff --git a/packages/core/shared/vscode-uri.d.ts b/packages/core/shared/vscode-uri.d.ts new file mode 100644 index 0000000000000..cd3a0f30c7ee1 --- /dev/null +++ b/packages/core/shared/vscode-uri.d.ts @@ -0,0 +1 @@ +export * from 'vscode-uri'; diff --git a/packages/core/shared/vscode-uri.js b/packages/core/shared/vscode-uri.js new file mode 100644 index 0000000000000..45afd3d231519 --- /dev/null +++ b/packages/core/shared/vscode-uri.js @@ -0,0 +1 @@ +module.exports = require('vscode-uri'); diff --git a/packages/core/shared/vscode-ws-jsonrpc.d.ts b/packages/core/shared/vscode-ws-jsonrpc.d.ts new file mode 100644 index 0000000000000..b11ff897103ed --- /dev/null +++ b/packages/core/shared/vscode-ws-jsonrpc.d.ts @@ -0,0 +1 @@ +export * from 'vscode-ws-jsonrpc'; diff --git a/packages/core/shared/vscode-ws-jsonrpc.js b/packages/core/shared/vscode-ws-jsonrpc.js new file mode 100644 index 0000000000000..3aed560b82d62 --- /dev/null +++ b/packages/core/shared/vscode-ws-jsonrpc.js @@ -0,0 +1 @@ +module.exports = require('vscode-ws-jsonrpc'); diff --git a/packages/core/shared/ws.d.ts b/packages/core/shared/ws.d.ts new file mode 100644 index 0000000000000..c72fcac4eb656 --- /dev/null +++ b/packages/core/shared/ws.d.ts @@ -0,0 +1,2 @@ +import WebSocket = require('ws'); +export = WebSocket; diff --git a/packages/core/shared/ws.js b/packages/core/shared/ws.js new file mode 100644 index 0000000000000..506736795db6b --- /dev/null +++ b/packages/core/shared/ws.js @@ -0,0 +1 @@ +module.exports = require('ws'); diff --git a/packages/core/shared/yargs.d.ts b/packages/core/shared/yargs.d.ts new file mode 100644 index 0000000000000..97150dba4e593 --- /dev/null +++ b/packages/core/shared/yargs.d.ts @@ -0,0 +1,2 @@ +import yargs = require('yargs'); +export = yargs; diff --git a/packages/core/shared/yargs.js b/packages/core/shared/yargs.js new file mode 100644 index 0000000000000..17077c2554945 --- /dev/null +++ b/packages/core/shared/yargs.js @@ -0,0 +1 @@ +module.exports = require('yargs'); diff --git a/packages/core/src/browser/encoding-registry.ts b/packages/core/src/browser/encoding-registry.ts index 6f8fb2d086fcf..6edbc7fd6b99e 100644 --- a/packages/core/src/browser/encoding-registry.ts +++ b/packages/core/src/browser/encoding-registry.ts @@ -22,7 +22,7 @@ import { injectable, inject } from 'inversify'; import URI from '../common/uri'; -import { Disposable } from 'vscode-ws-jsonrpc'; +import { Disposable } from '../common/disposable'; import { CorePreferences } from './core-preferences'; import { EncodingService as EncodingService } from '../common/encoding-service'; import { UTF8 } from '../common/encodings'; diff --git a/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.spec.ts b/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.spec.ts index 20f645346a6b1..0a06734962be8 100644 --- a/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.spec.ts +++ b/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.spec.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Container, injectable } from 'inversify'; -import { IMacKeyboardLayoutInfo } from 'native-keymap'; +import type { IMacKeyboardLayoutInfo } from 'native-keymap'; import * as chai from 'chai'; import * as sinon from 'sinon'; import * as os from '../../common/os'; diff --git a/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.ts b/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.ts index 9857d11d0fc16..86efded27b7c4 100644 --- a/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.ts +++ b/packages/core/src/browser/keyboard/browser-keyboard-layout-provider.ts @@ -15,7 +15,6 @@ ********************************************************************************/ import { injectable, postConstruct, inject } from 'inversify'; -import { IKeyboardLayoutInfo } from 'native-keymap'; import { isOSX } from '../../common/os'; import { Emitter, Event } from '../../common/event'; import { ILogger } from '../../common/logger'; @@ -238,7 +237,8 @@ export const DEFAULT_LAYOUT_DATA: KeyboardLayoutData = { hardware: isOSX ? 'mac' : 'pc', language: 'en', raw: { - info: {} as IKeyboardLayoutInfo, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + info: {} as any, mapping: {} } }; diff --git a/packages/core/src/browser/keyboard/keyboard-layout-service.ts b/packages/core/src/browser/keyboard/keyboard-layout-service.ts index 84d90aad873bb..74cf7e0d38a0a 100644 --- a/packages/core/src/browser/keyboard/keyboard-layout-service.ts +++ b/packages/core/src/browser/keyboard/keyboard-layout-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { injectable, inject, optional } from 'inversify'; -import { IWindowsKeyMapping } from 'native-keymap'; +import type { IWindowsKeyMapping } from 'native-keymap'; import { isWindows } from '../../common/os'; import { NativeKeyboardLayout, KeyboardLayoutProvider, KeyboardLayoutChangeNotifier, KeyValidator diff --git a/packages/core/src/browser/preferences/preference-provider.ts b/packages/core/src/browser/preferences/preference-provider.ts index 497257d28870f..ddea742a8ac19 100644 --- a/packages/core/src/browser/preferences/preference-provider.ts +++ b/packages/core/src/browser/preferences/preference-provider.ts @@ -18,7 +18,7 @@ import debounce = require('p-debounce'); import { injectable } from 'inversify'; -import { JSONExt, JSONValue } from '@phosphor/coreutils/lib/json'; +import { JSONExt, JSONValue } from '@phosphor/coreutils'; import URI from '../../common/uri'; import { Disposable, DisposableCollection, Emitter, Event } from '../../common'; import { Deferred } from '../../common/promise-util'; diff --git a/packages/core/src/browser/progress-status-bar-item.ts b/packages/core/src/browser/progress-status-bar-item.ts index 81970c6a77cd1..fe4c9c8b5474e 100644 --- a/packages/core/src/browser/progress-status-bar-item.ts +++ b/packages/core/src/browser/progress-status-bar-item.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { injectable, inject } from 'inversify'; -import { CancellationToken } from 'vscode-jsonrpc'; +import { CancellationToken } from 'vscode-ws-jsonrpc'; import { ProgressClient } from '../common'; import { ProgressMessage, ProgressUpdate } from '../common'; import { StatusBar, StatusBarAlignment } from './status-bar'; diff --git a/packages/core/src/browser/test/jsdom.ts b/packages/core/src/browser/test/jsdom.ts index f6783bd4ebabe..ca7ab883e4a4d 100644 --- a/packages/core/src/browser/test/jsdom.ts +++ b/packages/core/src/browser/test/jsdom.ts @@ -14,6 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ +// eslint-disable-next-line import/no-extraneous-dependencies import { JSDOM } from 'jsdom'; /** diff --git a/packages/core/src/common/keyboard/keyboard-layout-provider.ts b/packages/core/src/common/keyboard/keyboard-layout-provider.ts index 47080267fc9aa..71948c9f927dc 100644 --- a/packages/core/src/common/keyboard/keyboard-layout-provider.ts +++ b/packages/core/src/common/keyboard/keyboard-layout-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { IKeyboardLayoutInfo, IKeyboardMapping } from 'native-keymap'; +import type { IKeyboardLayoutInfo, IKeyboardMapping } from 'native-keymap'; import { Event } from '../event'; export const keyboardPath = '/services/keyboard'; diff --git a/packages/core/src/common/messaging/connection-error-handler.ts b/packages/core/src/common/messaging/connection-error-handler.ts index cb1458459b8bc..8497124cff65a 100644 --- a/packages/core/src/common/messaging/connection-error-handler.ts +++ b/packages/core/src/common/messaging/connection-error-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Message } from 'vscode-jsonrpc'; +import { Message } from 'vscode-ws-jsonrpc'; import { ILogger } from '../../common'; export interface ResolvedConnectionErrorHandlerOptions { diff --git a/packages/core/src/common/messaging/handler.ts b/packages/core/src/common/messaging/handler.ts index 79e8c28d83fe3..fac67342ae6f5 100644 --- a/packages/core/src/common/messaging/handler.ts +++ b/packages/core/src/common/messaging/handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from 'vscode-ws-jsonrpc'; export const ConnectionHandler = Symbol('ConnectionHandler'); diff --git a/packages/core/src/common/messaging/proxy-factory.ts b/packages/core/src/common/messaging/proxy-factory.ts index c8cc24f70a38c..504e8dc2260b8 100644 --- a/packages/core/src/common/messaging/proxy-factory.ts +++ b/packages/core/src/common/messaging/proxy-factory.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { MessageConnection, ResponseError } from 'vscode-jsonrpc'; +import { MessageConnection, ResponseError } from 'vscode-ws-jsonrpc'; import { ApplicationError } from '../application-error'; import { Event, Emitter } from '../event'; import { Disposable } from '../disposable'; diff --git a/packages/core/src/common/test/expect.ts b/packages/core/src/common/test/expect.ts index c2b1d9a26d6df..6fb9d901488e5 100644 --- a/packages/core/src/common/test/expect.ts +++ b/packages/core/src/common/test/expect.ts @@ -14,6 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ +// eslint-disable-next-line import/no-extraneous-dependencies import { expect } from 'chai'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/core/src/electron-browser/electron-clipboard-service.ts b/packages/core/src/electron-browser/electron-clipboard-service.ts index 192e96ed5dd07..4830c1264d1fd 100644 --- a/packages/core/src/electron-browser/electron-clipboard-service.ts +++ b/packages/core/src/electron-browser/electron-clipboard-service.ts @@ -14,6 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ +// eslint-disable-next-line import/no-extraneous-dependencies import { clipboard } from 'electron'; import { injectable } from 'inversify'; import { ClipboardService } from '../browser/clipboard-service'; diff --git a/packages/core/src/electron-browser/keyboard/electron-keyboard-layout-change-notifier.ts b/packages/core/src/electron-browser/keyboard/electron-keyboard-layout-change-notifier.ts index e84d153ab0ccc..16cb494b52e05 100644 --- a/packages/core/src/electron-browser/keyboard/electron-keyboard-layout-change-notifier.ts +++ b/packages/core/src/electron-browser/keyboard/electron-keyboard-layout-change-notifier.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { postConstruct, injectable } from 'inversify'; -import { ipcRenderer } from 'electron'; +import { ipcRenderer } from '../../../shared/electron'; import { KeyboardLayoutChangeNotifier, NativeKeyboardLayout } from '../../common/keyboard/keyboard-layout-provider'; import { Emitter, Event } from '../../common/event'; diff --git a/packages/core/src/electron-browser/menu/electron-context-menu-renderer.ts b/packages/core/src/electron-browser/menu/electron-context-menu-renderer.ts index 8789130c40f9b..537958969084c 100644 --- a/packages/core/src/electron-browser/menu/electron-context-menu-renderer.ts +++ b/packages/core/src/electron-browser/menu/electron-context-menu-renderer.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import * as electron from 'electron'; +import * as electron from '../../../shared/electron'; import { inject, injectable } from 'inversify'; import { ContextMenuRenderer, RenderContextMenuOptions, ContextMenuAccess, FrontendApplicationContribution, CommonCommands } from '../../browser'; import { ElectronMainMenuFactory } from './electron-main-menu-factory'; diff --git a/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts b/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts index 7f94abd255ff0..e0d22f1973605 100644 --- a/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts +++ b/packages/core/src/electron-browser/menu/electron-main-menu-factory.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import * as electron from 'electron'; +import * as electron from '../../../shared/electron'; import { inject, injectable } from 'inversify'; import { CommandRegistry, isOSX, ActionMenuNode, CompositeMenuNode, diff --git a/packages/core/src/electron-browser/menu/electron-menu-contribution.ts b/packages/core/src/electron-browser/menu/electron-menu-contribution.ts index 9edde85136911..8b4c3822a0c90 100644 --- a/packages/core/src/electron-browser/menu/electron-menu-contribution.ts +++ b/packages/core/src/electron-browser/menu/electron-menu-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as electron from 'electron'; +import * as electron from '../../../shared/electron'; import { inject, injectable } from 'inversify'; import { Command, CommandContribution, CommandRegistry, diff --git a/packages/core/src/electron-browser/messaging/electron-ipc-connection-provider.ts b/packages/core/src/electron-browser/messaging/electron-ipc-connection-provider.ts index ecd88f72605f1..28620107a9ffd 100644 --- a/packages/core/src/electron-browser/messaging/electron-ipc-connection-provider.ts +++ b/packages/core/src/electron-browser/messaging/electron-ipc-connection-provider.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { injectable, interfaces } from 'inversify'; -import { Event as ElectronEvent, ipcRenderer } from 'electron'; +import { Event as ElectronEvent, ipcRenderer } from '../../../shared/electron'; import { JsonRpcProxy } from '../../common/messaging'; import { WebSocketChannel } from '../../common/messaging/web-socket-channel'; import { AbstractConnectionProvider } from '../../common/messaging/abstract-connection-provider'; diff --git a/packages/core/src/electron-browser/token/electron-token-frontend-module.ts b/packages/core/src/electron-browser/token/electron-token-frontend-module.ts index 7e2da3f889c55..062315c7e00c7 100644 --- a/packages/core/src/electron-browser/token/electron-token-frontend-module.ts +++ b/packages/core/src/electron-browser/token/electron-token-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as electron from 'electron'; +import * as electron from '../../../shared/electron'; import { ContainerModule } from 'inversify'; import { ElectronSecurityToken } from '../../electron-common/electron-token'; diff --git a/packages/core/src/electron-browser/window/electron-window-service.ts b/packages/core/src/electron-browser/window/electron-window-service.ts index 70da23e8c29b7..e290cadf8ddf9 100644 --- a/packages/core/src/electron-browser/window/electron-window-service.ts +++ b/packages/core/src/electron-browser/window/electron-window-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { injectable, inject, postConstruct } from 'inversify'; -import { remote } from 'electron'; +import { remote } from '../../../shared/electron'; import { NewWindowOptions } from '../../browser/window/window-service'; import { DefaultWindowService } from '../../browser/window/default-window-service'; import { ElectronMainWindowService } from '../../electron-common/electron-main-window-service'; diff --git a/packages/core/src/electron-main/electron-main-application.ts b/packages/core/src/electron-main/electron-main-application.ts index fd8f51f4e5b94..06de8e06bc87d 100644 --- a/packages/core/src/electron-main/electron-main-application.ts +++ b/packages/core/src/electron-main/electron-main-application.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { inject, injectable, named } from 'inversify'; -import { screen, globalShortcut, app, BrowserWindow, BrowserWindowConstructorOptions, Event as ElectronEvent } from 'electron'; +import { screen, globalShortcut, app, BrowserWindow, BrowserWindowConstructorOptions, Event as ElectronEvent } from '../../shared/electron'; import * as path from 'path'; import { Argv } from 'yargs'; import { AddressInfo } from 'net'; @@ -29,7 +29,7 @@ import { MaybePromise } from '../common/types'; import { ContributionProvider } from '../common/contribution-provider'; import { ElectronSecurityTokenService } from './electron-security-token-service'; import { ElectronSecurityToken } from '../electron-common/electron-token'; -const Storage = require('electron-store'); +import Storage = require('electron-store'); const createYargs: (argv?: string[], cwd?: string) => Argv = require('yargs/yargs'); /** diff --git a/packages/core/src/electron-main/electron-main-window-service-impl.ts b/packages/core/src/electron-main/electron-main-window-service-impl.ts index c010cd172ff8f..7b14b0148f046 100644 --- a/packages/core/src/electron-main/electron-main-window-service-impl.ts +++ b/packages/core/src/electron-main/electron-main-window-service-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { shell } from 'electron'; +import { shell } from '../../shared/electron'; import { injectable, inject } from 'inversify'; import { ElectronMainWindowService } from '../electron-common/electron-main-window-service'; import { ElectronMainApplication } from './electron-main-application'; diff --git a/packages/core/src/electron-main/electron-native-keymap.ts b/packages/core/src/electron-main/electron-native-keymap.ts index 53b4ebf0cd204..33b8486a80d12 100644 --- a/packages/core/src/electron-main/electron-native-keymap.ts +++ b/packages/core/src/electron-main/electron-native-keymap.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { webContents } from 'electron'; +import { webContents } from '../../shared/electron'; import { injectable } from 'inversify'; import { ElectronMainApplication, ElectronMainApplicationContribution } from './electron-main-application'; -const nativeKeymap = require('native-keymap'); +import * as nativeKeymap from '@theia/electron/native-keymap'; @injectable() export class ElectronNativeKeymap implements ElectronMainApplicationContribution { diff --git a/packages/core/src/electron-main/electron-security-token-service.ts b/packages/core/src/electron-main/electron-security-token-service.ts index 534de8fd993bc..cfbbca7641f7d 100644 --- a/packages/core/src/electron-main/electron-security-token-service.ts +++ b/packages/core/src/electron-main/electron-security-token-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { session } from 'electron'; +import { session } from '../../shared/electron'; import { inject, injectable } from 'inversify'; import { ElectronSecurityToken } from '../electron-common/electron-token'; diff --git a/packages/core/src/electron-main/messaging/electron-messaging-contribution.ts b/packages/core/src/electron-main/messaging/electron-messaging-contribution.ts index 378f32545a6a9..f4ea507a699a6 100644 --- a/packages/core/src/electron-main/messaging/electron-messaging-contribution.ts +++ b/packages/core/src/electron-main/messaging/electron-messaging-contribution.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { IpcMainEvent, ipcMain, WebContents } from 'electron'; +import { IpcMainEvent, ipcMain, WebContents } from '../../../shared/electron'; import { inject, injectable, named, postConstruct } from 'inversify'; -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from 'vscode-ws-jsonrpc'; import { createWebSocketConnection } from 'vscode-ws-jsonrpc/lib/socket/connection'; import { ContributionProvider } from '../../common/contribution-provider'; import { WebSocketChannel } from '../../common/messaging/web-socket-channel'; diff --git a/packages/core/src/electron-node/keyboard/electron-keyboard-layout-provider.ts b/packages/core/src/electron-node/keyboard/electron-keyboard-layout-provider.ts index 89c5d87692dbe..e72305d9e18a5 100644 --- a/packages/core/src/electron-node/keyboard/electron-keyboard-layout-provider.ts +++ b/packages/core/src/electron-node/keyboard/electron-keyboard-layout-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as nativeKeymap from 'native-keymap'; +import * as nativeKeymap from '@theia/electron/native-keymap'; import { injectable } from 'inversify'; import { KeyboardLayoutProvider, NativeKeyboardLayout } from '../../common/keyboard/keyboard-layout-provider'; diff --git a/packages/core/src/node/messaging/ipc-bootstrap.ts b/packages/core/src/node/messaging/ipc-bootstrap.ts index fa59146ea6f4b..43afc43e1ed05 100644 --- a/packages/core/src/node/messaging/ipc-bootstrap.ts +++ b/packages/core/src/node/messaging/ipc-bootstrap.ts @@ -16,7 +16,7 @@ import 'reflect-metadata'; import { ConsoleLogger } from 'vscode-ws-jsonrpc/lib/logger'; -import { createMessageConnection, IPCMessageReader, IPCMessageWriter, Trace } from 'vscode-jsonrpc'; +import { createMessageConnection, IPCMessageReader, IPCMessageWriter, Trace } from 'vscode-ws-jsonrpc'; import { checkParentAlive, ipcEntryPoint, IPCEntryPoint } from './ipc-protocol'; checkParentAlive(); diff --git a/packages/core/src/node/messaging/ipc-connection-provider.ts b/packages/core/src/node/messaging/ipc-connection-provider.ts index 9e76ce13bdfbc..4ca773bc4675f 100644 --- a/packages/core/src/node/messaging/ipc-connection-provider.ts +++ b/packages/core/src/node/messaging/ipc-connection-provider.ts @@ -17,7 +17,7 @@ import * as path from 'path'; import * as cp from 'child_process'; import { injectable, inject } from 'inversify'; -import { Trace, IPCMessageReader, IPCMessageWriter, createMessageConnection, MessageConnection, Message } from 'vscode-jsonrpc'; +import { Trace, IPCMessageReader, IPCMessageWriter, createMessageConnection, MessageConnection, Message } from 'vscode-ws-jsonrpc'; import { ILogger, ConnectionErrorHandler, DisposableCollection, Disposable } from '../../common'; import { createIpcEnv } from './ipc-protocol'; diff --git a/packages/core/src/node/messaging/ipc-protocol.ts b/packages/core/src/node/messaging/ipc-protocol.ts index 5c6daec6fb707..fa3afc60218ed 100644 --- a/packages/core/src/node/messaging/ipc-protocol.ts +++ b/packages/core/src/node/messaging/ipc-protocol.ts @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from 'vscode-ws-jsonrpc'; const THEIA_PARENT_PID = 'THEIA_PARENT_PID'; const THEIA_ENTRY_POINT = 'THEIA_ENTRY_POINT'; diff --git a/packages/core/src/node/messaging/logger.ts b/packages/core/src/node/messaging/logger.ts index 5177b5c0c8666..998a2fe0ae253 100644 --- a/packages/core/src/node/messaging/logger.ts +++ b/packages/core/src/node/messaging/logger.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Logger } from 'vscode-jsonrpc'; +import { Logger } from 'vscode-ws-jsonrpc'; export class ConsoleLogger implements Logger { diff --git a/packages/core/src/node/messaging/messaging-contribution.ts b/packages/core/src/node/messaging/messaging-contribution.ts index 354ae68dd5ec2..daa455c9487ab 100644 --- a/packages/core/src/node/messaging/messaging-contribution.ts +++ b/packages/core/src/node/messaging/messaging-contribution.ts @@ -20,7 +20,7 @@ import * as net from 'net'; import * as http from 'http'; import * as https from 'https'; import { injectable, inject, named, postConstruct, interfaces, Container } from 'inversify'; -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from 'vscode-ws-jsonrpc'; import { createWebSocketConnection } from 'vscode-ws-jsonrpc/lib/socket/connection'; import { IConnection } from 'vscode-ws-jsonrpc/lib/server/connection'; import * as launch from 'vscode-ws-jsonrpc/lib/server/launch'; diff --git a/packages/core/src/node/messaging/messaging-service.ts b/packages/core/src/node/messaging/messaging-service.ts index 68dd461abe828..693166483cfb1 100644 --- a/packages/core/src/node/messaging/messaging-service.ts +++ b/packages/core/src/node/messaging/messaging-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as ws from 'ws'; -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from 'vscode-ws-jsonrpc'; import { IConnection } from 'vscode-ws-jsonrpc/lib/server/connection'; import { WebSocketChannel } from '../../common/messaging/web-socket-channel'; diff --git a/packages/debug/compile.tsconfig.json b/packages/debug/compile.tsconfig.json index 7d53bcc49a187..af365b1e8014e 100644 --- a/packages/debug/compile.tsconfig.json +++ b/packages/debug/compile.tsconfig.json @@ -9,9 +9,6 @@ "src" ], "references": [ - { - "path": "../../dev-packages/application-package/compile.tsconfig.json" - }, { "path": "../console/compile.tsconfig.json" }, diff --git a/packages/debug/package.json b/packages/debug/package.json index 41a5bc5698001..e6e0eebeeb733 100644 --- a/packages/debug/package.json +++ b/packages/debug/package.json @@ -3,7 +3,6 @@ "version": "1.12.0", "description": "Theia - Debug Extension", "dependencies": { - "@theia/application-package": "1.12.0", "@theia/console": "1.12.0", "@theia/core": "1.12.0", "@theia/editor": "1.12.0", diff --git a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts index e29f87dc7f192..6bb22bfabf6f7 100644 --- a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts +++ b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common'; import { StorageService } from '@theia/core/lib/browser'; import { Marker } from '@theia/markers/lib/common/marker'; diff --git a/packages/debug/src/browser/breakpoint/breakpoint-marker.ts b/packages/debug/src/browser/breakpoint/breakpoint-marker.ts index 63fa440651d65..7b1906d6e261c 100644 --- a/packages/debug/src/browser/breakpoint/breakpoint-marker.ts +++ b/packages/debug/src/browser/breakpoint/breakpoint-marker.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { UUID } from '@phosphor/coreutils'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; import URI from '@theia/core/lib/common/uri'; import { Marker } from '@theia/markers/lib/common/marker'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; diff --git a/packages/debug/src/browser/console/debug-console-contribution.tsx b/packages/debug/src/browser/console/debug-console-contribution.tsx index 9a3d31f6f42db..dd66d2b757a59 100644 --- a/packages/debug/src/browser/console/debug-console-contribution.tsx +++ b/packages/debug/src/browser/console/debug-console-contribution.tsx @@ -20,8 +20,8 @@ import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-k import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { Command, CommandRegistry } from '@theia/core/lib/common/command'; import { Severity } from '@theia/core/lib/common/severity'; -import { inject, injectable, interfaces } from 'inversify'; -import * as React from 'react'; +import { inject, injectable, interfaces } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; import { DebugConsoleSession } from './debug-console-session'; export type InDebugReplContextKey = ContextKey; diff --git a/packages/debug/src/browser/console/debug-console-items.tsx b/packages/debug/src/browser/console/debug-console-items.tsx index f18a6864cf8ea..b59589808c87f 100644 --- a/packages/debug/src/browser/console/debug-console-items.tsx +++ b/packages/debug/src/browser/console/debug-console-items.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import { SingleTextInputDialog } from '@theia/core/lib/browser'; import { ConsoleItem, CompositeConsoleItem } from '@theia/console/lib/browser/console-session'; diff --git a/packages/debug/src/browser/console/debug-console-session.ts b/packages/debug/src/browser/console/debug-console-session.ts index cfa3c452c0885..20fd98870af01 100644 --- a/packages/debug/src/browser/console/debug-console-session.ts +++ b/packages/debug/src/browser/console/debug-console-session.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import throttle = require('lodash.throttle'); -import { injectable, inject, postConstruct } from 'inversify'; +import throttle = require('@theia/core/shared/lodash.throttle'); +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import { ConsoleSession, ConsoleItem } from '@theia/console/lib/browser/console-session'; import { AnsiConsoleItem } from '@theia/console/lib/browser/ansi-console-item'; diff --git a/packages/debug/src/browser/debug-configuration-manager.ts b/packages/debug/src/browser/debug-configuration-manager.ts index 9121f1ad85764..c9bab9652caab 100644 --- a/packages/debug/src/browser/debug-configuration-manager.ts +++ b/packages/debug/src/browser/debug-configuration-manager.ts @@ -21,7 +21,7 @@ import debounce = require('p-debounce'); import { visit } from 'jsonc-parser'; -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Emitter, Event, WaitUntilEvent } from '@theia/core/lib/common/event'; import { EditorManager, EditorWidget } from '@theia/editor/lib/browser'; diff --git a/packages/debug/src/browser/debug-frontend-application-contribution.ts b/packages/debug/src/browser/debug-frontend-application-contribution.ts index 22e57b817c0d1..d371bc6e7f8a1 100644 --- a/packages/debug/src/browser/debug-frontend-application-contribution.ts +++ b/packages/debug/src/browser/debug-frontend-application-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { AbstractViewContribution, ApplicationShell, KeybindingRegistry, Widget, CompositeTreeNode, LabelProvider } from '@theia/core/lib/browser'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ThemeService } from '@theia/core/lib/browser/theming'; import { MenuModelRegistry, CommandRegistry, MAIN_MENU_BAR, Command, Emitter, Mutable } from '@theia/core/lib/common'; import { DebugViewLocation } from '../common/debug-configuration'; @@ -1254,10 +1254,10 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi defaults: { dark: '#ffff0033', light: '#ffff6673', hc: '#fff600' }, description: 'Background color for the highlight of line at the top stack frame position.' }, { - id: 'editor.focusedStackFrameHighlightBackground', - defaults: { dark: '#7abd7a4d', light: '#cee7ce73', hc: '#cee7ce' }, - description: 'Background color for the highlight of line at focused stack frame position.' - }, + id: 'editor.focusedStackFrameHighlightBackground', + defaults: { dark: '#7abd7a4d', light: '#cee7ce73', hc: '#cee7ce' }, + description: 'Background color for the highlight of line at focused stack frame position.' + }, // Status bar colors should be aligned with debugging colors from https://code.visualstudio.com/api/references/theme-color#status-bar-colors { id: 'statusBar.debuggingBackground', defaults: { @@ -1287,10 +1287,10 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi dark: '#a31515', light: '#a31515', hc: '#a31515' }, description: 'Exception widget border color.', }, { - id: 'debugExceptionWidget.background', defaults: { - dark: '#420b0d', light: '#f1dfde', hc: '#420b0d' - }, description: 'Exception widget background color.' - } + id: 'debugExceptionWidget.background', defaults: { + dark: '#420b0d', light: '#f1dfde', hc: '#420b0d' + }, description: 'Exception widget background color.' + } ); } diff --git a/packages/debug/src/browser/debug-frontend-module.ts b/packages/debug/src/browser/debug-frontend-module.ts index f1ced0af36ee3..f4c96416dd32c 100644 --- a/packages/debug/src/browser/debug-frontend-module.ts +++ b/packages/debug/src/browser/debug-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { DebugConfigurationManager } from './debug-configuration-manager'; import { DebugWidget } from './view/debug-widget'; import { DebugPath, DebugService } from '../common/debug-service'; diff --git a/packages/debug/src/browser/debug-keybinding-contexts.ts b/packages/debug/src/browser/debug-keybinding-contexts.ts index 0f8ddbd91070a..df20615cb1f56 100644 --- a/packages/debug/src/browser/debug-keybinding-contexts.ts +++ b/packages/debug/src/browser/debug-keybinding-contexts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContext } from '@theia/core/lib/browser'; import { DebugSessionManager } from './debug-session-manager'; import { DebugEditorService } from './editor/debug-editor-service'; diff --git a/packages/debug/src/browser/debug-preferences.ts b/packages/debug/src/browser/debug-preferences.ts index 3a06847e4bff8..b09bac6683de0 100644 --- a/packages/debug/src/browser/debug-preferences.ts +++ b/packages/debug/src/browser/debug-preferences.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { PreferenceSchema, PreferenceProxy, PreferenceService, createPreferenceProxy, PreferenceContribution } from '@theia/core/lib/browser/preferences'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; export const debugPreferencesSchema: PreferenceSchema = { type: 'object', diff --git a/packages/debug/src/browser/debug-prefix-configuration.ts b/packages/debug/src/browser/debug-prefix-configuration.ts index 4d7aff11afea0..0ae18e6e55509 100644 --- a/packages/debug/src/browser/debug-prefix-configuration.ts +++ b/packages/debug/src/browser/debug-prefix-configuration.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Command, CommandContribution, CommandHandler, CommandRegistry } from '@theia/core/lib/common/command'; import { QuickOpenContribution, QuickOpenHandler, QuickOpenModel, diff --git a/packages/debug/src/browser/debug-resource.ts b/packages/debug/src/browser/debug-resource.ts index 1913d16de27ad..f91d6df27ca11 100644 --- a/packages/debug/src/browser/debug-resource.ts +++ b/packages/debug/src/browser/debug-resource.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Resource, ResourceResolver } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; import { DebugSessionManager } from './debug-session-manager'; diff --git a/packages/debug/src/browser/debug-schema-updater.ts b/packages/debug/src/browser/debug-schema-updater.ts index 353b5222cea95..9d680f0e43e35 100644 --- a/packages/debug/src/browser/debug-schema-updater.ts +++ b/packages/debug/src/browser/debug-schema-updater.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { JsonSchemaRegisterContext, JsonSchemaContribution } from '@theia/core/lib/browser/json-schema-store'; import { InMemoryResources, deepClone } from '@theia/core/lib/common'; import { IJSONSchema } from '@theia/core/lib/common/json-schema'; diff --git a/packages/debug/src/browser/debug-session-connection.ts b/packages/debug/src/browser/debug-session-connection.ts index 879ee98faecf0..32f575de00615 100644 --- a/packages/debug/src/browser/debug-session-connection.ts +++ b/packages/debug/src/browser/debug-session-connection.ts @@ -20,7 +20,7 @@ import { DebugProtocol } from 'vscode-debugprotocol'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { Event, Emitter, DisposableCollection, Disposable, MaybePromise } from '@theia/core'; import { OutputChannel } from '@theia/output/lib/common/output-channel'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; export interface DebugExitEvent { code?: number diff --git a/packages/debug/src/browser/debug-session-contribution.ts b/packages/debug/src/browser/debug-session-contribution.ts index 9b00a1786d3aa..ebcab7eac6ab2 100644 --- a/packages/debug/src/browser/debug-session-contribution.ts +++ b/packages/debug/src/browser/debug-session-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named, postConstruct } from 'inversify'; +import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify'; import { MessageClient } from '@theia/core/lib/common'; import { LabelProvider } from '@theia/core/lib/browser'; import { EditorManager } from '@theia/editor/lib/browser'; @@ -26,7 +26,7 @@ import { DebugSessionOptions } from './debug-session-options'; import { OutputChannelManager, OutputChannel } from '@theia/output/lib/common/output-channel'; import { DebugPreferences } from './debug-preferences'; import { DebugSessionConnection } from './debug-session-connection'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; import { DebugAdapterPath } from '../common/debug-service'; import { ContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; diff --git a/packages/debug/src/browser/debug-session-manager.ts b/packages/debug/src/browser/debug-session-manager.ts index 54da78df11546..907c2a3873b2e 100644 --- a/packages/debug/src/browser/debug-session-manager.ts +++ b/packages/debug/src/browser/debug-session-manager.ts @@ -24,7 +24,7 @@ import { EditorManager } from '@theia/editor/lib/browser'; import { QuickOpenTask } from '@theia/task/lib/browser/quick-open-task'; import { TaskService, TaskEndedInfo, TaskEndedTypes } from '@theia/task/lib/browser/task-service'; import { VariableResolverService } from '@theia/variable-resolver/lib/browser'; -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { DebugConfiguration } from '../common/debug-common'; import { DebugError, DebugService } from '../common/debug-service'; import { BreakpointManager } from './breakpoint/breakpoint-manager'; diff --git a/packages/debug/src/browser/debug-session.tsx b/packages/debug/src/browser/debug-session.tsx index 867aba36c3e76..6d409be30318a 100644 --- a/packages/debug/src/browser/debug-session.tsx +++ b/packages/debug/src/browser/debug-session.tsx @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { LabelProvider } from '@theia/core/lib/browser'; import { DebugProtocol } from 'vscode-debugprotocol'; import { Emitter, Event, DisposableCollection, Disposable, MessageClient, MessageType, Mutable } from '@theia/core/lib/common'; diff --git a/packages/debug/src/browser/debug-tab-bar-decorator.ts b/packages/debug/src/browser/debug-tab-bar-decorator.ts index 6e11856f45d57..9dfa94bec388d 100644 --- a/packages/debug/src/browser/debug-tab-bar-decorator.ts +++ b/packages/debug/src/browser/debug-tab-bar-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { DebugSessionManager } from './debug-session-manager'; import { DebugWidget } from './view/debug-widget'; import { Emitter, Event } from '@theia/core/lib/common/event'; diff --git a/packages/debug/src/browser/debug-watch-manager.ts b/packages/debug/src/browser/debug-watch-manager.ts index ff11ce244714e..9d054e37024d2 100644 --- a/packages/debug/src/browser/debug-watch-manager.ts +++ b/packages/debug/src/browser/debug-watch-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { StorageService } from '@theia/core/lib/browser/storage-service'; diff --git a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx index dcf109c5aa16b..e7e535047dae6 100644 --- a/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx +++ b/packages/debug/src/browser/editor/debug-breakpoint-widget.tsx @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; +import * as React from '@theia/core/shared/react'; +import * as ReactDOM from '@theia/core/shared/react-dom'; import { DebugProtocol } from 'vscode-debugprotocol'; -import { injectable, postConstruct, inject } from 'inversify'; +import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider'; diff --git a/packages/debug/src/browser/editor/debug-editor-model.ts b/packages/debug/src/browser/editor/debug-editor-model.ts index 9d122756af3f0..10945d37e0975 100644 --- a/packages/debug/src/browser/editor/debug-editor-model.ts +++ b/packages/debug/src/browser/editor/debug-editor-model.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import debounce = require('p-debounce'); -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Disposable, DisposableCollection, MenuPath, isOSX } from '@theia/core'; import { ContextMenuRenderer } from '@theia/core/lib/browser'; diff --git a/packages/debug/src/browser/editor/debug-editor-service.ts b/packages/debug/src/browser/editor/debug-editor-service.ts index fe34bfb4a5164..9d69e5f5a936d 100644 --- a/packages/debug/src/browser/editor/debug-editor-service.ts +++ b/packages/debug/src/browser/editor/debug-editor-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { EditorManager, EditorWidget } from '@theia/editor/lib/browser'; import { ContextMenuRenderer } from '@theia/core/lib/browser'; diff --git a/packages/debug/src/browser/editor/debug-exception-widget.tsx b/packages/debug/src/browser/editor/debug-exception-widget.tsx index 53b7d4f45063d..830f52be3c483 100644 --- a/packages/debug/src/browser/editor/debug-exception-widget.tsx +++ b/packages/debug/src/browser/editor/debug-exception-widget.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; -import { injectable, inject, postConstruct } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import * as ReactDOM from '@theia/core/shared/react-dom'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { MonacoEditorZoneWidget } from '@theia/monaco/lib/browser/monaco-editor-zone-widget'; import { DebugEditor } from './debug-editor'; diff --git a/packages/debug/src/browser/editor/debug-expression-provider.ts b/packages/debug/src/browser/editor/debug-expression-provider.ts index e9c06c7f8e5d0..c1c6ba5cbb890 100644 --- a/packages/debug/src/browser/editor/debug-expression-provider.ts +++ b/packages/debug/src/browser/editor/debug-expression-provider.ts @@ -18,7 +18,7 @@ * Licensed under the MIT License. See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; /** * TODO: introduce a new request to LSP to look up an expression range: https://github.com/Microsoft/language-server-protocol/issues/462 diff --git a/packages/debug/src/browser/editor/debug-hover-source.tsx b/packages/debug/src/browser/editor/debug-hover-source.tsx index b86ce847cf24c..f8c5324175d82 100644 --- a/packages/debug/src/browser/editor/debug-hover-source.tsx +++ b/packages/debug/src/browser/editor/debug-hover-source.tsx @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree'; import { ExpressionContainer, ExpressionItem, DebugVariable } from '../console/debug-console-items'; import { DebugSessionManager } from '../debug-session-manager'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; @injectable() export class DebugHoverSource extends TreeSource { diff --git a/packages/debug/src/browser/editor/debug-hover-widget.ts b/packages/debug/src/browser/editor/debug-hover-widget.ts index 1ed6dca22593c..443ebece8627c 100644 --- a/packages/debug/src/browser/editor/debug-hover-widget.ts +++ b/packages/debug/src/browser/editor/debug-hover-widget.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); -import { Widget } from '@phosphor/widgets'; -import { Message } from '@phosphor/messaging'; -import { injectable, postConstruct, inject, Container, interfaces } from 'inversify'; +import { Widget } from '@theia/core/shared/@phosphor/widgets'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { injectable, postConstruct, inject, Container, interfaces } from '@theia/core/shared/inversify'; import { Key } from '@theia/core/lib/browser'; import { SourceTreeWidget } from '@theia/core/lib/browser/source-tree'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/debug/src/browser/editor/debug-inline-value-decorator.ts b/packages/debug/src/browser/editor/debug-inline-value-decorator.ts index 49ee9cd7ae304..0ee08b0bd4c4e 100644 --- a/packages/debug/src/browser/editor/debug-inline-value-decorator.ts +++ b/packages/debug/src/browser/editor/debug-inline-value-decorator.ts @@ -20,7 +20,7 @@ *--------------------------------------------------------------------------------------------*/ // Based on https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/workbench/contrib/debug/browser/debugEditorContribution.ts -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application'; import { MonacoEditorService } from '@theia/monaco/lib/browser/monaco-editor-service'; import { ExpressionContainer, DebugVariable } from '../console/debug-console-items'; diff --git a/packages/debug/src/browser/model/debug-breakpoint.tsx b/packages/debug/src/browser/model/debug-breakpoint.tsx index 5346771250c66..b4be6f5dab1db 100644 --- a/packages/debug/src/browser/model/debug-breakpoint.tsx +++ b/packages/debug/src/browser/model/debug-breakpoint.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import URI from '@theia/core/lib/common/uri'; import { EditorManager } from '@theia/editor/lib/browser'; diff --git a/packages/debug/src/browser/model/debug-function-breakpoint.tsx b/packages/debug/src/browser/model/debug-function-breakpoint.tsx index 84c173b6d040c..db7ac5b49eea4 100644 --- a/packages/debug/src/browser/model/debug-function-breakpoint.tsx +++ b/packages/debug/src/browser/model/debug-function-breakpoint.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { TreeElement } from '@theia/core/lib/browser/source-tree'; import { FunctionBreakpoint } from '../breakpoint/breakpoint-marker'; import { BreakpointManager } from '../breakpoint/breakpoint-manager'; diff --git a/packages/debug/src/browser/model/debug-source-breakpoint.tsx b/packages/debug/src/browser/model/debug-source-breakpoint.tsx index 87321c33be954..9f5deaacc1678 100644 --- a/packages/debug/src/browser/model/debug-source-breakpoint.tsx +++ b/packages/debug/src/browser/model/debug-source-breakpoint.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import { RecursivePartial } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/debug/src/browser/model/debug-source.ts b/packages/debug/src/browser/model/debug-source.ts index 509332ce6ef4c..9d8a8286757c1 100644 --- a/packages/debug/src/browser/model/debug-source.ts +++ b/packages/debug/src/browser/model/debug-source.ts @@ -19,7 +19,7 @@ import { EditorManager, EditorOpenerOptions, EditorWidget } from '@theia/editor/ import URI from '@theia/core/lib/common/uri'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import { DebugSession } from '../debug-session'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; export class DebugSourceData { readonly raw: DebugProtocol.Source; diff --git a/packages/debug/src/browser/model/debug-stack-frame.tsx b/packages/debug/src/browser/model/debug-stack-frame.tsx index 7fd76eb7ebfc6..594a8945b3607 100644 --- a/packages/debug/src/browser/model/debug-stack-frame.tsx +++ b/packages/debug/src/browser/model/debug-stack-frame.tsx @@ -20,7 +20,7 @@ *--------------------------------------------------------------------------------------------*/ // Based on https://github.com/theia-ide/vscode/blob/standalone/0.19.x/src/vs/workbench/contrib/debug/common/debugModel.ts -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { WidgetOpenerOptions, DISABLED_CLASS } from '@theia/core/lib/browser'; import { EditorWidget, Range, Position } from '@theia/editor/lib/browser'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; diff --git a/packages/debug/src/browser/model/debug-thread.tsx b/packages/debug/src/browser/model/debug-thread.tsx index 9d2116a17d11d..939de6679fff8 100644 --- a/packages/debug/src/browser/model/debug-thread.tsx +++ b/packages/debug/src/browser/model/debug-thread.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { CancellationTokenSource, Emitter, Event } from '@theia/core'; import { DebugProtocol } from 'vscode-debugprotocol/lib/debugProtocol'; import { TreeElement } from '@theia/core/lib/browser/source-tree'; diff --git a/packages/debug/src/browser/preferences/launch-preferences.ts b/packages/debug/src/browser/preferences/launch-preferences.ts index 743f8fd4fc886..9e969f9ca3b9b 100644 --- a/packages/debug/src/browser/preferences/launch-preferences.ts +++ b/packages/debug/src/browser/preferences/launch-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser/preferences/preference-contribution'; import { launchSchemaId } from '../debug-schema-updater'; import { PreferenceConfiguration } from '@theia/core/lib/browser/preferences/preference-configurations'; diff --git a/packages/debug/src/browser/view/debug-action.tsx b/packages/debug/src/browser/view/debug-action.tsx index a4da08c00d7d8..17dc3da26f525 100644 --- a/packages/debug/src/browser/view/debug-action.tsx +++ b/packages/debug/src/browser/view/debug-action.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DISABLED_CLASS } from '@theia/core/lib/browser'; export class DebugAction extends React.Component { diff --git a/packages/debug/src/browser/view/debug-breakpoints-source.tsx b/packages/debug/src/browser/view/debug-breakpoints-source.tsx index ca66df51b0bd2..6849b398dffbf 100644 --- a/packages/debug/src/browser/view/debug-breakpoints-source.tsx +++ b/packages/debug/src/browser/view/debug-breakpoints-source.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree'; import { DebugViewModel } from './debug-view-model'; import { BreakpointManager } from '../breakpoint/breakpoint-manager'; diff --git a/packages/debug/src/browser/view/debug-breakpoints-widget.ts b/packages/debug/src/browser/view/debug-breakpoints-widget.ts index dee0689aad28a..26d9a3a482782 100644 --- a/packages/debug/src/browser/view/debug-breakpoints-widget.ts +++ b/packages/debug/src/browser/view/debug-breakpoints-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core/lib/common'; import { TreeNode, NodeProps } from '@theia/core/lib/browser'; import { SourceTreeWidget } from '@theia/core/lib/browser/source-tree'; diff --git a/packages/debug/src/browser/view/debug-configuration-widget.tsx b/packages/debug/src/browser/view/debug-configuration-widget.tsx index 5791f55af22f6..159e94d5145fc 100644 --- a/packages/debug/src/browser/view/debug-configuration-widget.tsx +++ b/packages/debug/src/browser/view/debug-configuration-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject, postConstruct } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { ReactWidget } from '@theia/core/lib/browser'; diff --git a/packages/debug/src/browser/view/debug-exception-breakpoint.tsx b/packages/debug/src/browser/view/debug-exception-breakpoint.tsx index d931794c213e7..38d16d786045b 100644 --- a/packages/debug/src/browser/view/debug-exception-breakpoint.tsx +++ b/packages/debug/src/browser/view/debug-exception-breakpoint.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { TreeElement } from '@theia/core/lib/browser/source-tree'; import { BreakpointManager } from '../breakpoint/breakpoint-manager'; import { ExceptionBreakpoint } from '../breakpoint/breakpoint-marker'; diff --git a/packages/debug/src/browser/view/debug-session-widget.ts b/packages/debug/src/browser/view/debug-session-widget.ts index bf5eabb6f735f..d2ebd97af2edd 100644 --- a/packages/debug/src/browser/view/debug-session-widget.ts +++ b/packages/debug/src/browser/view/debug-session-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct, interfaces, Container } from 'inversify'; +import { inject, injectable, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { Message, ApplicationShell, Widget, BaseWidget, PanelLayout, StatefulWidget, ViewContainer } from '@theia/core/lib/browser'; diff --git a/packages/debug/src/browser/view/debug-stack-frames-source.tsx b/packages/debug/src/browser/view/debug-stack-frames-source.tsx index 08d12764365ae..d60fbc71ffcd2 100644 --- a/packages/debug/src/browser/view/debug-stack-frames-source.tsx +++ b/packages/debug/src/browser/view/debug-stack-frames-source.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject, postConstruct } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree'; import { DebugThread } from '../model/debug-thread'; import { DebugViewModel } from './debug-view-model'; diff --git a/packages/debug/src/browser/view/debug-stack-frames-widget.ts b/packages/debug/src/browser/view/debug-stack-frames-widget.ts index fa4a44e0719c7..aa8c299c3a1c6 100644 --- a/packages/debug/src/browser/view/debug-stack-frames-widget.ts +++ b/packages/debug/src/browser/view/debug-stack-frames-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core'; import { TreeNode, NodeProps, SelectableTreeNode } from '@theia/core/lib/browser'; import { SourceTreeWidget, TreeElementNode } from '@theia/core/lib/browser/source-tree'; diff --git a/packages/debug/src/browser/view/debug-threads-source.tsx b/packages/debug/src/browser/view/debug-threads-source.tsx index 6a227ccbad413..05a83b05214f4 100644 --- a/packages/debug/src/browser/view/debug-threads-source.tsx +++ b/packages/debug/src/browser/view/debug-threads-source.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree'; import { DebugViewModel } from './debug-view-model'; diff --git a/packages/debug/src/browser/view/debug-threads-widget.ts b/packages/debug/src/browser/view/debug-threads-widget.ts index 39db57685b357..32fe3cb784dfc 100644 --- a/packages/debug/src/browser/view/debug-threads-widget.ts +++ b/packages/debug/src/browser/view/debug-threads-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core'; import { TreeNode, NodeProps, SelectableTreeNode } from '@theia/core/lib/browser'; import { SourceTreeWidget, TreeElementNode } from '@theia/core/lib/browser/source-tree'; diff --git a/packages/debug/src/browser/view/debug-toolbar-widget.tsx b/packages/debug/src/browser/view/debug-toolbar-widget.tsx index b0cafb6b1bbc0..18155541534dc 100644 --- a/packages/debug/src/browser/view/debug-toolbar-widget.tsx +++ b/packages/debug/src/browser/view/debug-toolbar-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { inject, postConstruct, injectable } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { inject, postConstruct, injectable } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core'; import { ReactWidget } from '@theia/core/lib/browser/widgets'; import { DebugViewModel } from './debug-view-model'; diff --git a/packages/debug/src/browser/view/debug-variables-source.ts b/packages/debug/src/browser/view/debug-variables-source.ts index 7d5b6e364ab2c..9b9f5801ea31f 100644 --- a/packages/debug/src/browser/view/debug-variables-source.ts +++ b/packages/debug/src/browser/view/debug-variables-source.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource } from '@theia/core/lib/browser/source-tree'; import { DebugScope } from '../console/debug-console-items'; import { DebugViewModel } from './debug-view-model'; diff --git a/packages/debug/src/browser/view/debug-variables-widget.ts b/packages/debug/src/browser/view/debug-variables-widget.ts index 5ada69010a664..e3b830fffabe5 100644 --- a/packages/debug/src/browser/view/debug-variables-widget.ts +++ b/packages/debug/src/browser/view/debug-variables-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core/lib/common'; import { SourceTreeWidget } from '@theia/core/lib/browser/source-tree'; import { DebugVariablesSource } from './debug-variables-source'; diff --git a/packages/debug/src/browser/view/debug-view-model.ts b/packages/debug/src/browser/view/debug-view-model.ts index 7d11a8850172c..a3cdfb9a1473e 100644 --- a/packages/debug/src/browser/view/debug-view-model.ts +++ b/packages/debug/src/browser/view/debug-view-model.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import debounce from 'p-debounce'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection, Event, Emitter } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { DebugSession, DebugState } from '../debug-session'; diff --git a/packages/debug/src/browser/view/debug-watch-expression.tsx b/packages/debug/src/browser/view/debug-watch-expression.tsx index 51fe73e4d80e1..5b405760a6d67 100644 --- a/packages/debug/src/browser/view/debug-watch-expression.tsx +++ b/packages/debug/src/browser/view/debug-watch-expression.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { SingleTextInputDialog } from '@theia/core/lib/browser/dialogs'; import { ExpressionItem, DebugSessionProvider } from '../console/debug-console-items'; import { DebugProtocol } from 'vscode-debugprotocol'; diff --git a/packages/debug/src/browser/view/debug-watch-source.ts b/packages/debug/src/browser/view/debug-watch-source.ts index fd7a67e3ac3bb..7e0fa43cde798 100644 --- a/packages/debug/src/browser/view/debug-watch-source.ts +++ b/packages/debug/src/browser/view/debug-watch-source.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource } from '@theia/core/lib/browser/source-tree'; import { DebugViewModel } from './debug-view-model'; import { DebugWatchExpression } from './debug-watch-expression'; diff --git a/packages/debug/src/browser/view/debug-watch-widget.ts b/packages/debug/src/browser/view/debug-watch-widget.ts index a36487bb78b0f..2f4299a3d2b3b 100644 --- a/packages/debug/src/browser/view/debug-watch-widget.ts +++ b/packages/debug/src/browser/view/debug-watch-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct, interfaces, Container } from 'inversify'; +import { injectable, inject, postConstruct, interfaces, Container } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core/lib/common'; import { SourceTreeWidget } from '@theia/core/lib/browser/source-tree'; import { DebugWatchSource } from './debug-watch-source'; diff --git a/packages/debug/src/browser/view/debug-widget.ts b/packages/debug/src/browser/view/debug-widget.ts index 4be43613d9610..78f6efb82a56e 100644 --- a/packages/debug/src/browser/view/debug-widget.ts +++ b/packages/debug/src/browser/view/debug-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct, inject, interfaces, Container } from 'inversify'; +import { injectable, postConstruct, inject, interfaces, Container } from '@theia/core/shared/inversify'; import { BaseWidget, PanelLayout, Message, ApplicationShell, Widget, StatefulWidget, ViewContainer } from '@theia/core/lib/browser'; diff --git a/packages/debug/src/node/debug-adapter-contribution-registry.ts b/packages/debug/src/node/debug-adapter-contribution-registry.ts index 21f6cda3a59e4..e1acc58ef1f81 100644 --- a/packages/debug/src/node/debug-adapter-contribution-registry.ts +++ b/packages/debug/src/node/debug-adapter-contribution-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ContributionProvider } from '@theia/core'; import { DebugConfiguration } from '../common/debug-configuration'; import { DebuggerDescription, DebugError } from '../common/debug-service'; diff --git a/packages/debug/src/node/debug-adapter-factory.ts b/packages/debug/src/node/debug-adapter-factory.ts index d4e34d35e2282..48f84782b5f60 100644 --- a/packages/debug/src/node/debug-adapter-factory.ts +++ b/packages/debug/src/node/debug-adapter-factory.ts @@ -22,7 +22,7 @@ // Some entities copied and modified from https://github.com/Microsoft/vscode-debugadapter-node/blob/master/adapter/src/protocol.ts import * as net from 'net'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { RawProcessFactory, ProcessManager, @@ -39,7 +39,7 @@ import { DebugAdapterForkExecutable } from '../common/debug-model'; import { DebugAdapterSessionImpl } from './debug-adapter-session'; -import { environment } from '@theia/application-package'; +import { environment } from '@theia/core/shared/@theia/application-package'; /** * [DebugAdapterFactory](#DebugAdapterFactory) implementation based on diff --git a/packages/debug/src/node/debug-adapter-session-manager.ts b/packages/debug/src/node/debug-adapter-session-manager.ts index 730104eb0211a..975d32ab4c927 100644 --- a/packages/debug/src/node/debug-adapter-session-manager.ts +++ b/packages/debug/src/node/debug-adapter-session-manager.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { UUID } from '@phosphor/coreutils'; -import { injectable, inject } from 'inversify'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service'; import { DebugAdapterPath } from '../common/debug-service'; diff --git a/packages/debug/src/node/debug-adapter-session.ts b/packages/debug/src/node/debug-adapter-session.ts index 6db07ecdee6df..2d36b0e99e062 100644 --- a/packages/debug/src/node/debug-adapter-session.ts +++ b/packages/debug/src/node/debug-adapter-session.ts @@ -26,7 +26,7 @@ import { DebugAdapterSession, } from '../common/debug-model'; import { DebugProtocol } from 'vscode-debugprotocol'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; /** diff --git a/packages/debug/src/node/debug-backend-module.ts b/packages/debug/src/node/debug-backend-module.ts index ff8475887bc46..a5248d03c056a 100644 --- a/packages/debug/src/node/debug-backend-module.ts +++ b/packages/debug/src/node/debug-backend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { bindContributionProvider, ILogger } from '@theia/core/lib/common'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { DebugPath, DebugService diff --git a/packages/debug/src/node/debug-service-impl.ts b/packages/debug/src/node/debug-service-impl.ts index dcaf0fd3e7918..dfee75016769d 100644 --- a/packages/debug/src/node/debug-service-impl.ts +++ b/packages/debug/src/node/debug-service-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { DebugConfiguration } from '../common/debug-configuration'; import { DebugService, DebuggerDescription } from '../common/debug-service'; diff --git a/packages/debug/src/node/vscode/vscode-debug-adapter-contribution.ts b/packages/debug/src/node/vscode/vscode-debug-adapter-contribution.ts index 2091a938f8da3..bb71678f660ad 100644 --- a/packages/debug/src/node/vscode/vscode-debug-adapter-contribution.ts +++ b/packages/debug/src/node/vscode/vscode-debug-adapter-contribution.ts @@ -14,13 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { DebugAdapterExecutable, DebugAdapterContribution } from '../../common/debug-model'; import { isWindows, isOSX } from '@theia/core/lib/common/os'; import { IJSONSchema, IJSONSchemaSnippet } from '@theia/core/lib/common/json-schema'; import { deepClone } from '@theia/core/lib/common/objects'; -import { injectable, unmanaged } from 'inversify'; +import { injectable, unmanaged } from '@theia/core/shared/inversify'; namespace nls { export function localize(key: string, _default: string): string { @@ -178,7 +178,7 @@ export abstract class AbstractVSCodeDebugAdapterContribution implements DebugAda }; properties['postDebugTask'] = { anyOf: [taskSchema, { - type: ['string', ], + type: ['string'], }], default: '', defaultSnippets: [{ body: { task: '', type: '' } }], diff --git a/packages/editor-preview/src/browser/editor-preview-factory.spec.ts b/packages/editor-preview/src/browser/editor-preview-factory.spec.ts index d4ee56496812c..12e0d2be5c477 100644 --- a/packages/editor-preview/src/browser/editor-preview-factory.spec.ts +++ b/packages/editor-preview/src/browser/editor-preview-factory.spec.ts @@ -27,7 +27,7 @@ FrontendApplicationConfigProvider.set({ ...ApplicationProps.DEFAULT.frontend.config }); -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { WidgetFactory, WidgetManager } from '@theia/core/lib/browser'; import { EditorWidget, EditorManager } from '@theia/editor/lib/browser'; import { EditorPreviewWidgetFactory, EditorPreviewWidgetOptions } from './editor-preview-factory'; diff --git a/packages/editor-preview/src/browser/editor-preview-factory.ts b/packages/editor-preview/src/browser/editor-preview-factory.ts index 7e64b1fbabcc2..c8c1d84ca16b0 100644 --- a/packages/editor-preview/src/browser/editor-preview-factory.ts +++ b/packages/editor-preview/src/browser/editor-preview-factory.ts @@ -18,9 +18,9 @@ import URI from '@theia/core/lib/common/uri'; import { WidgetFactory, WidgetManager } from '@theia/core/lib/browser'; import { MaybePromise } from '@theia/core/lib/common/types'; import { EditorPreviewWidget } from './editor-preview-widget'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { EditorManager } from '@theia/editor/lib/browser'; -import { UUID } from '@phosphor/coreutils'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; export interface EditorPreviewWidgetOptions { kind: 'editor-preview-widget', diff --git a/packages/editor-preview/src/browser/editor-preview-frontend-module.ts b/packages/editor-preview/src/browser/editor-preview-frontend-module.ts index c3057b83b8f4a..de819df09e544 100644 --- a/packages/editor-preview/src/browser/editor-preview-frontend-module.ts +++ b/packages/editor-preview/src/browser/editor-preview-frontend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { OpenHandler, WidgetFactory } from '@theia/core/lib/browser'; -import {ContainerModule} from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { EditorPreviewManager } from './editor-preview-manager'; import { EditorPreviewWidgetFactory } from './editor-preview-factory'; import { bindEditorPreviewPreferences } from './editor-preview-preferences'; diff --git a/packages/editor-preview/src/browser/editor-preview-manager.spec.ts b/packages/editor-preview/src/browser/editor-preview-manager.spec.ts index d0b68b50cd576..ac2dd61c38cea 100644 --- a/packages/editor-preview/src/browser/editor-preview-manager.spec.ts +++ b/packages/editor-preview/src/browser/editor-preview-manager.spec.ts @@ -22,7 +22,7 @@ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom'; const disableJsDom = enableJSDOM(); import URI from '@theia/core/lib/common/uri'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { EditorPreviewManager } from './editor-preview-manager'; import { EditorPreviewWidget } from './editor-preview-widget'; import { EditorPreviewWidgetFactory } from './editor-preview-factory'; diff --git a/packages/editor-preview/src/browser/editor-preview-manager.ts b/packages/editor-preview/src/browser/editor-preview-manager.ts index 2515fa59e7b67..2fd3c394b4d1f 100644 --- a/packages/editor-preview/src/browser/editor-preview-manager.ts +++ b/packages/editor-preview/src/browser/editor-preview-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ApplicationShell, DockPanel } from '@theia/core/lib/browser'; import { EditorManager, EditorOpenerOptions, EditorWidget } from '@theia/editor/lib/browser'; diff --git a/packages/editor-preview/src/browser/editor-preview-preferences.ts b/packages/editor-preview/src/browser/editor-preview-preferences.ts index fb412af748107..707639d306d73 100644 --- a/packages/editor-preview/src/browser/editor-preview-preferences.ts +++ b/packages/editor-preview/src/browser/editor-preview-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; export const EditorPreviewConfigSchema: PreferenceSchema = { diff --git a/packages/editor-preview/src/browser/editor-preview-widget.ts b/packages/editor-preview/src/browser/editor-preview-widget.ts index 05f682fd03509..b9813cab53df0 100644 --- a/packages/editor-preview/src/browser/editor-preview-widget.ts +++ b/packages/editor-preview/src/browser/editor-preview-widget.ts @@ -21,8 +21,8 @@ import { import { Emitter, DisposableCollection } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { EditorWidget } from '@theia/editor/lib/browser'; -import { Message, MessageLoop } from '@phosphor/messaging'; -import { find } from '@phosphor/algorithm'; +import { Message, MessageLoop } from '@theia/core/shared/@phosphor/messaging'; +import { find } from '@theia/core/shared/@phosphor/algorithm'; export interface PreviewViewState { pinned: boolean, diff --git a/packages/editor/src/browser/decorations/editor-decorator.ts b/packages/editor/src/browser/decorations/editor-decorator.ts index 42e92c5094ff8..e98bc17ed509d 100644 --- a/packages/editor/src/browser/decorations/editor-decorator.ts +++ b/packages/editor/src/browser/decorations/editor-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { TextEditor } from '../editor'; import { EditorDecoration } from './editor-decoration'; diff --git a/packages/editor/src/browser/editor-command.ts b/packages/editor/src/browser/editor-command.ts index 03c41deaf719b..80a9cac2cfaac 100644 --- a/packages/editor/src/browser/editor-command.ts +++ b/packages/editor/src/browser/editor-command.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { CommandContribution, CommandRegistry, Command } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { CommonCommands, PreferenceService, QuickPickItem, QuickPickService, LabelProvider, QuickPickValue, ApplicationShell } from '@theia/core/lib/browser'; diff --git a/packages/editor/src/browser/editor-contribution.ts b/packages/editor/src/browser/editor-contribution.ts index 7f2466e960902..bf981507c9fdf 100644 --- a/packages/editor/src/browser/editor-contribution.ts +++ b/packages/editor/src/browser/editor-contribution.ts @@ -16,7 +16,7 @@ import { EditorManager } from './editor-manager'; import { TextEditor } from './editor'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { StatusBarAlignment, StatusBar } from '@theia/core/lib/browser/status-bar/status-bar'; import { FrontendApplicationContribution, DiffUris } from '@theia/core/lib/browser'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; diff --git a/packages/editor/src/browser/editor-frontend-module.ts b/packages/editor/src/browser/editor-frontend-module.ts index 952fe1c8a8b73..3feda7e790e55 100644 --- a/packages/editor/src/browser/editor-frontend-module.ts +++ b/packages/editor/src/browser/editor-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; import { OpenHandler, WidgetFactory, FrontendApplicationContribution, KeybindingContext, KeybindingContribution, QuickOpenContribution } from '@theia/core/lib/browser'; import { VariableContribution } from '@theia/variable-resolver/lib/browser'; diff --git a/packages/editor/src/browser/editor-keybinding-contexts.ts b/packages/editor/src/browser/editor-keybinding-contexts.ts index 8f614434b0d68..76be2c55a8078 100644 --- a/packages/editor/src/browser/editor-keybinding-contexts.ts +++ b/packages/editor/src/browser/editor-keybinding-contexts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContext } from '@theia/core/lib/browser/keybinding'; import { EditorManager } from './editor-manager'; import { EditorWidget } from './editor-widget'; diff --git a/packages/editor/src/browser/editor-keybinding.ts b/packages/editor/src/browser/editor-keybinding.ts index b3b45af929952..1ba6559baf71a 100644 --- a/packages/editor/src/browser/editor-keybinding.ts +++ b/packages/editor/src/browser/editor-keybinding.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { isOSX, isWindows } from '@theia/core/lib/common/os'; import { KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser/keybinding'; import { EditorCommands } from './editor-command'; diff --git a/packages/editor/src/browser/editor-manager.ts b/packages/editor/src/browser/editor-manager.ts index 149bcca68a5f0..f197d317ad54b 100644 --- a/packages/editor/src/browser/editor-manager.ts +++ b/packages/editor/src/browser/editor-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct, inject } from 'inversify'; +import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { RecursivePartial, Emitter, Event } from '@theia/core/lib/common'; import { WidgetOpenerOptions, NavigatableWidgetOpenHandler } from '@theia/core/lib/browser'; diff --git a/packages/editor/src/browser/editor-menu.ts b/packages/editor/src/browser/editor-menu.ts index 59952406673a1..11f7590b023d7 100644 --- a/packages/editor/src/browser/editor-menu.ts +++ b/packages/editor/src/browser/editor-menu.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MenuContribution, MenuModelRegistry, MenuPath, MAIN_MENU_BAR } from '@theia/core'; import { CommonCommands, CommonMenus } from '@theia/core/lib/browser'; import { EditorCommands } from './editor-command'; diff --git a/packages/editor/src/browser/editor-navigation-contribution.ts b/packages/editor/src/browser/editor-navigation-contribution.ts index b3e53e4bd35c1..11e243e56f7c5 100644 --- a/packages/editor/src/browser/editor-navigation-contribution.ts +++ b/packages/editor/src/browser/editor-navigation-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { StorageService } from '@theia/core/lib/browser/storage-service'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/editor/src/browser/editor-preferences.ts b/packages/editor/src/browser/editor-preferences.ts index 7937038f92f94..c04e70663ea73 100644 --- a/packages/editor/src/browser/editor-preferences.ts +++ b/packages/editor/src/browser/editor-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/editor/src/browser/editor-quick-open-service.ts b/packages/editor/src/browser/editor-quick-open-service.ts index e2df18766c9ab..163c175ba2962 100644 --- a/packages/editor/src/browser/editor-quick-open-service.ts +++ b/packages/editor/src/browser/editor-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { QuickOpenModel, QuickOpenItem, QuickOpenMode, PrefixQuickOpenService, OpenerService, QuickOpenItemOptions, diff --git a/packages/editor/src/browser/editor-variable-contribution.ts b/packages/editor/src/browser/editor-variable-contribution.ts index 4e1d505b80436..3d447e0244ca8 100644 --- a/packages/editor/src/browser/editor-variable-contribution.ts +++ b/packages/editor/src/browser/editor-variable-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { VariableRegistry, VariableContribution } from '@theia/variable-resolver/lib/browser'; import { TextEditor } from './editor'; import { EditorManager } from './editor-manager'; diff --git a/packages/editor/src/browser/editor-widget-factory.ts b/packages/editor/src/browser/editor-widget-factory.ts index a0c1e86dd83f5..f108ee07e4b3a 100644 --- a/packages/editor/src/browser/editor-widget-factory.ts +++ b/packages/editor/src/browser/editor-widget-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, } from 'inversify'; +import { injectable, inject, } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { SelectionService } from '@theia/core/lib/common'; import { NavigatableWidgetOptions, WidgetFactory, LabelProvider } from '@theia/core/lib/browser'; diff --git a/packages/editor/src/browser/editor.ts b/packages/editor/src/browser/editor.ts index 922ecd1ec552d..07c29993b2935 100644 --- a/packages/editor/src/browser/editor.ts +++ b/packages/editor/src/browser/editor.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Position, Range, Location } from 'vscode-languageserver-types'; -import * as lsp from 'vscode-languageserver-types'; +import { Position, Range, Location } from '@theia/core/shared/vscode-languageserver-types'; +import * as lsp from '@theia/core/shared/vscode-languageserver-types'; import URI from '@theia/core/lib/common/uri'; import { Event, Disposable, TextDocumentContentChangeDelta } from '@theia/core/lib/common'; import { Saveable, Navigatable, Widget } from '@theia/core/lib/browser'; diff --git a/packages/editor/src/browser/navigation/navigation-location-service.spec.ts b/packages/editor/src/browser/navigation/navigation-location-service.spec.ts index 4afadf461a01c..75de81fadf496 100644 --- a/packages/editor/src/browser/navigation/navigation-location-service.spec.ts +++ b/packages/editor/src/browser/navigation/navigation-location-service.spec.ts @@ -18,7 +18,7 @@ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom'; let disableJSDOM = enableJSDOM(); import { expect } from 'chai'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import { OpenerService } from '@theia/core/lib/browser/opener-service'; diff --git a/packages/editor/src/browser/navigation/navigation-location-service.ts b/packages/editor/src/browser/navigation/navigation-location-service.ts index e9e3579959d36..d3e21714bf77a 100644 --- a/packages/editor/src/browser/navigation/navigation-location-service.ts +++ b/packages/editor/src/browser/navigation/navigation-location-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { OpenerService, OpenerOptions, open } from '@theia/core/lib/browser/opener-service'; import { EditorOpenerOptions } from '../editor-manager'; diff --git a/packages/editor/src/browser/navigation/navigation-location-similarity.ts b/packages/editor/src/browser/navigation/navigation-location-similarity.ts index ac04f61e091c1..87d53561480a2 100644 --- a/packages/editor/src/browser/navigation/navigation-location-similarity.ts +++ b/packages/editor/src/browser/navigation/navigation-location-similarity.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { NavigationLocation } from './navigation-location'; /** diff --git a/packages/editor/src/browser/navigation/navigation-location-updater.ts b/packages/editor/src/browser/navigation/navigation-location-updater.ts index d0cc884fa5c13..cc61f02b5df85 100644 --- a/packages/editor/src/browser/navigation/navigation-location-updater.ts +++ b/packages/editor/src/browser/navigation/navigation-location-updater.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { NavigationLocation, ContentChangeLocation, CursorLocation, SelectionLocation, Position, Range } from './navigation-location'; /** diff --git a/packages/external-terminal/src/electron-browser/external-terminal-contribution.ts b/packages/external-terminal/src/electron-browser/external-terminal-contribution.ts index 714ab3b53a633..ce197ac4cf432 100644 --- a/packages/external-terminal/src/electron-browser/external-terminal-contribution.ts +++ b/packages/external-terminal/src/electron-browser/external-terminal-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { QuickPickService } from '@theia/core/lib/common/quick-pick-service'; diff --git a/packages/external-terminal/src/electron-browser/external-terminal-frontend-module.ts b/packages/external-terminal/src/electron-browser/external-terminal-frontend-module.ts index 4daf76fbbe42c..ec4e7f6fff337 100644 --- a/packages/external-terminal/src/electron-browser/external-terminal-frontend-module.ts +++ b/packages/external-terminal/src/electron-browser/external-terminal-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { CommandContribution } from '@theia/core/lib/common'; import { KeybindingContribution, WebSocketConnectionProvider } from '@theia/core/lib/browser'; import { bindExternalTerminalPreferences } from './external-terminal-preference'; diff --git a/packages/external-terminal/src/electron-browser/external-terminal-preference.ts b/packages/external-terminal/src/electron-browser/external-terminal-preference.ts index 5c5845502ea08..ef5f932771953 100644 --- a/packages/external-terminal/src/electron-browser/external-terminal-preference.ts +++ b/packages/external-terminal/src/electron-browser/external-terminal-preference.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, interfaces, postConstruct } from 'inversify'; +import { inject, injectable, interfaces, postConstruct } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceSchema, diff --git a/packages/external-terminal/src/electron-node/external-terminal-backend-module.ts b/packages/external-terminal/src/electron-node/external-terminal-backend-module.ts index 0dbc5282a65d5..a8629b911f77f 100644 --- a/packages/external-terminal/src/electron-node/external-terminal-backend-module.ts +++ b/packages/external-terminal/src/electron-node/external-terminal-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common'; import { isWindows, isOSX } from '@theia/core/lib/common/os'; import { ExternalTerminalService, externalTerminalServicePath } from '../common/external-terminal'; diff --git a/packages/external-terminal/src/electron-node/linux-external-terminal-service.ts b/packages/external-terminal/src/electron-node/linux-external-terminal-service.ts index 359b3bbf40191..764d094942f78 100644 --- a/packages/external-terminal/src/electron-node/linux-external-terminal-service.ts +++ b/packages/external-terminal/src/electron-node/linux-external-terminal-service.ts @@ -15,8 +15,8 @@ ********************************************************************************/ import * as cp from 'child_process'; -import * as fs from 'fs-extra'; -import { injectable } from 'inversify'; +import * as fs from '@theia/core/shared/fs-extra'; +import { injectable } from '@theia/core/shared/inversify'; import { OS } from '@theia/core/lib/common/os'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal'; diff --git a/packages/external-terminal/src/electron-node/mac-external-terminal-service.ts b/packages/external-terminal/src/electron-node/mac-external-terminal-service.ts index 81fc95ec7448a..fe8553ce76ceb 100644 --- a/packages/external-terminal/src/electron-node/mac-external-terminal-service.ts +++ b/packages/external-terminal/src/electron-node/mac-external-terminal-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as cp from 'child_process'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal'; diff --git a/packages/external-terminal/src/electron-node/windows-external-terminal-service.ts b/packages/external-terminal/src/electron-node/windows-external-terminal-service.ts index 39c8fac73711f..8fc87e303990c 100644 --- a/packages/external-terminal/src/electron-node/windows-external-terminal-service.ts +++ b/packages/external-terminal/src/electron-node/windows-external-terminal-service.ts @@ -16,7 +16,7 @@ import * as cp from 'child_process'; import * as path from 'path'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { ExternalTerminalService, ExternalTerminalConfiguration } from '../common/external-terminal'; diff --git a/packages/file-search/package.json b/packages/file-search/package.json index c39fefb21cd3d..41fb163b94e1a 100644 --- a/packages/file-search/package.json +++ b/packages/file-search/package.json @@ -8,7 +8,6 @@ "@theia/filesystem": "1.12.0", "@theia/process": "1.12.0", "@theia/workspace": "1.12.0", - "fuzzy": "^0.1.3", "vscode-ripgrep": "^1.2.4" }, "publishConfig": { diff --git a/packages/file-search/src/browser/file-search-frontend-module.ts b/packages/file-search/src/browser/file-search-frontend-module.ts index b603507d8e1c8..40c64a3e3ac54 100644 --- a/packages/file-search/src/browser/file-search-frontend-module.ts +++ b/packages/file-search/src/browser/file-search-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { CommandContribution } from '@theia/core/lib/common'; import { WebSocketConnectionProvider, KeybindingContribution, QuickOpenContribution } from '@theia/core/lib/browser'; import { QuickFileOpenFrontendContribution } from './quick-file-open-contribution'; diff --git a/packages/file-search/src/browser/quick-file-open-contribution.ts b/packages/file-search/src/browser/quick-file-open-contribution.ts index 8d0bd3f94ba33..d79359f9517e7 100644 --- a/packages/file-search/src/browser/quick-file-open-contribution.ts +++ b/packages/file-search/src/browser/quick-file-open-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { QuickFileOpenService, quickFileOpen } from './quick-file-open'; import { CommandRegistry, CommandContribution } from '@theia/core/lib/common'; diff --git a/packages/file-search/src/browser/quick-file-open.ts b/packages/file-search/src/browser/quick-file-open.ts index 76d5dd671ac64..19b3c811a7439 100644 --- a/packages/file-search/src/browser/quick-file-open.ts +++ b/packages/file-search/src/browser/quick-file-open.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { QuickOpenModel, QuickOpenItem, QuickOpenMode, PrefixQuickOpenService, OpenerService, KeybindingRegistry, QuickOpenGroupItem, QuickOpenGroupItemOptions, QuickOpenItemOptions, @@ -27,7 +27,7 @@ import { CancellationTokenSource } from '@theia/core/lib/common'; import { LabelProvider } from '@theia/core/lib/browser/label-provider'; import { Command } from '@theia/core/lib/common'; import { NavigationLocationService } from '@theia/editor/lib/browser/navigation/navigation-location-service'; -import * as fuzzy from 'fuzzy'; +import * as fuzzy from '@theia/core/shared/fuzzy'; import { MessageService } from '@theia/core/lib/common/message-service'; import { FileSystemPreferences } from '@theia/filesystem/lib/browser'; diff --git a/packages/file-search/src/node/file-search-backend-module.ts b/packages/file-search/src/node/file-search-backend-module.ts index ef9710c25f628..c963efcc4303c 100644 --- a/packages/file-search/src/node/file-search-backend-module.ts +++ b/packages/file-search/src/node/file-search-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common'; import { FileSearchServiceImpl } from './file-search-service-impl'; import { fileSearchServicePath, FileSearchService } from '../common/file-search-service'; diff --git a/packages/file-search/src/node/file-search-service-impl.spec.ts b/packages/file-search/src/node/file-search-service-impl.spec.ts index 4033a6f9adf2d..b8864efaa978a 100644 --- a/packages/file-search/src/node/file-search-service-impl.spec.ts +++ b/packages/file-search/src/node/file-search-service-impl.spec.ts @@ -19,7 +19,7 @@ import * as assert from 'assert'; import * as path from 'path'; import { FileSearchServiceImpl } from './file-search-service-impl'; import { FileUri } from '@theia/core/lib/node'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { CancellationTokenSource } from '@theia/core'; import { bindLogger } from '@theia/core/lib/node/logger-backend-module'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/file-search/src/node/file-search-service-impl.ts b/packages/file-search/src/node/file-search-service-impl.ts index 4ff10c4a7fba1..d72adba7d9e4e 100644 --- a/packages/file-search/src/node/file-search-service-impl.ts +++ b/packages/file-search/src/node/file-search-service-impl.ts @@ -15,10 +15,10 @@ ********************************************************************************/ import * as cp from 'child_process'; -import * as fuzzy from 'fuzzy'; +import * as fuzzy from '@theia/core/shared/fuzzy'; import * as readline from 'readline'; import { rgPath } from 'vscode-ripgrep'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { CancellationTokenSource, CancellationToken, ILogger, isWindows } from '@theia/core'; diff --git a/packages/filesystem/compile.tsconfig.json b/packages/filesystem/compile.tsconfig.json index 324e2d66da5ab..9792bb12d2153 100644 --- a/packages/filesystem/compile.tsconfig.json +++ b/packages/filesystem/compile.tsconfig.json @@ -18,9 +18,6 @@ "src" ], "references": [ - { - "path": "../../dev-packages/application-package/compile.tsconfig.json" - }, { "path": "../core/compile.tsconfig.json" } diff --git a/packages/filesystem/package.json b/packages/filesystem/package.json index 05ba8e1b3edcb..3a84f6e2f7318 100644 --- a/packages/filesystem/package.json +++ b/packages/filesystem/package.json @@ -3,7 +3,6 @@ "version": "1.12.0", "description": "Theia - FileSystem Extension", "dependencies": { - "@theia/application-package": "1.12.0", "@theia/core": "1.12.0", "@types/body-parser": "^1.17.0", "@types/rimraf": "^2.0.2", diff --git a/packages/filesystem/src/browser/download/file-download-command-contribution.ts b/packages/filesystem/src/browser/download/file-download-command-contribution.ts index b08dd48469197..fdc7af94c601c 100644 --- a/packages/filesystem/src/browser/download/file-download-command-contribution.ts +++ b/packages/filesystem/src/browser/download/file-download-command-contribution.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { isChrome } from '@theia/core/lib/browser/browser'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { SelectionService } from '@theia/core/lib/common/selection-service'; import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command'; import { UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler'; diff --git a/packages/filesystem/src/browser/download/file-download-frontend-module.ts b/packages/filesystem/src/browser/download/file-download-frontend-module.ts index 24b894d6d9e07..d49371841635a 100644 --- a/packages/filesystem/src/browser/download/file-download-frontend-module.ts +++ b/packages/filesystem/src/browser/download/file-download-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { CommandContribution } from '@theia/core/lib/common/command'; import { FileDownloadService } from './file-download-service'; import { FileDownloadCommandContribution } from './file-download-command-contribution'; diff --git a/packages/filesystem/src/browser/download/file-download-service.ts b/packages/filesystem/src/browser/download/file-download-service.ts index cfc801ad244bd..8c66f5a23ebf2 100644 --- a/packages/filesystem/src/browser/download/file-download-service.ts +++ b/packages/filesystem/src/browser/download/file-download-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ILogger } from '@theia/core/lib/common/logger'; import { Endpoint } from '@theia/core/lib/browser/endpoint'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-container.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-container.ts index 280d4e529f722..ed2aea702a77d 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-container.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { Tree, TreeModel, TreeProps, defaultTreeProps } from '@theia/core/lib/browser'; import { createFileTreeContainer, FileTreeModel, FileTreeWidget } from '../file-tree'; import { OpenFileDialog, OpenFileDialogProps, SaveFileDialog, SaveFileDialogProps } from './file-dialog'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-model.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-model.ts index 29f57467b19cc..6fb2a7062d867 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-model.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Emitter, Event } from '@theia/core/lib/common'; import { TreeNode, SelectableTreeNode } from '@theia/core/lib/browser'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-module.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-module.ts index 5304292c3be2e..80194aa555a25 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-module.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { DefaultFileDialogService, FileDialogService } from './file-dialog-service'; export default new ContainerModule(bind => { diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-service.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-service.ts index e1d1506dfd58a..5e43edcc55f83 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-service.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { MaybeArray } from '@theia/core/lib/common'; import { LabelProvider } from '@theia/core/lib/browser'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx b/packages/filesystem/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx index c157d8d8ae389..6c525f7d90ad8 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx @@ -16,7 +16,7 @@ import { ReactRenderer } from '@theia/core/lib/browser/widgets/react-renderer'; import { FileDialogTree } from './file-dialog-tree'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; export const FILE_TREE_FILTERS_LIST_CLASS = 'theia-FileTreeFiltersList'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-tree.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-tree.ts index dbbc70d39d748..6c2b3cb35989a 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-tree.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { DirNode, FileTree } from '../file-tree'; import { TreeNode, CompositeTreeNode } from '@theia/core/lib/browser/tree/tree'; import { FileStat } from '../../common/files'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog-widget.ts b/packages/filesystem/src/browser/file-dialog/file-dialog-widget.ts index 0bdbdd3aab9dd..ed3f40a170225 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog-widget.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ContextMenuRenderer, NodeProps, TreeProps, TreeNode, SELECTED_CLASS, FOCUS_CLASS } from '@theia/core/lib/browser'; import { FileTreeWidget, FileStatNode } from '../file-tree'; import { FileDialogModel } from './file-dialog-model'; diff --git a/packages/filesystem/src/browser/file-dialog/file-dialog.ts b/packages/filesystem/src/browser/file-dialog/file-dialog.ts index 72935ef80371d..ef422deae47e9 100644 --- a/packages/filesystem/src/browser/file-dialog/file-dialog.ts +++ b/packages/filesystem/src/browser/file-dialog/file-dialog.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { Disposable, MaybeArray } from '@theia/core/lib/common'; import { Key, LabelProvider } from '@theia/core/lib/browser'; import { AbstractDialog, DialogProps, setEnabled, createIconButton, Widget } from '@theia/core/lib/browser'; @@ -25,7 +25,7 @@ import { FileDialogModel } from './file-dialog-model'; import { FileDialogWidget } from './file-dialog-widget'; import { FileDialogTreeFiltersRenderer, FileDialogTreeFilters } from './file-dialog-tree-filters-renderer'; import URI from '@theia/core/lib/common/uri'; -import { Panel } from '@phosphor/widgets'; +import { Panel } from '@theia/core/shared/@phosphor/widgets'; import { FileService } from '../file-service'; export const OpenFileDialogFactory = Symbol('OpenFileDialogFactory'); diff --git a/packages/filesystem/src/browser/file-resource.ts b/packages/filesystem/src/browser/file-resource.ts index ccb98f764e747..0511fdb31c575 100644 --- a/packages/filesystem/src/browser/file-resource.ts +++ b/packages/filesystem/src/browser/file-resource.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Resource, ResourceVersion, ResourceResolver, ResourceError, ResourceSaveOptions } from '@theia/core/lib/common/resource'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { Emitter, Event } from '@theia/core/lib/common/event'; diff --git a/packages/filesystem/src/browser/file-service.ts b/packages/filesystem/src/browser/file-service.ts index 89493b5e5774e..fdd76dea7daa4 100644 --- a/packages/filesystem/src/browser/file-service.ts +++ b/packages/filesystem/src/browser/file-service.ts @@ -29,7 +29,7 @@ /* eslint-disable @typescript-eslint/tslint/config */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, inject, named, postConstruct } from 'inversify'; +import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { timeout, Deferred } from '@theia/core/lib/common/promise-util'; import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation'; @@ -59,7 +59,7 @@ import { LabelProvider } from '@theia/core/lib/browser/label-provider'; import { FileSystemPreferences } from './filesystem-preferences'; import { ProgressService } from '@theia/core/lib/common/progress-service'; import { DelegatingFileSystemProvider } from '../common/delegating-file-system-provider'; -import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import type { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { EncodingRegistry } from '@theia/core/lib/browser/encoding-registry'; import { UTF8, UTF8_with_bom } from '@theia/core/lib/common/encodings'; import { EncodingService, ResourceEncoding, DecodeStreamResult } from '@theia/core/lib/common/encoding-service'; diff --git a/packages/filesystem/src/browser/file-tree/file-tree-container.ts b/packages/filesystem/src/browser/file-tree/file-tree-container.ts index eccc7f55e4e13..d620082ea0d27 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-container.ts +++ b/packages/filesystem/src/browser/file-tree/file-tree-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { createTreeContainer, Tree, TreeImpl, TreeModel, TreeModelImpl, TreeWidget } from '@theia/core/lib/browser'; import { FileTree } from './file-tree'; import { FileTreeModel } from './file-tree-model'; diff --git a/packages/filesystem/src/browser/file-tree/file-tree-label-provider.ts b/packages/filesystem/src/browser/file-tree/file-tree-label-provider.ts index 091fd07b2dbd0..5ca221e03af33 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-label-provider.ts +++ b/packages/filesystem/src/browser/file-tree/file-tree-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProviderContribution, DidChangeLabelEvent, LabelProvider } from '@theia/core/lib/browser/label-provider'; import { FileStatNode } from './file-tree'; import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider'; diff --git a/packages/filesystem/src/browser/file-tree/file-tree-model.ts b/packages/filesystem/src/browser/file-tree/file-tree-model.ts index 46a67678e6fe3..aa320027c2510 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-model.ts +++ b/packages/filesystem/src/browser/file-tree/file-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { CompositeTreeNode, TreeModelImpl, TreeNode, ConfirmDialog } from '@theia/core/lib/browser'; import { FileStatNode, DirNode, FileNode } from './file-tree'; diff --git a/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx b/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx index bdcac72788859..2300015220af4 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx +++ b/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; import URI from '@theia/core/lib/common/uri'; import { UriSelection } from '@theia/core/lib/common/selection'; diff --git a/packages/filesystem/src/browser/file-tree/file-tree.ts b/packages/filesystem/src/browser/file-tree/file-tree.ts index 654668d149449..8f5cb9e673a46 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree.ts +++ b/packages/filesystem/src/browser/file-tree/file-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { TreeNode, CompositeTreeNode, SelectableTreeNode, ExpandableTreeNode, TreeImpl } from '@theia/core/lib/browser'; import { Mutable } from '@theia/core/lib/common/types'; diff --git a/packages/filesystem/src/browser/file-upload-service.ts b/packages/filesystem/src/browser/file-upload-service.ts index 2a967f610d6f4..a6439c35131ea 100644 --- a/packages/filesystem/src/browser/file-upload-service.ts +++ b/packages/filesystem/src/browser/file-upload-service.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { CancellationTokenSource, CancellationToken, checkCancelled, cancelled } from '@theia/core/lib/common/cancellation'; import { Deferred } from '@theia/core/lib/common/promise-util'; @@ -24,7 +24,7 @@ import { MessageService } from '@theia/core/lib/common/message-service'; import { Progress } from '@theia/core/lib/common/message-service-protocol'; import { Endpoint } from '@theia/core/lib/browser/endpoint'; -import throttle = require('lodash.throttle'); +import throttle = require('@theia/core/shared/lodash.throttle'); const maxChunkSize = 64 * 1024; diff --git a/packages/filesystem/src/browser/filesystem-frontend-contribution.ts b/packages/filesystem/src/browser/filesystem-frontend-contribution.ts index 9df7971c29474..004136109da98 100644 --- a/packages/filesystem/src/browser/filesystem-frontend-contribution.ts +++ b/packages/filesystem/src/browser/filesystem-frontend-contribution.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { MaybePromise, SelectionService, isCancelled } from '@theia/core/lib/common'; import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command'; import { diff --git a/packages/filesystem/src/browser/filesystem-frontend-module.ts b/packages/filesystem/src/browser/filesystem-frontend-module.ts index cc8516d077ed5..ff0415fdbe1bf 100644 --- a/packages/filesystem/src/browser/filesystem-frontend-module.ts +++ b/packages/filesystem/src/browser/filesystem-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { ResourceResolver, CommandContribution } from '@theia/core/lib/common'; import { WebSocketConnectionProvider, FrontendApplicationContribution, LabelProviderContribution } from '@theia/core/lib/browser'; import { FileResourceResolver } from './file-resource'; @@ -30,7 +30,7 @@ import { RemoteFileSystemProvider, RemoteFileSystemServer, remoteFileSystemPath, import { FileSystem, FileStat, FileMoveOptions, FileDeleteOptions, FileSystemError } from '../common/filesystem'; import URI from '@theia/core/lib/common/uri'; import { FileOperationError, FileOperationResult, BaseStatWithMetadata, FileStatWithMetadata, etag } from '../common/files'; -import { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { RemoteFileServiceContribution } from './remote-file-service-contribution'; diff --git a/packages/filesystem/src/browser/filesystem-preferences.ts b/packages/filesystem/src/browser/filesystem-preferences.ts index 48d39dd61a761..4a7a621c9aab2 100644 --- a/packages/filesystem/src/browser/filesystem-preferences.ts +++ b/packages/filesystem/src/browser/filesystem-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, @@ -23,7 +23,7 @@ import { PreferenceContribution } from '@theia/core/lib/browser/preferences'; import { SUPPORTED_ENCODINGS } from '@theia/core/lib/browser/supported-encodings'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; // See https://github.com/Microsoft/vscode/issues/30180 export const WIN32_MAX_FILE_SIZE_MB = 300; // 300 MB diff --git a/packages/filesystem/src/browser/filesystem-watcher-error-handler.ts b/packages/filesystem/src/browser/filesystem-watcher-error-handler.ts index 87ce2f8048340..0506710a0ec6a 100644 --- a/packages/filesystem/src/browser/filesystem-watcher-error-handler.ts +++ b/packages/filesystem/src/browser/filesystem-watcher-error-handler.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; -import { environment } from '@theia/application-package/lib/environment'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { MessageService } from '@theia/core'; import { WindowService } from '@theia/core/lib/browser/window/window-service'; diff --git a/packages/filesystem/src/browser/filesystem-watcher.ts b/packages/filesystem/src/browser/filesystem-watcher.ts index 67aff9258dbaa..46203784eb017 100644 --- a/packages/filesystem/src/browser/filesystem-watcher.ts +++ b/packages/filesystem/src/browser/filesystem-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { Emitter, WaitUntilEvent } from '@theia/core/lib/common/event'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/filesystem/src/browser/location/location-renderer.tsx b/packages/filesystem/src/browser/location/location-renderer.tsx index 1aa8690c31e08..e9191633a0294 100644 --- a/packages/filesystem/src/browser/location/location-renderer.tsx +++ b/packages/filesystem/src/browser/location/location-renderer.tsx @@ -17,8 +17,8 @@ import URI from '@theia/core/lib/common/uri'; import { LocationService } from './location-service'; import { ReactRenderer } from '@theia/core/lib/browser/widgets/react-renderer'; -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; +import * as React from '@theia/core/shared/react'; +import * as ReactDOM from '@theia/core/shared/react-dom'; import { FileService } from '../file-service'; import { DisposableCollection, Emitter } from '@theia/core/lib/common'; diff --git a/packages/filesystem/src/browser/remote-file-service-contribution.ts b/packages/filesystem/src/browser/remote-file-service-contribution.ts index 9c6ada265b903..5bd48b423ee09 100644 --- a/packages/filesystem/src/browser/remote-file-service-contribution.ts +++ b/packages/filesystem/src/browser/remote-file-service-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { FileServiceContribution, FileService } from './file-service'; import { RemoteFileSystemProvider } from '../common/remote-file-system-provider'; diff --git a/packages/filesystem/src/common/delegating-file-system-provider.ts b/packages/filesystem/src/common/delegating-file-system-provider.ts index bcd240d59cd4f..5db963695e833 100644 --- a/packages/filesystem/src/common/delegating-file-system-provider.ts +++ b/packages/filesystem/src/common/delegating-file-system-provider.ts @@ -23,7 +23,7 @@ import { FileReadStreamOptions, hasFileReadStreamCapability } from './files'; -import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import type { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { ReadableStreamEvents } from '@theia/core/lib/common/stream'; export class DelegatingFileSystemProvider implements Required, Disposable { diff --git a/packages/filesystem/src/common/files.ts b/packages/filesystem/src/common/files.ts index 63a4a1bb7c2d1..90785dc214eed 100644 --- a/packages/filesystem/src/common/files.ts +++ b/packages/filesystem/src/common/files.ts @@ -23,7 +23,7 @@ import URI from '@theia/core/lib/common/uri'; import { Event } from '@theia/core/lib/common/event'; import { Disposable as IDisposable } from '@theia/core/lib/common/disposable'; import { BinaryBuffer, BinaryBufferReadableStream } from '@theia/core/lib/common/buffer'; -import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import type { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { ReadableStreamEvents } from '@theia/core/lib/common/stream'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; diff --git a/packages/filesystem/src/common/filesystem-watcher-protocol.ts b/packages/filesystem/src/common/filesystem-watcher-protocol.ts index 9330a17cf251b..a4fff90a96306 100644 --- a/packages/filesystem/src/common/filesystem-watcher-protocol.ts +++ b/packages/filesystem/src/common/filesystem-watcher-protocol.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { JsonRpcServer, JsonRpcProxy } from '@theia/core'; import { FileChangeType } from './files'; export { FileChangeType }; diff --git a/packages/filesystem/src/common/filesystem.ts b/packages/filesystem/src/common/filesystem.ts index f4a64f1669ebf..e2eaf0f791047 100644 --- a/packages/filesystem/src/common/filesystem.ts +++ b/packages/filesystem/src/common/filesystem.ts @@ -16,7 +16,7 @@ /* eslint-disable max-len */ -import { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { ApplicationError } from '@theia/core/lib/common'; /** diff --git a/packages/filesystem/src/common/remote-file-system-provider.ts b/packages/filesystem/src/common/remote-file-system-provider.ts index e6dafeb3532d7..f1d9391e9031f 100644 --- a/packages/filesystem/src/common/remote-file-system-provider.ts +++ b/packages/filesystem/src/common/remote-file-system-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Emitter } from '@theia/core/lib/common/event'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; @@ -28,7 +28,7 @@ import { import { JsonRpcServer, JsonRpcProxy, JsonRpcProxyFactory } from '@theia/core/lib/common/messaging/proxy-factory'; import { ApplicationError } from '@theia/core/lib/common/application-error'; import { Deferred } from '@theia/core/lib/common/promise-util'; -import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import type { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { newWriteableStream, ReadableStreamEvents } from '@theia/core/lib/common/stream'; import { CancellationToken, cancelled } from '@theia/core/lib/common/cancellation'; diff --git a/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-module.ts b/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-module.ts index 594f896515759..76e10c6c77ec7 100644 --- a/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-module.ts +++ b/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { FileDialogService } from '../../browser/file-dialog/file-dialog-service'; import { ElectronFileDialogService } from './electron-file-dialog-service'; diff --git a/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-service.ts b/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-service.ts index 7fc751a2b8958..1c93f41ef7d2e 100644 --- a/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-service.ts +++ b/packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-service.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; -import { remote, FileFilter, OpenDialogOptions, SaveDialogOptions } from 'electron'; +import { inject, injectable } from '@theia/core/shared/inversify'; +import { remote, FileFilter, OpenDialogOptions, SaveDialogOptions } from '@theia/core/shared/electron'; import URI from '@theia/core/lib/common/uri'; import { isOSX } from '@theia/core/lib/common/os'; import { MaybeArray } from '@theia/core/lib/common/types'; diff --git a/packages/filesystem/src/node/disk-file-system-provider.ts b/packages/filesystem/src/node/disk-file-system-provider.ts index 7fafb579f6bda..46961a84aaf55 100644 --- a/packages/filesystem/src/node/disk-file-system-provider.ts +++ b/packages/filesystem/src/node/disk-file-system-provider.ts @@ -22,7 +22,7 @@ /* eslint-disable no-null/no-null */ /* eslint-disable @typescript-eslint/no-shadow */ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { basename, dirname, normalize, join } from 'path'; import { v4 } from 'uuid'; import * as os from 'os'; @@ -58,7 +58,7 @@ import { } from '../common/files'; import { FileSystemWatcherServer } from '../common/filesystem-watcher-protocol'; import trash = require('trash'); -import { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { EncodingService } from '@theia/core/lib/common/encoding-service'; import { BinaryBuffer } from '@theia/core/lib/common/buffer'; diff --git a/packages/filesystem/src/node/download/directory-archiver.spec.ts b/packages/filesystem/src/node/download/directory-archiver.spec.ts index dda8cdf4dd755..3842678a75da0 100644 --- a/packages/filesystem/src/node/download/directory-archiver.spec.ts +++ b/packages/filesystem/src/node/download/directory-archiver.spec.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import * as temp from 'temp'; import { extract } from 'tar-fs'; diff --git a/packages/filesystem/src/node/download/directory-archiver.ts b/packages/filesystem/src/node/download/directory-archiver.ts index 05246b99de0d0..a383f90094143 100644 --- a/packages/filesystem/src/node/download/directory-archiver.ts +++ b/packages/filesystem/src/node/download/directory-archiver.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import * as fs from 'fs-extra'; +import { injectable } from '@theia/core/shared/inversify'; +import * as fs from '@theia/core/shared/fs-extra'; import { pack } from 'tar-fs'; import URI from '@theia/core/lib/common/uri'; import { FileUri } from '@theia/core/lib/node/file-uri'; diff --git a/packages/filesystem/src/node/download/file-download-backend-module.ts b/packages/filesystem/src/node/download/file-download-backend-module.ts index c5e893dd3f8ff..bcb7fe378925f 100644 --- a/packages/filesystem/src/node/download/file-download-backend-module.ts +++ b/packages/filesystem/src/node/download/file-download-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { FileDownloadEndpoint } from './file-download-endpoint'; import { FileDownloadHandler, SingleFileDownloadHandler, MultiFileDownloadHandler, DownloadLinkHandler } from './file-download-handler'; diff --git a/packages/filesystem/src/node/download/file-download-cache.ts b/packages/filesystem/src/node/download/file-download-cache.ts index 09591f8aaf83b..2ed1da44cf195 100644 --- a/packages/filesystem/src/node/download/file-download-cache.ts +++ b/packages/filesystem/src/node/download/file-download-cache.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import * as rimraf from 'rimraf'; diff --git a/packages/filesystem/src/node/download/file-download-endpoint.ts b/packages/filesystem/src/node/download/file-download-endpoint.ts index 2d4182ba520c2..0eb631e24cb99 100644 --- a/packages/filesystem/src/node/download/file-download-endpoint.ts +++ b/packages/filesystem/src/node/download/file-download-endpoint.ts @@ -17,9 +17,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as url from 'url'; -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { json } from 'body-parser'; -import { Application, Router } from 'express'; +import { Application, Router } from '@theia/core/shared/express'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { FileDownloadHandler } from './file-download-handler'; diff --git a/packages/filesystem/src/node/download/file-download-handler.ts b/packages/filesystem/src/node/download/file-download-handler.ts index cad45f6f432ac..7960294f57154 100644 --- a/packages/filesystem/src/node/download/file-download-handler.ts +++ b/packages/filesystem/src/node/download/file-download-handler.ts @@ -15,11 +15,11 @@ ********************************************************************************/ import * as os from 'os'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { v4 } from 'uuid'; -import { Request, Response } from 'express'; -import { inject, injectable } from 'inversify'; +import { Request, Response } from '@theia/core/shared/express'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { OK, BAD_REQUEST, METHOD_NOT_ALLOWED, NOT_FOUND, INTERNAL_SERVER_ERROR, REQUESTED_RANGE_NOT_SATISFIABLE, PARTIAL_CONTENT } from 'http-status-codes'; import URI from '@theia/core/lib/common/uri'; import { isEmpty } from '@theia/core/lib/common/objects'; diff --git a/packages/filesystem/src/node/filesystem-backend-module.ts b/packages/filesystem/src/node/filesystem-backend-module.ts index 5c52d6dafcdad..c0ba70c3dc725 100644 --- a/packages/filesystem/src/node/filesystem-backend-module.ts +++ b/packages/filesystem/src/node/filesystem-backend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as path from 'path'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { ConnectionHandler, JsonRpcConnectionHandler, ILogger } from '@theia/core/lib/common'; import { FileSystemWatcherServer, FileSystemWatcherService } from '../common/filesystem-watcher-protocol'; import { FileSystemWatcherServerClient } from './filesystem-watcher-client'; diff --git a/packages/filesystem/src/node/filesystem-watcher-client.ts b/packages/filesystem/src/node/filesystem-watcher-client.ts index abb72980dda3d..7a9ce1fc3a5ee 100644 --- a/packages/filesystem/src/node/filesystem-watcher-client.ts +++ b/packages/filesystem/src/node/filesystem-watcher-client.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { FileSystemWatcherServer, WatchOptions, FileSystemWatcherClient, FileSystemWatcherService } from '../common/filesystem-watcher-protocol'; import { FileSystemWatcherServiceDispatcher } from './filesystem-watcher-dispatcher'; diff --git a/packages/filesystem/src/node/filesystem-watcher-dispatcher.ts b/packages/filesystem/src/node/filesystem-watcher-dispatcher.ts index 9c3b6832bfe4f..d66ba28d494af 100644 --- a/packages/filesystem/src/node/filesystem-watcher-dispatcher.ts +++ b/packages/filesystem/src/node/filesystem-watcher-dispatcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { FileSystemWatcherClient, FileSystemWatcherServiceClient, DidFilesChangedParams, FileSystemWatcherErrorParams diff --git a/packages/filesystem/src/node/node-file-upload-service.ts b/packages/filesystem/src/node/node-file-upload-service.ts index a6b6acf7c35be..dd6ca45756e1c 100644 --- a/packages/filesystem/src/node/node-file-upload-service.ts +++ b/packages/filesystem/src/node/node-file-upload-service.ts @@ -15,8 +15,8 @@ ********************************************************************************/ // tslint:disable-next-line -import * as ws from 'ws'; -import { injectable } from 'inversify'; +import * as ws from '@theia/core/shared/ws'; +import { injectable } from '@theia/core/shared/inversify'; import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service'; import { NodeFileUpload } from './node-file-upload'; diff --git a/packages/filesystem/src/node/node-file-upload.ts b/packages/filesystem/src/node/node-file-upload.ts index 819537704da09..170f3f39a9aec 100644 --- a/packages/filesystem/src/node/node-file-upload.ts +++ b/packages/filesystem/src/node/node-file-upload.ts @@ -16,7 +16,7 @@ import * as path from 'path'; import * as crypto from 'crypto'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import { Buffer } from 'buffer'; import { Disposable } from '@theia/core/lib/common/disposable'; import { FileUri } from '@theia/core/lib/node/file-uri'; diff --git a/packages/filesystem/src/node/nsfw-watcher/index.ts b/packages/filesystem/src/node/nsfw-watcher/index.ts index 04a4fd14c81ec..61f0204f6fa52 100644 --- a/packages/filesystem/src/node/nsfw-watcher/index.ts +++ b/packages/filesystem/src/node/nsfw-watcher/index.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as yargs from 'yargs'; +import * as yargs from '@theia/core/shared/yargs'; import { JsonRpcProxyFactory } from '@theia/core'; import { FileSystemWatcherServiceClient } from '../../common/filesystem-watcher-protocol'; import { NsfwFileSystemWatcherService } from './nsfw-filesystem-service'; diff --git a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-service.ts b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-service.ts index 8e15372a5ddf2..d339607748f5e 100644 --- a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-service.ts +++ b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as nsfw from 'nsfw'; +import * as nsfw from '@theia/core/shared/nsfw'; import { join } from 'path'; import { promises as fsp } from 'fs'; import { IMinimatch, Minimatch } from 'minimatch'; diff --git a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.spec.ts b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.spec.ts index ac9ef9ba28880..d2d6e8c234278 100644 --- a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.spec.ts +++ b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.spec.ts @@ -17,7 +17,7 @@ import * as temp from 'temp'; import * as chai from 'chai'; import * as cp from 'child_process'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as assert from 'assert'; import URI from '@theia/core/lib/common/uri'; import { FileUri } from '@theia/core/lib/node'; diff --git a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts index 22ad1c8a20cfc..3186e6269ab82 100644 --- a/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts +++ b/packages/filesystem/src/node/nsfw-watcher/nsfw-filesystem-watcher.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as fs from 'fs'; -import * as nsfw from 'nsfw'; +import * as nsfw from '@theia/core/shared/nsfw'; import * as paths from 'path'; import { IMinimatch, Minimatch } from 'minimatch'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; @@ -29,7 +29,7 @@ import { import { FileChangeCollection } from '../file-change-collection'; import { setInterval, clearInterval } from 'timers'; -const debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/packages/filesystem/src/node/nsfw-watcher/nsfw-options.ts b/packages/filesystem/src/node/nsfw-watcher/nsfw-options.ts index 1cd30ee5a0c78..5c00f150d0de9 100644 --- a/packages/filesystem/src/node/nsfw-watcher/nsfw-options.ts +++ b/packages/filesystem/src/node/nsfw-watcher/nsfw-options.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as nsfw from 'nsfw'; +import * as nsfw from '@theia/core/shared/nsfw'; /** * Inversify service identifier allowing extensions to override options passed to nsfw by the file watcher. diff --git a/packages/getting-started/src/browser/getting-started-contribution.ts b/packages/getting-started/src/browser/getting-started-contribution.ts index 2ac178d20278d..97382bfa1d5a7 100644 --- a/packages/getting-started/src/browser/getting-started-contribution.ts +++ b/packages/getting-started/src/browser/getting-started-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandRegistry, MenuModelRegistry } from '@theia/core/lib/common'; import { CommonMenus, AbstractViewContribution, FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser'; import { GettingStartedWidget } from './getting-started-widget'; diff --git a/packages/getting-started/src/browser/getting-started-frontend-module.ts b/packages/getting-started/src/browser/getting-started-frontend-module.ts index b3007fdd93099..87e181b8f27da 100644 --- a/packages/getting-started/src/browser/getting-started-frontend-module.ts +++ b/packages/getting-started/src/browser/getting-started-frontend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { GettingStartedContribution } from './getting-started-contribution'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { GettingStartedWidget } from './getting-started-widget'; import { WidgetFactory, FrontendApplicationContribution, bindViewContribution } from '@theia/core/lib/browser'; diff --git a/packages/getting-started/src/browser/getting-started-widget.tsx b/packages/getting-started/src/browser/getting-started-widget.tsx index c12d3327befa3..99cc5cb1be675 100644 --- a/packages/getting-started/src/browser/getting-started-widget.tsx +++ b/packages/getting-started/src/browser/getting-started-widget.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import URI from '@theia/core/lib/common/uri'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget'; import { CommandRegistry, isOSX, environment, Path } from '@theia/core/lib/common'; import { WorkspaceCommands, WorkspaceService } from '@theia/workspace/lib/browser'; diff --git a/packages/git/src/browser/blame/blame-contribution.ts b/packages/git/src/browser/blame/blame-contribution.ts index 9de4206697eea..c376bf03c0129 100644 --- a/packages/git/src/browser/blame/blame-contribution.ts +++ b/packages/git/src/browser/blame/blame-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser'; import { CommandContribution, CommandRegistry, Command, MenuContribution, MenuModelRegistry, Disposable, DisposableCollection } from '@theia/core/lib/common'; import { BlameDecorator } from './blame-decorator'; @@ -23,7 +23,7 @@ import { BlameManager } from './blame-manager'; import URI from '@theia/core/lib/common/uri'; import { EDITOR_CONTEXT_MENU_SCM } from '@theia/scm-extra/lib/browser/scm-extra-contribution'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); export namespace BlameCommands { export const TOGGLE_GIT_ANNOTATIONS: Command = { diff --git a/packages/git/src/browser/blame/blame-decorator.ts b/packages/git/src/browser/blame/blame-decorator.ts index 145fb1516958d..8dcfa30092876 100644 --- a/packages/git/src/browser/blame/blame-decorator.ts +++ b/packages/git/src/browser/blame/blame-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { EditorManager, TextEditor, EditorDecoration, EditorDecorationOptions, Range, Position, EditorDecorationStyle } from '@theia/editor/lib/browser'; import { GitFileBlame, Commit } from '../../common'; import { Disposable, DisposableCollection } from '@theia/core'; diff --git a/packages/git/src/browser/blame/blame-manager.ts b/packages/git/src/browser/blame/blame-manager.ts index 208da64fdeee3..1a68be6564c8c 100644 --- a/packages/git/src/browser/blame/blame-manager.ts +++ b/packages/git/src/browser/blame/blame-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Git, GitFileBlame } from '../../common'; import { GitRepositoryTracker } from '../git-repository-tracker'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/git/src/browser/blame/blame-module.ts b/packages/git/src/browser/blame/blame-module.ts index acfe022445dd0..b3522d21ea8d7 100644 --- a/packages/git/src/browser/blame/blame-module.ts +++ b/packages/git/src/browser/blame/blame-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { KeybindingContribution, KeybindingContext } from '@theia/core/lib/browser'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; import { BlameContribution, BlameAnnotationsKeybindingContext } from './blame-contribution'; diff --git a/packages/git/src/browser/diff/git-diff-contribution.ts b/packages/git/src/browser/diff/git-diff-contribution.ts index 3bbf480608df0..6a066be805be6 100644 --- a/packages/git/src/browser/diff/git-diff-contribution.ts +++ b/packages/git/src/browser/diff/git-diff-contribution.ts @@ -18,7 +18,7 @@ import { CommandRegistry, Command, MenuModelRegistry, SelectionService, MessageS import { FrontendApplication, AbstractViewContribution } from '@theia/core/lib/browser'; import { WidgetManager } from '@theia/core/lib/browser/widget-manager'; import { EditorManager } from '@theia/editor/lib/browser'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { GitDiffWidget, GIT_DIFF } from './git-diff-widget'; import { GitCommitDetailWidget } from '../history/git-commit-detail-widget'; import { GitDiffTreeModel } from './git-diff-tree-model'; @@ -227,7 +227,7 @@ export class GitDiffContribution extends AbstractViewContribution command: GitDiffCommands.NEXT_CHANGE.id, tooltip: GitDiffCommands.NEXT_CHANGE.label, }); -} + } protected findGitRepository(uri: URI): Repository | undefined { const repo = this.scmService.findRepository(uri); diff --git a/packages/git/src/browser/diff/git-diff-frontend-module.ts b/packages/git/src/browser/diff/git-diff-frontend-module.ts index a523d0d7083eb..7318a5524856a 100644 --- a/packages/git/src/browser/diff/git-diff-frontend-module.ts +++ b/packages/git/src/browser/diff/git-diff-frontend-module.ts @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { GitDiffContribution } from './git-diff-contribution'; import { WidgetFactory, bindViewContribution, TreeModel } from '@theia/core/lib/browser'; import { GitDiffWidget, GIT_DIFF } from './git-diff-widget'; import { GitDiffHeaderWidget } from './git-diff-header-widget'; import { GitDiffTreeModel } from './git-diff-tree-model'; import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; -import { createScmTreeContainer } from '@theia/scm/lib/browser/scm-frontend-module'; +import { createScmTreeContainer } from '@theia/scm/lib/browser/scm-frontend-module'; import { GitResourceOpener } from './git-resource-opener'; import { GitOpenerInPrimaryArea } from './git-opener-in-primary-area'; import '../../../src/browser/style/diff.css'; diff --git a/packages/git/src/browser/diff/git-diff-header-widget.tsx b/packages/git/src/browser/diff/git-diff-header-widget.tsx index cf9046ff239d3..285f153cfc81f 100644 --- a/packages/git/src/browser/diff/git-diff-header-widget.tsx +++ b/packages/git/src/browser/diff/git-diff-header-widget.tsx @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ScmService } from '@theia/scm/lib/browser/scm-service'; import { LabelProvider } from '@theia/core/lib/browser/label-provider'; import { ScmFileChangeLabelProvider } from '@theia/scm-extra/lib/browser/scm-file-change-label-provider'; import { ReactWidget, StatefulWidget, KeybindingRegistry } from '@theia/core/lib/browser'; import { Git } from '../../common'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; /* eslint-disable no-null/no-null */ diff --git a/packages/git/src/browser/diff/git-diff-tree-model.tsx b/packages/git/src/browser/diff/git-diff-tree-model.tsx index 0cb746a857e33..58a363d2c46fa 100644 --- a/packages/git/src/browser/diff/git-diff-tree-model.tsx +++ b/packages/git/src/browser/diff/git-diff-tree-model.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { DisposableCollection } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { ScmTreeModel } from '@theia/scm/lib/browser/scm-tree-model'; diff --git a/packages/git/src/browser/diff/git-diff-widget.tsx b/packages/git/src/browser/diff/git-diff-widget.tsx index bf667c0dcbcbe..1a5a4f57ca0b5 100644 --- a/packages/git/src/browser/diff/git-diff-widget.tsx +++ b/packages/git/src/browser/diff/git-diff-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { BaseWidget, Widget, StatefulWidget, Panel, PanelLayout, Message, MessageLoop } from '@theia/core/lib/browser'; diff --git a/packages/git/src/browser/diff/git-opener-in-primary-area.ts b/packages/git/src/browser/diff/git-opener-in-primary-area.ts index 6071f7f80436e..efc08941a58a9 100644 --- a/packages/git/src/browser/diff/git-opener-in-primary-area.ts +++ b/packages/git/src/browser/diff/git-opener-in-primary-area.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { GitResourceOpener } from './git-resource-opener'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/git/src/browser/dirty-diff/dirty-diff-contribution.ts b/packages/git/src/browser/dirty-diff/dirty-diff-contribution.ts index ca732a2f1a237..d3f03968f5e80 100644 --- a/packages/git/src/browser/dirty-diff/dirty-diff-contribution.ts +++ b/packages/git/src/browser/dirty-diff/dirty-diff-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { DirtyDiffDecorator } from '@theia/scm/lib/browser/dirty-diff/dirty-diff-decorator'; import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser'; import { DirtyDiffManager } from './dirty-diff-manager'; diff --git a/packages/git/src/browser/dirty-diff/dirty-diff-manager.ts b/packages/git/src/browser/dirty-diff/dirty-diff-manager.ts index 099cb4d6f0573..ca686e1338876 100644 --- a/packages/git/src/browser/dirty-diff/dirty-diff-manager.ts +++ b/packages/git/src/browser/dirty-diff/dirty-diff-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { EditorManager, EditorWidget, TextEditor, TextEditorDocument, TextDocumentChangeEvent } from '@theia/editor/lib/browser'; import URI from '@theia/core/lib/common/uri'; import { Emitter, Event, Disposable, DisposableCollection } from '@theia/core'; @@ -28,7 +28,7 @@ import { GitResourceResolver } from '../git-resource-resolver'; import { WorkingDirectoryStatus, GitFileStatus, GitFileChange, Repository, Git, GitStatusChangeEvent } from '../../common'; import { GitRepositoryTracker } from '../git-repository-tracker'; -import throttle = require('lodash.throttle'); +import throttle = require('@theia/core/shared/lodash.throttle'); @injectable() export class DirtyDiffManager { diff --git a/packages/git/src/browser/dirty-diff/dirty-diff-module.ts b/packages/git/src/browser/dirty-diff/dirty-diff-module.ts index 1a4ed606c4e6c..05ec167881951 100644 --- a/packages/git/src/browser/dirty-diff/dirty-diff-module.ts +++ b/packages/git/src/browser/dirty-diff/dirty-diff-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution } from '@theia/core/lib/browser'; import { DirtyDiffContribution } from './dirty-diff-contribution'; import { DirtyDiffManager } from './dirty-diff-manager'; diff --git a/packages/git/src/browser/git-commit-message-validator.ts b/packages/git/src/browser/git-commit-message-validator.ts index d64e4046a1cf8..e3ee94d1fe17d 100644 --- a/packages/git/src/browser/git-commit-message-validator.ts +++ b/packages/git/src/browser/git-commit-message-validator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MaybePromise } from '@theia/core/lib/common/types'; import { ScmInputIssueType } from '@theia/scm/lib/browser/scm-input'; diff --git a/packages/git/src/browser/git-contribution.ts b/packages/git/src/browser/git-contribution.ts index 09ac087eb443f..be587fdbf7999 100644 --- a/packages/git/src/browser/git-contribution.ts +++ b/packages/git/src/browser/git-contribution.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Command, @@ -449,7 +449,7 @@ export class GitContribution implements CommandContribution, MenuContribution, T return provider && this.withProgress(() => provider.discard(resources)); }, isEnabled: (...arg: ScmResource[]) => !!this.repositoryProvider.selectedScmProvider - && arg.some(r => r.sourceUri) + && arg.some(r => r.sourceUri) }); registry.registerCommand(GIT_COMMANDS.OPEN_CHANGED_FILE, { execute: (...arg: ScmResource[]) => { diff --git a/packages/git/src/browser/git-decorator.ts b/packages/git/src/browser/git-decorator.ts index c0be21fe403f5..a22a7a7b6df2a 100644 --- a/packages/git/src/browser/git-decorator.ts +++ b/packages/git/src/browser/git-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ILogger } from '@theia/core/lib/common/logger'; import { Event, Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/git/src/browser/git-error-handler.ts b/packages/git/src/browser/git-error-handler.ts index 35d0bb62f0d59..3585ee2fd5266 100644 --- a/packages/git/src/browser/git-error-handler.ts +++ b/packages/git/src/browser/git-error-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MessageService } from '@theia/core'; @injectable() diff --git a/packages/git/src/browser/git-frontend-module.ts b/packages/git/src/browser/git-frontend-module.ts index e4832a117bdb5..9a6bdb1c36d43 100644 --- a/packages/git/src/browser/git-frontend-module.ts +++ b/packages/git/src/browser/git-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { CommandContribution, MenuContribution, ResourceResolver } from '@theia/core/lib/common'; import { WebSocketConnectionProvider, diff --git a/packages/git/src/browser/git-preferences.ts b/packages/git/src/browser/git-preferences.ts index 5c9531e09a7a3..9e361b185e2c0 100644 --- a/packages/git/src/browser/git-preferences.ts +++ b/packages/git/src/browser/git-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; export const GitConfigSchema: PreferenceSchema = { diff --git a/packages/git/src/browser/git-quick-open-service.ts b/packages/git/src/browser/git-quick-open-service.ts index 54a8ee3a0d4bd..25bf174136bb7 100644 --- a/packages/git/src/browser/git-quick-open-service.ts +++ b/packages/git/src/browser/git-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { QuickOpenItem, QuickOpenMode, QuickOpenModel } from '@theia/core/lib/common/quick-open-model'; import { QuickOpenService, QuickOpenOptions } from '@theia/core/lib/browser/quick-open/quick-open-service'; import { Git, Repository, Branch, BranchType, Tag, Remote, StashEntry } from '../common'; diff --git a/packages/git/src/browser/git-repository-provider.spec.ts b/packages/git/src/browser/git-repository-provider.spec.ts index 39db2e52c2974..208e9735f3939 100644 --- a/packages/git/src/browser/git-repository-provider.spec.ts +++ b/packages/git/src/browser/git-repository-provider.spec.ts @@ -23,7 +23,7 @@ FrontendApplicationConfigProvider.set({ ...ApplicationProps.DEFAULT.frontend.config }); -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { Git, Repository } from '../common'; import { DugiteGit } from '../node/dugite-git'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; diff --git a/packages/git/src/browser/git-repository-provider.ts b/packages/git/src/browser/git-repository-provider.ts index d66421f806c11..3ca8eef3b65b0 100644 --- a/packages/git/src/browser/git-repository-provider.ts +++ b/packages/git/src/browser/git-repository-provider.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { StorageService } from '@theia/core/lib/browser/storage-service'; diff --git a/packages/git/src/browser/git-repository-tracker.ts b/packages/git/src/browser/git-repository-tracker.ts index 22cc352742ba9..cc05fe4325543 100644 --- a/packages/git/src/browser/git-repository-tracker.ts +++ b/packages/git/src/browser/git-repository-tracker.ts @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Git, Repository, WorkingDirectoryStatus } from '../common'; import { Event, Emitter, Disposable, DisposableCollection, CancellationToken, CancellationTokenSource } from '@theia/core'; import { GitRepositoryProvider } from './git-repository-provider'; import { GitWatcher, GitStatusChangeEvent } from '../common/git-watcher'; import URI from '@theia/core/lib/common/uri'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); /** * The repository tracker watches the selected repository for status changes. It provides a convenient way to listen on status updates. diff --git a/packages/git/src/browser/git-resource-resolver.ts b/packages/git/src/browser/git-resource-resolver.ts index 56774d0d6a05a..adfe67d9829e2 100644 --- a/packages/git/src/browser/git-resource-resolver.ts +++ b/packages/git/src/browser/git-resource-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Git, Repository } from '../common'; import { Resource, ResourceResolver } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/git/src/browser/git-scm-provider.ts b/packages/git/src/browser/git-scm-provider.ts index de699461228f3..f98206b58a1b8 100644 --- a/packages/git/src/browser/git-scm-provider.ts +++ b/packages/git/src/browser/git-scm-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { DiffUris } from '@theia/core/lib/browser/diff-uris'; import { Emitter } from '@theia/core'; diff --git a/packages/git/src/browser/git-sync-service.ts b/packages/git/src/browser/git-sync-service.ts index 400b311762f25..d76133cdac914 100644 --- a/packages/git/src/browser/git-sync-service.ts +++ b/packages/git/src/browser/git-sync-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MessageService, Emitter, Event } from '@theia/core'; import { QuickPickService, ConfirmDialog } from '@theia/core/lib/browser'; import { GitRepositoryTracker } from './git-repository-tracker'; diff --git a/packages/git/src/browser/git-uri-label-contribution.ts b/packages/git/src/browser/git-uri-label-contribution.ts index 8648af4f3a20f..fe7d2a1676493 100644 --- a/packages/git/src/browser/git-uri-label-contribution.ts +++ b/packages/git/src/browser/git-uri-label-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProviderContribution, LabelProvider, DidChangeLabelEvent } from '@theia/core/lib/browser/label-provider'; import URI from '@theia/core/lib/common/uri'; import { GIT_RESOURCE_SCHEME } from './git-resource'; diff --git a/packages/git/src/browser/history/git-commit-detail-header-widget.tsx b/packages/git/src/browser/history/git-commit-detail-header-widget.tsx index 52d7b0a5d1c42..963a2840257d6 100644 --- a/packages/git/src/browser/history/git-commit-detail-header-widget.tsx +++ b/packages/git/src/browser/history/git-commit-detail-header-widget.tsx @@ -14,12 +14,12 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ScmAvatarService } from '@theia/scm/lib/browser/scm-avatar-service'; import { GitCommitDetailWidgetOptions } from './git-commit-detail-widget-options'; import { ReactWidget, KeybindingRegistry } from '@theia/core/lib/browser'; import { Git } from '../../common'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; @injectable() export class GitCommitDetailHeaderWidget extends ReactWidget { diff --git a/packages/git/src/browser/history/git-commit-detail-open-handler.ts b/packages/git/src/browser/history/git-commit-detail-open-handler.ts index aefbcec016e58..5b8a7fb0ca4db 100644 --- a/packages/git/src/browser/history/git-commit-detail-open-handler.ts +++ b/packages/git/src/browser/history/git-commit-detail-open-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { WidgetOpenHandler, WidgetOpenerOptions } from '@theia/core/lib/browser'; import URI from '@theia/core/lib/common/uri'; import { GitCommitDetailWidgetOptions } from './git-commit-detail-widget-options'; diff --git a/packages/git/src/browser/history/git-commit-detail-widget.tsx b/packages/git/src/browser/history/git-commit-detail-widget.tsx index 32e9e4bcd57fa..a624ca79ba796 100644 --- a/packages/git/src/browser/history/git-commit-detail-widget.tsx +++ b/packages/git/src/browser/history/git-commit-detail-widget.tsx @@ -16,8 +16,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Message } from '@phosphor/messaging'; -import { injectable, inject, postConstruct } from 'inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { BaseWidget, Widget, StatefulWidget, Panel, PanelLayout, MessageLoop } from '@theia/core/lib/browser'; diff --git a/packages/git/src/browser/history/git-history-frontend-module.ts b/packages/git/src/browser/history/git-history-frontend-module.ts index f3eef86853a30..81e0a18c70655 100644 --- a/packages/git/src/browser/history/git-history-frontend-module.ts +++ b/packages/git/src/browser/history/git-history-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { WidgetFactory, OpenHandler, TreeModel } from '@theia/core/lib/browser'; import { GitCommitDetailWidgetOptions } from './git-commit-detail-widget-options'; import { GitCommitDetailWidget } from './git-commit-detail-widget'; diff --git a/packages/git/src/browser/history/git-history-support.ts b/packages/git/src/browser/history/git-history-support.ts index 37b9fd848b928..3d73b9ee75fa3 100644 --- a/packages/git/src/browser/history/git-history-support.ts +++ b/packages/git/src/browser/history/git-history-support.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Emitter, Disposable } from '@theia/core'; import { Git } from '../../common'; import { ScmHistorySupport, HistoryWidgetOptions } from '@theia/scm-extra/lib/browser/history/scm-history-widget'; diff --git a/packages/git/src/browser/history/git-opener-in-secondary-area.ts b/packages/git/src/browser/history/git-opener-in-secondary-area.ts index 6b8515f225e1b..4b5e51fdf69b7 100644 --- a/packages/git/src/browser/history/git-opener-in-secondary-area.ts +++ b/packages/git/src/browser/history/git-opener-in-secondary-area.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; -import { Widget } from '@phosphor/widgets'; +import { inject, injectable } from '@theia/core/shared/inversify'; +import { Widget } from '@theia/core/shared/@phosphor/widgets'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { GitResourceOpener } from '../diff/git-resource-opener'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/git/src/browser/prompt/git-prompt-module.ts b/packages/git/src/browser/prompt/git-prompt-module.ts index 5d6916622498d..482d28a4cc74b 100644 --- a/packages/git/src/browser/prompt/git-prompt-module.ts +++ b/packages/git/src/browser/prompt/git-prompt-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider'; import { GitPrompt, GitPromptServer, GitPromptServerProxy, GitPromptServerImpl } from '../../common/git-prompt'; diff --git a/packages/git/src/common/git-prompt.ts b/packages/git/src/common/git-prompt.ts index 9f145a45d1572..451371618c563 100644 --- a/packages/git/src/common/git-prompt.ts +++ b/packages/git/src/common/git-prompt.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { JsonRpcProxy } from '@theia/core/lib/common/messaging/proxy-factory'; import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/git/src/common/git-watcher.ts b/packages/git/src/common/git-watcher.ts index 4dda3dbd76bc6..6ed643a721edf 100644 --- a/packages/git/src/common/git-watcher.ts +++ b/packages/git/src/common/git-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { JsonRpcServer, JsonRpcProxy } from '@theia/core'; import { Repository, WorkingDirectoryStatus } from './git-model'; import { Disposable, DisposableCollection, Emitter, Event } from '@theia/core/lib/common'; diff --git a/packages/git/src/electron-browser/prompt/electron-git-prompt-module.ts b/packages/git/src/electron-browser/prompt/electron-git-prompt-module.ts index 7097423cf7483..d5d23307cebfb 100644 --- a/packages/git/src/electron-browser/prompt/electron-git-prompt-module.ts +++ b/packages/git/src/electron-browser/prompt/electron-git-prompt-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { GitPrompt } from '../../common/git-prompt'; import { bindPromptServer } from '../../browser/prompt/git-prompt-module'; import { GitQuickOpenPrompt } from './git-quick-open-prompt'; diff --git a/packages/git/src/electron-browser/prompt/git-quick-open-prompt.ts b/packages/git/src/electron-browser/prompt/git-quick-open-prompt.ts index 57f9c5c635f0f..219759467feea 100644 --- a/packages/git/src/electron-browser/prompt/git-quick-open-prompt.ts +++ b/packages/git/src/electron-browser/prompt/git-quick-open-prompt.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import * as PQueue from 'p-queue'; import { QuickOpenItem, QuickOpenMode } from '@theia/core/lib/browser/quick-open/quick-open-model'; import { QuickOpenService } from '@theia/core/lib/browser/quick-open/quick-open-service'; diff --git a/packages/git/src/electron-node/askpass/askpass.ts b/packages/git/src/electron-node/askpass/askpass.ts index 11a6333b2a706..4c6cc15ad85e9 100644 --- a/packages/git/src/electron-node/askpass/askpass.ts +++ b/packages/git/src/electron-node/askpass/askpass.ts @@ -5,7 +5,7 @@ *--------------------------------------------------------------------------------------------*/ // Based on: https://github.com/Microsoft/vscode/blob/dd3e2d94f81139f9d18ba15a24c16c6061880b93/extensions/git/src/askpass.ts -import { injectable, postConstruct, inject } from 'inversify'; +import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'; import * as path from 'path'; import * as http from 'http'; import { ILogger } from '@theia/core/lib/common/logger'; diff --git a/packages/git/src/electron-node/env/electron-git-env-module.ts b/packages/git/src/electron-node/env/electron-git-env-module.ts index df5173d8e4913..cd6374080c116 100644 --- a/packages/git/src/electron-node/env/electron-git-env-module.ts +++ b/packages/git/src/electron-node/env/electron-git-env-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { GitEnvProvider } from '../../node/env/git-env-provider'; import { Askpass } from '../askpass/askpass'; import { ElectronGitEnvProvider } from './electron-git-env-provider'; diff --git a/packages/git/src/electron-node/env/electron-git-env-provider.ts b/packages/git/src/electron-node/env/electron-git-env-provider.ts index 9cb07b3e44a04..be113be8f9e75 100644 --- a/packages/git/src/electron-node/env/electron-git-env-provider.ts +++ b/packages/git/src/electron-node/env/electron-git-env-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { DefaultGitEnvProvider } from '../../node/env/git-env-provider'; import { Askpass } from '../askpass/askpass'; diff --git a/packages/git/src/node/dugite-git-prompt.ts b/packages/git/src/node/dugite-git-prompt.ts index 73cfac066916b..516103e5fc7db 100644 --- a/packages/git/src/node/dugite-git-prompt.ts +++ b/packages/git/src/node/dugite-git-prompt.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { GitPromptServer, GitPromptClient, GitPrompt } from '../common/git-prompt'; @injectable() diff --git a/packages/git/src/node/dugite-git-watcher.slow-spec.ts b/packages/git/src/node/dugite-git-watcher.slow-spec.ts index b4919503d6774..4ac54c5218b47 100644 --- a/packages/git/src/node/dugite-git-watcher.slow-spec.ts +++ b/packages/git/src/node/dugite-git-watcher.slow-spec.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as temp from 'temp'; import * as path from 'path'; import { expect } from 'chai'; diff --git a/packages/git/src/node/dugite-git-watcher.ts b/packages/git/src/node/dugite-git-watcher.ts index bc3864353de1f..8b49e10bcfdac 100644 --- a/packages/git/src/node/dugite-git-watcher.ts +++ b/packages/git/src/node/dugite-git-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { DisposableCollection, Disposable } from '@theia/core'; import { Repository } from '../common'; import { GitWatcherServer, GitWatcherClient } from '../common/git-watcher'; diff --git a/packages/git/src/node/dugite-git.spec.ts b/packages/git/src/node/dugite-git.spec.ts index 26c898d237665..949e4680f6e5d 100644 --- a/packages/git/src/node/dugite-git.spec.ts +++ b/packages/git/src/node/dugite-git.spec.ts @@ -18,7 +18,7 @@ import * as upath from 'upath'; import * as path from 'path'; import * as temp from 'temp'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import { expect } from 'chai'; import { Git } from '../common/git'; import { git as gitExec } from 'dugite-extra/lib/core/git'; diff --git a/packages/git/src/node/dugite-git.ts b/packages/git/src/node/dugite-git.ts index 4dda89cb9edea..b09bd248a24f5 100644 --- a/packages/git/src/node/dugite-git.ts +++ b/packages/git/src/node/dugite-git.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as Path from 'path'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { git } from 'dugite-extra/lib/core/git'; import { push } from 'dugite-extra/lib/command/push'; import { pull } from 'dugite-extra/lib/command/pull'; diff --git a/packages/git/src/node/env/git-env-module.ts b/packages/git/src/node/env/git-env-module.ts index bbe9138dfec2e..79d861bec68d6 100644 --- a/packages/git/src/node/env/git-env-module.ts +++ b/packages/git/src/node/env/git-env-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { GitEnvProvider, DefaultGitEnvProvider } from './git-env-provider'; export default new ContainerModule(bind => { diff --git a/packages/git/src/node/env/git-env-provider.ts b/packages/git/src/node/env/git-env-provider.ts index d28ce2b558160..2caf936cb6182 100644 --- a/packages/git/src/node/env/git-env-provider.ts +++ b/packages/git/src/node/env/git-env-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; /** diff --git a/packages/git/src/node/git-backend-module.ts b/packages/git/src/node/git-backend-module.ts index 7eb24b31f9bcd..0be4ac3ed4881 100644 --- a/packages/git/src/node/git-backend-module.ts +++ b/packages/git/src/node/git-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, Container, interfaces } from 'inversify'; +import { ContainerModule, Container, interfaces } from '@theia/core/shared/inversify'; import { Git, GitPath } from '../common/git'; import { GitWatcherPath, GitWatcherClient, GitWatcherServer } from '../common/git-watcher'; import { DugiteGit, OutputParser, NameStatusParser, CommitDetailsParser, GitBlameParser } from './dugite-git'; diff --git a/packages/git/src/node/git-exec-provider.ts b/packages/git/src/node/git-exec-provider.ts index 75dbf82f794dd..8e90c4841ae22 100644 --- a/packages/git/src/node/git-exec-provider.ts +++ b/packages/git/src/node/git-exec-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Disposable, MaybePromise } from '@theia/core/'; import { IGitExecutionOptions } from 'dugite-extra/lib/core/git'; diff --git a/packages/git/src/node/git-locator/git-locator-client.ts b/packages/git/src/node/git-locator/git-locator-client.ts index a8ca4cd8bdb79..28aef66323b06 100644 --- a/packages/git/src/node/git-locator/git-locator-client.ts +++ b/packages/git/src/node/git-locator/git-locator-client.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as paths from 'path'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { JsonRpcProxyFactory, DisposableCollection } from '@theia/core'; import { IPCConnectionProvider } from '@theia/core/lib/node'; import { GitLocator, GitLocateOptions } from './git-locator-protocol'; diff --git a/packages/git/src/node/git-locator/git-locator-impl.ts b/packages/git/src/node/git-locator/git-locator-impl.ts index d6c6e867f4658..aa1f87c52517d 100644 --- a/packages/git/src/node/git-locator/git-locator-impl.ts +++ b/packages/git/src/node/git-locator/git-locator-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { GitLocator, GitLocateOptions } from './git-locator-protocol'; diff --git a/packages/git/src/node/git-repository-manager.ts b/packages/git/src/node/git-repository-manager.ts index de80187d8b9f4..34cd2e014c940 100644 --- a/packages/git/src/node/git-repository-manager.ts +++ b/packages/git/src/node/git-repository-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ReferenceCollection, Reference } from '@theia/core'; import { Repository } from '../common'; import { GitRepositoryWatcher, GitRepositoryWatcherFactory } from './git-repository-watcher'; diff --git a/packages/git/src/node/git-repository-watcher.ts b/packages/git/src/node/git-repository-watcher.ts index c4731fffd7729..4ff1ec4a0907c 100644 --- a/packages/git/src/node/git-repository-watcher.ts +++ b/packages/git/src/node/git-repository-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable, Event, Emitter, ILogger } from '@theia/core'; import { Git, Repository, WorkingDirectoryStatus, GitUtils } from '../common'; import { GitStatusChangeEvent } from '../common/git-watcher'; diff --git a/packages/git/src/node/init/git-init.ts b/packages/git/src/node/init/git-init.ts index e2774077e874c..a9a2512d68db0 100644 --- a/packages/git/src/node/init/git-init.ts +++ b/packages/git/src/node/init/git-init.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import findGit from 'find-git-exec'; import { dirname } from 'path'; -import { pathExists } from 'fs-extra'; +import { pathExists } from '@theia/core/shared/fs-extra'; import { ILogger } from '@theia/core/lib/common/logger'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { MessageService } from '@theia/core'; diff --git a/packages/git/src/node/test/binding-helper.ts b/packages/git/src/node/test/binding-helper.ts index 7229f3dd5c086..906764dc8c298 100644 --- a/packages/git/src/node/test/binding-helper.ts +++ b/packages/git/src/node/test/binding-helper.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container, interfaces } from 'inversify'; +import { Container, interfaces } from '@theia/core/shared/inversify'; import { Git } from '../../common/git'; import { DugiteGit } from '../dugite-git'; import { bindGit, GitBindingOptions } from '../git-backend-module'; diff --git a/packages/git/src/node/test/no-sync-repository-manager.ts b/packages/git/src/node/test/no-sync-repository-manager.ts index 08e5540b3ad46..969164cbfe240 100644 --- a/packages/git/src/node/test/no-sync-repository-manager.ts +++ b/packages/git/src/node/test/no-sync-repository-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Repository } from '../../common/git-model'; import { GitRepositoryManager } from '../git-repository-manager'; diff --git a/packages/keymaps/package.json b/packages/keymaps/package.json index fa25c6ef530de..d9162955113bb 100644 --- a/packages/keymaps/package.json +++ b/packages/keymaps/package.json @@ -9,9 +9,7 @@ "@theia/workspace": "1.12.0", "@types/lodash.debounce": "4.0.3", "ajv": "^6.5.3", - "fuzzy": "^0.1.3", - "jsonc-parser": "^2.2.0", - "lodash.debounce": "^4.0.8" + "jsonc-parser": "^2.2.0" }, "devDependencies": { "@theia/ext-scripts": "1.12.0", diff --git a/packages/keymaps/src/browser/keybindings-widget.tsx b/packages/keymaps/src/browser/keybindings-widget.tsx index 78b810574ecaa..56b4e97100d0e 100644 --- a/packages/keymaps/src/browser/keybindings-widget.tsx +++ b/packages/keymaps/src/browser/keybindings-widget.tsx @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import React = require('react'); -import debounce = require('lodash.debounce'); -import * as fuzzy from 'fuzzy'; -import { injectable, inject, postConstruct } from 'inversify'; +import React = require('@theia/core/shared/react'); +import debounce = require('@theia/core/shared/lodash.debounce'); +import * as fuzzy from '@theia/core/shared/fuzzy'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { CommandRegistry, Command } from '@theia/core/lib/common/command'; import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget'; diff --git a/packages/keymaps/src/browser/keymaps-frontend-contribution.ts b/packages/keymaps/src/browser/keymaps-frontend-contribution.ts index 1eee742763ac9..612c1840f3a71 100644 --- a/packages/keymaps/src/browser/keymaps-frontend-contribution.ts +++ b/packages/keymaps/src/browser/keymaps-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { CommandContribution, Command, diff --git a/packages/keymaps/src/browser/keymaps-frontend-module.ts b/packages/keymaps/src/browser/keymaps-frontend-module.ts index 7b1728738528a..ae87268ffe8ce 100644 --- a/packages/keymaps/src/browser/keymaps-frontend-module.ts +++ b/packages/keymaps/src/browser/keymaps-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { KeymapsService } from './keymaps-service'; import { KeymapsFrontendContribution } from './keymaps-frontend-contribution'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; diff --git a/packages/keymaps/src/browser/keymaps-service.ts b/packages/keymaps/src/browser/keymaps-service.ts index 88824439566e6..9217594c9bfde 100644 --- a/packages/keymaps/src/browser/keymaps-service.ts +++ b/packages/keymaps/src/browser/keymaps-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { OpenerService, open, WidgetOpenerOptions, Widget } from '@theia/core/lib/browser'; import { KeybindingRegistry, KeybindingScope } from '@theia/core/lib/browser/keybinding'; import { Keybinding } from '@theia/core/lib/common/keybinding'; diff --git a/packages/markers/src/browser/marker-manager.ts b/packages/markers/src/browser/marker-manager.ts index 7e3129239c40e..bafa6c540af39 100644 --- a/packages/markers/src/browser/marker-manager.ts +++ b/packages/markers/src/browser/marker-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common'; import URI from '@theia/core/lib/common/uri'; import { Marker } from '../common/marker'; diff --git a/packages/markers/src/browser/marker-tree-label-provider.spec.ts b/packages/markers/src/browser/marker-tree-label-provider.spec.ts index 82b349d2d1f65..d15e6eec2e92f 100644 --- a/packages/markers/src/browser/marker-tree-label-provider.spec.ts +++ b/packages/markers/src/browser/marker-tree-label-provider.spec.ts @@ -26,12 +26,12 @@ FrontendApplicationConfigProvider.set({ import URI from '@theia/core/lib/common/uri'; import { expect } from 'chai'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { ContributionProvider, Event } from '@theia/core/lib/common'; import { LabelProvider, LabelProviderContribution, DefaultUriLabelProviderContribution, ApplicationShell, WidgetManager } from '@theia/core/lib/browser'; import { MarkerInfoNode } from './marker-tree'; import { MarkerTreeLabelProvider } from './marker-tree-label-provider'; -import { Signal } from '@phosphor/signaling'; +import { Signal } from '@theia/core/shared/@phosphor/signaling'; import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider'; import { WorkspaceService } from '@theia/workspace/lib/browser'; import { WorkspaceUriLabelProviderContribution } from '@theia/workspace/lib/browser/workspace-uri-contribution'; diff --git a/packages/markers/src/browser/marker-tree-label-provider.ts b/packages/markers/src/browser/marker-tree-label-provider.ts index 6de8ca6e5ee07..538b21e07cd2b 100644 --- a/packages/markers/src/browser/marker-tree-label-provider.ts +++ b/packages/markers/src/browser/marker-tree-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProvider, LabelProviderContribution, DidChangeLabelEvent } from '@theia/core/lib/browser/label-provider'; import { MarkerInfoNode } from './marker-tree'; import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider'; diff --git a/packages/markers/src/browser/marker-tree-model.ts b/packages/markers/src/browser/marker-tree-model.ts index 0b1197f334860..24abe001f8fd5 100644 --- a/packages/markers/src/browser/marker-tree-model.ts +++ b/packages/markers/src/browser/marker-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MarkerNode } from './marker-tree'; import { TreeModelImpl, OpenerService, open, TreeNode, OpenerOptions } from '@theia/core/lib/browser'; diff --git a/packages/markers/src/browser/marker-tree.ts b/packages/markers/src/browser/marker-tree.ts index a2deb11de3ba1..cf2027d5b396a 100644 --- a/packages/markers/src/browser/marker-tree.ts +++ b/packages/markers/src/browser/marker-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { TreeImpl, CompositeTreeNode, TreeNode, SelectableTreeNode, ExpandableTreeNode } from '@theia/core/lib/browser'; import { MarkerManager } from './marker-manager'; import { Marker } from '../common/marker'; diff --git a/packages/markers/src/browser/problem/problem-container.ts b/packages/markers/src/browser/problem/problem-container.ts index 8aa41b8e91f0e..97d57ac2a30b1 100644 --- a/packages/markers/src/browser/problem/problem-container.ts +++ b/packages/markers/src/browser/problem/problem-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { MarkerOptions } from '../marker-tree'; import { ProblemWidget } from './problem-widget'; import { ProblemTreeModel, ProblemTree } from './problem-tree-model'; diff --git a/packages/markers/src/browser/problem/problem-contribution.ts b/packages/markers/src/browser/problem/problem-contribution.ts index 6812c17a027f9..e880ff4c2c0d3 100644 --- a/packages/markers/src/browser/problem/problem-contribution.ts +++ b/packages/markers/src/browser/problem/problem-contribution.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import debounce = require('lodash.debounce'); -import { injectable, inject } from 'inversify'; +import debounce = require('@theia/core/shared/lodash.debounce'); +import { injectable, inject } from '@theia/core/shared/inversify'; import { FrontendApplication, FrontendApplicationContribution, CompositeTreeNode, SelectableTreeNode, Widget } from '@theia/core/lib/browser'; import { StatusBar, StatusBarAlignment } from '@theia/core/lib/browser/status-bar/status-bar'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; diff --git a/packages/markers/src/browser/problem/problem-decorator.ts b/packages/markers/src/browser/problem/problem-decorator.ts index 697278854d95a..0aac3d40c53eb 100644 --- a/packages/markers/src/browser/problem/problem-decorator.ts +++ b/packages/markers/src/browser/problem/problem-decorator.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; -import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { Diagnostic, DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-types'; import URI from '@theia/core/lib/common/uri'; import { notEmpty } from '@theia/core/lib/common/objects'; import { Event, Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/markers/src/browser/problem/problem-frontend-module.ts b/packages/markers/src/browser/problem/problem-frontend-module.ts index 32cb24a0e49a0..59c99029420c0 100644 --- a/packages/markers/src/browser/problem/problem-frontend-module.ts +++ b/packages/markers/src/browser/problem/problem-frontend-module.ts @@ -16,7 +16,7 @@ import '../../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ProblemWidget, PROBLEMS_WIDGET_ID } from './problem-widget'; import { ProblemContribution } from './problem-contribution'; import { createProblemWidget } from './problem-container'; diff --git a/packages/markers/src/browser/problem/problem-layout-migrations.ts b/packages/markers/src/browser/problem/problem-layout-migrations.ts index 67c58f8ba5534..aa65426826fd1 100644 --- a/packages/markers/src/browser/problem/problem-layout-migrations.ts +++ b/packages/markers/src/browser/problem/problem-layout-migrations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ApplicationShellLayoutMigration, WidgetDescription } from '@theia/core/lib/browser/shell/shell-layout-restorer'; import { PROBLEM_KIND } from '../../common/problem-marker'; import { PROBLEMS_WIDGET_ID } from './problem-widget'; diff --git a/packages/markers/src/browser/problem/problem-manager.spec.ts b/packages/markers/src/browser/problem/problem-manager.spec.ts index 6abdecb1fa89d..7edd55f8b6754 100644 --- a/packages/markers/src/browser/problem/problem-manager.spec.ts +++ b/packages/markers/src/browser/problem/problem-manager.spec.ts @@ -21,11 +21,11 @@ const disableJSDOM = enableJSDOM(); import * as chai from 'chai'; import URI from '@theia/core/lib/common/uri'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { ProblemManager } from './problem-manager'; import { Event } from '@theia/core/lib/common/event'; import { ILogger } from '@theia/core/lib/common/logger'; -import { DiagnosticSeverity, Range } from 'vscode-languageserver-types'; +import { DiagnosticSeverity, Range } from '@theia/core/shared/vscode-languageserver-types'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { LocalStorageService, StorageService } from '@theia/core/lib/browser/storage-service'; diff --git a/packages/markers/src/browser/problem/problem-manager.ts b/packages/markers/src/browser/problem/problem-manager.ts index 074b0c830f4d8..89a1a98e145c5 100644 --- a/packages/markers/src/browser/problem/problem-manager.ts +++ b/packages/markers/src/browser/problem/problem-manager.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MarkerManager } from '../marker-manager'; import { PROBLEM_KIND } from '../../common/problem-marker'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; export interface ProblemStat { errors: number; diff --git a/packages/markers/src/browser/problem/problem-preferences.ts b/packages/markers/src/browser/problem/problem-preferences.ts index b6e0da94d1ae8..5ae25f44ac163 100644 --- a/packages/markers/src/browser/problem/problem-preferences.ts +++ b/packages/markers/src/browser/problem/problem-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; export const ProblemConfigSchema: PreferenceSchema = { diff --git a/packages/markers/src/browser/problem/problem-tabbar-decorator.ts b/packages/markers/src/browser/problem/problem-tabbar-decorator.ts index 04bfb69b802f8..cc59201e24046 100644 --- a/packages/markers/src/browser/problem/problem-tabbar-decorator.ts +++ b/packages/markers/src/browser/problem/problem-tabbar-decorator.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; -import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { Diagnostic, DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-types'; import { Event, Emitter } from '@theia/core/lib/common/event'; -import { Title, Widget } from '@phosphor/widgets'; +import { Title, Widget } from '@theia/core/shared/@phosphor/widgets'; import { WidgetDecoration } from '@theia/core/lib/browser/widget-decoration'; import { TabBarDecorator } from '@theia/core/lib/browser/shell/tab-bar-decorator'; import { Marker } from '../../common/marker'; diff --git a/packages/markers/src/browser/problem/problem-tree-model.spec.ts b/packages/markers/src/browser/problem/problem-tree-model.spec.ts index f3308a011c715..94501b050cdcd 100644 --- a/packages/markers/src/browser/problem/problem-tree-model.spec.ts +++ b/packages/markers/src/browser/problem/problem-tree-model.spec.ts @@ -19,8 +19,8 @@ let disableJSDOM = enableJSDOM(); import URI from '@theia/core/lib/common/uri'; import { expect } from 'chai'; -import { Container } from 'inversify'; -import { Diagnostic, Range, DiagnosticSeverity } from 'vscode-languageserver-types'; +import { Container } from '@theia/core/shared/inversify'; +import { Diagnostic, Range, DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-types'; import { Event } from '@theia/core/lib/common/event'; import { Marker } from '../../common/marker'; import { MarkerManager } from '../marker-manager'; diff --git a/packages/markers/src/browser/problem/problem-tree-model.ts b/packages/markers/src/browser/problem/problem-tree-model.ts index 0df15d3b29d43..25bf9915ca5d6 100644 --- a/packages/markers/src/browser/problem/problem-tree-model.ts +++ b/packages/markers/src/browser/problem/problem-tree-model.ts @@ -18,10 +18,10 @@ import { ProblemMarker } from '../../common/problem-marker'; import { ProblemManager } from './problem-manager'; import { MarkerNode, MarkerTree, MarkerOptions, MarkerInfoNode } from '../marker-tree'; import { MarkerTreeModel } from '../marker-tree-model'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { OpenerOptions, TreeNode } from '@theia/core/lib/browser'; import { Marker } from '../../common/marker'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; import { ProblemUtils } from './problem-utils'; @injectable() diff --git a/packages/markers/src/browser/problem/problem-utils.ts b/packages/markers/src/browser/problem/problem-utils.ts index f816fdf6f7343..af4bc2b2a4217 100644 --- a/packages/markers/src/browser/problem/problem-utils.ts +++ b/packages/markers/src/browser/problem/problem-utils.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Marker } from '../../common/marker'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; export namespace ProblemUtils { diff --git a/packages/markers/src/browser/problem/problem-widget-tab-bar-decorator.ts b/packages/markers/src/browser/problem/problem-widget-tab-bar-decorator.ts index f65096ce3212f..b888260bd8ec5 100644 --- a/packages/markers/src/browser/problem/problem-widget-tab-bar-decorator.ts +++ b/packages/markers/src/browser/problem/problem-widget-tab-bar-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common/event'; import { ProblemManager } from './problem-manager'; import { TabBarDecorator } from '@theia/core/lib/browser/shell/tab-bar-decorator'; diff --git a/packages/markers/src/browser/problem/problem-widget.tsx b/packages/markers/src/browser/problem/problem-widget.tsx index c5a35bf0eebf4..ba25b2e41bc4a 100644 --- a/packages/markers/src/browser/problem/problem-widget.tsx +++ b/packages/markers/src/browser/problem/problem-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ProblemManager } from './problem-manager'; import { ProblemMarker } from '../../common/problem-marker'; import { ProblemTreeModel } from './problem-tree-model'; @@ -23,8 +23,8 @@ import { TreeWidget, TreeProps, ContextMenuRenderer, TreeNode, NodeProps, TreeModel, ApplicationShell, Navigatable, ExpandableTreeNode, SelectableTreeNode } from '@theia/core/lib/browser'; -import { DiagnosticSeverity } from 'vscode-languageserver-types'; -import * as React from 'react'; +import { DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-types'; +import * as React from '@theia/core/shared/react'; import { ProblemPreferences } from './problem-preferences'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/markers/src/common/problem-marker.ts b/packages/markers/src/common/problem-marker.ts index 73e746e8a645e..a3de30205c57a 100644 --- a/packages/markers/src/common/problem-marker.ts +++ b/packages/markers/src/common/problem-marker.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Marker } from './marker'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; export const PROBLEM_KIND = 'problem'; diff --git a/packages/messages/package.json b/packages/messages/package.json index 63b1e3236749a..fc1de13deb7b7 100644 --- a/packages/messages/package.json +++ b/packages/messages/package.json @@ -4,7 +4,6 @@ "description": "Theia - Messages Extension", "dependencies": { "@theia/core": "1.12.0", - "lodash.throttle": "^4.1.1", "markdown-it": "^8.4.0", "react-perfect-scrollbar": "^1.5.3", "ts-md5": "^1.2.2" diff --git a/packages/messages/src/browser/messages-frontend-module.ts b/packages/messages/src/browser/messages-frontend-module.ts index 7ce6a521f190d..18c8efeb66042 100644 --- a/packages/messages/src/browser/messages-frontend-module.ts +++ b/packages/messages/src/browser/messages-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { MessageClient } from '@theia/core/lib/common'; import { NotificationManager } from './notifications-manager'; import { bindNotificationPreferences } from './notification-preferences'; diff --git a/packages/messages/src/browser/notification-center-component.tsx b/packages/messages/src/browser/notification-center-component.tsx index 5da00eea22848..7c775a54f5ab5 100644 --- a/packages/messages/src/browser/notification-center-component.tsx +++ b/packages/messages/src/browser/notification-center-component.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DisposableCollection } from '@theia/core'; import { NotificationManager, NotificationUpdateEvent } from './notifications-manager'; import { NotificationComponent } from './notification-component'; diff --git a/packages/messages/src/browser/notification-component.tsx b/packages/messages/src/browser/notification-component.tsx index 38f60324634ad..9c14f06cf1ba7 100644 --- a/packages/messages/src/browser/notification-component.tsx +++ b/packages/messages/src/browser/notification-component.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { NotificationManager, Notification } from './notifications-manager'; export interface NotificationComponentProps { diff --git a/packages/messages/src/browser/notification-content-renderer.ts b/packages/messages/src/browser/notification-content-renderer.ts index 2c99b2cc72a28..cb19de2b998be 100644 --- a/packages/messages/src/browser/notification-content-renderer.ts +++ b/packages/messages/src/browser/notification-content-renderer.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as markdownit from 'markdown-it'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; @injectable() export class NotificationContentRenderer { diff --git a/packages/messages/src/browser/notification-preferences.ts b/packages/messages/src/browser/notification-preferences.ts index 4c88cea97104a..18e85ded59678 100644 --- a/packages/messages/src/browser/notification-preferences.ts +++ b/packages/messages/src/browser/notification-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/messages/src/browser/notification-toasts-component.tsx b/packages/messages/src/browser/notification-toasts-component.tsx index 1bc8a8ee9ebc9..06cb28ca896ad 100644 --- a/packages/messages/src/browser/notification-toasts-component.tsx +++ b/packages/messages/src/browser/notification-toasts-component.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { DisposableCollection } from '@theia/core'; import { NotificationManager, NotificationUpdateEvent } from './notifications-manager'; import { NotificationComponent } from './notification-component'; diff --git a/packages/messages/src/browser/notifications-contribution.ts b/packages/messages/src/browser/notifications-contribution.ts index dfb6b655ad10a..7a9fe1da165d8 100644 --- a/packages/messages/src/browser/notifications-contribution.ts +++ b/packages/messages/src/browser/notifications-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, StatusBar, FrontendApplication, StatusBarAlignment, KeybindingContribution, KeybindingRegistry, KeybindingContext } from '@theia/core/lib/browser'; diff --git a/packages/messages/src/browser/notifications-manager.ts b/packages/messages/src/browser/notifications-manager.ts index c89e935e3bb01..2532f69f2368a 100644 --- a/packages/messages/src/browser/notifications-manager.ts +++ b/packages/messages/src/browser/notifications-manager.ts @@ -14,13 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { MessageClient, MessageType, Message as PlainMessage, ProgressMessage, ProgressUpdate, CancellationToken } from '@theia/core/lib/common'; import { deepClone } from '@theia/core/lib/common/objects'; import { Emitter } from '@theia/core'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { Md5 } from 'ts-md5'; -import throttle = require('lodash.throttle'); +import throttle = require('@theia/core/shared/lodash.throttle'); import { NotificationPreferences } from './notification-preferences'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; import { OpenerService } from '@theia/core/lib/browser'; diff --git a/packages/messages/src/browser/notifications-renderer.tsx b/packages/messages/src/browser/notifications-renderer.tsx index 479b2e5760b64..f92d722550d09 100644 --- a/packages/messages/src/browser/notifications-renderer.tsx +++ b/packages/messages/src/browser/notifications-renderer.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as ReactDOM from 'react-dom'; -import * as React from 'react'; -import { injectable, inject, postConstruct } from 'inversify'; +import * as ReactDOM from '@theia/core/shared/react-dom'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ApplicationShell, CorePreferences } from '@theia/core/lib/browser'; import { NotificationManager } from './notifications-manager'; import { NotificationCenterComponent } from './notification-center-component'; diff --git a/packages/metrics/compile.tsconfig.json b/packages/metrics/compile.tsconfig.json index 51b627fd0efed..4f0b13d382c8f 100644 --- a/packages/metrics/compile.tsconfig.json +++ b/packages/metrics/compile.tsconfig.json @@ -9,9 +9,6 @@ "src" ], "references": [ - { - "path": "../../dev-packages/application-package/compile.tsconfig.json" - }, { "path": "../core/compile.tsconfig.json" } diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 3ed61d3ab6ea1..45c844c0ec39d 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -3,7 +3,6 @@ "version": "1.12.0", "description": "Theia - Metrics Extension", "dependencies": { - "@theia/application-package": "1.12.0", "@theia/core": "1.12.0", "prom-client": "^10.2.0" }, diff --git a/packages/metrics/src/node/extensions-metrics-contribution.ts b/packages/metrics/src/node/extensions-metrics-contribution.ts index 3f9a3d6a88d81..a4e54bf32f465 100644 --- a/packages/metrics/src/node/extensions-metrics-contribution.ts +++ b/packages/metrics/src/node/extensions-metrics-contribution.ts @@ -13,9 +13,9 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MetricsContribution } from './metrics-contribution'; -import { ApplicationPackage } from '@theia/application-package'; +import { ApplicationPackage } from '@theia/core/shared/@theia/application-package'; import { PROMETHEUS_REGEXP, toPrometheusValidName } from './prometheus'; const metricsName = 'theia_extension_version'; diff --git a/packages/metrics/src/node/metrics-backend-application-contribution.ts b/packages/metrics/src/node/metrics-backend-application-contribution.ts index 0f6eee239f99b..7b1b8c59ce09e 100644 --- a/packages/metrics/src/node/metrics-backend-application-contribution.ts +++ b/packages/metrics/src/node/metrics-backend-application-contribution.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import * as http from 'http'; import * as https from 'https'; -import * as express from 'express'; +import * as express from '@theia/core/shared/express'; import { ContributionProvider } from '@theia/core/lib/common'; import { BackendApplicationContribution } from '@theia/core/lib/node'; import { MetricsContribution } from './metrics-contribution'; diff --git a/packages/metrics/src/node/metrics-backend-module.ts b/packages/metrics/src/node/metrics-backend-module.ts index ddd3c9465b439..7ee4442b13de7 100644 --- a/packages/metrics/src/node/metrics-backend-module.ts +++ b/packages/metrics/src/node/metrics-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { BackendApplicationContribution } from '@theia/core/lib/node'; import { bindContributionProvider } from '@theia/core/lib/common'; import { MetricsContribution } from './metrics-contribution'; diff --git a/packages/metrics/src/node/node-metrics-contribution.ts b/packages/metrics/src/node/node-metrics-contribution.ts index a44f9ac6bafaa..7e95e559c96b9 100644 --- a/packages/metrics/src/node/node-metrics-contribution.ts +++ b/packages/metrics/src/node/node-metrics-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as prom from 'prom-client'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MetricsContribution } from './'; @injectable() diff --git a/packages/mini-browser/src/browser/environment/mini-browser-environment-module.ts b/packages/mini-browser/src/browser/environment/mini-browser-environment-module.ts index 3980ce516fc5b..66753b6eba43a 100644 --- a/packages/mini-browser/src/browser/environment/mini-browser-environment-module.ts +++ b/packages/mini-browser/src/browser/environment/mini-browser-environment-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { FrontendApplicationContribution } from '@theia/core/lib/browser'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { MiniBrowserEnvironment } from './mini-browser-environment'; export default new ContainerModule(bind => { diff --git a/packages/mini-browser/src/browser/environment/mini-browser-environment.ts b/packages/mini-browser/src/browser/environment/mini-browser-environment.ts index 37a3363536fda..c22f747a4d792 100644 --- a/packages/mini-browser/src/browser/environment/mini-browser-environment.ts +++ b/packages/mini-browser/src/browser/environment/mini-browser-environment.ts @@ -16,7 +16,7 @@ import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { Endpoint, FrontendApplicationContribution } from '@theia/core/lib/browser'; -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { MiniBrowserEndpoint } from '../../common/mini-browser-endpoint'; import { v4 } from 'uuid'; diff --git a/packages/mini-browser/src/browser/location-mapper-service.ts b/packages/mini-browser/src/browser/location-mapper-service.ts index 9c24b517e8c81..a20bdf1c8c8d1 100644 --- a/packages/mini-browser/src/browser/location-mapper-service.ts +++ b/packages/mini-browser/src/browser/location-mapper-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Endpoint } from '@theia/core/lib/browser'; import { MaybePromise, Prioritizeable } from '@theia/core/lib/common/types'; diff --git a/packages/mini-browser/src/browser/mini-browser-content.ts b/packages/mini-browser/src/browser/mini-browser-content.ts index e705ee5ae511a..5d14b3ad3d8eb 100644 --- a/packages/mini-browser/src/browser/mini-browser-content.ts +++ b/packages/mini-browser/src/browser/mini-browser-content.ts @@ -15,8 +15,8 @@ ********************************************************************************/ import * as PDFObject from 'pdfobject'; -import { inject, injectable, postConstruct } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import URI from '@theia/core/lib/common/uri'; import { ILogger } from '@theia/core/lib/common/logger'; import { Emitter } from '@theia/core/lib/common/event'; @@ -28,7 +28,7 @@ import { BaseWidget, addEventListener } from '@theia/core/lib/browser/widgets/wi import { LocationMapperService } from './location-mapper-service'; import { ApplicationShellMouseTracker } from '@theia/core/lib/browser/shell/application-shell-mouse-tracker'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); import { MiniBrowserContentStyle } from './mini-browser-content-style'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { FileChangesEvent, FileChangeType } from '@theia/filesystem/lib/common/files'; diff --git a/packages/mini-browser/src/browser/mini-browser-frontend-module.ts b/packages/mini-browser/src/browser/mini-browser-frontend-module.ts index f3788c6c3fe34..f3af38aabcdd6 100644 --- a/packages/mini-browser/src/browser/mini-browser-frontend-module.ts +++ b/packages/mini-browser/src/browser/mini-browser-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { OpenHandler } from '@theia/core/lib/browser/opener-service'; import { WidgetFactory } from '@theia/core/lib/browser/widget-manager'; diff --git a/packages/mini-browser/src/browser/mini-browser-open-handler.ts b/packages/mini-browser/src/browser/mini-browser-open-handler.ts index f0d6b61ab7488..3cf5fc36b20df 100644 --- a/packages/mini-browser/src/browser/mini-browser-open-handler.ts +++ b/packages/mini-browser/src/browser/mini-browser-open-handler.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Widget } from '@phosphor/widgets'; -import { injectable, inject } from 'inversify'; +import { Widget } from '@theia/core/shared/@phosphor/widgets'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { MaybePromise } from '@theia/core/lib/common/types'; import { QuickInputService } from '@theia/core/lib/browser'; diff --git a/packages/mini-browser/src/browser/mini-browser.ts b/packages/mini-browser/src/browser/mini-browser.ts index a8b58fe6b4354..47ed8c4dec778 100644 --- a/packages/mini-browser/src/browser/mini-browser.ts +++ b/packages/mini-browser/src/browser/mini-browser.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import URI from '@theia/core/lib/common/uri'; import { NavigatableWidget, StatefulWidget } from '@theia/core/lib/browser'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment-module.ts b/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment-module.ts index df73c19358161..f20089082553f 100644 --- a/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment-module.ts +++ b/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { FrontendApplicationContribution } from '@theia/core/lib/browser'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { MiniBrowserEnvironment } from '../../browser/environment/mini-browser-environment'; import { ElectronMiniBrowserEnvironment } from './electron-mini-browser-environment'; diff --git a/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment.ts b/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment.ts index c80c88e2aa08e..a4c5eb5fc854b 100644 --- a/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment.ts +++ b/packages/mini-browser/src/electron-browser/environment/electron-mini-browser-environment.ts @@ -16,8 +16,8 @@ import { Endpoint } from '@theia/core/lib/browser'; import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token'; -import { remote } from 'electron'; -import { inject, injectable } from 'inversify'; +import { remote } from '@theia/core/shared/electron'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { MiniBrowserEnvironment } from '../../browser/environment/mini-browser-environment'; @injectable() diff --git a/packages/mini-browser/src/electron-main/mini-browser-electron-main-contribution.ts b/packages/mini-browser/src/electron-main/mini-browser-electron-main-contribution.ts new file mode 100644 index 0000000000000..371e983fd9e65 --- /dev/null +++ b/packages/mini-browser/src/electron-main/mini-browser-electron-main-contribution.ts @@ -0,0 +1,42 @@ +/******************************************************************************** + * Copyright (C) 2020 Ericsson and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + ********************************************************************************/ + +import { ElectronMainApplication, ElectronMainApplicationContribution } from '@theia/core/lib/electron-main/electron-main-application'; +import { ElectronSecurityTokenService } from '@theia/core/lib/electron-main/electron-security-token-service'; +import { inject, injectable } from '@theia/core/shared/inversify'; +import { MiniBrowserEndpoint } from '../common/mini-browser-endpoint'; + +/** + * Since the mini-browser might serve content from a new origin, + * we need to attach the ElectronSecurityToken for the Electron + * backend to accept HTTP requests. + */ +@injectable() +export class MiniBrowserElectronMainContribution implements ElectronMainApplicationContribution { + + @inject(ElectronSecurityTokenService) + protected readonly electronSecurityTokenService: ElectronSecurityTokenService; + + async onStart(app: ElectronMainApplication): Promise { + const url = this.getMiniBrowserEndpoint(await app.backendPort); + await this.electronSecurityTokenService.setElectronSecurityTokenCookie(url); + } + + protected getMiniBrowserEndpoint(port: number): string { + const pattern = process.env[MiniBrowserEndpoint.HOST_PATTERN_ENV] ?? MiniBrowserEndpoint.HOST_PATTERN_DEFAULT; + return 'http://' + pattern.replace('{{hostname}}', `localhost:${port}`); + } +} diff --git a/packages/mini-browser/src/node/mini-browser-backend-module.ts b/packages/mini-browser/src/node/mini-browser-backend-module.ts index 5be14fa758d5b..0856094ce4f20 100644 --- a/packages/mini-browser/src/node/mini-browser-backend-module.ts +++ b/packages/mini-browser/src/node/mini-browser-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common'; diff --git a/packages/mini-browser/src/node/mini-browser-endpoint.ts b/packages/mini-browser/src/node/mini-browser-endpoint.ts index d40d43eed2082..559fbdc48429c 100644 --- a/packages/mini-browser/src/node/mini-browser-endpoint.ts +++ b/packages/mini-browser/src/node/mini-browser-endpoint.ts @@ -15,11 +15,11 @@ ********************************************************************************/ const vhost = require('vhost'); -import express = require('express'); -import * as fs from 'fs-extra'; +import express = require('@theia/core/shared/express'); +import * as fs from '@theia/core/shared/fs-extra'; import { lookup } from 'mime-types'; -import { injectable, inject, named } from 'inversify'; -import { Application, Request, Response } from 'express'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; +import { Application, Request, Response } from '@theia/core/shared/express'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { ILogger } from '@theia/core/lib/common/logger'; import { MaybePromise } from '@theia/core/lib/common/types'; diff --git a/packages/mini-browser/src/node/mini-browser-ws-validator.ts b/packages/mini-browser/src/node/mini-browser-ws-validator.ts index 6ded1d544f21d..7756e1108094d 100644 --- a/packages/mini-browser/src/node/mini-browser-ws-validator.ts +++ b/packages/mini-browser/src/node/mini-browser-ws-validator.ts @@ -16,7 +16,7 @@ import { WsRequestValidatorContribution } from '@theia/core/lib/node/ws-request-validators'; import * as http from 'http'; -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import * as url from 'url'; import { MiniBrowserEndpoint } from '../common/mini-browser-endpoint'; diff --git a/packages/monaco/src/browser/monaco-browser-module.ts b/packages/monaco/src/browser/monaco-browser-module.ts index 17368d028a196..ac02f67644c9a 100644 --- a/packages/monaco/src/browser/monaco-browser-module.ts +++ b/packages/monaco/src/browser/monaco-browser-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { loadMonaco, loadVsRequire } from './monaco-loader'; export { ContainerModule }; diff --git a/packages/monaco/src/browser/monaco-bulk-edit-service.ts b/packages/monaco/src/browser/monaco-bulk-edit-service.ts index c1b9be7715da0..d91b5b2159fbe 100644 --- a/packages/monaco/src/browser/monaco-bulk-edit-service.ts +++ b/packages/monaco/src/browser/monaco-bulk-edit-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MonacoWorkspace } from './monaco-workspace'; @injectable() diff --git a/packages/monaco/src/browser/monaco-color-registry.ts b/packages/monaco/src/browser/monaco-color-registry.ts index 3a3bac08a9ee5..0c95dd4057f2f 100644 --- a/packages/monaco/src/browser/monaco-color-registry.ts +++ b/packages/monaco/src/browser/monaco-color-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ColorRegistry, ColorDefinition, Color } from '@theia/core/lib/browser/color-registry'; import { Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/monaco/src/browser/monaco-command-registry.ts b/packages/monaco/src/browser/monaco-command-registry.ts index d4d7168dc044f..f78e942aeb1ed 100644 --- a/packages/monaco/src/browser/monaco-command-registry.ts +++ b/packages/monaco/src/browser/monaco-command-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Command, CommandHandler, CommandRegistry, SelectionService } from '@theia/core'; import { TextEditorSelection } from '@theia/editor/lib/browser'; import { MonacoEditor } from './monaco-editor'; diff --git a/packages/monaco/src/browser/monaco-command-service.ts b/packages/monaco/src/browser/monaco-command-service.ts index b3e981905a41d..e37441344a535 100644 --- a/packages/monaco/src/browser/monaco-command-service.ts +++ b/packages/monaco/src/browser/monaco-command-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { CommandRegistry } from '@theia/core/lib/common/command'; import { Emitter } from '@theia/core/lib/common/event'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/monaco/src/browser/monaco-command.ts b/packages/monaco/src/browser/monaco-command.ts index 944e56119a943..813cf3d145852 100644 --- a/packages/monaco/src/browser/monaco-command.ts +++ b/packages/monaco/src/browser/monaco-command.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; -import { Position, Location } from 'vscode-languageserver-types'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import { Position, Location } from '@theia/core/shared/vscode-languageserver-types'; import { CommandContribution, CommandRegistry, CommandHandler } from '@theia/core/lib/common/command'; import { CommonCommands } from '@theia/core/lib/browser'; import { QuickOpenService } from '@theia/core/lib/browser/quick-open/quick-open-service'; diff --git a/packages/monaco/src/browser/monaco-context-key-service.ts b/packages/monaco/src/browser/monaco-context-key-service.ts index adab42f8ee409..7132bea1f9af2 100644 --- a/packages/monaco/src/browser/monaco-context-key-service.ts +++ b/packages/monaco/src/browser/monaco-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/monaco/src/browser/monaco-context-menu.ts b/packages/monaco/src/browser/monaco-context-menu.ts index 674bd9d114715..eb452628e8c95 100644 --- a/packages/monaco/src/browser/monaco-context-menu.ts +++ b/packages/monaco/src/browser/monaco-context-menu.ts @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core/lib/common/menu'; import { EDITOR_CONTEXT_MENU } from '@theia/editor/lib/browser'; import { ContextMenuRenderer, toAnchor } from '@theia/core/lib/browser'; import IContextMenuService = monaco.editor.IContextMenuService; import IContextMenuDelegate = monaco.editor.IContextMenuDelegate; -import { Menu } from '@phosphor/widgets'; -import { CommandRegistry } from '@phosphor/commands'; +import { Menu } from '@theia/core/shared/@phosphor/widgets'; +import { CommandRegistry } from '@theia/core/shared/@phosphor/commands'; @injectable() export class MonacoContextMenuService implements IContextMenuService { diff --git a/packages/monaco/src/browser/monaco-diagnostic-collection.ts b/packages/monaco/src/browser/monaco-diagnostic-collection.ts index 7a97bd4e010d1..357fb66e2e57c 100644 --- a/packages/monaco/src/browser/monaco-diagnostic-collection.ts +++ b/packages/monaco/src/browser/monaco-diagnostic-collection.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter'; import IModel = monaco.editor.IModel; diff --git a/packages/monaco/src/browser/monaco-diff-navigator-factory.ts b/packages/monaco/src/browser/monaco-diff-navigator-factory.ts index 66d99d0d6382b..10165f0a7f5b1 100644 --- a/packages/monaco/src/browser/monaco-diff-navigator-factory.ts +++ b/packages/monaco/src/browser/monaco-diff-navigator-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { DiffNavigator } from '@theia/editor/lib/browser'; import IStandaloneDiffEditor = monaco.editor.IStandaloneDiffEditor; diff --git a/packages/monaco/src/browser/monaco-editor-model.ts b/packages/monaco/src/browser/monaco-editor-model.ts index 92b2586d03929..2ff794943e8dc 100644 --- a/packages/monaco/src/browser/monaco-editor-model.ts +++ b/packages/monaco/src/browser/monaco-editor-model.ts @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Position } from 'vscode-languageserver-types'; -import { TextDocumentSaveReason, TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import { Position } from '@theia/core/shared/vscode-languageserver-types'; +import { TextDocumentSaveReason, TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; import { TextEditorDocument, EncodingMode, FindMatchesOptions, FindMatch, EditorPreferences, DEFAULT_WORD_SEPARATORS } from '@theia/editor/lib/browser'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { CancellationTokenSource, CancellationToken } from '@theia/core/lib/common/cancellation'; import { Resource, ResourceError, ResourceVersion } from '@theia/core/lib/common/resource'; -import { Range } from 'vscode-languageserver-types'; +import { Range } from '@theia/core/shared/vscode-languageserver-types'; import { Saveable, SaveOptions } from '@theia/core/lib/browser/saveable'; import { MonacoToProtocolConverter } from './monaco-to-protocol-converter'; import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter'; diff --git a/packages/monaco/src/browser/monaco-editor-provider.ts b/packages/monaco/src/browser/monaco-editor-provider.ts index 6700f76ddfaf9..62c50b03d2566 100644 --- a/packages/monaco/src/browser/monaco-editor-provider.ts +++ b/packages/monaco/src/browser/monaco-editor-provider.ts @@ -18,9 +18,9 @@ import URI from '@theia/core/lib/common/uri'; import { EditorPreferenceChange, EditorPreferences, TextEditor, DiffNavigator } from '@theia/editor/lib/browser'; import { DiffUris } from '@theia/core/lib/browser/diff-uris'; -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { DisposableCollection, deepClone, Disposable, } from '@theia/core/lib/common'; -import { TextDocumentSaveReason } from 'vscode-languageserver-protocol'; +import { TextDocumentSaveReason } from '@theia/core/shared/vscode-languageserver-protocol'; import { MonacoCommandServiceFactory } from './monaco-command-service'; import { MonacoContextMenuService } from './monaco-context-menu'; import { MonacoDiffEditor } from './monaco-diff-editor'; diff --git a/packages/monaco/src/browser/monaco-editor-service.ts b/packages/monaco/src/browser/monaco-editor-service.ts index f515cdccbc39a..0c1deb1254151 100644 --- a/packages/monaco/src/browser/monaco-editor-service.ts +++ b/packages/monaco/src/browser/monaco-editor-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, decorate } from 'inversify'; +import { injectable, inject, decorate } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { OpenerService, open, WidgetOpenMode, ApplicationShell, PreferenceService } from '@theia/core/lib/browser'; import { EditorWidget, EditorOpenerOptions, EditorManager, CustomEditorWidget } from '@theia/editor/lib/browser'; diff --git a/packages/monaco/src/browser/monaco-editor.ts b/packages/monaco/src/browser/monaco-editor.ts index c6a3cf602001c..0da85e5d4e71c 100644 --- a/packages/monaco/src/browser/monaco-editor.ts +++ b/packages/monaco/src/browser/monaco-editor.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, unmanaged } from 'inversify'; -import { ElementExt } from '@phosphor/domutils'; +import { injectable, inject, unmanaged } from '@theia/core/shared/inversify'; +import { ElementExt } from '@theia/core/shared/@phosphor/domutils'; import URI from '@theia/core/lib/common/uri'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; import { DisposableCollection, Disposable, Emitter, Event } from '@theia/core/lib/common'; @@ -39,7 +39,7 @@ import { import { MonacoEditorModel } from './monaco-editor-model'; import { MonacoToProtocolConverter } from './monaco-to-protocol-converter'; import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter'; -import { TextEdit } from 'vscode-languageserver-types'; +import { TextEdit } from '@theia/core/shared/vscode-languageserver-types'; import { UTF8 } from '@theia/core/lib/common/encodings'; import IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions; diff --git a/packages/monaco/src/browser/monaco-formatting-conflicts.ts b/packages/monaco/src/browser/monaco-formatting-conflicts.ts index 63268e4b3efbe..daf280f2a0fb2 100644 --- a/packages/monaco/src/browser/monaco-formatting-conflicts.ts +++ b/packages/monaco/src/browser/monaco-formatting-conflicts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MonacoQuickOpenService } from './monaco-quick-open-service'; import { QuickOpenModel, QuickOpenItem, QuickOpenMode } from '@theia/core/lib/common/quick-open-model'; import { Deferred } from '@theia/core/lib/common/promise-util'; diff --git a/packages/monaco/src/browser/monaco-frontend-application-contribution.ts b/packages/monaco/src/browser/monaco-frontend-application-contribution.ts index 357d925d2f847..b38ec291e9ba5 100644 --- a/packages/monaco/src/browser/monaco-frontend-application-contribution.ts +++ b/packages/monaco/src/browser/monaco-frontend-application-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, PreferenceSchemaProvider } from '@theia/core/lib/browser'; import { MonacoSnippetSuggestProvider } from './monaco-snippet-suggest-provider'; diff --git a/packages/monaco/src/browser/monaco-frontend-module.ts b/packages/monaco/src/browser/monaco-frontend-module.ts index f73c1f94c0501..ffd8d7c1d49a1 100644 --- a/packages/monaco/src/browser/monaco-frontend-module.ts +++ b/packages/monaco/src/browser/monaco-frontend-module.ts @@ -18,7 +18,7 @@ import '../../src/browser/style/index.css'; import '../../src/browser/style/symbol-sprite.svg'; import '../../src/browser/style/symbol-icons.css'; -import { ContainerModule, decorate, injectable, interfaces } from 'inversify'; +import { ContainerModule, decorate, injectable, interfaces } from '@theia/core/shared/inversify'; import { MenuContribution, CommandContribution } from '@theia/core/lib/common'; import { QuickOpenService, FrontendApplicationContribution, KeybindingContribution, diff --git a/packages/monaco/src/browser/monaco-keybinding-contexts.ts b/packages/monaco/src/browser/monaco-keybinding-contexts.ts index c3479a2733868..cacb14beca082 100644 --- a/packages/monaco/src/browser/monaco-keybinding-contexts.ts +++ b/packages/monaco/src/browser/monaco-keybinding-contexts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { EditorWidget } from '@theia/editor/lib/browser/editor-widget'; import { StrictEditorTextFocusContext } from '@theia/editor/lib/browser/editor-keybinding-contexts'; import { MonacoEditor } from './monaco-editor'; diff --git a/packages/monaco/src/browser/monaco-keybinding.ts b/packages/monaco/src/browser/monaco-keybinding.ts index 580553adc3050..d508c1f8a8a03 100644 --- a/packages/monaco/src/browser/monaco-keybinding.ts +++ b/packages/monaco/src/browser/monaco-keybinding.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContribution, KeybindingRegistry } from '@theia/core/lib/browser'; import { MonacoCommands } from './monaco-command'; import { MonacoCommandRegistry } from './monaco-command-registry'; diff --git a/packages/monaco/src/browser/monaco-languages.ts b/packages/monaco/src/browser/monaco-languages.ts index 9731ee272d0ba..f978174db1458 100644 --- a/packages/monaco/src/browser/monaco-languages.ts +++ b/packages/monaco/src/browser/monaco-languages.ts @@ -14,16 +14,16 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Diagnostic } from 'vscode-languageserver-types'; -import { injectable, inject, postConstruct } from 'inversify'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ProblemManager } from '@theia/markers/lib/browser/problem/problem-manager'; import URI from '@theia/core/lib/common/uri'; import { Mutable } from '@theia/core/lib/common/types'; import { Disposable } from '@theia/core/lib/common/disposable'; import { MaybePromise } from '@theia/core/lib/common/types'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; -import { WorkspaceSymbolParams } from 'vscode-languageserver-protocol'; -import { SymbolInformation } from 'vscode-languageserver-types'; +import { WorkspaceSymbolParams } from '@theia/core/shared/vscode-languageserver-protocol'; +import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; import { Language, LanguageService } from '@theia/core/lib/browser/language-service'; import { MonacoDiagnosticCollection } from './monaco-diagnostic-collection'; import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter'; diff --git a/packages/monaco/src/browser/monaco-menu.ts b/packages/monaco/src/browser/monaco-menu.ts index 87f86839c50dd..247a79e7c96d8 100644 --- a/packages/monaco/src/browser/monaco-menu.ts +++ b/packages/monaco/src/browser/monaco-menu.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MenuContribution, MenuModelRegistry, MAIN_MENU_BAR, MenuPath } from '@theia/core/lib/common'; import { EDITOR_CONTEXT_MENU } from '@theia/editor/lib/browser'; import { MonacoCommandRegistry } from './monaco-command-registry'; diff --git a/packages/monaco/src/browser/monaco-mime-service.ts b/packages/monaco/src/browser/monaco-mime-service.ts index 0711438309e70..9e8114a270254 100644 --- a/packages/monaco/src/browser/monaco-mime-service.ts +++ b/packages/monaco/src/browser/monaco-mime-service.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import debounce = require('lodash.debounce'); -import { injectable } from 'inversify'; +import debounce = require('@theia/core/shared/lodash.debounce'); +import { injectable } from '@theia/core/shared/inversify'; import { MimeAssociation, MimeService } from '@theia/core/lib/browser/mime-service'; @injectable() diff --git a/packages/monaco/src/browser/monaco-outline-contribution.ts b/packages/monaco/src/browser/monaco-outline-contribution.ts index 878effb13d530..83624c9f96ab2 100644 --- a/packages/monaco/src/browser/monaco-outline-contribution.ts +++ b/packages/monaco/src/browser/monaco-outline-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import DocumentSymbol = monaco.languages.DocumentSymbol; import SymbolKind = monaco.languages.SymbolKind; import { FrontendApplicationContribution, FrontendApplication, TreeNode } from '@theia/core/lib/browser'; @@ -28,7 +28,7 @@ import { OutlineSymbolInformationNode } from '@theia/outline-view/lib/browser/ou import URI from '@theia/core/lib/common/uri'; import { MonacoEditor } from './monaco-editor'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); @injectable() export class MonacoOutlineContribution implements FrontendApplicationContribution { diff --git a/packages/monaco/src/browser/monaco-outline-decorator.ts b/packages/monaco/src/browser/monaco-outline-decorator.ts index 800c7c24d51ce..bfb4d1426a763 100644 --- a/packages/monaco/src/browser/monaco-outline-decorator.ts +++ b/packages/monaco/src/browser/monaco-outline-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common/event'; import { Tree } from '@theia/core/lib/browser/tree/tree'; import { DepthFirstTreeIterator } from '@theia/core/lib/browser/tree/tree-iterator'; diff --git a/packages/monaco/src/browser/monaco-quick-open-service.ts b/packages/monaco/src/browser/monaco-quick-open-service.ts index ee53498addb79..77faf49a27006 100644 --- a/packages/monaco/src/browser/monaco-quick-open-service.ts +++ b/packages/monaco/src/browser/monaco-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, optional, postConstruct } from 'inversify'; +import { injectable, inject, optional, postConstruct } from '@theia/core/shared/inversify'; import { MessageType } from '@theia/core/lib/common/message-service-protocol'; import { QuickOpenService, QuickOpenOptions, QuickOpenItem, QuickOpenGroupItem, diff --git a/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts b/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts index f48a63ec9b456..eb70b925256fe 100644 --- a/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts +++ b/packages/monaco/src/browser/monaco-snippet-suggest-provider.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ import * as jsoncparser from 'jsonc-parser'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; diff --git a/packages/monaco/src/browser/monaco-status-bar-contribution.ts b/packages/monaco/src/browser/monaco-status-bar-contribution.ts index c28a8e3c2b204..baa7023728f70 100644 --- a/packages/monaco/src/browser/monaco-status-bar-contribution.ts +++ b/packages/monaco/src/browser/monaco-status-bar-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { DisposableCollection } from '@theia/core'; import { FrontendApplicationContribution, FrontendApplication, StatusBar, StatusBarAlignment } from '@theia/core/lib/browser'; import { EditorCommands, EditorManager, EditorWidget } from '@theia/editor/lib/browser'; diff --git a/packages/monaco/src/browser/monaco-text-model-service.ts b/packages/monaco/src/browser/monaco-text-model-service.ts index c77648d8362ea..2aae7719525cc 100644 --- a/packages/monaco/src/browser/monaco-text-model-service.ts +++ b/packages/monaco/src/browser/monaco-text-model-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named, postConstruct } from 'inversify'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ResourceProvider, ReferenceCollection, Event, MaybePromise, Resource, ContributionProvider, OS } from '@theia/core'; import { EditorPreferences, EditorPreferenceChange } from '@theia/editor/lib/browser'; diff --git a/packages/monaco/src/browser/monaco-theming-service.ts b/packages/monaco/src/browser/monaco-theming-service.ts index 0cedbe875ecda..811d8074ce226 100644 --- a/packages/monaco/src/browser/monaco-theming-service.ts +++ b/packages/monaco/src/browser/monaco-theming-service.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import * as jsoncparser from 'jsonc-parser'; import * as plistparser from 'fast-plist'; import { ThemeService, BuiltinThemeProvider } from '@theia/core/lib/browser/theming'; diff --git a/packages/monaco/src/browser/monaco-to-protocol-converter.ts b/packages/monaco/src/browser/monaco-to-protocol-converter.ts index e931c61eef66c..90be67b218581 100644 --- a/packages/monaco/src/browser/monaco-to-protocol-converter.ts +++ b/packages/monaco/src/browser/monaco-to-protocol-converter.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Position, Range } from 'vscode-languageserver-types'; +import { injectable } from '@theia/core/shared/inversify'; +import { Position, Range } from '@theia/core/shared/vscode-languageserver-types'; import { RecursivePartial } from '@theia/core/lib/common/types'; export interface MonacoRangeReplace { diff --git a/packages/monaco/src/browser/monaco-workspace.ts b/packages/monaco/src/browser/monaco-workspace.ts index 027f10efb7ab4..7bacd987805fd 100644 --- a/packages/monaco/src/browser/monaco-workspace.ts +++ b/packages/monaco/src/browser/monaco-workspace.ts @@ -16,8 +16,8 @@ /* eslint-disable no-null/no-null */ -import { URI as Uri } from 'vscode-uri'; -import { injectable, inject, postConstruct } from 'inversify'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Emitter } from '@theia/core/lib/common/event'; import { FileSystemPreferences } from '@theia/filesystem/lib/browser'; diff --git a/packages/monaco/src/browser/protocol-to-monaco-converter.ts b/packages/monaco/src/browser/protocol-to-monaco-converter.ts index 72d4b71e48601..7f6cf2ca49df3 100644 --- a/packages/monaco/src/browser/protocol-to-monaco-converter.ts +++ b/packages/monaco/src/browser/protocol-to-monaco-converter.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Position, Range, Location, TextEdit, Diagnostic, DiagnosticRelatedInformation } from 'vscode-languageserver-types'; +import { injectable } from '@theia/core/shared/inversify'; +import { Position, Range, Location, TextEdit, Diagnostic, DiagnosticRelatedInformation } from '@theia/core/shared/vscode-languageserver-types'; import { RecursivePartial } from '@theia/core/lib/common/types'; @injectable() diff --git a/packages/monaco/src/browser/textmate/monaco-textmate-frontend-bindings.ts b/packages/monaco/src/browser/textmate/monaco-textmate-frontend-bindings.ts index 0e8bf3e634e48..eb9b4a94f3cf7 100644 --- a/packages/monaco/src/browser/textmate/monaco-textmate-frontend-bindings.ts +++ b/packages/monaco/src/browser/textmate/monaco-textmate-frontend-bindings.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, isBasicWasmSupported } from '@theia/core/lib/browser'; import { bindContributionProvider } from '@theia/core'; import { TextmateRegistry } from './textmate-registry'; diff --git a/packages/monaco/src/browser/textmate/monaco-textmate-service.ts b/packages/monaco/src/browser/textmate/monaco-textmate-service.ts index 75fd443dc5781..49737917faf81 100644 --- a/packages/monaco/src/browser/textmate/monaco-textmate-service.ts +++ b/packages/monaco/src/browser/textmate/monaco-textmate-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { Registry, IOnigLib, IRawGrammar, parseRawGrammar } from 'vscode-textmate'; import { ILogger, ContributionProvider, DisposableCollection, Disposable } from '@theia/core'; import { FrontendApplicationContribution, isBasicWasmSupported } from '@theia/core/lib/browser'; diff --git a/packages/monaco/src/browser/textmate/monaco-theme-registry.ts b/packages/monaco/src/browser/textmate/monaco-theme-registry.ts index 4fa832ffbee84..89744d08c2d55 100644 --- a/packages/monaco/src/browser/textmate/monaco-theme-registry.ts +++ b/packages/monaco/src/browser/textmate/monaco-theme-registry.ts @@ -17,7 +17,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { IRawTheme, Registry, IRawThemeSetting } from 'vscode-textmate'; export interface ThemeMix extends IRawTheme, monaco.editor.IStandaloneThemeData { } diff --git a/packages/monaco/src/browser/textmate/textmate-registry.ts b/packages/monaco/src/browser/textmate/textmate-registry.ts index 3dc6fba2a4ebf..5a4b96da9a9c7 100644 --- a/packages/monaco/src/browser/textmate/textmate-registry.ts +++ b/packages/monaco/src/browser/textmate/textmate-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { IGrammarConfiguration } from 'vscode-textmate'; import { TokenizerOption } from './textmate-tokenizer'; import { Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/monaco/src/browser/workspace-symbol-command.ts b/packages/monaco/src/browser/workspace-symbol-command.ts index 1818a6dbdb1bc..fd0df771efd34 100644 --- a/packages/monaco/src/browser/workspace-symbol-command.ts +++ b/packages/monaco/src/browser/workspace-symbol-command.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; -import { environment } from '@theia/application-package/lib/environment'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { PrefixQuickOpenService, QuickOpenModel, QuickOpenItem, OpenerService, QuickOpenMode, KeybindingContribution, KeybindingRegistry, QuickOpenHandler, QuickOpenOptions, QuickOpenContribution, QuickOpenHandlerRegistry @@ -23,8 +23,8 @@ import { import { CancellationTokenSource, CommandRegistry, CommandHandler, Command, SelectionService, CancellationToken } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; import { CommandContribution } from '@theia/core/lib/common'; -import { Range, Position, SymbolInformation } from 'vscode-languageserver-types'; -import { WorkspaceSymbolParams } from 'vscode-languageserver-protocol'; +import { Range, Position, SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; +import { WorkspaceSymbolParams } from '@theia/core/shared/vscode-languageserver-protocol'; import { MonacoLanguages, WorkspaceSymbolProvider } from './monaco-languages'; @injectable() diff --git a/packages/monaco/src/electron-browser/monaco-electron-module.ts b/packages/monaco/src/electron-browser/monaco-electron-module.ts index 090d52056df74..751eddedcaa27 100644 --- a/packages/monaco/src/electron-browser/monaco-electron-module.ts +++ b/packages/monaco/src/electron-browser/monaco-electron-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as path from 'path'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { loadVsRequire, loadMonaco } from '../browser/monaco-loader'; export { ContainerModule }; diff --git a/packages/navigator/package.json b/packages/navigator/package.json index 7bde12bfb1b4f..d8236aa417d71 100644 --- a/packages/navigator/package.json +++ b/packages/navigator/package.json @@ -6,7 +6,6 @@ "@theia/core": "1.12.0", "@theia/filesystem": "1.12.0", "@theia/workspace": "1.12.0", - "fuzzy": "^0.1.3", "minimatch": "^3.0.4" }, "publishConfig": { diff --git a/packages/navigator/src/browser/navigator-container.ts b/packages/navigator/src/browser/navigator-container.ts index 022cb691f01c9..42df4dcadcc39 100644 --- a/packages/navigator/src/browser/navigator-container.ts +++ b/packages/navigator/src/browser/navigator-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container, interfaces } from 'inversify'; +import { Container, interfaces } from '@theia/core/shared/inversify'; import { Tree, TreeModel, TreeProps, defaultTreeProps, TreeDecoratorService } from '@theia/core/lib/browser'; import { createFileTreeContainer, FileTree, FileTreeModel, FileTreeWidget } from '@theia/filesystem/lib/browser'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; diff --git a/packages/navigator/src/browser/navigator-context-key-service.ts b/packages/navigator/src/browser/navigator-context-key-service.ts index c9e9180fe2e4d..004331ab7235a 100644 --- a/packages/navigator/src/browser/navigator-context-key-service.ts +++ b/packages/navigator/src/browser/navigator-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/navigator/src/browser/navigator-contribution.ts b/packages/navigator/src/browser/navigator-contribution.ts index 8b65dad965693..e17d31912bc20 100644 --- a/packages/navigator/src/browser/navigator-contribution.ts +++ b/packages/navigator/src/browser/navigator-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { CommonCommands, diff --git a/packages/navigator/src/browser/navigator-decorator-service.ts b/packages/navigator/src/browser/navigator-decorator-service.ts index bd92a71a58eda..0a4bf0e4e7b53 100644 --- a/packages/navigator/src/browser/navigator-decorator-service.ts +++ b/packages/navigator/src/browser/navigator-decorator-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { ContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { TreeDecorator, AbstractTreeDecoratorService } from '@theia/core/lib/browser/tree/tree-decorator'; diff --git a/packages/navigator/src/browser/navigator-diff.spec.ts b/packages/navigator/src/browser/navigator-diff.spec.ts index 41d4bda7dd5e9..c41f971d6930a 100644 --- a/packages/navigator/src/browser/navigator-diff.spec.ts +++ b/packages/navigator/src/browser/navigator-diff.spec.ts @@ -26,7 +26,7 @@ FrontendApplicationConfigProvider.set({ import { expect } from 'chai'; import { NavigatorDiff } from './navigator-diff'; import * as path from 'path'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { SelectionService, ILogger } from '@theia/core/lib/common'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/navigator/src/browser/navigator-diff.ts b/packages/navigator/src/browser/navigator-diff.ts index 28e00a72cb1c6..0a0a725087c2e 100644 --- a/packages/navigator/src/browser/navigator-diff.ts +++ b/packages/navigator/src/browser/navigator-diff.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { SelectionService, UriSelection } from '@theia/core/lib/common'; import { OpenerService, open } from '@theia/core/lib/browser/opener-service'; diff --git a/packages/navigator/src/browser/navigator-filter.ts b/packages/navigator/src/browser/navigator-filter.ts index 5a105ed643761..3adca742686ad 100644 --- a/packages/navigator/src/browser/navigator-filter.ts +++ b/packages/navigator/src/browser/navigator-filter.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Minimatch } from 'minimatch'; import { MaybePromise } from '@theia/core/lib/common/types'; import { Event, Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/navigator/src/browser/navigator-frontend-module.ts b/packages/navigator/src/browser/navigator-frontend-module.ts index c3720255b8655..0eea116a1b69c 100644 --- a/packages/navigator/src/browser/navigator-frontend-module.ts +++ b/packages/navigator/src/browser/navigator-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { KeybindingContext, bindViewContribution, FrontendApplicationContribution, diff --git a/packages/navigator/src/browser/navigator-keybinding-context.ts b/packages/navigator/src/browser/navigator-keybinding-context.ts index 80ce2ba8ca3be..f8a415848a7d0 100644 --- a/packages/navigator/src/browser/navigator-keybinding-context.ts +++ b/packages/navigator/src/browser/navigator-keybinding-context.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContext, ApplicationShell } from '@theia/core/lib/browser'; import { FileNavigatorWidget } from './navigator-widget'; diff --git a/packages/navigator/src/browser/navigator-layout-migrations.ts b/packages/navigator/src/browser/navigator-layout-migrations.ts index 6a11178dd6d63..37f6d68bf4b8b 100644 --- a/packages/navigator/src/browser/navigator-layout-migrations.ts +++ b/packages/navigator/src/browser/navigator-layout-migrations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer'; import { EXPLORER_VIEW_CONTAINER_ID, EXPLORER_VIEW_CONTAINER_TITLE_OPTIONS } from './navigator-widget-factory'; import { FILE_NAVIGATOR_ID } from './navigator-widget'; diff --git a/packages/navigator/src/browser/navigator-model.ts b/packages/navigator/src/browser/navigator-model.ts index dd8278e7a73bb..f890a318e845b 100644 --- a/packages/navigator/src/browser/navigator-model.ts +++ b/packages/navigator/src/browser/navigator-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { FileNode, FileTreeModel } from '@theia/filesystem/lib/browser'; import { OpenerService, open, TreeNode, ExpandableTreeNode, CompositeTreeNode, SelectableTreeNode } from '@theia/core/lib/browser'; diff --git a/packages/navigator/src/browser/navigator-preferences.ts b/packages/navigator/src/browser/navigator-preferences.ts index 5e047064f7f7f..00452fcbb71c2 100644 --- a/packages/navigator/src/browser/navigator-preferences.ts +++ b/packages/navigator/src/browser/navigator-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; export const FileNavigatorConfigSchema: PreferenceSchema = { diff --git a/packages/navigator/src/browser/navigator-tab-bar-decorator.ts b/packages/navigator/src/browser/navigator-tab-bar-decorator.ts index 384ddfe4eb592..c8a0272ee9dff 100644 --- a/packages/navigator/src/browser/navigator-tab-bar-decorator.ts +++ b/packages/navigator/src/browser/navigator-tab-bar-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { TabBarDecorator } from '@theia/core/lib/browser/shell/tab-bar-decorator'; import { EXPLORER_VIEW_CONTAINER_ID } from './navigator-widget-factory'; diff --git a/packages/navigator/src/browser/navigator-tree.ts b/packages/navigator/src/browser/navigator-tree.ts index d411cf7e400af..9cdaa99989774 100644 --- a/packages/navigator/src/browser/navigator-tree.ts +++ b/packages/navigator/src/browser/navigator-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { FileTree, DirNode } from '@theia/filesystem/lib/browser'; import { FileStat } from '@theia/filesystem/lib/common/files'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/navigator/src/browser/navigator-widget-factory.ts b/packages/navigator/src/browser/navigator-widget-factory.ts index 8438c992aac10..4c7f2c4649338 100644 --- a/packages/navigator/src/browser/navigator-widget-factory.ts +++ b/packages/navigator/src/browser/navigator-widget-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { ViewContainer, ViewContainerTitleOptions, diff --git a/packages/navigator/src/browser/navigator-widget.tsx b/packages/navigator/src/browser/navigator-widget.tsx index e8a5e7476bd86..45d8d7c2d5947 100644 --- a/packages/navigator/src/browser/navigator-widget.tsx +++ b/packages/navigator/src/browser/navigator-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import URI from '@theia/core/lib/common/uri'; import { CommandService, SelectionService } from '@theia/core/lib/common'; import { CorePreferences, Key, TreeModel, SelectableTreeNode } from '@theia/core/lib/browser'; @@ -29,7 +29,7 @@ import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shel import { WorkspaceNode, WorkspaceRootNode } from './navigator-tree'; import { FileNavigatorModel } from './navigator-model'; import { isOSX, environment } from '@theia/core'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { NavigatorContextKeyService } from './navigator-context-key-service'; import { FileNavigatorCommands } from './navigator-contribution'; diff --git a/packages/outline-view/src/browser/outline-decorator-service.ts b/packages/outline-view/src/browser/outline-decorator-service.ts index 43af7582f4d59..b93b15573bf08 100644 --- a/packages/outline-view/src/browser/outline-decorator-service.ts +++ b/packages/outline-view/src/browser/outline-decorator-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { ContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { TreeDecorator, AbstractTreeDecoratorService } from '@theia/core/lib/browser/tree/tree-decorator'; diff --git a/packages/outline-view/src/browser/outline-view-contribution.ts b/packages/outline-view/src/browser/outline-view-contribution.ts index 5ad27b9a49356..07850eaa18a92 100644 --- a/packages/outline-view/src/browser/outline-view-contribution.ts +++ b/packages/outline-view/src/browser/outline-view-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser/frontend-application'; import { Command, CommandRegistry } from '@theia/core/lib/common/command'; diff --git a/packages/outline-view/src/browser/outline-view-frontend-module.ts b/packages/outline-view/src/browser/outline-view-frontend-module.ts index 8c54193dd75c1..a8969c12f753b 100644 --- a/packages/outline-view/src/browser/outline-view-frontend-module.ts +++ b/packages/outline-view/src/browser/outline-view-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { OutlineViewService } from './outline-view-service'; import { OutlineViewContribution } from './outline-view-contribution'; import { WidgetFactory } from '@theia/core/lib/browser/widget-manager'; diff --git a/packages/outline-view/src/browser/outline-view-service.ts b/packages/outline-view/src/browser/outline-view-service.ts index c2c21999a2ea2..9dcd7da62fece 100644 --- a/packages/outline-view/src/browser/outline-view-service.ts +++ b/packages/outline-view/src/browser/outline-view-service.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Event, Emitter, DisposableCollection } from '@theia/core'; import { WidgetFactory } from '@theia/core/lib/browser'; import { OutlineViewWidget, OutlineViewWidgetFactory, OutlineSymbolInformationNode } from './outline-view-widget'; -import { Widget } from '@phosphor/widgets'; +import { Widget } from '@theia/core/shared/@phosphor/widgets'; @injectable() export class OutlineViewService implements WidgetFactory { diff --git a/packages/outline-view/src/browser/outline-view-tree.ts b/packages/outline-view/src/browser/outline-view-tree.ts index 36d112b547796..d75dd4ad8c2a6 100644 --- a/packages/outline-view/src/browser/outline-view-tree.ts +++ b/packages/outline-view/src/browser/outline-view-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CompositeTreeNode, TreeModelImpl, TreeExpansionService, ExpandableTreeNode } from '@theia/core/lib/browser'; @injectable() diff --git a/packages/outline-view/src/browser/outline-view-widget.tsx b/packages/outline-view/src/browser/outline-view-widget.tsx index b93541574c0e7..12ac92459eb86 100644 --- a/packages/outline-view/src/browser/outline-view-widget.tsx +++ b/packages/outline-view/src/browser/outline-view-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { TreeWidget, TreeNode, @@ -26,10 +26,10 @@ import { ExpandableTreeNode } from '@theia/core/lib/browser'; import { OutlineViewTreeModel } from './outline-view-tree'; -import { Message } from '@phosphor/messaging'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { Emitter } from '@theia/core'; import { CompositeTreeNode } from '@theia/core/lib/browser'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; /** * Representation of an outline symbol information node. diff --git a/packages/output/src/browser/output-context-menu.ts b/packages/output/src/browser/output-context-menu.ts index c0b76af0c8353..088fac465f3fa 100644 --- a/packages/output/src/browser/output-context-menu.ts +++ b/packages/output/src/browser/output-context-menu.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { MenuPath } from '@theia/core/lib/common'; import { MonacoContextMenuService } from '@theia/monaco/lib/browser/monaco-context-menu'; diff --git a/packages/output/src/browser/output-contribution.ts b/packages/output/src/browser/output-contribution.ts index 92d68a9e5c22a..adada8c262faf 100644 --- a/packages/output/src/browser/output-contribution.ts +++ b/packages/output/src/browser/output-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Widget } from '@theia/core/lib/browser/widgets/widget'; import { MaybePromise } from '@theia/core/lib/common/types'; diff --git a/packages/output/src/browser/output-editor-factory.ts b/packages/output/src/browser/output-editor-factory.ts index 9ba6b7d05710d..9130510bfda2a 100644 --- a/packages/output/src/browser/output-editor-factory.ts +++ b/packages/output/src/browser/output-editor-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model'; import { MonacoEditorFactory } from '@theia/monaco/lib/browser/monaco-editor-provider'; diff --git a/packages/output/src/browser/output-editor-model-factory.ts b/packages/output/src/browser/output-editor-model-factory.ts index 1ff36e8082b14..40c759bdfbe24 100644 --- a/packages/output/src/browser/output-editor-model-factory.ts +++ b/packages/output/src/browser/output-editor-model-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Resource } from '@theia/core/lib/common/resource'; import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model'; import { OutputUri } from '../common/output-uri'; diff --git a/packages/output/src/browser/output-frontend-module.ts b/packages/output/src/browser/output-frontend-module.ts index 09b9525f569ab..dda78940077fd 100644 --- a/packages/output/src/browser/output-frontend-module.ts +++ b/packages/output/src/browser/output-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { OutputWidget, OUTPUT_WIDGET_KIND } from './output-widget'; import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { ResourceResolver } from '@theia/core/lib/common'; diff --git a/packages/output/src/browser/output-toolbar-contribution.tsx b/packages/output/src/browser/output-toolbar-contribution.tsx index a8209fcbad7ad..5703fbb3db3cb 100644 --- a/packages/output/src/browser/output-toolbar-contribution.tsx +++ b/packages/output/src/browser/output-toolbar-contribution.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { inject, injectable, postConstruct } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { OutputWidget } from './output-widget'; diff --git a/packages/output/src/browser/output-widget.ts b/packages/output/src/browser/output-widget.ts index 89806b329d58d..0c2318ccef03e 100644 --- a/packages/output/src/browser/output-widget.ts +++ b/packages/output/src/browser/output-widget.ts @@ -15,9 +15,9 @@ ********************************************************************************/ import '../../src/browser/style/output.css'; -import { inject, injectable, postConstruct } from 'inversify'; -import { toArray } from '@phosphor/algorithm'; -import { IDragEvent } from '@phosphor/dragdrop'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { toArray } from '@theia/core/shared/@phosphor/algorithm'; +import { IDragEvent } from '@theia/core/shared/@phosphor/dragdrop'; import { EditorWidget } from '@theia/editor/lib/browser'; import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; import { SelectionService } from '@theia/core/lib/common/selection-service'; diff --git a/packages/output/src/common/output-channel.ts b/packages/output/src/common/output-channel.ts index 7f7ee421cfd2e..0f591ddb484dd 100644 --- a/packages/output/src/common/output-channel.ts +++ b/packages/output/src/common/output-channel.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as PQueue from 'p-queue'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { Resource, ResourceResolver } from '@theia/core/lib/common/resource'; diff --git a/packages/output/src/common/output-preferences.ts b/packages/output/src/common/output-preferences.ts index 0ddf4082944b4..3da86e72963de 100644 --- a/packages/output/src/common/output-preferences.ts +++ b/packages/output/src/common/output-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/plugin-dev/src/browser/hosted-plugin-controller.ts b/packages/plugin-dev/src/browser/hosted-plugin-controller.ts index 9593840400867..5d7a698227286 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-controller.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-controller.ts @@ -14,13 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { setTimeout } from 'timers'; import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar'; import { StatusBarAlignment, StatusBarEntry, FrontendApplicationContribution, PreferenceServiceImpl, PreferenceChange } from '@theia/core/lib/browser'; import { MessageService } from '@theia/core/lib/common'; -import { CommandRegistry } from '@phosphor/commands'; -import { Menu } from '@phosphor/widgets'; +import { CommandRegistry } from '@theia/core/shared/@phosphor/commands'; +import { Menu } from '@theia/core/shared/@phosphor/widgets'; import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state'; import { ConnectionStatusService, ConnectionStatus } from '@theia/core/lib/browser/connection-status-service'; import { HostedPluginServer } from '../common/plugin-dev-protocol'; diff --git a/packages/plugin-dev/src/browser/hosted-plugin-frontend-contribution.ts b/packages/plugin-dev/src/browser/hosted-plugin-frontend-contribution.ts index fa92c82281a34..ce4c3161dfda9 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-frontend-contribution.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandRegistry, CommandContribution } from '@theia/core/lib/common'; import { HostedPluginManagerClient, HostedPluginCommands } from './hosted-plugin-manager-client'; diff --git a/packages/plugin-dev/src/browser/hosted-plugin-informer.ts b/packages/plugin-dev/src/browser/hosted-plugin-informer.ts index ea41981337b7a..88a38578712cd 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-informer.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-informer.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { StatusBar } from '@theia/core/lib/browser/status-bar/status-bar'; import { StatusBarAlignment, StatusBarEntry, FrontendApplicationContribution } from '@theia/core/lib/browser'; import { WorkspaceService } from '@theia/workspace/lib/browser'; diff --git a/packages/plugin-dev/src/browser/hosted-plugin-log-viewer.ts b/packages/plugin-dev/src/browser/hosted-plugin-log-viewer.ts index 3f50ebaefe98a..9eeaad7b82da8 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-log-viewer.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-log-viewer.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { OutputChannel, OutputChannelManager } from '@theia/output/lib/common/output-channel'; import { OutputContribution } from '@theia/output/lib/browser/output-contribution'; import { LogPart } from '@theia/plugin-ext/lib/common/types'; diff --git a/packages/plugin-dev/src/browser/hosted-plugin-manager-client.ts b/packages/plugin-dev/src/browser/hosted-plugin-manager-client.ts index e19fb1256b28e..af43366d63e38 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-manager-client.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-manager-client.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Path } from '@theia/core/lib/common/path'; import { MessageService, Command, Emitter, Event, UriSelection } from '@theia/core/lib/common'; diff --git a/packages/plugin-dev/src/browser/hosted-plugin-preferences.ts b/packages/plugin-dev/src/browser/hosted-plugin-preferences.ts index 09b2b9dbd671b..d7359288288d4 100644 --- a/packages/plugin-dev/src/browser/hosted-plugin-preferences.ts +++ b/packages/plugin-dev/src/browser/hosted-plugin-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; export const HostedPluginConfigSchema: PreferenceSchema = { diff --git a/packages/plugin-dev/src/browser/plugin-dev-frontend-module.ts b/packages/plugin-dev/src/browser/plugin-dev-frontend-module.ts index c09f2f231183a..744fa0e78ba7c 100644 --- a/packages/plugin-dev/src/browser/plugin-dev-frontend-module.ts +++ b/packages/plugin-dev/src/browser/plugin-dev-frontend-module.ts @@ -19,7 +19,7 @@ import { HostedPluginManagerClient } from './hosted-plugin-manager-client'; import { HostedPluginInformer } from './hosted-plugin-informer'; import { bindHostedPluginPreferences } from './hosted-plugin-preferences'; import { HostedPluginController } from './hosted-plugin-controller'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, WebSocketConnectionProvider } from '@theia/core/lib/browser'; import { HostedPluginFrontendContribution } from './hosted-plugin-frontend-contribution'; import { CommandContribution } from '@theia/core/lib/common/command'; diff --git a/packages/plugin-dev/src/node-electron/plugin-dev-electron-backend-module.ts b/packages/plugin-dev/src/node-electron/plugin-dev-electron-backend-module.ts index 494388d5846f8..cdf010b9b7a3c 100644 --- a/packages/plugin-dev/src/node-electron/plugin-dev-electron-backend-module.ts +++ b/packages/plugin-dev/src/node-electron/plugin-dev-electron-backend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { HostedInstanceManager, ElectronNodeHostedPluginRunner } from '../node/hosted-instance-manager'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module'; import { bindCommonHostedBackend } from '../node/plugin-dev-backend-module'; diff --git a/packages/plugin-dev/src/node/hosted-instance-manager.ts b/packages/plugin-dev/src/node/hosted-instance-manager.ts index 537548c617ff3..73d7cd5ad5fd6 100644 --- a/packages/plugin-dev/src/node/hosted-instance-manager.ts +++ b/packages/plugin-dev/src/node/hosted-instance-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import * as cp from 'child_process'; import * as fs from 'fs'; import * as net from 'net'; diff --git a/packages/plugin-dev/src/node/hosted-plugin-reader.ts b/packages/plugin-dev/src/node/hosted-plugin-reader.ts index 9de24675a5bb7..46686c52ea659 100644 --- a/packages/plugin-dev/src/node/hosted-plugin-reader.ts +++ b/packages/plugin-dev/src/node/hosted-plugin-reader.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { HostedPluginReader as PluginReaderHosted } from '@theia/plugin-ext/lib/hosted/node/plugin-reader'; import { Deferred } from '@theia/core/lib/common/promise-util'; diff --git a/packages/plugin-dev/src/node/hosted-plugin-service.ts b/packages/plugin-dev/src/node/hosted-plugin-service.ts index 98b42449646cc..f3602fc322ac6 100644 --- a/packages/plugin-dev/src/node/hosted-plugin-service.ts +++ b/packages/plugin-dev/src/node/hosted-plugin-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { HostedPluginServer, DebugConfiguration, HostedPluginClient } from '../common/plugin-dev-protocol'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { HostedInstanceManager } from './hosted-instance-manager'; import { PluginMetadata } from '@theia/plugin-ext/lib/common/plugin-protocol'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/plugin-dev/src/node/hosted-plugins-manager.ts b/packages/plugin-dev/src/node/hosted-plugins-manager.ts index 055d20500018f..87bdeef07fb63 100644 --- a/packages/plugin-dev/src/node/hosted-plugins-manager.ts +++ b/packages/plugin-dev/src/node/hosted-plugins-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import * as cp from 'child_process'; import * as processTree from 'ps-tree'; import * as fs from 'fs'; diff --git a/packages/plugin-dev/src/node/plugin-dev-backend-module.ts b/packages/plugin-dev/src/node/plugin-dev-backend-module.ts index 5f0a654cc2515..9c0a2f81ecab9 100644 --- a/packages/plugin-dev/src/node/plugin-dev-backend-module.ts +++ b/packages/plugin-dev/src/node/plugin-dev-backend-module.ts @@ -17,7 +17,7 @@ import { HostedInstanceManager, NodeHostedPluginRunner } from './hosted-instance-manager'; import { HostedPluginUriPostProcessorSymbolName } from './hosted-plugin-uri-postprocessor'; import { HostedPluginsManager, HostedPluginsManagerImpl } from './hosted-plugins-manager'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { HostedPluginServerImpl } from './hosted-plugin-service'; diff --git a/packages/plugin-ext-vscode/compile.tsconfig.json b/packages/plugin-ext-vscode/compile.tsconfig.json index dd7e705a0c8fe..f8a2ccde4236c 100644 --- a/packages/plugin-ext-vscode/compile.tsconfig.json +++ b/packages/plugin-ext-vscode/compile.tsconfig.json @@ -34,6 +34,15 @@ }, { "path": "../workspace/compile.tsconfig.json" + }, + { + "path": "../filesystem/compile.tsconfig.json" + }, + { + "path": "../navigator/compile.tsconfig.json" + }, + { + "path": "../terminal/compile.tsconfig.json" } ] } diff --git a/packages/plugin-ext-vscode/package.json b/packages/plugin-ext-vscode/package.json index 11664144b74e1..fcb67718fee90 100644 --- a/packages/plugin-ext-vscode/package.json +++ b/packages/plugin-ext-vscode/package.json @@ -5,9 +5,12 @@ "dependencies": { "@theia/core": "1.12.0", "@theia/editor": "1.12.0", + "@theia/filesystem": "1.12.0", "@theia/monaco": "1.12.0", "@theia/plugin": "1.12.0", + "@theia/navigator": "1.12.0", "@theia/plugin-ext": "1.12.0", + "@theia/terminal": "1.12.0", "@theia/userstorage": "1.12.0", "@theia/workspace": "1.12.0", "@types/request": "^2.0.3", diff --git a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts index 006df2d3bfa4b..c471856b1906f 100755 --- a/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts +++ b/packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts @@ -50,9 +50,9 @@ import { ViewColumn } from '@theia/plugin-ext/lib/plugin/types-impl'; import { WorkspaceCommands } from '@theia/workspace/lib/browser'; import { WorkspaceService, WorkspaceInput } from '@theia/workspace/lib/browser/workspace-service'; import { DiffService } from '@theia/workspace/lib/browser/diff-service'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Position } from '@theia/plugin-ext/lib/common/plugin-api-rpc'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { PluginServer } from '@theia/plugin-ext/lib/common/plugin-protocol'; import { MonacoEditor } from '@theia/monaco/lib/browser/monaco-editor'; import { TerminalFrontendContribution } from '@theia/terminal/lib/browser/terminal-frontend-contribution'; diff --git a/packages/plugin-ext-vscode/src/browser/plugin-vscode-contribution.ts b/packages/plugin-ext-vscode/src/browser/plugin-vscode-contribution.ts index f18bb6a6d7898..3150dd28253c5 100644 --- a/packages/plugin-ext-vscode/src/browser/plugin-vscode-contribution.ts +++ b/packages/plugin-ext-vscode/src/browser/plugin-vscode-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { UserStorageUri } from '@theia/userstorage/lib/browser/user-storage-uri'; import { FileServiceContribution, FileService } from '@theia/filesystem/lib/browser/file-service'; import { Schemes } from '@theia/plugin-ext/lib/common/uri-components'; diff --git a/packages/plugin-ext-vscode/src/browser/plugin-vscode-frontend-module.ts b/packages/plugin-ext-vscode/src/browser/plugin-vscode-frontend-module.ts index 4ee8c9a100067..89fbfc87384b5 100644 --- a/packages/plugin-ext-vscode/src/browser/plugin-vscode-frontend-module.ts +++ b/packages/plugin-ext-vscode/src/browser/plugin-vscode-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { CommandContribution } from '@theia/core'; import { PluginVscodeCommandsContribution } from './plugin-vscode-commands-contribution'; import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment'; diff --git a/packages/plugin-ext-vscode/src/common/plugin-vscode-environment.ts b/packages/plugin-ext-vscode/src/common/plugin-vscode-environment.ts index 56d0723de801b..8e83ee01d4c58 100644 --- a/packages/plugin-ext-vscode/src/common/plugin-vscode-environment.ts +++ b/packages/plugin-ext-vscode/src/common/plugin-vscode-environment.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-backend-module.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-backend-module.ts index 1b39a16af6a09..2576791f28955 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-backend-module.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { PluginDeployerFileHandler, PluginDeployerDirectoryHandler, PluginScanner, PluginDeployerParticipant } from '@theia/plugin-ext'; diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-cli-contribution.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-cli-contribution.ts index 9e7b04fb4f513..a16c8272aabf5 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-cli-contribution.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-cli-contribution.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Argv, Arguments } from 'yargs'; +import { injectable } from '@theia/core/shared/inversify'; +import { Argv, Arguments } from '@theia/core/shared/yargs'; import { CliContribution } from '@theia/core/lib/node/cli'; import { PluginHostEnvironmentVariable } from '@theia/plugin-ext/lib/common'; import { VSCODE_DEFAULT_API_VERSION } from '../common/plugin-vscode-types'; diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-deployer-participant.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-deployer-participant.ts index 0b65c3f7c2171..f6609d12342d5 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-deployer-participant.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-deployer-participant.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment'; import { PluginDeployerParticipant, PluginDeployerStartContext } from '@theia/plugin-ext/lib/common/plugin-protocol'; diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-directory-handler.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-directory-handler.ts index bd48d8a561643..3f2cb36f65a96 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-directory-handler.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-directory-handler.ts @@ -16,7 +16,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { RecursivePartial } from '@theia/core'; import { PluginDeployerDirectoryHandler, diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts index 60acac14013a3..3409e18aa5e43 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts @@ -15,10 +15,10 @@ ********************************************************************************/ import { PluginDeployerFileHandler, PluginDeployerEntry, PluginDeployerFileHandlerContext, PluginType } from '@theia/plugin-ext'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import * as filenamify from 'filenamify'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { getTempDir } from '@theia/plugin-ext/lib/main/node/temp-dir-util'; import { PluginVSCodeEnvironment } from '../common/plugin-vscode-environment'; import { FileUri } from '@theia/core/lib/node/file-uri'; diff --git a/packages/plugin-ext-vscode/src/node/scanner-vscode.ts b/packages/plugin-ext-vscode/src/node/scanner-vscode.ts index b3b4f99fbb189..376b96744f0d6 100644 --- a/packages/plugin-ext-vscode/src/node/scanner-vscode.ts +++ b/packages/plugin-ext-vscode/src/node/scanner-vscode.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginScanner, PluginEngine, PluginPackage, PluginModel, PluginLifecycle } from '@theia/plugin-ext'; import { TheiaPluginScanner } from '@theia/plugin-ext/lib/hosted/node/scanners/scanner-theia'; diff --git a/packages/plugin-ext/compile.tsconfig.json b/packages/plugin-ext/compile.tsconfig.json index 3238f0d8c356a..259bba12f5f86 100644 --- a/packages/plugin-ext/compile.tsconfig.json +++ b/packages/plugin-ext/compile.tsconfig.json @@ -73,6 +73,9 @@ }, { "path": "../workspace/compile.tsconfig.json" + }, + { + "path": "../editor-preview/compile.tsconfig.json" } ] } diff --git a/packages/plugin-ext/package.json b/packages/plugin-ext/package.json index 06183a8c9edd2..fba5cf15d9bd4 100644 --- a/packages/plugin-ext/package.json +++ b/packages/plugin-ext/package.json @@ -10,6 +10,7 @@ "@theia/core": "1.12.0", "@theia/debug": "1.12.0", "@theia/editor": "1.12.0", + "@theia/editor-preview": "1.12.0", "@theia/file-search": "1.12.0", "@theia/filesystem": "1.12.0", "@theia/markers": "1.12.0", diff --git a/packages/plugin-ext/src/common/connection.ts b/packages/plugin-ext/src/common/connection.ts index 140376bad2270..650380cc0a85f 100644 --- a/packages/plugin-ext/src/common/connection.ts +++ b/packages/plugin-ext/src/common/connection.ts @@ -16,8 +16,8 @@ import { Disposable } from './disposable-util'; import { PluginMessageReader } from './plugin-message-reader'; import { PluginMessageWriter } from './plugin-message-writer'; -import { MessageReader, MessageWriter, Message } from 'vscode-jsonrpc'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { MessageReader, MessageWriter, Message } from '@theia/core/shared/vscode-ws-jsonrpc'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; /** * The interface for describing the connection between plugins and main side. diff --git a/packages/plugin-ext/src/common/plugin-api-rpc-model.ts b/packages/plugin-ext/src/common/plugin-api-rpc-model.ts index 3b03fe6b68db0..4b3468bce9cae 100644 --- a/packages/plugin-ext/src/common/plugin-api-rpc-model.ts +++ b/packages/plugin-ext/src/common/plugin-api-rpc-model.ts @@ -18,7 +18,7 @@ import * as theia from '@theia/plugin'; import { UriComponents } from './uri-components'; import { CompletionItemTag } from '../plugin/types-impl'; import { Event as TheiaEvent } from '@theia/core/lib/common/event'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; // Should contains internal Plugin API types diff --git a/packages/plugin-ext/src/common/plugin-api-rpc.ts b/packages/plugin-ext/src/common/plugin-api-rpc.ts index 416f06b71b1f1..cf3c71bde9e6a 100644 --- a/packages/plugin-ext/src/common/plugin-api-rpc.ts +++ b/packages/plugin-ext/src/common/plugin-api-rpc.ts @@ -79,7 +79,7 @@ import { KeysToAnyValues, KeysToKeysToAnyValue } from './types'; import { CancellationToken, Progress, ProgressOptions } from '@theia/plugin'; import { DebuggerDescription } from '@theia/debug/lib/common/debug-service'; import { DebugProtocol } from 'vscode-debugprotocol'; -import { SymbolInformation } from 'vscode-languageserver-types'; +import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; import { ArgumentProcessor } from '../plugin/command-registry'; import { MaybePromise } from '@theia/core/lib/common/types'; import { QuickTitleButton } from '@theia/core/lib/common/quick-open-model'; diff --git a/packages/plugin-ext/src/common/plugin-ext-api-contribution.ts b/packages/plugin-ext/src/common/plugin-ext-api-contribution.ts index 98f33b4ed3b4d..29135efd25959 100644 --- a/packages/plugin-ext/src/common/plugin-ext-api-contribution.ts +++ b/packages/plugin-ext/src/common/plugin-ext-api-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { RPCProtocol } from './rpc-protocol'; import { PluginManager, Plugin } from './plugin-api-rpc'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; export const ExtPluginApiProvider = 'extPluginApi'; /** diff --git a/packages/plugin-ext/src/common/plugin-message-reader.ts b/packages/plugin-ext/src/common/plugin-message-reader.ts index 4ddb1f0e2ee0f..6f6be7fe880f2 100644 --- a/packages/plugin-ext/src/common/plugin-message-reader.ts +++ b/packages/plugin-ext/src/common/plugin-message-reader.ts @@ -14,13 +14,48 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { es5ClassCompat } from './types'; -import { AbstractMessageReader, DataCallback } from 'vscode-jsonrpc/lib/messageReader'; +import { DataCallback, Emitter, Event, PartialMessageInfo } from '@theia/core/shared/vscode-ws-jsonrpc'; + +export abstract class AbstractMessageReader { + protected errorEmitter = new Emitter(); + protected closeEmitter = new Emitter(); + protected partialMessageEmitter = new Emitter(); + dispose(): void { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError(): Event { + return this.errorEmitter.event; + } + fireError(error: Error): void { + this.errorEmitter.fire(this.asError(error)); + } + get onClose(): Event { + return this.closeEmitter.event; + } + fireClose(): void { + this.closeEmitter.fire(undefined); + } + get onPartialMessage(): Event { + return this.partialMessageEmitter.event; + } + firePartialMessage(info: PartialMessageInfo): void { + this.partialMessageEmitter.fire(info); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + asError(error: any): Error { + if (error instanceof Error) { + return error; + } else { + return new Error(`Reader received error. Reason: ${typeof error.message === 'string' ? error.message : 'unknown'}`); + } + } +} /** * Support for reading string message through RPC protocol. */ -export class PluginMessageReader extends es5ClassCompat(AbstractMessageReader) { +export class PluginMessageReader extends AbstractMessageReader { protected state: 'initial' | 'listening' | 'closed' = 'initial'; protected callback: DataCallback | undefined; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/plugin-ext/src/common/plugin-message-writer.ts b/packages/plugin-ext/src/common/plugin-message-writer.ts index 781caabc850ec..35ea668361e20 100644 --- a/packages/plugin-ext/src/common/plugin-message-writer.ts +++ b/packages/plugin-ext/src/common/plugin-message-writer.ts @@ -14,15 +14,42 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { es5ClassCompat } from './types'; -import { AbstractMessageWriter, MessageWriter } from 'vscode-jsonrpc/lib/messageWriter'; +import { Message, MessageWriter, Emitter, Event } from '@theia/core/shared/vscode-ws-jsonrpc'; import { ConnectionMain, ConnectionExt } from './plugin-api-rpc'; -import { Message } from 'vscode-jsonrpc'; + +export abstract class AbstractMessageWriter { + protected errorEmitter = new Emitter<[Error, Message | undefined, number | undefined]>(); + protected closeEmitter = new Emitter(); + dispose(): void { + this.errorEmitter.dispose(); + this.closeEmitter.dispose(); + } + get onError(): Event<[Error, Message | undefined, number | undefined]> { + return this.errorEmitter.event; + } + fireError(error: Error, message: Message | undefined, count: number | undefined): void { + this.errorEmitter.fire([this.asError(error), message, count]); + } + get onClose(): Event { + return this.closeEmitter.event; + } + fireClose(): void { + this.closeEmitter.fire(undefined); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + asError(error: any): Error { + if (error instanceof Error) { + return error; + } else { + return new Error(`Writer received error. Reason: ${typeof error.message === 'string' ? error.message : 'unknown'}`); + } + } +} /** * Support for writing string message through RPC protocol. */ -export class PluginMessageWriter extends es5ClassCompat(AbstractMessageWriter) implements MessageWriter { +export class PluginMessageWriter extends AbstractMessageWriter implements MessageWriter { constructor( protected readonly id: string, protected readonly proxy: ConnectionMain | ConnectionExt) { diff --git a/packages/plugin-ext/src/common/rpc-protocol.ts b/packages/plugin-ext/src/common/rpc-protocol.ts index 8947841cd1657..f9caaf152a17f 100644 --- a/packages/plugin-ext/src/common/rpc-protocol.ts +++ b/packages/plugin-ext/src/common/rpc-protocol.ts @@ -25,9 +25,9 @@ import { Event } from '@theia/core/lib/common/event'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; import { Deferred } from '@theia/core/lib/common/promise-util'; -import { URI as VSCodeURI } from 'vscode-uri'; +import { URI as VSCodeURI } from '@theia/core/shared/vscode-uri'; import URI from '@theia/core/lib/common/uri'; -import { CancellationToken, CancellationTokenSource } from 'vscode-languageserver-protocol'; +import { CancellationToken, CancellationTokenSource } from '@theia/core/shared/vscode-languageserver-protocol'; import { Range, Position } from '../plugin/types-impl'; import { BinaryBuffer } from '@theia/core/lib/common/buffer'; diff --git a/packages/plugin-ext/src/hosted/browser/hosted-plugin-watcher.ts b/packages/plugin-ext/src/hosted/browser/hosted-plugin-watcher.ts index 3efc0db7c66ba..0454cc37efdf3 100644 --- a/packages/plugin-ext/src/hosted/browser/hosted-plugin-watcher.ts +++ b/packages/plugin-ext/src/hosted/browser/hosted-plugin-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { HostedPluginClient } from '../../common/plugin-protocol'; import { LogPart } from '../../common/types'; diff --git a/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts b/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts index 028030050d4d2..11d10843a8771 100644 --- a/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts +++ b/packages/plugin-ext/src/hosted/browser/hosted-plugin.ts @@ -21,9 +21,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import debounce = require('lodash.debounce'); -import { UUID } from '@phosphor/coreutils'; -import { injectable, inject, interfaces, named, postConstruct } from 'inversify'; +import debounce = require('@theia/core/shared/lodash.debounce'); +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; +import { injectable, inject, interfaces, named, postConstruct } from '@theia/core/shared/inversify'; import { PluginWorker } from '../../main/browser/plugin-worker'; import { PluginMetadata, getPluginId, HostedPluginServer, DeployedPlugin } from '../../common/plugin-protocol'; import { HostedPluginWatcher } from './hosted-plugin-watcher'; @@ -59,7 +59,7 @@ import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-servi import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import URI from '@theia/core/lib/common/uri'; import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { JsonSchemaStore } from '@theia/core/lib/browser/json-schema-store'; import { FileService, FileSystemProviderActivationEvent } from '@theia/filesystem/lib/browser/file-service'; import { PluginCustomEditorRegistry } from '../../main/browser/custom-editors/plugin-custom-editor-registry'; diff --git a/packages/plugin-ext/src/hosted/node-electron/plugin-ext-hosted-electron-backend-module.ts b/packages/plugin-ext/src/hosted/node-electron/plugin-ext-hosted-electron-backend-module.ts index 0a96f818adc17..4ed4ae138dcfd 100644 --- a/packages/plugin-ext/src/hosted/node-electron/plugin-ext-hosted-electron-backend-module.ts +++ b/packages/plugin-ext/src/hosted/node-electron/plugin-ext-hosted-electron-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { bindCommonHostedBackend } from '../node/plugin-ext-hosted-backend-module'; import { PluginScanner } from '../../common/plugin-protocol'; import { TheiaPluginScannerElectron } from './scanner-theia-electron'; diff --git a/packages/plugin-ext/src/hosted/node-electron/scanner-theia-electron.ts b/packages/plugin-ext/src/hosted/node-electron/scanner-theia-electron.ts index 190c1b427a625..fdd724c819a7b 100644 --- a/packages/plugin-ext/src/hosted/node-electron/scanner-theia-electron.ts +++ b/packages/plugin-ext/src/hosted/node-electron/scanner-theia-electron.ts @@ -16,7 +16,7 @@ import * as path from 'path'; import { TheiaPluginScanner } from '../node/scanners/scanner-theia'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginPackage, PluginModel } from '../../common/plugin-protocol'; @injectable() diff --git a/packages/plugin-ext/src/hosted/node/hosted-plugin-cli-contribution.ts b/packages/plugin-ext/src/hosted/node/hosted-plugin-cli-contribution.ts index 8ff695c7e31e2..59fbbfa5cf4ac 100644 --- a/packages/plugin-ext/src/hosted/node/hosted-plugin-cli-contribution.ts +++ b/packages/plugin-ext/src/hosted/node/hosted-plugin-cli-contribution.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Argv, Arguments } from 'yargs'; +import { injectable } from '@theia/core/shared/inversify'; +import { Argv, Arguments } from '@theia/core/shared/yargs'; import { CliContribution } from '@theia/core/lib/node'; let pluginHostTerminateTimeout = 10 * 1000; diff --git a/packages/plugin-ext/src/hosted/node/hosted-plugin-deployer-handler.ts b/packages/plugin-ext/src/hosted/node/hosted-plugin-deployer-handler.ts index f8cd1a006389b..45c193d9530cf 100644 --- a/packages/plugin-ext/src/hosted/node/hosted-plugin-deployer-handler.ts +++ b/packages/plugin-ext/src/hosted/node/hosted-plugin-deployer-handler.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as fs from 'fs-extra'; -import { injectable, inject } from 'inversify'; +import * as fs from '@theia/core/shared/fs-extra'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core'; import { PluginDeployerHandler, PluginDeployerEntry, PluginEntryPoint, DeployedPlugin, PluginDependencies } from '../../common/plugin-protocol'; import { HostedPluginReader } from './plugin-reader'; diff --git a/packages/plugin-ext/src/hosted/node/hosted-plugin-process.ts b/packages/plugin-ext/src/hosted/node/hosted-plugin-process.ts index e6ae378e13fe0..59d79d68b9c5f 100644 --- a/packages/plugin-ext/src/hosted/node/hosted-plugin-process.ts +++ b/packages/plugin-ext/src/hosted/node/hosted-plugin-process.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as cp from 'child_process'; -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ILogger, ConnectionErrorHandler, ContributionProvider, MessageService } from '@theia/core/lib/common'; import { createIpcEnv } from '@theia/core/lib/node/messaging/ipc-protocol'; import { HostedPluginClient, ServerPluginRunner, PluginHostEnvironmentVariable, DeployedPlugin } from '../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/hosted/node/hosted-plugin.ts b/packages/plugin-ext/src/hosted/node/hosted-plugin.ts index 83fbfe0a138b1..c373201513984 100644 --- a/packages/plugin-ext/src/hosted/node/hosted-plugin.ts +++ b/packages/plugin-ext/src/hosted/node/hosted-plugin.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, multiInject, postConstruct, optional } from 'inversify'; +import { injectable, inject, multiInject, postConstruct, optional } from '@theia/core/shared/inversify'; import { ILogger, ConnectionErrorHandler } from '@theia/core/lib/common'; import { HostedPluginClient, PluginModel, ServerPluginRunner, DeployedPlugin } from '../../common/plugin-protocol'; import { LogPart } from '../../common/types'; diff --git a/packages/plugin-ext/src/hosted/node/metadata-scanner.ts b/packages/plugin-ext/src/hosted/node/metadata-scanner.ts index 35bc989c8a2c0..60b74560ed71f 100644 --- a/packages/plugin-ext/src/hosted/node/metadata-scanner.ts +++ b/packages/plugin-ext/src/hosted/node/metadata-scanner.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, multiInject } from 'inversify'; +import { injectable, multiInject } from '@theia/core/shared/inversify'; import { PluginPackage, PluginScanner, PluginMetadata } from '../../common/plugin-protocol'; @injectable() diff --git a/packages/plugin-ext/src/hosted/node/plugin-ext-hosted-backend-module.ts b/packages/plugin-ext/src/hosted/node/plugin-ext-hosted-backend-module.ts index 2fdd182222fb6..77c76899a06c4 100644 --- a/packages/plugin-ext/src/hosted/node/plugin-ext-hosted-backend-module.ts +++ b/packages/plugin-ext/src/hosted/node/plugin-ext-hosted-backend-module.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as path from 'path'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { CliContribution } from '@theia/core/lib/node/cli'; import { ConnectionContainerModule } from '@theia/core/lib/node/messaging/connection-container-module'; diff --git a/packages/plugin-ext/src/hosted/node/plugin-manifest-loader.ts b/packages/plugin-ext/src/hosted/node/plugin-manifest-loader.ts index 39cea8b802508..b7cfe660fd377 100644 --- a/packages/plugin-ext/src/hosted/node/plugin-manifest-loader.ts +++ b/packages/plugin-ext/src/hosted/node/plugin-manifest-loader.ts @@ -17,7 +17,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as path from 'path'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; const NLS_REGEX = /^%([\w\d.-]+)%$/i; diff --git a/packages/plugin-ext/src/hosted/node/plugin-reader.ts b/packages/plugin-ext/src/hosted/node/plugin-reader.ts index e5086ee216763..9a922453a2807 100644 --- a/packages/plugin-ext/src/hosted/node/plugin-reader.ts +++ b/packages/plugin-ext/src/hosted/node/plugin-reader.ts @@ -15,10 +15,10 @@ ********************************************************************************/ import * as path from 'path'; -import * as express from 'express'; +import * as express from '@theia/core/shared/express'; import * as escape_html from 'escape-html'; import { ILogger } from '@theia/core'; -import { inject, injectable, optional, multiInject } from 'inversify'; +import { inject, injectable, optional, multiInject } from '@theia/core/shared/inversify'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; import { PluginMetadata, getPluginId, MetadataProcessor, PluginPackage, PluginContribution } from '../../common/plugin-protocol'; import { MetadataScanner } from './metadata-scanner'; diff --git a/packages/plugin-ext/src/hosted/node/plugin-service.ts b/packages/plugin-ext/src/hosted/node/plugin-service.ts index 8e7df0174ce12..4cec8af205be7 100644 --- a/packages/plugin-ext/src/hosted/node/plugin-service.ts +++ b/packages/plugin-ext/src/hosted/node/plugin-service.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named, postConstruct } from 'inversify'; +import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify'; import { HostedPluginServer, HostedPluginClient, PluginDeployer, GetDeployedPluginsParams, DeployedPlugin } from '../../common/plugin-protocol'; import { HostedPluginSupport } from './hosted-plugin'; import { ILogger, Disposable } from '@theia/core'; diff --git a/packages/plugin-ext/src/hosted/node/scanners/file-plugin-uri-factory.ts b/packages/plugin-ext/src/hosted/node/scanners/file-plugin-uri-factory.ts index c70ef7f2592b1..7d4abd9890726 100644 --- a/packages/plugin-ext/src/hosted/node/scanners/file-plugin-uri-factory.ts +++ b/packages/plugin-ext/src/hosted/node/scanners/file-plugin-uri-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import * as path from 'path'; import URI from '@theia/core/lib/common/uri'; import { FileUri } from '@theia/core/lib/node/file-uri'; diff --git a/packages/plugin-ext/src/hosted/node/scanners/grammars-reader.ts b/packages/plugin-ext/src/hosted/node/scanners/grammars-reader.ts index 2d9fcdd204e30..e7fcf4f945e1f 100644 --- a/packages/plugin-ext/src/hosted/node/scanners/grammars-reader.ts +++ b/packages/plugin-ext/src/hosted/node/scanners/grammars-reader.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginPackageGrammarsContribution, GrammarsContribution } from '../../../common'; import * as path from 'path'; import * as fs from 'fs'; diff --git a/packages/plugin-ext/src/hosted/node/scanners/scanner-theia.ts b/packages/plugin-ext/src/hosted/node/scanners/scanner-theia.ts index 6a0d196f1bdff..c97f268f0cdd7 100644 --- a/packages/plugin-ext/src/hosted/node/scanners/scanner-theia.ts +++ b/packages/plugin-ext/src/hosted/node/scanners/scanner-theia.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { AutoClosingPair, AutoClosingPairConditional, diff --git a/packages/plugin-ext/src/main/browser/authentication-main.ts b/packages/plugin-ext/src/main/browser/authentication-main.ts index 49ddbdee5a71a..088c1ae677ec8 100644 --- a/packages/plugin-ext/src/main/browser/authentication-main.ts +++ b/packages/plugin-ext/src/main/browser/authentication-main.ts @@ -20,7 +20,7 @@ *--------------------------------------------------------------------------------------------*/ // code copied and modified from https://github.com/microsoft/vscode/blob/1.47.3/src/vs/workbench/api/browser/mainThreadAuthentication.ts -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { AuthenticationExt, AuthenticationMain, MAIN_RPC_CONTEXT } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; import { MessageService } from '@theia/core/lib/common/message-service'; @@ -85,7 +85,7 @@ export class AuthenticationMainImpl implements AuthenticationMain { } async $getSession(providerId: string, scopes: string[], extensionId: string, extensionName: string, - options: { createIfNone: boolean, clearSessionPreference: boolean }): Promise { + options: { createIfNone: boolean, clearSessionPreference: boolean }): Promise { const orderedScopes = scopes.sort().join(' '); const sessions = (await this.authenticationService.getSessions(providerId)).filter(session => session.scopes.slice().sort().join(' ') === orderedScopes); const label = this.authenticationService.getLabel(providerId); @@ -122,7 +122,7 @@ export class AuthenticationMainImpl implements AuthenticationMain { } protected async selectSession(providerId: string, providerName: string, extensionId: string, extensionName: string, - potentialSessions: AuthenticationSession[], scopes: string[], clearSessionPreference: boolean): Promise { + potentialSessions: AuthenticationSession[], scopes: string[], clearSessionPreference: boolean): Promise { if (!potentialSessions.length) { throw new Error('No potential sessions found'); } @@ -144,9 +144,9 @@ export class AuthenticationMainImpl implements AuthenticationMain { return new Promise(async (resolve, reject) => { const items: QuickPickItem<{ session?: AuthenticationSession }>[] = potentialSessions.map(session => ({ - label: session.account.label, - value: { session } - })); + label: session.account.label, + value: { session } + })); items.push({ label: 'Sign in to another account', value: { session: undefined } @@ -250,7 +250,7 @@ export class AuthenticationProviderImpl implements AuthenticationProvider { public readonly supportsMultipleAccounts: boolean, private readonly storageService: StorageService, private readonly messageService: MessageService - ) {} + ) { } public hasSessions(): boolean { return !!this.sessions.size; @@ -271,7 +271,7 @@ export class AuthenticationProviderImpl implements AuthenticationProvider { async signOut(accountName: string): Promise { const accountUsages = await readAccountUsages(this.storageService, this.id, accountName); const sessionsForAccount = this.accounts.get(accountName); - const result = await this.messageService.info(accountUsages.length ? `The account ${accountName} has been used by: + const result = await this.messageService.info(accountUsages.length ? `The account ${accountName} has been used by: ${accountUsages.map(usage => usage.extensionName).join(', ')}. Sign out of these features?` : `Sign out of ${accountName}?`, 'Yes'); if (result && result === 'Yes' && sessionsForAccount) { diff --git a/packages/plugin-ext/src/main/browser/callhierarchy/callhierarchy-type-converters.ts b/packages/plugin-ext/src/main/browser/callhierarchy/callhierarchy-type-converters.ts index 9c25654385799..38efe4ac45e83 100644 --- a/packages/plugin-ext/src/main/browser/callhierarchy/callhierarchy-type-converters.ts +++ b/packages/plugin-ext/src/main/browser/callhierarchy/callhierarchy-type-converters.ts @@ -17,10 +17,10 @@ import { Definition as CallHierarchyDefinition, Caller as CallHierarchyCaller } from '@theia/callhierarchy/lib/browser'; import * as model from '../../../common/plugin-api-rpc-model'; import * as rpc from '../../../common/plugin-api-rpc'; -import * as callhierarchy from 'vscode-languageserver-types'; -import { URI } from 'vscode-uri'; +import * as callhierarchy from '@theia/core/shared/vscode-languageserver-types'; +import { URI } from '@theia/core/shared/vscode-uri'; import { UriComponents } from '../../../common/uri-components'; -import { Location } from 'vscode-languageserver-types'; +import { Location } from '@theia/core/shared/vscode-languageserver-types'; export function toUriComponents(uri: string): UriComponents { return URI.parse(uri); diff --git a/packages/plugin-ext/src/main/browser/clipboard-main.ts b/packages/plugin-ext/src/main/browser/clipboard-main.ts index eccb10948ed30..8c6a3fc9e3208 100644 --- a/packages/plugin-ext/src/main/browser/clipboard-main.ts +++ b/packages/plugin-ext/src/main/browser/clipboard-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ClipboardMain } from '../../common'; import { ClipboardService } from '@theia/core/lib/browser/clipboard-service'; diff --git a/packages/plugin-ext/src/main/browser/command-registry-main.ts b/packages/plugin-ext/src/main/browser/command-registry-main.ts index f017306a2a17e..6d0799b5495a7 100644 --- a/packages/plugin-ext/src/main/browser/command-registry-main.ts +++ b/packages/plugin-ext/src/main/browser/command-registry-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { CommandRegistry } from '@theia/core/lib/common/command'; import * as theia from '@theia/plugin'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/commands.ts b/packages/plugin-ext/src/main/browser/commands.ts index 8d171b402608d..c951e3f962c12 100644 --- a/packages/plugin-ext/src/main/browser/commands.ts +++ b/packages/plugin-ext/src/main/browser/commands.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Command, CommandService } from '@theia/core/lib/common/command'; import { AbstractDialog } from '@theia/core/lib/browser'; diff --git a/packages/plugin-ext/src/main/browser/comments/comment-thread-widget.tsx b/packages/plugin-ext/src/main/browser/comments/comment-thread-widget.tsx index 0cd1b610388ce..0928fa1f6b183 100644 --- a/packages/plugin-ext/src/main/browser/comments/comment-thread-widget.tsx +++ b/packages/plugin-ext/src/main/browser/comments/comment-thread-widget.tsx @@ -22,8 +22,8 @@ import { } from '../../../common/plugin-api-rpc-model'; import { CommentGlyphWidget } from './comment-glyph-widget'; import { BaseWidget, DISABLED_CLASS } from '@theia/core/lib/browser'; -import * as ReactDOM from 'react-dom'; -import * as React from 'react'; +import * as ReactDOM from '@theia/core/shared/react-dom'; +import * as React from '@theia/core/shared/react'; import { MouseTargetType } from '@theia/editor/lib/browser'; import { CommentsService } from './comments-service'; import { @@ -34,7 +34,7 @@ import { MenuPath } from '@theia/core/lib/common'; import { CommentsContextKeyService } from './comments-context-key-service'; -import { RefObject } from 'react'; +import { RefObject } from '@theia/core/shared/react'; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/packages/plugin-ext/src/main/browser/comments/comments-context-key-service.ts b/packages/plugin-ext/src/main/browser/comments/comments-context-key-service.ts index 075623bfb0015..94545f3bbd54c 100644 --- a/packages/plugin-ext/src/main/browser/comments/comments-context-key-service.ts +++ b/packages/plugin-ext/src/main/browser/comments/comments-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; import { Emitter } from '@theia/core/lib/common'; diff --git a/packages/plugin-ext/src/main/browser/comments/comments-contribution.ts b/packages/plugin-ext/src/main/browser/comments/comments-contribution.ts index 11342199ba440..eb70dc962f383 100644 --- a/packages/plugin-ext/src/main/browser/comments/comments-contribution.ts +++ b/packages/plugin-ext/src/main/browser/comments/comments-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { CommentingRangeDecorator } from './comments-decorator'; import { EditorManager, EditorMouseEvent, EditorWidget } from '@theia/editor/lib/browser'; import { MonacoDiffEditor } from '@theia/monaco/lib/browser/monaco-diff-editor'; @@ -22,7 +22,7 @@ import { CommentThreadWidget } from './comment-thread-widget'; import { CommentsService, CommentInfoMain } from './comments-service'; import { CommentThread } from '../../../common/plugin-api-rpc-model'; import { CommandRegistry, DisposableCollection, MenuModelRegistry } from '@theia/core/lib/common'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { CommentsContextKeyService } from './comments-context-key-service'; import { ContextKeyService } from '@theia/core/lib/browser/context-key-service'; @@ -46,8 +46,8 @@ export class CommentsContribution { @inject(CommandRegistry) protected readonly commands: CommandRegistry; constructor(@inject(CommentingRangeDecorator) protected readonly rangeDecorator: CommentingRangeDecorator, - @inject(CommentsService) protected readonly commentService: CommentsService, - @inject(EditorManager) protected readonly editorManager: EditorManager) { + @inject(CommentsService) protected readonly commentService: CommentsService, + @inject(EditorManager) protected readonly editorManager: EditorManager) { this.commentWidgets = []; this.commentInfos = []; this.commentService.onDidSetResourceCommentInfos(e => { @@ -77,40 +77,40 @@ export class CommentsContribution { } disposables.push(editor.onMouseDown(e => this.onEditorMouseDown(e))); disposables.push(this.commentService.onDidUpdateCommentThreads(async e => { - const editorURI = editor.document.uri; - const commentInfo = this.commentInfos.filter(info => info.owner === e.owner); - if (!commentInfo || !commentInfo.length) { - return; - } + const editorURI = editor.document.uri; + const commentInfo = this.commentInfos.filter(info => info.owner === e.owner); + if (!commentInfo || !commentInfo.length) { + return; + } - const added = e.added.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); - const removed = e.removed.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); - const changed = e.changed.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); - - removed.forEach(thread => { - const matchedZones = this.commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner - && zoneWidget.commentThread.threadId === thread.threadId && zoneWidget.commentThread.threadId !== ''); - if (matchedZones.length) { - const matchedZone = matchedZones[0]; - const index = this.commentWidgets.indexOf(matchedZone); - this.commentWidgets.splice(index, 1); - matchedZone.dispose(); - } - }); - - changed.forEach(thread => { - const matchedZones = this.commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner - && zoneWidget.commentThread.threadId === thread.threadId); - if (matchedZones.length) { - const matchedZone = matchedZones[0]; - matchedZone.update(); - } - }); - added.forEach(thread => { - this.displayCommentThread(e.owner, thread); - this.commentInfos.filter(info => info.owner === e.owner)[0].threads.push(thread); - }); - }) + const added = e.added.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); + const removed = e.removed.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); + const changed = e.changed.filter(thread => thread.resource && thread.resource.toString() === editorURI.toString()); + + removed.forEach(thread => { + const matchedZones = this.commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner + && zoneWidget.commentThread.threadId === thread.threadId && zoneWidget.commentThread.threadId !== ''); + if (matchedZones.length) { + const matchedZone = matchedZones[0]; + const index = this.commentWidgets.indexOf(matchedZone); + this.commentWidgets.splice(index, 1); + matchedZone.dispose(); + } + }); + + changed.forEach(thread => { + const matchedZones = this.commentWidgets.filter(zoneWidget => zoneWidget.owner === e.owner + && zoneWidget.commentThread.threadId === thread.threadId); + if (matchedZones.length) { + const matchedZone = matchedZones[0]; + matchedZone.update(); + } + }); + added.forEach(thread => { + this.displayCommentThread(e.owner, thread); + this.commentInfos.filter(info => info.owner === e.owner)[0].threads.push(thread); + }); + }) ); editor.onDispose(() => { disposables.dispose(); @@ -179,7 +179,7 @@ export class CommentsContribution { get editor(): monaco.editor.IStandaloneCodeEditor | undefined { const editor = this.getCurrentEditor(); if (editor && editor.editor instanceof MonacoDiffEditor) { - return editor.editor.diffEditor.getModifiedEditor(); + return editor.editor.diffEditor.getModifiedEditor(); } } @@ -228,7 +228,7 @@ export class CommentsContribution { } private getCurrentEditor(): EditorWidget | undefined { - return this.editorManager.currentEditor; + return this.editorManager.currentEditor; } public addCommentAtLine(lineNumber: number, e: EditorMouseEvent | undefined): Promise { diff --git a/packages/plugin-ext/src/main/browser/comments/comments-decorator.ts b/packages/plugin-ext/src/main/browser/comments/comments-decorator.ts index c20682e7b0b3d..bc5a4b7978a5e 100644 --- a/packages/plugin-ext/src/main/browser/comments/comments-decorator.ts +++ b/packages/plugin-ext/src/main/browser/comments/comments-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { CommentInfoMain } from './comments-service'; import { CommentingRanges, Range } from '../../../common/plugin-api-rpc-model'; @@ -72,8 +72,8 @@ class CommentingRangeDecoration { } constructor(private _editor: monaco.editor.ICodeEditor, private _ownerId: string, private _extensionId: string | undefined, - private _label: string | undefined, private _range: Range, commentingOptions: monaco.editor.IModelDecorationOptions, - private commentingRangesInfo: CommentingRanges) { + private _label: string | undefined, private _range: Range, commentingOptions: monaco.editor.IModelDecorationOptions, + private commentingRangesInfo: CommentingRanges) { const startLineNumber = _range.startLineNumber; const endLineNumber = _range.endLineNumber; const commentingRangeDecorations = [{ diff --git a/packages/plugin-ext/src/main/browser/comments/comments-main.ts b/packages/plugin-ext/src/main/browser/comments/comments-main.ts index 3944940fc1b78..2cb7e21d19293 100644 --- a/packages/plugin-ext/src/main/browser/comments/comments-main.ts +++ b/packages/plugin-ext/src/main/browser/comments/comments-main.ts @@ -34,10 +34,10 @@ import { import { Disposable } from '@theia/core/lib/common/disposable'; import { CommentsService, CommentInfoMain } from './comments-service'; import { UriComponents } from '../../../common/uri-components'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { CancellationToken } from '@theia/core/lib/common'; import { RPCProtocol } from '../../../common/rpc-protocol'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { v4 as uuidv4 } from 'uuid'; import { CommentsContribution } from './comments-contribution'; @@ -209,10 +209,10 @@ export class CommentController { } createCommentThread(extensionId: string, - commentThreadHandle: number, - threadId: string, - resource: UriComponents, - range: Range, + commentThreadHandle: number, + threadId: string, + resource: UriComponents, + range: Range, ): CommentThread { const thread = new CommentThreadImpl( commentThreadHandle, @@ -235,9 +235,9 @@ export class CommentController { } updateCommentThread(commentThreadHandle: number, - threadId: string, - resource: UriComponents, - changes: CommentThreadChanges): void { + threadId: string, + resource: UriComponents, + changes: CommentThreadChanges): void { const thread = this.getKnownThread(commentThreadHandle); thread.batchUpdate(changes); @@ -390,11 +390,11 @@ export class CommentsMainImp implements CommentsMain { } $createCommentThread(handle: number, - commentThreadHandle: number, - threadId: string, - resource: UriComponents, - range: Range, - extensionId: string + commentThreadHandle: number, + threadId: string, + resource: UriComponents, + range: Range, + extensionId: string ): CommentThread | undefined { const provider = this.commentControllers.get(handle); @@ -406,10 +406,10 @@ export class CommentsMainImp implements CommentsMain { } $updateCommentThread(handle: number, - commentThreadHandle: number, - threadId: string, - resource: UriComponents, - changes: CommentThreadChanges): void { + commentThreadHandle: number, + threadId: string, + resource: UriComponents, + changes: CommentThreadChanges): void { const provider = this.commentControllers.get(handle); if (!provider) { diff --git a/packages/plugin-ext/src/main/browser/comments/comments-service.ts b/packages/plugin-ext/src/main/browser/comments/comments-service.ts index d51940efd1cf1..bcd0417b2f3b2 100644 --- a/packages/plugin-ext/src/main/browser/comments/comments-service.ts +++ b/packages/plugin-ext/src/main/browser/comments/comments-service.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { URI } from 'vscode-uri'; +import { injectable } from '@theia/core/shared/inversify'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Event, Emitter } from '@theia/core/lib/common/event'; import { Range, diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts index 2b1e613dfbb81..94ae908e57adb 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandRegistry, CommandContribution } from '@theia/core/lib/common'; import { ApplicationShell, CommonCommands } from '@theia/core/lib/browser'; import { CustomEditorWidget } from './custom-editor-widget'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx index c8e2ccbc4f40d..e2a94975db670 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-opener.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject } from 'inversify'; +import { inject } from '@theia/core/shared/inversify'; import { PreviewEditorOpenerOptions } from '@theia/editor-preview/lib/browser'; import URI from '@theia/core/lib/common/uri'; import { ApplicationShell, OpenerOptions, OpenHandler, Widget, WidgetManager } from '@theia/core/lib/browser'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-service.ts b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-service.ts index 6434a1644581f..28637881f6635 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-service.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-service.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ // copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/workbench/contrib/customEditor/browser/customEditors.ts -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Reference } from '@theia/core/lib/common/reference'; import { CustomEditorModel } from './custom-editors-main'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget-factory.ts b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget-factory.ts index e23ee857fb303..d0187f39f2ace 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget-factory.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget-factory.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { CustomEditorWidget } from '../custom-editors/custom-editor-widget'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { WebviewWidgetIdentifier, WebviewWidgetExternalEndpoint } from '../webview/webview'; import { WebviewEnvironment } from '../webview/webview-environment'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts index 2ff60a022fa4b..229073c9b970e 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editor-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { FileOperation } from '@theia/filesystem/lib/common/files'; import { NavigatableWidget, Saveable, SaveableSource, SaveOptions } from '@theia/core/lib/browser'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts b/packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts index a5d2773949b1f..f36c3680bca69 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/custom-editors-main.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ // some code copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/workbench/api/browser/mainThreadCustomEditors.ts -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { MAIN_RPC_CONTEXT, CustomEditorsMain, CustomEditorsExt, CustomTextEditorCapabilities } from '../../../common/plugin-api-rpc'; import { RPCProtocol } from '../../../common/rpc-protocol'; import { HostedPluginSupport } from '../../../hosted/browser/hosted-plugin'; @@ -27,7 +27,7 @@ import { PluginCustomEditorRegistry } from './plugin-custom-editor-registry'; import { CustomEditorWidget } from './custom-editor-widget'; import { Emitter } from '@theia/core'; import { UriComponents } from '../../../common/uri-components'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import TheiaURI from '@theia/core/lib/common/uri'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { Reference } from '@theia/core/lib/common/reference'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/plugin-custom-editor-registry.ts b/packages/plugin-ext/src/main/browser/custom-editors/plugin-custom-editor-registry.ts index 3ded9a43de887..5c871ba529681 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/plugin-custom-editor-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { CustomEditor } from '../../../common'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { CustomEditorOpener } from './custom-editor-opener'; diff --git a/packages/plugin-ext/src/main/browser/custom-editors/undo-redo-service.ts b/packages/plugin-ext/src/main/browser/custom-editors/undo-redo-service.ts index 143dc6892ebbf..b34e00722c3af 100644 --- a/packages/plugin-ext/src/main/browser/custom-editors/undo-redo-service.ts +++ b/packages/plugin-ext/src/main/browser/custom-editors/undo-redo-service.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ // copied and modified from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/platform/undoRedo/common/undoRedoService.ts# -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; @injectable() diff --git a/packages/plugin-ext/src/main/browser/debug/debug-main.ts b/packages/plugin-ext/src/main/browser/debug/debug-main.ts index 58b6a0128276f..01d4b9a60388a 100644 --- a/packages/plugin-ext/src/main/browser/debug/debug-main.ts +++ b/packages/plugin-ext/src/main/browser/debug/debug-main.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { RPCProtocol } from '../../../common/rpc-protocol'; import { DebugMain, @@ -29,7 +29,7 @@ import { LabelProvider } from '@theia/core/lib/browser'; import { EditorManager } from '@theia/editor/lib/browser'; import { BreakpointManager, BreakpointsChangeEvent } from '@theia/debug/lib/browser/breakpoint/breakpoint-manager'; import { DebugSourceBreakpoint } from '@theia/debug/lib/browser/model/debug-source-breakpoint'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; import { DebugConsoleSession } from '@theia/debug/lib/browser/console/debug-console-session'; import { SourceBreakpoint, FunctionBreakpoint } from '@theia/debug/lib/browser/breakpoint/breakpoint-marker'; import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration'; diff --git a/packages/plugin-ext/src/main/browser/debug/plugin-debug-service.ts b/packages/plugin-ext/src/main/browser/debug/plugin-debug-service.ts index 5c989a97e3ff8..cb7076da2457b 100644 --- a/packages/plugin-ext/src/main/browser/debug/plugin-debug-service.ts +++ b/packages/plugin-ext/src/main/browser/debug/plugin-debug-service.ts @@ -19,7 +19,7 @@ import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposa import { DebugConfiguration } from '@theia/debug/lib/common/debug-configuration'; import { IJSONSchema, IJSONSchemaSnippet } from '@theia/core/lib/common/json-schema'; import { PluginDebugAdapterContribution } from './plugin-debug-adapter-contribution'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider'; import { WorkspaceService } from '@theia/workspace/lib/browser'; import { DebuggerContribution } from '../../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-contribution-registry.ts b/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-contribution-registry.ts index b6d8dc7dd4819..e789fe4f593d6 100644 --- a/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-contribution-registry.ts +++ b/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-contribution-registry.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { DebugSessionContributionRegistry, DebugSessionContribution } from '@theia/debug/lib/browser/debug-session-contribution'; -import { injectable, inject, named, postConstruct } from 'inversify'; +import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify'; import { ContributionProvider } from '@theia/core/lib/common/contribution-provider'; import { Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-factory.ts b/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-factory.ts index 4ab6ffd2b8057..638aa507a5a7d 100644 --- a/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-factory.ts +++ b/packages/plugin-ext/src/main/browser/debug/plugin-debug-session-factory.ts @@ -25,7 +25,7 @@ import { DebugPreferences } from '@theia/debug/lib/browser/debug-preferences'; import { DebugSessionOptions } from '@theia/debug/lib/browser/debug-session-options'; import { DebugSession } from '@theia/debug/lib/browser/debug-session'; import { DebugSessionConnection } from '@theia/debug/lib/browser/debug-session-connection'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; import { TerminalOptionsExt } from '../../../common/plugin-api-rpc'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; diff --git a/packages/plugin-ext/src/main/browser/decorations/decorations-main.ts b/packages/plugin-ext/src/main/browser/decorations/decorations-main.ts index 184adc2b2d45a..4bdb2ec3b8ec0 100644 --- a/packages/plugin-ext/src/main/browser/decorations/decorations-main.ts +++ b/packages/plugin-ext/src/main/browser/decorations/decorations-main.ts @@ -21,7 +21,7 @@ import { MAIN_RPC_CONTEXT } from '../../../common/plugin-api-rpc'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { Tree, TreeDecoration } from '@theia/core/lib/browser'; diff --git a/packages/plugin-ext/src/main/browser/dialogs-main.ts b/packages/plugin-ext/src/main/browser/dialogs-main.ts index 2713efc9b7ac6..e0d931a07243f 100644 --- a/packages/plugin-ext/src/main/browser/dialogs-main.ts +++ b/packages/plugin-ext/src/main/browser/dialogs-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { RPCProtocol } from '../../common/rpc-protocol'; import { OpenDialogOptionsMain, SaveDialogOptionsMain, DialogsMain, UploadDialogOptionsMain } from '../../common/plugin-api-rpc'; import { OpenFileDialogProps, SaveFileDialogProps, FileDialogService } from '@theia/filesystem/lib/browser'; diff --git a/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts b/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts index 0b9592a541313..5c4a83e07bd04 100644 --- a/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts +++ b/packages/plugin-ext/src/main/browser/dialogs/modal-notification.ts @@ -13,8 +13,8 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import { injectable } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { Key } from '@theia/core/lib/browser'; import { AbstractDialog } from '@theia/core/lib/browser/dialogs'; import '../../../../src/main/browser/dialogs/style/modal-notification.css'; diff --git a/packages/plugin-ext/src/main/browser/documents-main.ts b/packages/plugin-ext/src/main/browser/documents-main.ts index 020734aba47b7..23a2beb2242f1 100644 --- a/packages/plugin-ext/src/main/browser/documents-main.ts +++ b/packages/plugin-ext/src/main/browser/documents-main.ts @@ -23,10 +23,10 @@ import { EditorModelService } from './text-editor-model-service'; import { UntitledResourceResolver } from './editor/untitled-resource'; import { EditorManager, EditorOpenerOptions } from '@theia/editor/lib/browser'; import URI from '@theia/core/lib/common/uri'; -import { URI as CodeURI } from 'vscode-uri'; +import { URI as CodeURI } from '@theia/core/shared/vscode-uri'; import { ApplicationShell, Saveable } from '@theia/core/lib/browser'; import { TextDocumentShowOptions } from '../../common/plugin-api-rpc-model'; -import { Range } from 'vscode-languageserver-types'; +import { Range } from '@theia/core/shared/vscode-languageserver-types'; import { OpenerService } from '@theia/core/lib/browser/opener-service'; import { Reference } from '@theia/core/lib/common/reference'; import { dispose } from '../../common/disposable-util'; @@ -157,12 +157,12 @@ export class DocumentsMainImpl implements DocumentsMain, Disposable { eol: e.eol, versionId: e.versionId, changes: e.changes.map(c => - ({ - text: c.text, - range: c.range, - rangeLength: c.rangeLength, - rangeOffset: c.rangeOffset - })) + ({ + text: c.text, + range: c.range, + rangeLength: c.rangeLength, + rangeOffset: c.rangeOffset + })) }, model.dirty) ), Disposable.create(() => this.syncedModels.delete(key)) diff --git a/packages/plugin-ext/src/main/browser/editor/untitled-resource.ts b/packages/plugin-ext/src/main/browser/editor/untitled-resource.ts index 19c7240dbb782..8c2dcb7852fd7 100644 --- a/packages/plugin-ext/src/main/browser/editor/untitled-resource.ts +++ b/packages/plugin-ext/src/main/browser/editor/untitled-resource.ts @@ -15,12 +15,12 @@ ********************************************************************************/ import { Emitter, Event } from '@theia/core/lib/common/event'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Resource, ResourceResolver, ResourceVersion, ResourceSaveOptions } from '@theia/core/lib/common/resource'; import URI from '@theia/core/lib/common/uri'; import { Schemes } from '../../../common/uri-components'; import { FileResource, FileResourceResolver } from '@theia/filesystem/lib/browser'; -import { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; +import { TextDocumentContentChangeEvent } from '@theia/core/shared/vscode-languageserver-protocol'; let index = 0; diff --git a/packages/plugin-ext/src/main/browser/editors-and-documents-main.ts b/packages/plugin-ext/src/main/browser/editors-and-documents-main.ts index 76d32d4ecc17c..720b18f16558c 100644 --- a/packages/plugin-ext/src/main/browser/editors-and-documents-main.ts +++ b/packages/plugin-ext/src/main/browser/editors-and-documents-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { RPCProtocol } from '../../common/rpc-protocol'; import { MAIN_RPC_CONTEXT, diff --git a/packages/plugin-ext/src/main/browser/env-main.ts b/packages/plugin-ext/src/main/browser/env-main.ts index 55fd26eafcba2..665f06904c408 100644 --- a/packages/plugin-ext/src/main/browser/env-main.ts +++ b/packages/plugin-ext/src/main/browser/env-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { RPCProtocol } from '../../common/rpc-protocol'; import { EnvMain } from '../../common/plugin-api-rpc'; diff --git a/packages/plugin-ext/src/main/browser/file-system-main-impl.ts b/packages/plugin-ext/src/main/browser/file-system-main-impl.ts index 416ff7f690490..e1893ae99b6e2 100644 --- a/packages/plugin-ext/src/main/browser/file-system-main-impl.ts +++ b/packages/plugin-ext/src/main/browser/file-system-main-impl.ts @@ -23,8 +23,8 @@ /* eslint-disable @typescript-eslint/tslint/config */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { URI } from 'vscode-uri'; -import { interfaces } from 'inversify'; +import { URI } from '@theia/core/shared/vscode-uri'; +import { interfaces } from '@theia/core/shared/inversify'; import CoreURI from '@theia/core/lib/common/uri'; import { BinaryBuffer } from '@theia/core/lib/common/buffer'; import { Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/keybindings/keybindings-contribution-handler.ts b/packages/plugin-ext/src/main/browser/keybindings/keybindings-contribution-handler.ts index 2cd13363a57af..70c818d091380 100644 --- a/packages/plugin-ext/src/main/browser/keybindings/keybindings-contribution-handler.ts +++ b/packages/plugin-ext/src/main/browser/keybindings/keybindings-contribution-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PluginContribution, Keybinding as PluginKeybinding } from '../../../common'; import { Keybinding } from '@theia/core/lib/common/keybinding'; import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding'; diff --git a/packages/plugin-ext/src/main/browser/label-service-main.ts b/packages/plugin-ext/src/main/browser/label-service-main.ts index cba58d52e56b2..5305d1b28c07d 100644 --- a/packages/plugin-ext/src/main/browser/label-service-main.ts +++ b/packages/plugin-ext/src/main/browser/label-service-main.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { LabelServiceMain } from '../../common/plugin-api-rpc'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { DefaultUriLabelProviderContribution, LabelProviderContribution } from '@theia/core/lib/browser'; import { ContributionProvider } from '@theia/core/lib/common'; diff --git a/packages/plugin-ext/src/main/browser/languages-main.ts b/packages/plugin-ext/src/main/browser/languages-main.ts index c223814cd2c0b..23e714dd201d8 100644 --- a/packages/plugin-ext/src/main/browser/languages-main.ts +++ b/packages/plugin-ext/src/main/browser/languages-main.ts @@ -34,7 +34,7 @@ import { WorkspaceTextEditDto, PluginInfo } from '../../common/plugin-api-rpc'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { SerializedDocumentFilter, MarkerData, Range, RelatedInformation, MarkerSeverity, DocumentLink, WorkspaceSymbolParams, CodeAction, CompletionDto @@ -45,14 +45,14 @@ import CoreURI from '@theia/core/lib/common/uri'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { ProblemManager } from '@theia/markers/lib/browser'; -import * as vst from 'vscode-languageserver-types'; +import * as vst from '@theia/core/shared/vscode-languageserver-types'; import * as theia from '@theia/plugin'; import { UriComponents } from '../../common/uri-components'; import { CancellationToken } from '@theia/core/lib/common'; import { LanguageSelector, RelativePattern } from '@theia/callhierarchy/lib/common/language-selector'; import { CallHierarchyService, CallHierarchyServiceProvider, Caller, Definition } from '@theia/callhierarchy/lib/browser'; import { toDefinition, toUriComponents, fromDefinition, fromPosition, toCaller } from './callhierarchy/callhierarchy-type-converters'; -import { Position, DocumentUri } from 'vscode-languageserver-types'; +import { Position, DocumentUri } from '@theia/core/shared/vscode-languageserver-types'; import { ObjectIdentifier } from '../../common/object-identifier'; import { mixin } from '../../common/types'; import { relative } from '../../common/paths-util'; diff --git a/packages/plugin-ext/src/main/browser/main-context.ts b/packages/plugin-ext/src/main/browser/main-context.ts index dbd30180d0d00..f0592b0df5c04 100644 --- a/packages/plugin-ext/src/main/browser/main-context.ts +++ b/packages/plugin-ext/src/main/browser/main-context.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { CommandRegistryMainImpl } from './command-registry-main'; import { PreferenceRegistryMainImpl } from './preference-registry-main'; import { QuickOpenMainImpl } from './quick-open-main'; diff --git a/packages/plugin-ext/src/main/browser/main-file-system-event-service.ts b/packages/plugin-ext/src/main/browser/main-file-system-event-service.ts index d01cc0df912eb..37b3be90a2f64 100644 --- a/packages/plugin-ext/src/main/browser/main-file-system-event-service.ts +++ b/packages/plugin-ext/src/main/browser/main-file-system-event-service.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ // based on https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/src/vs/workbench/api/browser/mainThreadFileSystemEventService.ts -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { RPCProtocol } from '../../common/rpc-protocol'; import { MAIN_RPC_CONTEXT, FileSystemEvents } from '../../common/plugin-api-rpc'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/menus/menus-contribution-handler.ts b/packages/plugin-ext/src/main/browser/menus/menus-contribution-handler.ts index 3abfeae236c81..dd9a8d1a0e7d6 100644 --- a/packages/plugin-ext/src/main/browser/menus/menus-contribution-handler.ts +++ b/packages/plugin-ext/src/main/browser/menus/menus-contribution-handler.ts @@ -16,8 +16,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { URI as CodeUri } from 'vscode-uri'; -import { injectable, inject } from 'inversify'; +import { URI as CodeUri } from '@theia/core/shared/vscode-uri'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MenuPath, ILogger, CommandRegistry, Command, Mutable, MenuAction, SelectionService, CommandHandler, Disposable, DisposableCollection } from '@theia/core'; import { EDITOR_CONTEXT_MENU, EditorWidget } from '@theia/editor/lib/browser'; import { MenuModelRegistry } from '@theia/core/lib/common'; diff --git a/packages/plugin-ext/src/main/browser/message-registry-main.ts b/packages/plugin-ext/src/main/browser/message-registry-main.ts index 6d493a9b68385..988b65cf908d4 100644 --- a/packages/plugin-ext/src/main/browser/message-registry-main.ts +++ b/packages/plugin-ext/src/main/browser/message-registry-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { MessageService } from '@theia/core/lib/common/message-service'; import { MessageRegistryMain, MainMessageType, MainMessageOptions, MainMessageItem } from '../../common/plugin-api-rpc'; import { ModalNotification, MessageType } from './dialogs/modal-notification'; diff --git a/packages/plugin-ext/src/main/browser/notification-main.ts b/packages/plugin-ext/src/main/browser/notification-main.ts index 2568e0cfa6b32..9fbccc2b7640f 100644 --- a/packages/plugin-ext/src/main/browser/notification-main.ts +++ b/packages/plugin-ext/src/main/browser/notification-main.ts @@ -16,7 +16,7 @@ import { NotificationMain } from '../../common/plugin-api-rpc'; import { ProgressService, Progress, ProgressMessage } from '@theia/core/lib/common'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { RPCProtocol } from '../../common/rpc-protocol'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/output-channel-registry-main.ts b/packages/plugin-ext/src/main/browser/output-channel-registry-main.ts index 4face8d2d0086..d90f36a326dd4 100644 --- a/packages/plugin-ext/src/main/browser/output-channel-registry-main.ts +++ b/packages/plugin-ext/src/main/browser/output-channel-registry-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandService } from '@theia/core/lib/common/command'; import { OutputCommands } from '@theia/output/lib/browser/output-commands'; import { OutputChannelRegistryMain, PluginInfo } from '../../common/plugin-api-rpc'; diff --git a/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts b/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts index 02a79a025dd5f..589c37cf1bc4f 100644 --- a/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts +++ b/packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ITokenTypeMap, IEmbeddedLanguagesMap, StandardTokenType } from 'vscode-textmate'; import { TextmateRegistry, getEncodedLanguageId, MonacoTextmateService, GrammarDefinition } from '@theia/monaco/lib/browser/textmate'; import { MenusContributionPointHandler } from './menus/menus-contribution-handler'; diff --git a/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts b/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts index d6ac84bf19371..fe61bed3062ce 100644 --- a/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts +++ b/packages/plugin-ext/src/main/browser/plugin-ext-deploy-command.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { QuickOpenService, QuickOpenItem, QuickOpenModel, QuickOpenMode } from '@theia/core/lib/browser'; import { PluginServer } from '../../common'; import { Command } from '@theia/core/lib/common/command'; diff --git a/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts b/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts index d5e9618d6dee9..2082841d0c160 100644 --- a/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts +++ b/packages/plugin-ext/src/main/browser/plugin-ext-frontend-module.ts @@ -18,7 +18,7 @@ import '../../../src/main/style/status-bar.css'; import '../../../src/main/browser/style/index.css'; import '../../../src/main/browser/style/comments.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, WidgetFactory, bindViewContribution, ViewContainerIdentifier, ViewContainer, createTreeContainer, TreeImpl, TreeWidget, TreeModelImpl, LabelProviderContribution diff --git a/packages/plugin-ext/src/main/browser/plugin-ext-widget.tsx b/packages/plugin-ext/src/main/browser/plugin-ext-widget.tsx index eb763329c81d3..0d480b93c4b96 100644 --- a/packages/plugin-ext/src/main/browser/plugin-ext-widget.tsx +++ b/packages/plugin-ext/src/main/browser/plugin-ext-widget.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject, postConstruct } from 'inversify'; -import { Message } from '@phosphor/messaging'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { PluginMetadata } from '../../common/plugin-protocol'; import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget'; import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message'; diff --git a/packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts b/packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts index 984b8b4b64201..d32d319d845f1 100644 --- a/packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts +++ b/packages/plugin-ext/src/main/browser/plugin-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandRegistry, CommandContribution } from '@theia/core/lib/common'; import { PluginExtDeployCommandService } from './plugin-ext-deploy-command'; import { OpenUriCommandHandler } from './commands'; diff --git a/packages/plugin-ext/src/main/browser/plugin-frontend-view-contribution.ts b/packages/plugin-ext/src/main/browser/plugin-frontend-view-contribution.ts index 1153427bebc5b..5fdcf40a93da8 100644 --- a/packages/plugin-ext/src/main/browser/plugin-frontend-view-contribution.ts +++ b/packages/plugin-ext/src/main/browser/plugin-frontend-view-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { PluginWidget } from './plugin-ext-widget'; diff --git a/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts b/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts index 9b2a71e34c3e5..b98958fad617a 100644 --- a/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts +++ b/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts @@ -20,9 +20,9 @@ // some code is copied and modified from: // https://github.com/microsoft/vscode/blob/7cf4cca47aa025a590fc939af54932042302be63/src/vs/workbench/services/themes/browser/fileIconThemeData.ts -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); import * as jsoncparser from 'jsonc-parser'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { IconThemeService, IconTheme, IconThemeDefinition } from '@theia/core/lib/browser/icon-theme-service'; import { IconThemeContribution, DeployedPlugin, UiTheme, getPluginId } from '../../common/plugin-protocol'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/plugin-ext/src/main/browser/plugin-shared-style.ts b/packages/plugin-ext/src/main/browser/plugin-shared-style.ts index 58986f7c742a3..9f2ac49e18636 100644 --- a/packages/plugin-ext/src/main/browser/plugin-shared-style.ts +++ b/packages/plugin-ext/src/main/browser/plugin-shared-style.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { ThemeService, Theme } from '@theia/core/lib/browser/theming'; import { IconUrl } from '../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/main/browser/plugin-storage.ts b/packages/plugin-ext/src/main/browser/plugin-storage.ts index 4462b6fc32f6a..a00046997cb0a 100644 --- a/packages/plugin-ext/src/main/browser/plugin-storage.ts +++ b/packages/plugin-ext/src/main/browser/plugin-storage.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { StorageMain } from '../../common/plugin-api-rpc'; import { PluginServer, PluginStorageKind } from '../../common/plugin-protocol'; import { KeysToAnyValues, KeysToKeysToAnyValue } from '../../common/types'; diff --git a/packages/plugin-ext/src/main/browser/plugin-worker.ts b/packages/plugin-ext/src/main/browser/plugin-worker.ts index e277a174d99c3..590f8b90871b2 100644 --- a/packages/plugin-ext/src/main/browser/plugin-worker.ts +++ b/packages/plugin-ext/src/main/browser/plugin-worker.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { RPCProtocol, RPCProtocolImpl } from '../../common/rpc-protocol'; diff --git a/packages/plugin-ext/src/main/browser/preference-registry-main.ts b/packages/plugin-ext/src/main/browser/preference-registry-main.ts index ae943398d0321..b0ffddc560006 100644 --- a/packages/plugin-ext/src/main/browser/preference-registry-main.ts +++ b/packages/plugin-ext/src/main/browser/preference-registry-main.ts @@ -20,7 +20,7 @@ import { PreferenceScope, PreferenceProviderProvider } from '@theia/core/lib/browser/preferences'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { MAIN_RPC_CONTEXT, PreferenceRegistryExt, diff --git a/packages/plugin-ext/src/main/browser/quick-open-main.ts b/packages/plugin-ext/src/main/browser/quick-open-main.ts index fc8a19d448e30..e510cd935a776 100644 --- a/packages/plugin-ext/src/main/browser/quick-open-main.ts +++ b/packages/plugin-ext/src/main/browser/quick-open-main.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { InputBoxOptions, QuickPickItem as QuickPickItemExt } from '@theia/plugin'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { QuickOpenModel, QuickOpenItem, @@ -35,7 +35,7 @@ import { import { MonacoQuickOpenService } from '@theia/monaco/lib/browser/monaco-quick-open-service'; import { QuickInputService, LabelProvider } from '@theia/core/lib/browser'; import { PluginSharedStyle } from './plugin-shared-style'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { ThemeIcon, QuickInputButton } from '../../plugin/types-impl'; import { QuickPickService, QuickPickItem, QuickPickValue } from '@theia/core/lib/common/quick-pick-service'; import { QuickTitleBar } from '@theia/core/lib/browser/quick-open/quick-title-bar'; diff --git a/packages/plugin-ext/src/main/browser/scm-main.ts b/packages/plugin-ext/src/main/browser/scm-main.ts index 9143ce6480300..2b9b8c64abebd 100644 --- a/packages/plugin-ext/src/main/browser/scm-main.ts +++ b/packages/plugin-ext/src/main/browser/scm-main.ts @@ -32,11 +32,11 @@ import { ScmProvider, ScmResource, ScmResourceDecorations, ScmResourceGroup, Scm import { ScmRepository } from '@theia/scm/lib/browser/scm-repository'; import { ScmService } from '@theia/scm/lib/browser/scm-service'; import { RPCProtocol } from '../../common/rpc-protocol'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import URI from '@theia/core/lib/common/uri'; -import { URI as vscodeURI } from 'vscode-uri'; +import { URI as vscodeURI } from '@theia/core/shared/vscode-uri'; import { Splice } from '../../common/arrays'; import { UriComponents } from '../../common/uri-components'; import { ColorRegistry } from '@theia/core/lib/browser/color-registry'; @@ -167,7 +167,7 @@ export class PluginScmProvider implements ScmProvider { } registerGroups(resourceGroups: ScmRawResourceGroup[]): void { - const groups = resourceGroups.map( resourceGroup => { + const groups = resourceGroups.map(resourceGroup => { const { handle, id, label, features } = resourceGroup; const group = new PluginScmResourceGroup( handle, @@ -281,7 +281,7 @@ export class ScmMainImpl implements ScmMain { private readonly disposables = new DisposableCollection(); private readonly colors: ColorRegistry; - constructor( rpc: RPCProtocol, container: interfaces.Container) { + constructor(rpc: RPCProtocol, container: interfaces.Container) { this.proxy = rpc.getProxy(MAIN_RPC_CONTEXT.SCM_EXT); this.scmService = container.get(ScmService); this.colors = container.get(ColorRegistry); @@ -300,13 +300,13 @@ export class ScmMainImpl implements ScmMain { async $registerSourceControl(handle: number, id: string, label: string, rootUri: UriComponents | undefined): Promise { const provider = new PluginScmProvider(this.proxy, this.colors, handle, id, label, rootUri ? vscodeURI.revive(rootUri) : undefined); const repository = this.scmService.registerScmProvider(provider, { - input: { - validator: async value => { - const result = await this.proxy.$validateInput(handle, value, value.length); - return result && { message: result[0], type: result[1] }; - } + input: { + validator: async value => { + const result = await this.proxy.$validateInput(handle, value, value.length); + return result && { message: result[0], type: result[1] }; } } + } ); this.repositories.set(handle, repository); diff --git a/packages/plugin-ext/src/main/browser/selection-provider-command.ts b/packages/plugin-ext/src/main/browser/selection-provider-command.ts index ebe41362158d9..554ad4110fa9a 100644 --- a/packages/plugin-ext/src/main/browser/selection-provider-command.ts +++ b/packages/plugin-ext/src/main/browser/selection-provider-command.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { UriAwareCommandHandler, UriCommandHandler } from '@theia/core/lib/common/uri-command-handler'; import URI from '@theia/core/lib/common/uri'; import { SelectionService } from '@theia/core'; diff --git a/packages/plugin-ext/src/main/browser/status-bar-message-registry-main.ts b/packages/plugin-ext/src/main/browser/status-bar-message-registry-main.ts index 634e5887c591c..9a0fb30fe9473 100644 --- a/packages/plugin-ext/src/main/browser/status-bar-message-registry-main.ts +++ b/packages/plugin-ext/src/main/browser/status-bar-message-registry-main.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import * as types from '../../plugin/types-impl'; import { StatusBarMessageRegistryMain } from '../../common/plugin-api-rpc'; @@ -45,7 +45,7 @@ export class StatusBarMessageRegistryMainImpl implements StatusBarMessageRegistr color: string | undefined, tooltip: string | undefined, command: string | undefined, - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any args: any[] | undefined): Promise { const entry = { text: text || '', diff --git a/packages/plugin-ext/src/main/browser/tasks-main.ts b/packages/plugin-ext/src/main/browser/tasks-main.ts index 925ff01c4b4b5..28e1e83504225 100644 --- a/packages/plugin-ext/src/main/browser/tasks-main.ts +++ b/packages/plugin-ext/src/main/browser/tasks-main.ts @@ -24,7 +24,7 @@ import { import { RPCProtocol } from '../../common/rpc-protocol'; import { Disposable, DisposableCollection } from '@theia/core/lib/common'; import { TaskProviderRegistry, TaskResolverRegistry, TaskProvider, TaskResolver } from '@theia/task/lib/browser/task-contribution'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { TaskInfo, TaskExitedEvent, TaskConfiguration, TaskCustomization } from '@theia/task/lib/common/task-protocol'; import { TaskWatcher } from '@theia/task/lib/common/task-watcher'; import { TaskService } from '@theia/task/lib/browser/task-service'; diff --git a/packages/plugin-ext/src/main/browser/terminal-main.ts b/packages/plugin-ext/src/main/browser/terminal-main.ts index 44935781303a7..9ab198ce42281 100644 --- a/packages/plugin-ext/src/main/browser/terminal-main.ts +++ b/packages/plugin-ext/src/main/browser/terminal-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ApplicationShell, WidgetOpenerOptions } from '@theia/core/lib/browser'; import { TerminalOptions } from '@theia/plugin'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; diff --git a/packages/plugin-ext/src/main/browser/text-editor-model-service.ts b/packages/plugin-ext/src/main/browser/text-editor-model-service.ts index 2a38f48c2c1c1..90f6d058ca2fc 100644 --- a/packages/plugin-ext/src/main/browser/text-editor-model-service.ts +++ b/packages/plugin-ext/src/main/browser/text-editor-model-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { Event, Emitter } from '@theia/core'; import { MonacoEditorModel, WillSaveMonacoModelEvent } from '@theia/monaco/lib/browser/monaco-editor-model'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service'; import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace'; import { Schemes } from '../../common/uri-components'; diff --git a/packages/plugin-ext/src/main/browser/text-editors-main.ts b/packages/plugin-ext/src/main/browser/text-editors-main.ts index bd69867109a4c..29975182a8586 100644 --- a/packages/plugin-ext/src/main/browser/text-editors-main.ts +++ b/packages/plugin-ext/src/main/browser/text-editors-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { TextEditorsMain, MAIN_RPC_CONTEXT, diff --git a/packages/plugin-ext/src/main/browser/timeline-main.ts b/packages/plugin-ext/src/main/browser/timeline-main.ts index ac21e0d96ff93..0190d213e8a1d 100644 --- a/packages/plugin-ext/src/main/browser/timeline-main.ts +++ b/packages/plugin-ext/src/main/browser/timeline-main.ts @@ -13,12 +13,12 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { TimelineMain } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; import { TimelineService } from '@theia/timeline/lib/browser/timeline-service'; import { Emitter } from '@theia/core/lib/common'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { MAIN_RPC_CONTEXT, TimelineExt } from '../../common/plugin-api-rpc'; import { InternalTimelineOptions, diff --git a/packages/plugin-ext/src/main/browser/view-column-service.ts b/packages/plugin-ext/src/main/browser/view-column-service.ts index aad11a196eb6e..a6618a0c71273 100644 --- a/packages/plugin-ext/src/main/browser/view-column-service.ts +++ b/packages/plugin-ext/src/main/browser/view-column-service.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell'; -import { toArray } from '@phosphor/algorithm'; -import { TabBar, Widget } from '@phosphor/widgets'; +import { toArray } from '@theia/core/shared/@phosphor/algorithm'; +import { TabBar, Widget } from '@theia/core/shared/@phosphor/widgets'; @injectable() export class ViewColumnService { diff --git a/packages/plugin-ext/src/main/browser/view/plugin-tree-view-node-label-provider.ts b/packages/plugin-ext/src/main/browser/view/plugin-tree-view-node-label-provider.ts index 8518a69119121..aa02de38cbffa 100644 --- a/packages/plugin-ext/src/main/browser/view/plugin-tree-view-node-label-provider.ts +++ b/packages/plugin-ext/src/main/browser/view/plugin-tree-view-node-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { LabelProviderContribution, LabelProvider, URIIconReference } from '@theia/core/lib/browser/label-provider'; import { TreeLabelProvider } from '@theia/core/lib/browser/tree/tree-label-provider'; diff --git a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts index b649741bac27e..7d673e179cfae 100644 --- a/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts +++ b/packages/plugin-ext/src/main/browser/view/plugin-view-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ApplicationShell, ViewContainer as ViewContainerWidget, WidgetManager, ViewContainerIdentifier, ViewContainerTitleOptions, Widget, FrontendApplicationContribution, diff --git a/packages/plugin-ext/src/main/browser/view/plugin-view-widget.ts b/packages/plugin-ext/src/main/browser/view/plugin-view-widget.ts index 3f22cd274108c..7d2f486f547da 100644 --- a/packages/plugin-ext/src/main/browser/view/plugin-view-widget.ts +++ b/packages/plugin-ext/src/main/browser/view/plugin-view-widget.ts @@ -14,13 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; -import { Panel, Widget } from '@phosphor/widgets'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; +import { Panel, Widget } from '@theia/core/shared/@phosphor/widgets'; import { MenuModelRegistry } from '@theia/core/lib/common/menu'; import { CommandRegistry } from '@theia/core/lib/common/command'; import { ViewContextKeyService } from './view-context-key-service'; import { StatefulWidget } from '@theia/core/lib/browser/shell/shell-layout-restorer'; -import { Message } from '@phosphor/messaging'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { TreeViewWidget } from './tree-view-widget'; @injectable() diff --git a/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx b/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx index 6cee8cfd66140..cfb5468717370 100644 --- a/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx +++ b/packages/plugin-ext/src/main/browser/view/tree-view-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; -import { injectable, inject, postConstruct } from 'inversify'; +import { URI } from '@theia/core/shared/vscode-uri'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeViewsExt, TreeViewSelection } from '../../../common/plugin-api-rpc'; import { Command } from '../../../common/plugin-api-rpc-model'; import { @@ -33,7 +33,7 @@ import { } from '@theia/core/lib/browser'; import { TreeViewItem, TreeViewItemCollapsibleState } from '../../../common/plugin-api-rpc'; import { MenuPath, MenuModelRegistry, ActionMenuNode } from '@theia/core/lib/common/menu'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { PluginSharedStyle } from '../plugin-shared-style'; import { ViewContextKeyService } from './view-context-key-service'; import { Widget } from '@theia/core/lib/browser/widgets/widget'; diff --git a/packages/plugin-ext/src/main/browser/view/tree-views-main.ts b/packages/plugin-ext/src/main/browser/view/tree-views-main.ts index 3b646e2402f49..67aa6a3a1a753 100644 --- a/packages/plugin-ext/src/main/browser/view/tree-views-main.ts +++ b/packages/plugin-ext/src/main/browser/view/tree-views-main.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { MAIN_RPC_CONTEXT, TreeViewsMain, TreeViewsExt, TreeViewRevealOptions } from '../../../common/plugin-api-rpc'; import { RPCProtocol } from '../../../common/rpc-protocol'; import { PluginViewRegistry, PLUGIN_VIEW_DATA_FACTORY_ID } from './plugin-view-registry'; diff --git a/packages/plugin-ext/src/main/browser/view/view-context-key-service.ts b/packages/plugin-ext/src/main/browser/view/view-context-key-service.ts index ab3c98dc3898b..75f906e583844 100644 --- a/packages/plugin-ext/src/main/browser/view/view-context-key-service.ts +++ b/packages/plugin-ext/src/main/browser/view/view-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct, inject } from 'inversify'; +import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'; import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/plugin-ext/src/main/browser/webview/webview-environment.ts b/packages/plugin-ext/src/main/browser/webview/webview-environment.ts index aa3657ee14196..e56175c295cdc 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview-environment.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview-environment.ts @@ -14,13 +14,13 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Endpoint } from '@theia/core/lib/browser/endpoint'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import URI from '@theia/core/lib/common/uri'; import { WebviewExternalEndpoint } from '../../common/webview-protocol'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; @injectable() export class WebviewEnvironment { diff --git a/packages/plugin-ext/src/main/browser/webview/webview-preferences.ts b/packages/plugin-ext/src/main/browser/webview/webview-preferences.ts index 9935db33803d6..c15689d35da73 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview-preferences.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/plugin-ext/src/main/browser/webview/webview-resource-cache.ts b/packages/plugin-ext/src/main/browser/webview/webview-resource-cache.ts index 816dd219333dd..df95bb4a96e3a 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview-resource-cache.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview-resource-cache.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { MaybePromise } from '@theia/core/lib/common/types'; diff --git a/packages/plugin-ext/src/main/browser/webview/webview-theme-data-provider.ts b/packages/plugin-ext/src/main/browser/webview/webview-theme-data-provider.ts index 8afc728f4c060..394b1d5291740 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview-theme-data-provider.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview-theme-data-provider.ts @@ -19,7 +19,7 @@ *--------------------------------------------------------------------------------------------*/ // copied and modified from https://github.com/microsoft/vscode/blob/ba40bd16433d5a817bfae15f3b4350e18f144af4/src/vs/workbench/contrib/webview/common/themeing.ts -import { inject, postConstruct, injectable } from 'inversify'; +import { inject, postConstruct, injectable } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; import { EditorPreferences, EditorConfiguration } from '@theia/editor/lib/browser/editor-preferences'; import { ThemeService } from '@theia/core/lib/browser/theming'; diff --git a/packages/plugin-ext/src/main/browser/webview/webview-widget-factory.ts b/packages/plugin-ext/src/main/browser/webview/webview-widget-factory.ts index 4e2bf3f88dbdb..ed903585d165a 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview-widget-factory.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview-widget-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { WebviewWidget, WebviewWidgetIdentifier, WebviewWidgetExternalEndpoint } from './webview'; import { WebviewEnvironment } from './webview-environment'; diff --git a/packages/plugin-ext/src/main/browser/webview/webview.ts b/packages/plugin-ext/src/main/browser/webview/webview.ts index 6960e2be4d821..de4f97788a3f9 100644 --- a/packages/plugin-ext/src/main/browser/webview/webview.ts +++ b/packages/plugin-ext/src/main/browser/webview/webview.ts @@ -21,8 +21,8 @@ // copied and modified from https://github.com/microsoft/vscode/blob/ba40bd16433d5a817bfae15f3b4350e18f144af4/src/vs/workbench/contrib/webview/browser/webviewElement.ts# import * as mime from 'mime'; -import { JSONExt } from '@phosphor/coreutils/lib/json'; -import { injectable, inject, postConstruct } from 'inversify'; +import { JSONExt } from '@theia/core/shared/@phosphor/coreutils'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { WebviewPanelOptions, WebviewPortMapping } from '@theia/plugin'; import { BaseWidget, Message } from '@theia/core/lib/browser/widgets/widget'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/plugin-ext/src/main/browser/webviews-main.ts b/packages/plugin-ext/src/main/browser/webviews-main.ts index d68480a85708b..0efca500146d9 100644 --- a/packages/plugin-ext/src/main/browser/webviews-main.ts +++ b/packages/plugin-ext/src/main/browser/webviews-main.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import debounce = require('lodash.debounce'); -import { URI } from 'vscode-uri'; -import { interfaces } from 'inversify'; +import debounce = require('@theia/core/shared/lodash.debounce'); +import { URI } from '@theia/core/shared/vscode-uri'; +import { interfaces } from '@theia/core/shared/inversify'; import { WebviewsMain, MAIN_RPC_CONTEXT, WebviewsExt, WebviewPanelViewState } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; import { WebviewOptions, WebviewPanelOptions, WebviewPanelShowOptions } from '@theia/plugin'; @@ -25,7 +25,7 @@ import { WebviewWidget, WebviewWidgetIdentifier } from './webview/webview'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { ViewColumnService } from './view-column-service'; import { WidgetManager } from '@theia/core/lib/browser/widget-manager'; -import { JSONExt } from '@phosphor/coreutils/lib/json'; +import { JSONExt } from '@theia/core/shared/@phosphor/coreutils'; import { Mutable } from '@theia/core/lib/common/types'; import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin'; import { IconUrl } from '../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/main/browser/window-state-main.ts b/packages/plugin-ext/src/main/browser/window-state-main.ts index 4cd6bef57c157..857adea3088c4 100644 --- a/packages/plugin-ext/src/main/browser/window-state-main.ts +++ b/packages/plugin-ext/src/main/browser/window-state-main.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import CoreURI from '@theia/core/lib/common/uri'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { WindowStateExt, MAIN_RPC_CONTEXT, WindowMain } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; import { UriComponents } from '../../common/uri-components'; diff --git a/packages/plugin-ext/src/main/browser/workspace-main.ts b/packages/plugin-ext/src/main/browser/workspace-main.ts index b3816c960afb1..7ed3e0a96adb0 100644 --- a/packages/plugin-ext/src/main/browser/workspace-main.ts +++ b/packages/plugin-ext/src/main/browser/workspace-main.ts @@ -15,10 +15,10 @@ ********************************************************************************/ import * as theia from '@theia/plugin'; -import { interfaces, injectable } from 'inversify'; +import { interfaces, injectable } from '@theia/core/shared/inversify'; import { WorkspaceExt, StorageExt, MAIN_RPC_CONTEXT, WorkspaceMain, WorkspaceFolderPickOptionsMain } from '../../common/plugin-api-rpc'; import { RPCProtocol } from '../../common/rpc-protocol'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; import { UriComponents } from '../../common/uri-components'; import { QuickOpenModel, QuickOpenItem, QuickOpenMode } from '@theia/core/lib/browser/quick-open/quick-open-model'; import { MonacoQuickOpenService } from '@theia/monaco/lib/browser/monaco-quick-open-service'; diff --git a/packages/plugin-ext/src/main/common/plugin-theia-environment.ts b/packages/plugin-ext/src/main/common/plugin-theia-environment.ts index c4958ea6bce4b..607ecdc4c37ff 100644 --- a/packages/plugin-ext/src/main/common/plugin-theia-environment.ts +++ b/packages/plugin-ext/src/main/common/plugin-theia-environment.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/plugin-ext/src/main/electron-browser/plugin-ext-frontend-electron-module.ts b/packages/plugin-ext/src/main/electron-browser/plugin-ext-frontend-electron-module.ts index 2a89707ebe024..8c4f8fdc0b159 100644 --- a/packages/plugin-ext/src/main/electron-browser/plugin-ext-frontend-electron-module.ts +++ b/packages/plugin-ext/src/main/electron-browser/plugin-ext-frontend-electron-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { WebviewWidgetFactory } from '../browser/webview/webview-widget-factory'; import { CustomEditorWidgetFactory } from '../browser/custom-editors/custom-editor-widget-factory'; import { ElectronCustomEditorWidgetFactory, ElectronWebviewWidgetFactory } from './webview/electron-webview-widget-factory'; diff --git a/packages/plugin-ext/src/main/electron-browser/webview/electron-webview-widget-factory.ts b/packages/plugin-ext/src/main/electron-browser/webview/electron-webview-widget-factory.ts index 7230af0eff04a..22d98ca9db393 100644 --- a/packages/plugin-ext/src/main/electron-browser/webview/electron-webview-widget-factory.ts +++ b/packages/plugin-ext/src/main/electron-browser/webview/electron-webview-widget-factory.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { remote } from 'electron'; +import { remote } from '@theia/core/shared/electron'; import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token'; import { WebviewWidgetFactory } from '../../browser/webview/webview-widget-factory'; import { WebviewWidgetIdentifier, WebviewWidget } from '../../browser/webview/webview'; diff --git a/packages/plugin-ext/src/main/node/handlers/plugin-theia-directory-handler.ts b/packages/plugin-ext/src/main/node/handlers/plugin-theia-directory-handler.ts index d70c6ecaf94ed..2106ae12552cd 100644 --- a/packages/plugin-ext/src/main/node/handlers/plugin-theia-directory-handler.ts +++ b/packages/plugin-ext/src/main/node/handlers/plugin-theia-directory-handler.ts @@ -19,7 +19,7 @@ import { PluginDeployerEntry, PluginPackage, PluginDeployerDirectoryHandlerContext, PluginDeployerEntryType } from '../../../common/plugin-protocol'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts b/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts index 1b28e5ae53585..38a89af5793ce 100644 --- a/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts +++ b/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts @@ -15,9 +15,9 @@ ********************************************************************************/ import { PluginDeployerFileHandler, PluginDeployerEntry, PluginDeployerFileHandlerContext, PluginType } from '../../../common/plugin-protocol'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { getTempDir } from '../temp-dir-util'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as filenamify from 'filenamify'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { PluginTheiaEnvironment } from '../../common/plugin-theia-environment'; diff --git a/packages/plugin-ext/src/main/node/paths/plugin-paths-service.ts b/packages/plugin-ext/src/main/node/paths/plugin-paths-service.ts index ff6bc760ba33e..e94b7065e2574 100644 --- a/packages/plugin-ext/src/main/node/paths/plugin-paths-service.ts +++ b/packages/plugin-ext/src/main/node/paths/plugin-paths-service.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import * as path from 'path'; -import * as fs from 'fs-extra'; -import { readdir, remove } from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; +import { readdir, remove } from '@theia/core/shared/fs-extra'; import * as crypto from 'crypto'; import { ILogger } from '@theia/core'; import { FileUri } from '@theia/core/lib/node'; diff --git a/packages/plugin-ext/src/main/node/plugin-cli-contribution.ts b/packages/plugin-ext/src/main/node/plugin-cli-contribution.ts index 614c63bc4ce54..72ec53973cb4e 100644 --- a/packages/plugin-ext/src/main/node/plugin-cli-contribution.ts +++ b/packages/plugin-ext/src/main/node/plugin-cli-contribution.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import { Argv, Arguments } from 'yargs'; +import { injectable } from '@theia/core/shared/inversify'; +import { Argv, Arguments } from '@theia/core/shared/yargs'; import { CliContribution } from '@theia/core/lib/node/cli'; import { LocalDirectoryPluginDeployerResolver } from './resolvers/local-directory-plugin-deployer-resolver'; diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts b/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts index cae9ed0363dd5..1a0adc3f22377 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { BackendApplicationContribution } from '@theia/core/lib/node'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PluginDeployer } from '../../common/plugin-protocol'; import { ILogger } from '@theia/core'; diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts b/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts index 8b1d5a89a3781..80ef8372eff5d 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-impl.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, optional, multiInject, inject, named } from 'inversify'; +import { injectable, optional, multiInject, inject, named } from '@theia/core/shared/inversify'; import { PluginDeployerResolver, PluginDeployerFileHandler, PluginDeployerDirectoryHandler, PluginDeployerEntry, PluginDeployer, PluginDeployerParticipant, PluginDeployerStartContext, diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-proxy-entry-impl.ts b/packages/plugin-ext/src/main/node/plugin-deployer-proxy-entry-impl.ts index f244d3d13b38d..52e8f5e25733d 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-proxy-entry-impl.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-proxy-entry-impl.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginDeployerEntry, PluginDeployerEntryType, PluginType } from '../../common/plugin-protocol'; import { PluginDeployerEntryImpl } from './plugin-deployer-entry-impl'; diff --git a/packages/plugin-ext/src/main/node/plugin-ext-backend-module.ts b/packages/plugin-ext/src/main/node/plugin-ext-backend-module.ts index 986a43c071ed8..f490d71e5adfc 100644 --- a/packages/plugin-ext/src/main/node/plugin-ext-backend-module.ts +++ b/packages/plugin-ext/src/main/node/plugin-ext-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { PluginApiContribution } from './plugin-service'; import { BackendApplicationContribution, CliContribution } from '@theia/core/lib/node'; import { WsRequestValidatorContribution } from '@theia/core/lib/node/ws-request-validators'; diff --git a/packages/plugin-ext/src/main/node/plugin-github-resolver.ts b/packages/plugin-ext/src/main/node/plugin-github-resolver.ts index cee6a98a76d04..285ffc6471db3 100644 --- a/packages/plugin-ext/src/main/node/plugin-github-resolver.ts +++ b/packages/plugin-ext/src/main/node/plugin-github-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; diff --git a/packages/plugin-ext/src/main/node/plugin-http-resolver.ts b/packages/plugin-ext/src/main/node/plugin-http-resolver.ts index 4fe923ef3560e..c41203815d753 100644 --- a/packages/plugin-ext/src/main/node/plugin-http-resolver.ts +++ b/packages/plugin-ext/src/main/node/plugin-http-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; diff --git a/packages/plugin-ext/src/main/node/plugin-server-handler.ts b/packages/plugin-ext/src/main/node/plugin-server-handler.ts index 46dcb21ad2cc2..c28a58f1b4a60 100644 --- a/packages/plugin-ext/src/main/node/plugin-server-handler.ts +++ b/packages/plugin-ext/src/main/node/plugin-server-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; import { PluginDeployerImpl } from './plugin-deployer-impl'; import { PluginsKeyValueStorage } from './plugins-key-value-storage'; diff --git a/packages/plugin-ext/src/main/node/plugin-service.ts b/packages/plugin-ext/src/main/node/plugin-service.ts index d2de54b578763..3055a1647d072 100644 --- a/packages/plugin-ext/src/main/node/plugin-service.ts +++ b/packages/plugin-ext/src/main/node/plugin-service.ts @@ -18,11 +18,11 @@ import * as http from 'http'; import * as path from 'path'; import * as url from 'url'; const vhost = require('vhost'); -import * as express from 'express'; +import * as express from '@theia/core/shared/express'; import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application'; -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import { WebviewExternalEndpoint } from '../common/webview-protocol'; -import { environment } from '@theia/application-package/lib/environment'; +import { environment } from '@theia/core/shared/@theia/application-package/lib/environment'; import { WsRequestValidatorContribution } from '@theia/core/lib/node/ws-request-validators'; import { MaybePromise } from '@theia/core/lib/common'; diff --git a/packages/plugin-ext/src/main/node/plugin-theia-deployer-participant.ts b/packages/plugin-ext/src/main/node/plugin-theia-deployer-participant.ts index a2b39cfe62d1a..fc4a4493c4810 100644 --- a/packages/plugin-ext/src/main/node/plugin-theia-deployer-participant.ts +++ b/packages/plugin-ext/src/main/node/plugin-theia-deployer-participant.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PluginTheiaEnvironment } from '../common/plugin-theia-environment'; import { PluginDeployerParticipant, PluginDeployerStartContext } from '../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts b/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts index e3710fc05810c..4ab7c1ed44188 100644 --- a/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts +++ b/packages/plugin-ext/src/main/node/plugins-key-value-storage.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; -import * as fs from 'fs-extra'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { Deferred } from '@theia/core/lib/common/promise-util'; diff --git a/packages/plugin-ext/src/main/node/resolvers/local-directory-plugin-deployer-resolver.ts b/packages/plugin-ext/src/main/node/resolvers/local-directory-plugin-deployer-resolver.ts index 6e0ea92da99e3..012737da1615e 100644 --- a/packages/plugin-ext/src/main/node/resolvers/local-directory-plugin-deployer-resolver.ts +++ b/packages/plugin-ext/src/main/node/resolvers/local-directory-plugin-deployer-resolver.ts @@ -15,8 +15,8 @@ ********************************************************************************/ import { PluginDeployerResolverContext } from '../../../common/plugin-protocol'; -import { injectable } from 'inversify'; -import * as fs from 'fs-extra'; +import { injectable } from '@theia/core/shared/inversify'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver'; diff --git a/packages/plugin-ext/src/main/node/resolvers/local-file-plugin-deployer-resolver.ts b/packages/plugin-ext/src/main/node/resolvers/local-file-plugin-deployer-resolver.ts index 9635024ddf0b3..0ee80aa232cd9 100644 --- a/packages/plugin-ext/src/main/node/resolvers/local-file-plugin-deployer-resolver.ts +++ b/packages/plugin-ext/src/main/node/resolvers/local-file-plugin-deployer-resolver.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { PluginDeployerResolverContext } from '../../../common/plugin-protocol'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import * as path from 'path'; import { LocalPluginDeployerResolver } from './local-plugin-deployer-resolver'; diff --git a/packages/plugin-ext/src/main/node/resolvers/local-plugin-deployer-resolver.ts b/packages/plugin-ext/src/main/node/resolvers/local-plugin-deployer-resolver.ts index 8eaa16688feb6..55555716fbfbc 100644 --- a/packages/plugin-ext/src/main/node/resolvers/local-plugin-deployer-resolver.ts +++ b/packages/plugin-ext/src/main/node/resolvers/local-plugin-deployer-resolver.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginDeployerResolver, PluginDeployerResolverContext } from '../../../common/plugin-protocol'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import * as path from 'path'; import { FileUri } from '@theia/core/lib/node'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/plugin-ext/src/plugin-ext-backend-electron-module.ts b/packages/plugin-ext/src/plugin-ext-backend-electron-module.ts index 29f289c48210f..8f2680152cf03 100644 --- a/packages/plugin-ext/src/plugin-ext-backend-electron-module.ts +++ b/packages/plugin-ext/src/plugin-ext-backend-electron-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindElectronBackend } from './hosted/node-electron/plugin-ext-hosted-electron-backend-module'; import { bindMainBackend } from './main/node/plugin-ext-backend-module'; diff --git a/packages/plugin-ext/src/plugin-ext-backend-module.ts b/packages/plugin-ext/src/plugin-ext-backend-module.ts index 7af37cde2a01a..9f61c271a8d8a 100644 --- a/packages/plugin-ext/src/plugin-ext-backend-module.ts +++ b/packages/plugin-ext/src/plugin-ext-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindHostedBackend } from './hosted/node/plugin-ext-hosted-backend-module'; import { bindMainBackend } from './main/node/plugin-ext-backend-module'; diff --git a/packages/plugin-ext/src/plugin/comments.ts b/packages/plugin-ext/src/plugin/comments.ts index db0517aed0d06..e150141f53e17 100644 --- a/packages/plugin-ext/src/plugin/comments.ts +++ b/packages/plugin-ext/src/plugin/comments.ts @@ -18,7 +18,7 @@ import * as theia from '@theia/plugin'; import { RPCProtocol } from '../common/rpc-protocol'; import { CommandRegistryImpl } from './command-registry'; import { UriComponents } from '../common/uri-components'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Range, Comment, diff --git a/packages/plugin-ext/src/plugin/custom-editors.ts b/packages/plugin-ext/src/plugin/custom-editors.ts index 9419d0bb86820..63b21b4db870a 100644 --- a/packages/plugin-ext/src/plugin/custom-editors.ts +++ b/packages/plugin-ext/src/plugin/custom-editors.ts @@ -23,7 +23,7 @@ import { CustomEditorsExt, CustomEditorsMain, PLUGIN_RPC_CONTEXT } from '../comm import * as theia from '@theia/plugin'; import { RPCProtocol } from '../common/rpc-protocol'; import { Plugin } from '../common/plugin-api-rpc'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { UriComponents } from '../common/uri-components'; import { DocumentsExtImpl } from './documents'; import { WebviewImpl, WebviewsExtImpl } from './webviews'; diff --git a/packages/plugin-ext/src/plugin/decorations.ts b/packages/plugin-ext/src/plugin/decorations.ts index b1b64c04ede38..59e50e3c78a85 100644 --- a/packages/plugin-ext/src/plugin/decorations.ts +++ b/packages/plugin-ext/src/plugin/decorations.ts @@ -24,7 +24,7 @@ import { } from '../common/plugin-api-rpc'; import { Event } from '@theia/core/lib/common/event'; import { RPCProtocol } from '../common/rpc-protocol'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Disposable } from './types-impl'; export class DecorationsExtImpl implements DecorationsExt { @@ -39,7 +39,7 @@ export class DecorationsExtImpl implements DecorationsExt { } registerDecorationProvider(provider: theia.DecorationProvider): Disposable { - const id = DecorationsExtImpl.PROVIDER_ID ++; + const id = DecorationsExtImpl.PROVIDER_ID++; provider.onDidChangeDecorations(arg => { let argument; if (Array.isArray(arg)) { @@ -72,7 +72,7 @@ export class DecorationsExtImpl implements DecorationsExt { }; this.proxy.$registerDecorationProvider(id, providerMain); this.providersMap.set(id, providerMain); - return new Disposable( () => { + return new Disposable(() => { this.proxy.$dispose(id); }); } diff --git a/packages/plugin-ext/src/plugin/dialogs.ts b/packages/plugin-ext/src/plugin/dialogs.ts index a8380354087e4..02800c049fa98 100644 --- a/packages/plugin-ext/src/plugin/dialogs.ts +++ b/packages/plugin-ext/src/plugin/dialogs.ts @@ -16,7 +16,7 @@ import { PLUGIN_RPC_CONTEXT as Ext, OpenDialogOptionsMain, DialogsMain, SaveDialogOptionsMain, UploadDialogOptionsMain } from '../common/plugin-api-rpc'; import { OpenDialogOptions, SaveDialogOptions, UploadDialogOptions } from '@theia/plugin'; import { RPCProtocol } from '../common/rpc-protocol'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; export class DialogsExtImpl { private proxy: DialogsMain; diff --git a/packages/plugin-ext/src/plugin/document-data.ts b/packages/plugin-ext/src/plugin/document-data.ts index 3b3602c5e1a3d..39c15f4e5bc76 100644 --- a/packages/plugin-ext/src/plugin/document-data.ts +++ b/packages/plugin-ext/src/plugin/document-data.ts @@ -17,7 +17,7 @@ import * as theia from '@theia/plugin'; import { ModelChangedEvent, DocumentsMain } from '../common/plugin-api-rpc'; import { Range as ARange } from '../common/plugin-api-rpc-model'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { ok } from '../common/assert'; import { Range, Position, EndOfLine } from './types-impl'; import { PrefixSumComputer } from './prefix-sum-computer'; diff --git a/packages/plugin-ext/src/plugin/documents.ts b/packages/plugin-ext/src/plugin/documents.ts index db07f7dda8c88..4ec100ff57290 100644 --- a/packages/plugin-ext/src/plugin/documents.ts +++ b/packages/plugin-ext/src/plugin/documents.ts @@ -21,7 +21,7 @@ * based on https://github.com/Microsoft/vscode/blob/bf9a27ec01f2ef82fc45f69e0c946c7d74a57d3e/src/vs/workbench/api/node/extHostDocumentSaveParticipant.ts */ import { DocumentsExt, ModelChangedEvent, PLUGIN_RPC_CONTEXT, DocumentsMain, SingleEditOperation } from '../common/plugin-api-rpc'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { UriComponents } from '../common/uri-components'; import { RPCProtocol } from '../common/rpc-protocol'; import { Emitter, Event } from '@theia/core/lib/common/event'; @@ -179,12 +179,12 @@ export class DocumentsExtImpl implements DocumentsExt { this._onDidChangeDocument.fire({ document: data.document, contentChanges: e.changes.map(change => - ({ - range: Converter.toRange(change.range), - rangeOffset: change.rangeOffset, - rangeLength: change.rangeLength, - text: change.text - })) + ({ + range: Converter.toRange(change.range), + rangeOffset: change.rangeOffset, + rangeLength: change.rangeLength, + text: change.text + })) }); } getAllDocumentData(): DocumentDataExt[] { diff --git a/packages/plugin-ext/src/plugin/editors-and-documents.ts b/packages/plugin-ext/src/plugin/editors-and-documents.ts index 98eaa33fa41a7..af5e898b4ebcb 100644 --- a/packages/plugin-ext/src/plugin/editors-and-documents.ts +++ b/packages/plugin-ext/src/plugin/editors-and-documents.ts @@ -22,7 +22,7 @@ import { DocumentDataExt } from './document-data'; import { ok } from '../common/assert'; import * as Converter from './type-converters'; import { dispose } from '../common/disposable-util'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; export class EditorsAndDocumentsExtImpl implements EditorsAndDocumentsExt { private activeEditorId: string | null = null; diff --git a/packages/plugin-ext/src/plugin/file-system-event-service-ext-impl.ts b/packages/plugin-ext/src/plugin/file-system-event-service-ext-impl.ts index 454bf409a8861..de978c871fc65 100644 --- a/packages/plugin-ext/src/plugin/file-system-event-service-ext-impl.ts +++ b/packages/plugin-ext/src/plugin/file-system-event-service-ext-impl.ts @@ -30,7 +30,7 @@ import { Emitter, WaitUntilEvent, AsyncEmitter } from '@theia/core/lib/common/event'; import { IRelativePattern, parse } from '@theia/callhierarchy/lib/common/glob'; -import { URI, UriComponents } from 'vscode-uri'; +import { URI, UriComponents } from '@theia/core/shared/vscode-uri'; import { EditorsAndDocumentsExtImpl as ExtHostDocumentsAndEditors } from './editors-and-documents'; import type * as vscode from '@theia/plugin'; import * as typeConverter from './type-converters'; diff --git a/packages/plugin-ext/src/plugin/file-system-ext-impl.ts b/packages/plugin-ext/src/plugin/file-system-ext-impl.ts index 95ca8d64d290f..20f482a9c72e0 100644 --- a/packages/plugin-ext/src/plugin/file-system-ext-impl.ts +++ b/packages/plugin-ext/src/plugin/file-system-ext-impl.ts @@ -28,7 +28,7 @@ /* eslint-disable @typescript-eslint/tslint/config */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { URI, UriComponents } from 'vscode-uri'; +import { URI, UriComponents } from '@theia/core/shared/vscode-uri'; import { RPCProtocol } from '../common/rpc-protocol'; import { PLUGIN_RPC_CONTEXT, FileSystemExt, FileSystemMain, IFileChangeDto } from '../common/plugin-api-rpc'; import * as vscode from '@theia/plugin'; diff --git a/packages/plugin-ext/src/plugin/known-commands.spec.ts b/packages/plugin-ext/src/plugin/known-commands.spec.ts index dac4356214c6f..09dc28ae1cf43 100644 --- a/packages/plugin-ext/src/plugin/known-commands.spec.ts +++ b/packages/plugin-ext/src/plugin/known-commands.spec.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import { KnownCommands } from './known-commands'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Position } from './types-impl'; import { fromPosition } from './type-converters'; diff --git a/packages/plugin-ext/src/plugin/known-commands.ts b/packages/plugin-ext/src/plugin/known-commands.ts index c137a21126cfd..1e2743f24e38e 100755 --- a/packages/plugin-ext/src/plugin/known-commands.ts +++ b/packages/plugin-ext/src/plugin/known-commands.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Range as R, Position as P, Location as L } from 'vscode-languageserver-types'; -import { URI } from 'vscode-uri'; +import { Range as R, Position as P, Location as L } from '@theia/core/shared/vscode-languageserver-types'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { cloneAndChange } from '../common/objects'; import { Position, Range, Location, CallHierarchyItem } from './types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages.ts b/packages/plugin-ext/src/plugin/languages.ts index eba9329625350..772e93b4a6d42 100644 --- a/packages/plugin-ext/src/plugin/languages.ts +++ b/packages/plugin-ext/src/plugin/languages.ts @@ -33,7 +33,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from './documents'; import { PluginModel } from '../common/plugin-protocol'; import { Disposable } from './types-impl'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { UriComponents } from '../common/uri-components'; import { CompletionContext, @@ -79,7 +79,7 @@ import { CodeLensAdapter } from './languages/lens'; import { OutlineAdapter } from './languages/outline'; import { ReferenceAdapter } from './languages/reference'; import { WorkspaceSymbolAdapter } from './languages/workspace-symbol'; -import { SymbolInformation } from 'vscode-languageserver-types'; +import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; import { FoldingProviderAdapter } from './languages/folding'; import { SelectionRangeProviderAdapter } from './languages/selection-range'; import { ColorProviderAdapter } from './languages/color'; @@ -640,11 +640,11 @@ function serializeEnterRules(rules?: theia.OnEnterRule[]): SerializedOnEnterRule } return rules.map(r => - ({ - action: r.action, - beforeText: serializeRegExp(r.beforeText), - afterText: serializeRegExp(r.afterText) - } as SerializedOnEnterRule)); + ({ + action: r.action, + beforeText: serializeRegExp(r.beforeText), + afterText: serializeRegExp(r.afterText) + } as SerializedOnEnterRule)); } function serializeRegExp(regexp?: RegExp): SerializedRegExp | undefined { diff --git a/packages/plugin-ext/src/plugin/languages/call-hierarchy.ts b/packages/plugin-ext/src/plugin/languages/call-hierarchy.ts index f06eeb119f47d..aeab6ba8936e9 100644 --- a/packages/plugin-ext/src/plugin/languages/call-hierarchy.ts +++ b/packages/plugin-ext/src/plugin/languages/call-hierarchy.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import * as Converter from '../type-converters'; import { DocumentsExtImpl } from '../documents'; diff --git a/packages/plugin-ext/src/plugin/languages/code-action.ts b/packages/plugin-ext/src/plugin/languages/code-action.ts index 382948dc1126b..2a34471e23c69 100644 --- a/packages/plugin-ext/src/plugin/languages/code-action.ts +++ b/packages/plugin-ext/src/plugin/languages/code-action.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as theia from '@theia/plugin'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Selection } from '../../common/plugin-api-rpc'; import { Range, CodeActionContext, CodeAction } from '../../common/plugin-api-rpc-model'; import * as Converter from '../type-converters'; diff --git a/packages/plugin-ext/src/plugin/languages/color.ts b/packages/plugin-ext/src/plugin/languages/color.ts index eeafac32cff34..8001dab665402 100644 --- a/packages/plugin-ext/src/plugin/languages/color.ts +++ b/packages/plugin-ext/src/plugin/languages/color.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as theia from '@theia/plugin'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; import { RawColorInfo } from '../../common/plugin-api-rpc'; diff --git a/packages/plugin-ext/src/plugin/languages/completion.ts b/packages/plugin-ext/src/plugin/languages/completion.ts index b593472d1f8b4..2897f5f7c1a0c 100644 --- a/packages/plugin-ext/src/plugin/languages/completion.ts +++ b/packages/plugin-ext/src/plugin/languages/completion.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { CompletionItemTag, CompletionList, Range, SnippetString } from '../types-impl'; import { DocumentsExtImpl } from '../documents'; diff --git a/packages/plugin-ext/src/plugin/languages/declaration.ts b/packages/plugin-ext/src/plugin/languages/declaration.ts index 31eb65f2a5698..5fe5cded9b180 100644 --- a/packages/plugin-ext/src/plugin/languages/declaration.ts +++ b/packages/plugin-ext/src/plugin/languages/declaration.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/definition.ts b/packages/plugin-ext/src/plugin/languages/definition.ts index 5a1f519fe5eec..80c1cd6dcd020 100644 --- a/packages/plugin-ext/src/plugin/languages/definition.ts +++ b/packages/plugin-ext/src/plugin/languages/definition.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/diagnostics.ts b/packages/plugin-ext/src/plugin/languages/diagnostics.ts index 4519ea7780c39..ddcf4e164cb5f 100644 --- a/packages/plugin-ext/src/plugin/languages/diagnostics.ts +++ b/packages/plugin-ext/src/plugin/languages/diagnostics.ts @@ -21,7 +21,7 @@ import { DiagnosticSeverity, MarkerSeverity } from '../types-impl'; import { MarkerData } from '../../common/plugin-api-rpc-model'; import { RPCProtocol } from '../../common/rpc-protocol'; import { PLUGIN_RPC_CONTEXT, LanguagesMain } from '../../common/plugin-api-rpc'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { v4 } from 'uuid'; export class DiagnosticCollection implements theia.DiagnosticCollection { diff --git a/packages/plugin-ext/src/plugin/languages/document-formatting.ts b/packages/plugin-ext/src/plugin/languages/document-formatting.ts index c1d3996bdb560..ef2921697e405 100644 --- a/packages/plugin-ext/src/plugin/languages/document-formatting.ts +++ b/packages/plugin-ext/src/plugin/languages/document-formatting.ts @@ -17,7 +17,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { FormattingOptions, TextEdit } from '../../common/plugin-api-rpc-model'; export class DocumentFormattingAdapter { diff --git a/packages/plugin-ext/src/plugin/languages/document-highlight.ts b/packages/plugin-ext/src/plugin/languages/document-highlight.ts index 054ab63417648..36a2a0b2dbb42 100644 --- a/packages/plugin-ext/src/plugin/languages/document-highlight.ts +++ b/packages/plugin-ext/src/plugin/languages/document-highlight.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/folding.ts b/packages/plugin-ext/src/plugin/languages/folding.ts index 01738b0b2fc5c..3ada7e17e5ad5 100644 --- a/packages/plugin-ext/src/plugin/languages/folding.ts +++ b/packages/plugin-ext/src/plugin/languages/folding.ts @@ -16,7 +16,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as Converter from '../type-converters'; import * as model from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/hover.ts b/packages/plugin-ext/src/plugin/languages/hover.ts index 2943c96960d75..f2b88ec483486 100644 --- a/packages/plugin-ext/src/plugin/languages/hover.ts +++ b/packages/plugin-ext/src/plugin/languages/hover.ts @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import { Hover } from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/implementation.ts b/packages/plugin-ext/src/plugin/languages/implementation.ts index edc1d288d9c7c..7928b8106a229 100644 --- a/packages/plugin-ext/src/plugin/languages/implementation.ts +++ b/packages/plugin-ext/src/plugin/languages/implementation.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/lens.ts b/packages/plugin-ext/src/plugin/languages/lens.ts index 853e4d8e72f04..a560d4b74c331 100644 --- a/packages/plugin-ext/src/plugin/languages/lens.ts +++ b/packages/plugin-ext/src/plugin/languages/lens.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import { CodeLensSymbol } from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/link-provider.ts b/packages/plugin-ext/src/plugin/languages/link-provider.ts index d64815145b1af..1e189d624eedf 100644 --- a/packages/plugin-ext/src/plugin/languages/link-provider.ts +++ b/packages/plugin-ext/src/plugin/languages/link-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import { DocumentLink } from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/on-type-formatting.ts b/packages/plugin-ext/src/plugin/languages/on-type-formatting.ts index d26753086e437..4215b281eba8d 100644 --- a/packages/plugin-ext/src/plugin/languages/on-type-formatting.ts +++ b/packages/plugin-ext/src/plugin/languages/on-type-formatting.ts @@ -17,7 +17,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { FormattingOptions, TextEdit } from '../../common/plugin-api-rpc-model'; import { Position } from '../../common/plugin-api-rpc'; diff --git a/packages/plugin-ext/src/plugin/languages/outline.ts b/packages/plugin-ext/src/plugin/languages/outline.ts index ce02f70d0d742..6b4093f45f4a5 100644 --- a/packages/plugin-ext/src/plugin/languages/outline.ts +++ b/packages/plugin-ext/src/plugin/languages/outline.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; diff --git a/packages/plugin-ext/src/plugin/languages/range-formatting.ts b/packages/plugin-ext/src/plugin/languages/range-formatting.ts index b1cc4f5ec3341..da783c792ca18 100644 --- a/packages/plugin-ext/src/plugin/languages/range-formatting.ts +++ b/packages/plugin-ext/src/plugin/languages/range-formatting.ts @@ -17,7 +17,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { FormattingOptions, TextEdit, Range } from '../../common/plugin-api-rpc-model'; export class RangeFormattingAdapter { diff --git a/packages/plugin-ext/src/plugin/languages/reference.ts b/packages/plugin-ext/src/plugin/languages/reference.ts index 452173b8534dd..87700ef5f201e 100644 --- a/packages/plugin-ext/src/plugin/languages/reference.ts +++ b/packages/plugin-ext/src/plugin/languages/reference.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import { ReferenceContext, Location } from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/rename.ts b/packages/plugin-ext/src/plugin/languages/rename.ts index c602d9b6dbd10..611c14f0dc5e8 100644 --- a/packages/plugin-ext/src/plugin/languages/rename.ts +++ b/packages/plugin-ext/src/plugin/languages/rename.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import * as Converter from '../type-converters'; import * as model from '../../common/plugin-api-rpc-model'; diff --git a/packages/plugin-ext/src/plugin/languages/selection-range.ts b/packages/plugin-ext/src/plugin/languages/selection-range.ts index 6f668b5c8d5df..f2d20f4eeb1d3 100644 --- a/packages/plugin-ext/src/plugin/languages/selection-range.ts +++ b/packages/plugin-ext/src/plugin/languages/selection-range.ts @@ -22,7 +22,7 @@ import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; -import { URI } from 'vscode-uri/lib/umd'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as model from '../../common/plugin-api-rpc-model'; import * as Converter from '../type-converters'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/semantic-highlighting.ts b/packages/plugin-ext/src/plugin/languages/semantic-highlighting.ts index 053d53533346e..c5ea68c5821e7 100644 --- a/packages/plugin-ext/src/plugin/languages/semantic-highlighting.ts +++ b/packages/plugin-ext/src/plugin/languages/semantic-highlighting.ts @@ -24,7 +24,7 @@ import { BinaryBuffer } from '@theia/core/src/common/buffer'; import * as theia from '@theia/plugin'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { SemanticTokens, SemanticTokensEdit, SemanticTokensEdits } from '../types-impl'; import { DocumentsExtImpl } from '../documents'; import { toRange } from '../type-converters'; diff --git a/packages/plugin-ext/src/plugin/languages/signature.ts b/packages/plugin-ext/src/plugin/languages/signature.ts index 9aa1b3b345cfc..55a853991069d 100644 --- a/packages/plugin-ext/src/plugin/languages/signature.ts +++ b/packages/plugin-ext/src/plugin/languages/signature.ts @@ -20,7 +20,7 @@ // copied and modified from https://github.com/TypeFox/vscode/blob/70b8db24a37fafc77247de7f7cb5bb0195120ed0/src/vs/workbench/api/common/extHostLanguageFeatures.ts#L771 -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as Converter from '../type-converters'; diff --git a/packages/plugin-ext/src/plugin/languages/type-definition.ts b/packages/plugin-ext/src/plugin/languages/type-definition.ts index db1d9deeaeb78..8319aff8b32f5 100644 --- a/packages/plugin-ext/src/plugin/languages/type-definition.ts +++ b/packages/plugin-ext/src/plugin/languages/type-definition.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { DocumentsExtImpl } from '../documents'; import * as types from '../types-impl'; diff --git a/packages/plugin-ext/src/plugin/languages/workspace-symbol.ts b/packages/plugin-ext/src/plugin/languages/workspace-symbol.ts index aaa938435ed48..e9f1338091249 100644 --- a/packages/plugin-ext/src/plugin/languages/workspace-symbol.ts +++ b/packages/plugin-ext/src/plugin/languages/workspace-symbol.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { SymbolInformation } from 'vscode-languageserver-types'; +import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; import * as theia from '@theia/plugin'; import * as Converter from '../type-converters'; diff --git a/packages/plugin-ext/src/plugin/node/debug/debug.ts b/packages/plugin-ext/src/plugin/node/debug/debug.ts index 0e96373b077c4..b0547e835db5d 100644 --- a/packages/plugin-ext/src/plugin/node/debug/debug.ts +++ b/packages/plugin-ext/src/plugin/node/debug/debug.ts @@ -17,7 +17,7 @@ import { Emitter } from '@theia/core/lib/common/event'; import { Path } from '@theia/core/lib/common/path'; import { CommunicationProvider } from '@theia/debug/lib/common/debug-model'; import * as theia from '@theia/plugin'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Breakpoint } from '../../../common/plugin-api-rpc-model'; import { DebugExt, DebugMain, PLUGIN_RPC_CONTEXT as Ext, TerminalOptionsExt } from '../../../common/plugin-api-rpc'; import { PluginPackageDebuggersContribution } from '../../../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/plugin/node/debug/plugin-debug-adapter-session.ts b/packages/plugin-ext/src/plugin/node/debug/plugin-debug-adapter-session.ts index 7d7ee3c9f64fe..fb053998b9e76 100644 --- a/packages/plugin-ext/src/plugin/node/debug/plugin-debug-adapter-session.ts +++ b/packages/plugin-ext/src/plugin/node/debug/plugin-debug-adapter-session.ts @@ -17,7 +17,7 @@ import { CommunicationProvider } from '@theia/debug/lib/common/debug-model'; import { DebugAdapterSessionImpl } from '@theia/debug/lib/node/debug-adapter-session'; import * as theia from '@theia/plugin'; -import { IWebSocket } from 'vscode-ws-jsonrpc/lib/socket/socket'; +import { IWebSocket } from '@theia/core/shared/vscode-ws-jsonrpc'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/packages/plugin-ext/src/plugin/plugin-context.ts b/packages/plugin-ext/src/plugin/plugin-context.ts index e3e5118cdc6a5..76b343fef1379 100644 --- a/packages/plugin-ext/src/plugin/plugin-context.ts +++ b/packages/plugin-ext/src/plugin/plugin-context.ts @@ -137,7 +137,7 @@ import { SymbolKind } from '../common/plugin-api-rpc-model'; import { EditorsAndDocumentsExtImpl } from './editors-and-documents'; import { TextEditorsExtImpl } from './text-editors'; import { DocumentsExtImpl } from './documents'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; import { TextEditorCursorStyle } from '../common/editor-options'; import { PreferenceRegistryExtImpl } from './preference-registry'; import { OutputChannelRegistryExtImpl } from './output-channel-registry'; diff --git a/packages/plugin-ext/src/plugin/plugin-icon-path.ts b/packages/plugin-ext/src/plugin/plugin-icon-path.ts index edcdc51a7f9a4..39f81be6ec548 100644 --- a/packages/plugin-ext/src/plugin/plugin-icon-path.ts +++ b/packages/plugin-ext/src/plugin/plugin-icon-path.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as path from 'path'; -import { URI as Uri } from 'vscode-uri'; +import { URI as Uri } from '@theia/core/shared/vscode-uri'; import { IconUrl, PluginPackage } from '../common/plugin-protocol'; import { Plugin } from '../common/plugin-api-rpc'; diff --git a/packages/plugin-ext/src/plugin/preferences/configuration.spec.ts b/packages/plugin-ext/src/plugin/preferences/configuration.spec.ts index 330235a799356..02db0d2f04a22 100644 --- a/packages/plugin-ext/src/plugin/preferences/configuration.spec.ts +++ b/packages/plugin-ext/src/plugin/preferences/configuration.spec.ts @@ -20,7 +20,7 @@ import { Configuration, ConfigurationModel } from './configuration'; import { PreferenceData } from '../../common'; import { PreferenceScope } from '@theia/core/lib/common/preferences/preference-scope'; import { WorkspaceExtImpl } from '../workspace'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; const expect = chai.expect; diff --git a/packages/plugin-ext/src/plugin/preferences/configuration.ts b/packages/plugin-ext/src/plugin/preferences/configuration.ts index 20ab6a245a0ca..ad810bc96f373 100644 --- a/packages/plugin-ext/src/plugin/preferences/configuration.ts +++ b/packages/plugin-ext/src/plugin/preferences/configuration.ts @@ -17,7 +17,7 @@ import { WorkspaceExtImpl } from '../workspace'; import { isObject } from '../../common/types'; import cloneDeep = require('lodash.clonedeep'); -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/packages/plugin-ext/src/plugin/quick-open.ts b/packages/plugin-ext/src/plugin/quick-open.ts index 6c16d42bb73ef..fc79bc4c240b1 100644 --- a/packages/plugin-ext/src/plugin/quick-open.ts +++ b/packages/plugin-ext/src/plugin/quick-open.ts @@ -21,7 +21,7 @@ import { RPCProtocol } from '../common/rpc-protocol'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { QuickInputButtons, QuickInputButton, ThemeIcon } from './types-impl'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as path from 'path'; import { quickPickItemToPickOpenItem } from './type-converters'; import { PluginPackage } from '../common/plugin-protocol'; diff --git a/packages/plugin-ext/src/plugin/scm.ts b/packages/plugin-ext/src/plugin/scm.ts index a3fd8e318fa6b..b1db77890564f 100644 --- a/packages/plugin-ext/src/plugin/scm.ts +++ b/packages/plugin-ext/src/plugin/scm.ts @@ -35,7 +35,7 @@ import { Splice } from '../common/arrays'; import { UriComponents } from '../common/uri-components'; import { Command } from '../common/plugin-api-rpc-model'; import { RPCProtocol } from '../common/rpc-protocol'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { ScmCommandArg } from '../common/plugin-api-rpc'; import { sep } from '@theia/callhierarchy/lib/common/paths'; type ProviderHandle = number; @@ -451,9 +451,11 @@ class SsmResourceGroupImpl implements theia.SourceControlResourceGroup { const contextValue = r.contextValue || ''; // TODO remove the letter and colorId fields when the FileDecorationProvider is applied, see https://github.com/eclipse-theia/theia/pull/8911 - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const rawResource = { handle, sourceUri, letter: (r as any).letter, colorId: (r as any).color.id, icons, - tooltip, strikeThrough, faded, contextValue, command } as ScmRawResource; + const rawResource = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + handle, sourceUri, letter: (r as any).letter, colorId: (r as any).color.id, icons, + tooltip, strikeThrough, faded, contextValue, command + } as ScmRawResource; return { rawResource, handle }; }); @@ -464,10 +466,10 @@ class SsmResourceGroupImpl implements theia.SourceControlResourceGroup { const rawResourceSplices = splices .map(({ start, deleteCount, toInsert }) => ({ - start: start, - deleteCount: deleteCount, - rawResources: toInsert.map(i => i.rawResource) - } as ScmRawResourceSplice)); + start: start, + deleteCount: deleteCount, + rawResources: toInsert.map(i => i.rawResource) + } as ScmRawResourceSplice)); const reverseSplices = splices.reverse(); @@ -643,13 +645,13 @@ class SourceControlImpl implements theia.SourceControl { this.proxy.$unregisterGroup(this.handle, group.handle); }); - const { handle , id, label, features } = group; - groups.push({ handle , id, label, features }); + const { handle, id, label, features } = group; + groups.push({ handle, id, label, features }); const snapshot = group.takeResourceStateSnapshot(); if (snapshot.length > 0) { - splices.push( { handle: group.handle, splices: snapshot }); + splices.push({ handle: group.handle, splices: snapshot }); } this.groups.set(group.handle, group); @@ -710,7 +712,7 @@ export class ScmExtImpl implements ScmExt { private selectedSourceControlHandle: number | undefined; - constructor( rpc: RPCProtocol, private commands: CommandRegistryImpl) { + constructor(rpc: RPCProtocol, private commands: CommandRegistryImpl) { this.proxy = rpc.getProxy(PLUGIN_RPC_CONTEXT.SCM_MAIN); commands.registerArgumentProcessor({ @@ -827,9 +829,9 @@ export class ScmExtImpl implements ScmExt { * Diffs two *sorted* arrays and computes the splices which apply the diff. */ function sortedDiff(before: ReadonlyArray, - after: ReadonlyArray, - compare: (a: theia.SourceControlResourceState, - b: theia.SourceControlResourceState) => number): Splice[] { + after: ReadonlyArray, + compare: (a: theia.SourceControlResourceState, + b: theia.SourceControlResourceState) => number): Splice[] { const result: MutableSplice[] = []; function pushSplice(start: number, deleteCount: number, toInsert: theia.SourceControlResourceState[]): void { diff --git a/packages/plugin-ext/src/plugin/status-bar/status-bar-item.ts b/packages/plugin-ext/src/plugin/status-bar/status-bar-item.ts index 3ef9cfa71fea2..d36564a166f0d 100644 --- a/packages/plugin-ext/src/plugin/status-bar/status-bar-item.ts +++ b/packages/plugin-ext/src/plugin/status-bar/status-bar-item.ts @@ -16,7 +16,7 @@ import * as theia from '@theia/plugin'; import { ThemeColor, StatusBarAlignment } from '../types-impl'; import { StatusBarMessageRegistryMain } from '../../common/plugin-api-rpc'; -import { UUID } from '@phosphor/coreutils/lib/uuid'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; export class StatusBarItemImpl implements theia.StatusBarItem { diff --git a/packages/plugin-ext/src/plugin/terminal-ext.ts b/packages/plugin-ext/src/plugin/terminal-ext.ts index f9753876a814d..a2f576deee453 100644 --- a/packages/plugin-ext/src/plugin/terminal-ext.ts +++ b/packages/plugin-ext/src/plugin/terminal-ext.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { UUID } from '@phosphor/coreutils/lib/uuid'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; import { Terminal, TerminalOptions, PseudoTerminalOptions } from '@theia/plugin'; import { TerminalServiceExt, TerminalServiceMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc'; import { RPCProtocol } from '../common/rpc-protocol'; diff --git a/packages/plugin-ext/src/plugin/timeline.ts b/packages/plugin-ext/src/plugin/timeline.ts index db6360c1d78fb..50b018abc5733 100644 --- a/packages/plugin-ext/src/plugin/timeline.ts +++ b/packages/plugin-ext/src/plugin/timeline.ts @@ -26,7 +26,7 @@ import type { TimelineOptions, TimelineProvider } from '@theia/timeline/lib/common/timeline-model'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as theia from '@theia/plugin'; import { CancellationToken } from '@theia/core/lib/common/cancellation'; import { UriComponents } from '../common/uri-components'; diff --git a/packages/plugin-ext/src/plugin/type-converters.ts b/packages/plugin-ext/src/plugin/type-converters.ts index 44cfe63308d2a..ba6af8e3cd246 100644 --- a/packages/plugin-ext/src/plugin/type-converters.ts +++ b/packages/plugin-ext/src/plugin/type-converters.ts @@ -15,8 +15,8 @@ ********************************************************************************/ import * as theia from '@theia/plugin'; -import { Position as P, Range as R, SymbolInformation, SymbolKind as S } from 'vscode-languageserver-types'; -import { URI } from 'vscode-uri'; +import { Position as P, Range as R, SymbolInformation, SymbolKind as S } from '@theia/core/shared/vscode-languageserver-types'; +import { URI } from '@theia/core/shared/vscode-uri'; import * as rpc from '../common/plugin-api-rpc'; import { DecorationOptions, EditorPosition, PickOpenItem, Plugin, Position, WorkspaceTextEditDto, WorkspaceFileEditDto, Selection, TaskDto, WorkspaceEditDto @@ -174,9 +174,9 @@ export function fromRangeOrRangeWithMessage(ranges: theia.Range[] | theia.Decora }); } else { return ranges.map((r): DecorationOptions => - ({ - range: fromRange(r)! - })); + ({ + range: fromRange(r)! + })); } } diff --git a/packages/plugin-ext/src/plugin/types-impl.ts b/packages/plugin-ext/src/plugin/types-impl.ts index 65d9fb74d78c8..6f183da7a4732 100644 --- a/packages/plugin-ext/src/plugin/types-impl.ts +++ b/packages/plugin-ext/src/plugin/types-impl.ts @@ -22,10 +22,10 @@ /* eslint-disable no-null/no-null */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { UUID } from '@phosphor/coreutils/lib/uuid'; +import { UUID } from '@theia/core/shared/@phosphor/coreutils'; import { illegalArgument } from '../common/errors'; import * as theia from '@theia/plugin'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { relative } from '../common/paths-util'; import { startsWithIgnoreCase } from '@theia/core/lib/common/strings'; import { MarkdownString, isMarkdownString } from './markdown-string'; diff --git a/packages/plugin-ext/src/plugin/webviews.ts b/packages/plugin-ext/src/plugin/webviews.ts index b66dbca6303ad..7eceb1e640147 100644 --- a/packages/plugin-ext/src/plugin/webviews.ts +++ b/packages/plugin-ext/src/plugin/webviews.ts @@ -19,7 +19,7 @@ import { WebviewsExt, WebviewPanelViewState, WebviewsMain, PLUGIN_RPC_CONTEXT, W import * as theia from '@theia/plugin'; import { RPCProtocol } from '../common/rpc-protocol'; import { Plugin } from '../common/plugin-api-rpc'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { fromViewColumn, toViewColumn, toWebviewPanelShowOptions } from './type-converters'; import { Disposable, WebviewPanelTargetArea } from './types-impl'; diff --git a/packages/plugin-ext/src/plugin/window-state.ts b/packages/plugin-ext/src/plugin/window-state.ts index 11dc4c4b2d2c3..198e7fdd4d58c 100644 --- a/packages/plugin-ext/src/plugin/window-state.ts +++ b/packages/plugin-ext/src/plugin/window-state.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { WindowState } from '@theia/plugin'; import { WindowStateExt, WindowMain, PLUGIN_RPC_CONTEXT } from '../common/plugin-api-rpc'; import { Event, Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/plugin-ext/src/plugin/workspace.ts b/packages/plugin-ext/src/plugin/workspace.ts index f8576cc554632..9184ea14193f3 100644 --- a/packages/plugin-ext/src/plugin/workspace.ts +++ b/packages/plugin-ext/src/plugin/workspace.ts @@ -34,7 +34,7 @@ import { Path } from '@theia/core/lib/common/path'; import { RPCProtocol } from '../common/rpc-protocol'; import { WorkspaceRootsChangeEvent, SearchInWorkspaceResult, Range } from '../common/plugin-api-rpc-model'; import { EditorsAndDocumentsExtImpl } from './editors-and-documents'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { normalize } from '@theia/callhierarchy/lib/common/paths'; import { relative } from '../common/paths-util'; import { Schemes } from '../common/uri-components'; diff --git a/packages/plugin-metrics/package.json b/packages/plugin-metrics/package.json index 67b6c1026177d..390bdc56673a1 100644 --- a/packages/plugin-metrics/package.json +++ b/packages/plugin-metrics/package.json @@ -6,8 +6,7 @@ "@theia/core": "1.12.0", "@theia/metrics": "1.12.0", "@theia/plugin": "1.12.0", - "@theia/plugin-ext": "1.12.0", - "vscode-languageserver-protocol": "~3.15.3" + "@theia/plugin-ext": "1.12.0" }, "publishConfig": { "access": "public" diff --git a/packages/plugin-metrics/src/browser/plugin-metrics-creator.ts b/packages/plugin-metrics/src/browser/plugin-metrics-creator.ts index 64498dfa0b8d0..c64cfc1e12fa9 100644 --- a/packages/plugin-metrics/src/browser/plugin-metrics-creator.ts +++ b/packages/plugin-metrics/src/browser/plugin-metrics-creator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { PluginMetrics, METRICS_TIMEOUT } from '../common/metrics-protocol'; import { AnalyticsFromRequests, DataFromRequest, createRequestData, createDefaultAnalytics, MetricsMap } from '../common/plugin-metrics-types'; diff --git a/packages/plugin-metrics/src/browser/plugin-metrics-frontend-module.ts b/packages/plugin-metrics/src/browser/plugin-metrics-frontend-module.ts index c652ffc636928..0ef1edb72f001 100644 --- a/packages/plugin-metrics/src/browser/plugin-metrics-frontend-module.ts +++ b/packages/plugin-metrics/src/browser/plugin-metrics-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { LanguagesMainPluginMetrics } from './plugin-metrics-languages-main'; import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol'; import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging/ws-connection-provider'; diff --git a/packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts b/packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts index 0d9416baa09c9..72036f5c4b735 100644 --- a/packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts +++ b/packages/plugin-metrics/src/browser/plugin-metrics-languages-main.ts @@ -17,9 +17,9 @@ import { Range, WorkspaceSymbolParams } from '@theia/plugin-ext/lib/common/plugin-api-rpc-model'; import { PluginMetricsResolver } from './plugin-metrics-resolver'; import { LanguagesMainImpl } from '@theia/plugin-ext/lib/main/browser/languages-main'; -import { SymbolInformation } from 'vscode-languageserver-types'; -import { injectable, inject } from 'inversify'; -import * as vst from 'vscode-languageserver-protocol'; +import { SymbolInformation } from '@theia/core/shared/vscode-languageserver-types'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import * as vst from '@theia/core/shared/vscode-languageserver-protocol'; import { PluginInfo } from '@theia/plugin-ext/lib/common/plugin-api-rpc'; import { SerializedDocumentFilter } from '@theia/plugin-ext/lib/common/plugin-api-rpc-model'; import * as theia from '@theia/plugin'; diff --git a/packages/plugin-metrics/src/browser/plugin-metrics-output-registry.ts b/packages/plugin-metrics/src/browser/plugin-metrics-output-registry.ts index 640c334efcbca..961ba51d840a6 100644 --- a/packages/plugin-metrics/src/browser/plugin-metrics-output-registry.ts +++ b/packages/plugin-metrics/src/browser/plugin-metrics-output-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { OutputChannelRegistryMainImpl } from '@theia/plugin-ext/lib/main/browser/output-channel-registry-main'; import { PluginMetricsCreator } from './plugin-metrics-creator'; import { createDefaultRequestData } from '../common/plugin-metrics-types'; diff --git a/packages/plugin-metrics/src/browser/plugin-metrics-resolver.ts b/packages/plugin-metrics/src/browser/plugin-metrics-resolver.ts index 30e7f4ab7fb74..4d95712ac2e37 100644 --- a/packages/plugin-metrics/src/browser/plugin-metrics-resolver.ts +++ b/packages/plugin-metrics/src/browser/plugin-metrics-resolver.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PluginMetricsCreator } from './plugin-metrics-creator'; import { createRequestData } from '../common/plugin-metrics-types'; diff --git a/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-count.ts b/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-count.ts index 278a1a2db42b9..cd677f615da5e 100644 --- a/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-count.ts +++ b/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-count.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; @injectable() export class PluginMetricTimeCount implements MetricOutput { diff --git a/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-sum.ts b/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-sum.ts index d1932920132df..41fed19d9620f 100644 --- a/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-sum.ts +++ b/packages/plugin-metrics/src/node/metric-output/plugin-metrics-time-sum.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { MetricOutput, AnalyticsFromRequests } from '../../common/plugin-metrics-types'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; @injectable() export class PluginMetricTimeSum implements MetricOutput { diff --git a/packages/plugin-metrics/src/node/metric-string-generator.ts b/packages/plugin-metrics/src/node/metric-string-generator.ts index f4227530253fd..538bd355d3e81 100644 --- a/packages/plugin-metrics/src/node/metric-string-generator.ts +++ b/packages/plugin-metrics/src/node/metric-string-generator.ts @@ -16,7 +16,7 @@ import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count'; import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum'; import { MetricsMap } from '../common/plugin-metrics-types'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; @injectable() export class PluginMetricStringGenerator { diff --git a/packages/plugin-metrics/src/node/metrics-contributor.spec.ts b/packages/plugin-metrics/src/node/metrics-contributor.spec.ts index b8193178d1374..b37bdd5ce77b1 100644 --- a/packages/plugin-metrics/src/node/metrics-contributor.spec.ts +++ b/packages/plugin-metrics/src/node/metrics-contributor.spec.ts @@ -16,7 +16,7 @@ import { AnalyticsFromRequests } from '../common/plugin-metrics-types'; import { PluginMetricsContributor } from './metrics-contributor'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { PluginMetricsImpl } from './plugin-metrics-impl'; import { PluginMetrics } from '../common/metrics-protocol'; import * as assert from 'assert'; diff --git a/packages/plugin-metrics/src/node/metrics-contributor.ts b/packages/plugin-metrics/src/node/metrics-contributor.ts index d8f8080ec9fb4..a0cc74b0abdb0 100644 --- a/packages/plugin-metrics/src/node/metrics-contributor.ts +++ b/packages/plugin-metrics/src/node/metrics-contributor.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { PluginMetrics } from '../common/metrics-protocol'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { AnalyticsFromRequests, MetricsMap } from '../common/plugin-metrics-types'; @injectable() diff --git a/packages/plugin-metrics/src/node/plugin-metrics-backend-module.ts b/packages/plugin-metrics/src/node/plugin-metrics-backend-module.ts index e0e4392fbef86..7ff10ce9f2537 100644 --- a/packages/plugin-metrics/src/node/plugin-metrics-backend-module.ts +++ b/packages/plugin-metrics/src/node/plugin-metrics-backend-module.ts @@ -20,7 +20,7 @@ import { PluginMetrics, metricsJsonRpcPath } from '../common/metrics-protocol'; import { PluginMetricsImpl } from './plugin-metrics-impl'; import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler'; import { JsonRpcConnectionHandler } from '@theia/core'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { PluginMetricsContributor } from './metrics-contributor'; import { PluginMetricTimeSum } from './metric-output/plugin-metrics-time-sum'; import { PluginMetricTimeCount } from './metric-output/plugin-metrics-time-count'; diff --git a/packages/plugin-metrics/src/node/plugin-metrics-impl.ts b/packages/plugin-metrics/src/node/plugin-metrics-impl.ts index 1e0b4dd8c032d..0c3a1909630c0 100644 --- a/packages/plugin-metrics/src/node/plugin-metrics-impl.ts +++ b/packages/plugin-metrics/src/node/plugin-metrics-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PluginMetrics } from '../common/metrics-protocol'; @injectable() diff --git a/packages/plugin-metrics/src/node/plugin-metrics.ts b/packages/plugin-metrics/src/node/plugin-metrics.ts index 54a88c59c4670..1e79492f18f35 100644 --- a/packages/plugin-metrics/src/node/plugin-metrics.ts +++ b/packages/plugin-metrics/src/node/plugin-metrics.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { MetricsContribution } from '@theia/metrics/lib/node/metrics-contribution'; import { METRICS_TIMEOUT } from '../common/metrics-protocol'; import { PluginMetricsContributor } from './metrics-contributor'; diff --git a/packages/preferences/src/browser/abstract-resource-preference-provider.ts b/packages/preferences/src/browser/abstract-resource-preference-provider.ts index 976f124514dcd..c3be3fcff8aad 100644 --- a/packages/preferences/src/browser/abstract-resource-preference-provider.ts +++ b/packages/preferences/src/browser/abstract-resource-preference-provider.ts @@ -18,8 +18,8 @@ /* eslint-disable no-null/no-null */ import * as jsoncparser from 'jsonc-parser'; -import { JSONExt } from '@phosphor/coreutils/lib/json'; -import { inject, injectable, postConstruct } from 'inversify'; +import { JSONExt } from '@theia/core/shared/@phosphor/coreutils'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { MessageService } from '@theia/core/lib/common/message-service'; import { Disposable } from '@theia/core/lib/common/disposable'; import { PreferenceProvider, PreferenceSchemaProvider, PreferenceScope, PreferenceProviderDataChange, PreferenceService } from '@theia/core/lib/browser'; @@ -270,4 +270,3 @@ export abstract class AbstractResourcePreferenceProvider extends PreferenceProvi } } - diff --git a/packages/preferences/src/browser/folder-preference-provider.ts b/packages/preferences/src/browser/folder-preference-provider.ts index 8e7da67ebe56c..ac6cc92c68f4c 100644 --- a/packages/preferences/src/browser/folder-preference-provider.ts +++ b/packages/preferences/src/browser/folder-preference-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PreferenceScope } from '@theia/core/lib/browser'; import { FileStat } from '@theia/filesystem/lib/common/files'; diff --git a/packages/preferences/src/browser/folders-preferences-provider.ts b/packages/preferences/src/browser/folders-preferences-provider.ts index 94aa5876c8fa1..1fd1e48be9d1b 100644 --- a/packages/preferences/src/browser/folders-preferences-provider.ts +++ b/packages/preferences/src/browser/folders-preferences-provider.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PreferenceProvider, PreferenceResolveResult } from '@theia/core/lib/browser/preferences/preference-provider'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; diff --git a/packages/preferences/src/browser/preference-bindings.ts b/packages/preferences/src/browser/preference-bindings.ts index ace3ae54bd998..b57ba52345ed9 100644 --- a/packages/preferences/src/browser/preference-bindings.ts +++ b/packages/preferences/src/browser/preference-bindings.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container, interfaces } from 'inversify'; +import { Container, interfaces } from '@theia/core/shared/inversify'; import { PreferenceProvider, PreferenceScope } from '@theia/core/lib/browser/preferences'; import { UserPreferenceProvider, UserPreferenceProviderFactory } from './user-preference-provider'; import { WorkspacePreferenceProvider } from './workspace-preference-provider'; diff --git a/packages/preferences/src/browser/preference-frontend-module.ts b/packages/preferences/src/browser/preference-frontend-module.ts index c08a71945dc09..e8f1a65d73c9f 100644 --- a/packages/preferences/src/browser/preference-frontend-module.ts +++ b/packages/preferences/src/browser/preference-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; import './preferences-monaco-contribution'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { bindViewContribution } from '@theia/core/lib/browser'; import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { PreferenceTreeGenerator } from './util/preference-tree-generator'; diff --git a/packages/preferences/src/browser/preference-tree-model.ts b/packages/preferences/src/browser/preference-tree-model.ts index 3fcfe09150707..5e5a8e6b0df72 100644 --- a/packages/preferences/src/browser/preference-tree-model.ts +++ b/packages/preferences/src/browser/preference-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { TreeModelImpl, TreeWidget, @@ -29,7 +29,7 @@ import { import { Emitter } from '@theia/core'; import { PreferencesSearchbarWidget } from './views/preference-searchbar-widget'; import { PreferenceTreeGenerator } from './util/preference-tree-generator'; -import * as fuzzy from 'fuzzy'; +import * as fuzzy from '@theia/core/shared/fuzzy'; import { PreferencesScopeTabBar } from './views/preference-scope-tabbar-widget'; import { Preference } from './util/preference-types'; import { Event } from '@theia/core/src/common'; diff --git a/packages/preferences/src/browser/preferences-contribution.ts b/packages/preferences/src/browser/preferences-contribution.ts index 4007c68e90d11..72292b65cee5f 100644 --- a/packages/preferences/src/browser/preferences-contribution.ts +++ b/packages/preferences/src/browser/preferences-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { MenuModelRegistry, CommandRegistry } from '@theia/core'; import { CommonMenus, diff --git a/packages/preferences/src/browser/preferences-decorator-service.ts b/packages/preferences/src/browser/preferences-decorator-service.ts index 86410d8956cf0..058228523db5a 100644 --- a/packages/preferences/src/browser/preferences-decorator-service.ts +++ b/packages/preferences/src/browser/preferences-decorator-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { AbstractTreeDecoratorService } from '@theia/core/lib/browser/tree/tree-decorator'; import { PreferencesDecorator } from './preferences-decorator'; diff --git a/packages/preferences/src/browser/preferences-decorator.ts b/packages/preferences/src/browser/preferences-decorator.ts index f9ef80efd9d7c..313a4d4d633cc 100644 --- a/packages/preferences/src/browser/preferences-decorator.ts +++ b/packages/preferences/src/browser/preferences-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Tree, TreeDecorator, TreeDecoration, PreferenceDataProperty, PreferenceService } from '@theia/core/lib/browser'; import { Emitter, Event, MaybePromise } from '@theia/core'; import { escapeInvisibleChars } from '@theia/core/lib/common/strings'; diff --git a/packages/preferences/src/browser/preferences-json-schema-contribution.ts b/packages/preferences/src/browser/preferences-json-schema-contribution.ts index 93c2deb488728..39d0934fecc17 100644 --- a/packages/preferences/src/browser/preferences-json-schema-contribution.ts +++ b/packages/preferences/src/browser/preferences-json-schema-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { InMemoryResources } from '@theia/core'; import { JsonSchemaRegisterContext, JsonSchemaContribution } from '@theia/core/lib/browser/json-schema-store'; diff --git a/packages/preferences/src/browser/section-preference-provider.ts b/packages/preferences/src/browser/section-preference-provider.ts index 165d92cb7e34e..90c17461c22c4 100644 --- a/packages/preferences/src/browser/section-preference-provider.ts +++ b/packages/preferences/src/browser/section-preference-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { AbstractResourcePreferenceProvider } from './abstract-resource-preference-provider'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; diff --git a/packages/preferences/src/browser/user-configs-preference-provider.ts b/packages/preferences/src/browser/user-configs-preference-provider.ts index 321ca2ead0b72..616882c3dacd9 100644 --- a/packages/preferences/src/browser/user-configs-preference-provider.ts +++ b/packages/preferences/src/browser/user-configs-preference-provider.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PreferenceProvider, PreferenceResolveResult } from '@theia/core/lib/browser/preferences/preference-provider'; import { PreferenceConfigurations } from '@theia/core/lib/browser/preferences/preference-configurations'; diff --git a/packages/preferences/src/browser/user-preference-provider.ts b/packages/preferences/src/browser/user-preference-provider.ts index a73b366234600..a62991dc613d6 100644 --- a/packages/preferences/src/browser/user-preference-provider.ts +++ b/packages/preferences/src/browser/user-preference-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PreferenceScope } from '@theia/core/lib/browser'; import { SectionPreferenceProvider } from './section-preference-provider'; diff --git a/packages/preferences/src/browser/util/preference-scope-command-manager.ts b/packages/preferences/src/browser/util/preference-scope-command-manager.ts index 680e8f2a919c5..9e4216d07ac83 100644 --- a/packages/preferences/src/browser/util/preference-scope-command-manager.ts +++ b/packages/preferences/src/browser/util/preference-scope-command-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PreferenceScope, LabelProvider } from '@theia/core/lib/browser'; import { FileStat } from '@theia/filesystem/lib/common/files'; import { CommandRegistry, MenuModelRegistry, Command } from '@theia/core/lib/common'; diff --git a/packages/preferences/src/browser/util/preference-tree-generator.spec.ts b/packages/preferences/src/browser/util/preference-tree-generator.spec.ts index e3ceeca60c4ca..7a9932736d2e1 100644 --- a/packages/preferences/src/browser/util/preference-tree-generator.spec.ts +++ b/packages/preferences/src/browser/util/preference-tree-generator.spec.ts @@ -26,7 +26,7 @@ FrontendApplicationConfigProvider.set({ }); import { expect } from 'chai'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { PreferenceTreeGenerator } from './preference-tree-generator'; import { CompositeTreeNode, PreferenceSchemaProvider } from '@theia/core/lib/browser'; import { PreferenceConfigurations } from '@theia/core/lib/browser/preferences/preference-configurations'; diff --git a/packages/preferences/src/browser/util/preference-tree-generator.ts b/packages/preferences/src/browser/util/preference-tree-generator.ts index c7cdeecd26ed0..683fc5c9ba282 100644 --- a/packages/preferences/src/browser/util/preference-tree-generator.ts +++ b/packages/preferences/src/browser/util/preference-tree-generator.ts @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { CompositeTreeNode, PreferenceSchemaProvider, SelectableTreeNode } from '@theia/core/lib/browser'; import { PreferenceConfigurations } from '@theia/core/lib/browser/preferences/preference-configurations'; import { Emitter } from '@theia/core'; -import { debounce } from 'lodash'; +import debounce = require('@theia/core/shared/lodash.debounce'); @injectable() export class PreferenceTreeGenerator { diff --git a/packages/preferences/src/browser/views/components/preference-array-input.tsx b/packages/preferences/src/browser/views/components/preference-array-input.tsx index b937ada0a50b7..2e86f8dd5a233 100644 --- a/packages/preferences/src/browser/views/components/preference-array-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-array-input.tsx @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceArrayInputProps { diff --git a/packages/preferences/src/browser/views/components/preference-boolean-input.tsx b/packages/preferences/src/browser/views/components/preference-boolean-input.tsx index ba55d96e271d9..64d13fc3dac30 100644 --- a/packages/preferences/src/browser/views/components/preference-boolean-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-boolean-input.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceBooleanInputProps { diff --git a/packages/preferences/src/browser/views/components/preference-json-input.tsx b/packages/preferences/src/browser/views/components/preference-json-input.tsx index 5ee0bf23382ce..9be33be6bfe74 100644 --- a/packages/preferences/src/browser/views/components/preference-json-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-json-input.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceJSONInputProps { diff --git a/packages/preferences/src/browser/views/components/preference-number-input.tsx b/packages/preferences/src/browser/views/components/preference-number-input.tsx index 146c396c0b12f..63a4185150e4f 100644 --- a/packages/preferences/src/browser/views/components/preference-number-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-number-input.tsx @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceNumberInputProps { diff --git a/packages/preferences/src/browser/views/components/preference-select-input.tsx b/packages/preferences/src/browser/views/components/preference-select-input.tsx index a1036881b3bd5..835b9e30a0f64 100644 --- a/packages/preferences/src/browser/views/components/preference-select-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-select-input.tsx @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceSelectInputProps { diff --git a/packages/preferences/src/browser/views/components/preference-string-input.tsx b/packages/preferences/src/browser/views/components/preference-string-input.tsx index 6c3affb5fdaab..57f03ef3da2e8 100644 --- a/packages/preferences/src/browser/views/components/preference-string-input.tsx +++ b/packages/preferences/src/browser/views/components/preference-string-input.tsx @@ -15,7 +15,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Preference } from '../../util/preference-types'; interface PreferenceStringInputProps { diff --git a/packages/preferences/src/browser/views/components/single-preference-display-factory.tsx b/packages/preferences/src/browser/views/components/single-preference-display-factory.tsx index c0e91cbcf9fa4..719de1b5a3b87 100644 --- a/packages/preferences/src/browser/views/components/single-preference-display-factory.tsx +++ b/packages/preferences/src/browser/views/components/single-preference-display-factory.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { PreferenceService, ContextMenuRenderer } from '@theia/core/lib/browser'; import { CommandService } from '@theia/core'; import { Preference, PreferencesCommands } from '../../util/preference-types'; diff --git a/packages/preferences/src/browser/views/components/single-preference-wrapper.tsx b/packages/preferences/src/browser/views/components/single-preference-wrapper.tsx index 44889fc5d3a4a..d4f3a8b784ab9 100644 --- a/packages/preferences/src/browser/views/components/single-preference-wrapper.tsx +++ b/packages/preferences/src/browser/views/components/single-preference-wrapper.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { Menu, PreferenceScope, PreferenceItem, PreferenceService, ContextMenuRenderer } from '@theia/core/lib/browser'; import { PreferenceSelectInput, PreferenceBooleanInput, PreferenceStringInput, PreferenceNumberInput, PreferenceJSONInput, PreferenceArrayInput } from '.'; import { Preference, PreferenceMenus } from '../../util/preference-types'; diff --git a/packages/preferences/src/browser/views/preference-editor-widget.tsx b/packages/preferences/src/browser/views/preference-editor-widget.tsx index f6b1c43788728..3bdc1e4bd60fb 100644 --- a/packages/preferences/src/browser/views/preference-editor-widget.tsx +++ b/packages/preferences/src/browser/views/preference-editor-widget.tsx @@ -15,10 +15,10 @@ ********************************************************************************/ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { postConstruct, injectable, inject } from 'inversify'; -import * as React from 'react'; -import { debounce } from 'lodash'; -import { Disposable } from 'vscode-jsonrpc'; +import { postConstruct, injectable, inject } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; +import debounce = require('@theia/core/shared/lodash.debounce'); +import { Disposable } from '@theia/core/shared/vscode-ws-jsonrpc'; import { ReactWidget, PreferenceService, diff --git a/packages/preferences/src/browser/views/preference-scope-tabbar-widget.tsx b/packages/preferences/src/browser/views/preference-scope-tabbar-widget.tsx index 223be84a10df1..2538dc7545dd4 100644 --- a/packages/preferences/src/browser/views/preference-scope-tabbar-widget.tsx +++ b/packages/preferences/src/browser/views/preference-scope-tabbar-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; -import { TabBar, Widget, Title } from '@phosphor/widgets'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import { TabBar, Widget, Title } from '@theia/core/shared/@phosphor/widgets'; import { PreferenceScope, Message, ContextMenuRenderer, LabelProvider, StatefulWidget } from '@theia/core/lib/browser'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/preferences/src/browser/views/preference-searchbar-widget.tsx b/packages/preferences/src/browser/views/preference-searchbar-widget.tsx index b696b4d4c1198..d267bf8eb6b01 100644 --- a/packages/preferences/src/browser/views/preference-searchbar-widget.tsx +++ b/packages/preferences/src/browser/views/preference-searchbar-widget.tsx @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct } from 'inversify'; import { ReactWidget, StatefulWidget } from '@theia/core/lib/browser'; -import * as React from 'react'; -import { debounce } from 'lodash'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; +import debounce = require('@theia/core/shared/lodash.debounce'); import { Disposable, Emitter } from '@theia/core'; export interface PreferencesSearchbarState { diff --git a/packages/preferences/src/browser/views/preference-tree-widget.tsx b/packages/preferences/src/browser/views/preference-tree-widget.tsx index 23f480691d2bc..746afafc20d7c 100644 --- a/packages/preferences/src/browser/views/preference-tree-widget.tsx +++ b/packages/preferences/src/browser/views/preference-tree-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { ContextMenuRenderer, ExpandableTreeNode, @@ -25,7 +25,7 @@ import { TREE_NODE_CONTENT_CLASS, } from '@theia/core/lib/browser'; import { PreferenceConfigurations } from '@theia/core/lib/browser/preferences/preference-configurations'; -import React = require('react'); +import React = require('@theia/core/shared/react'); import { PreferenceTreeModel, PreferenceTreeNodeRow, PreferenceTreeNodeProps } from '../preference-tree-model'; @injectable() diff --git a/packages/preferences/src/browser/views/preference-widget-bindings.ts b/packages/preferences/src/browser/views/preference-widget-bindings.ts index 78fe6b41a831c..718c9ec39a3db 100644 --- a/packages/preferences/src/browser/views/preference-widget-bindings.ts +++ b/packages/preferences/src/browser/views/preference-widget-bindings.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { WidgetFactory, createTreeContainer, TreeWidget, TreeProps, defaultTreeProps, TreeDecoratorService, TreeModel } from '@theia/core/lib/browser'; import { SinglePreferenceDisplayFactory } from './components/single-preference-display-factory'; import { SinglePreferenceWrapper } from './components/single-preference-wrapper'; diff --git a/packages/preferences/src/browser/views/preference-widget.tsx b/packages/preferences/src/browser/views/preference-widget.tsx index 3621dbaf675ab..5d3994d1688d2 100644 --- a/packages/preferences/src/browser/views/preference-widget.tsx +++ b/packages/preferences/src/browser/views/preference-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { postConstruct, injectable, inject } from 'inversify'; -import { Panel, Widget, Message, StatefulWidget, } from '@theia/core/lib/browser'; +import { postConstruct, injectable, inject } from '@theia/core/shared/inversify'; +import { Panel, Widget, Message, StatefulWidget } from '@theia/core/lib/browser'; import { PreferencesEditorState, PreferencesEditorWidget } from './preference-editor-widget'; import { PreferencesTreeWidget } from './preference-tree-widget'; import { PreferencesSearchbarState, PreferencesSearchbarWidget } from './preference-searchbar-widget'; diff --git a/packages/preferences/src/browser/workspace-file-preference-provider.ts b/packages/preferences/src/browser/workspace-file-preference-provider.ts index 218d776a8bd89..c731af255d5a9 100644 --- a/packages/preferences/src/browser/workspace-file-preference-provider.ts +++ b/packages/preferences/src/browser/workspace-file-preference-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PreferenceScope } from '@theia/core/lib/browser/preferences'; import { WorkspaceService, WorkspaceData } from '@theia/workspace/lib/browser/workspace-service'; diff --git a/packages/preferences/src/browser/workspace-preference-provider.ts b/packages/preferences/src/browser/workspace-preference-provider.ts index 46ade70a98195..8477e4b0a16c4 100644 --- a/packages/preferences/src/browser/workspace-preference-provider.ts +++ b/packages/preferences/src/browser/workspace-preference-provider.ts @@ -16,7 +16,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { inject, injectable, postConstruct, named } from 'inversify'; +import { inject, injectable, postConstruct, named } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { PreferenceScope, PreferenceProvider } from '@theia/core/lib/browser/preferences'; diff --git a/packages/preview/src/browser/markdown/markdown-preview-handler.ts b/packages/preview/src/browser/markdown/markdown-preview-handler.ts index c354b61c013f6..2da06ae985681 100644 --- a/packages/preview/src/browser/markdown/markdown-preview-handler.ts +++ b/packages/preview/src/browser/markdown/markdown-preview-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { OpenerService } from '@theia/core/lib/browser'; import { isOSX } from '@theia/core/lib/common'; diff --git a/packages/preview/src/browser/preview-contribution.ts b/packages/preview/src/browser/preview-contribution.ts index b735b33736a07..47a31ae5e7ebe 100644 --- a/packages/preview/src/browser/preview-contribution.ts +++ b/packages/preview/src/browser/preview-contribution.ts @@ -14,20 +14,20 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; -import { Widget } from '@phosphor/widgets'; +import { injectable, inject } from '@theia/core/shared/inversify'; +import { Widget } from '@theia/core/shared/@phosphor/widgets'; import { FrontendApplicationContribution, WidgetOpenerOptions, NavigatableWidgetOpenHandler } from '@theia/core/lib/browser'; import { EditorManager, TextEditor, EditorWidget, EditorContextMenu } from '@theia/editor/lib/browser'; import { DisposableCollection, CommandContribution, CommandRegistry, Command, MenuContribution, MenuModelRegistry, Disposable } from '@theia/core/lib/common'; import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import URI from '@theia/core/lib/common/uri'; -import { Position } from 'vscode-languageserver-types'; +import { Position } from '@theia/core/shared/vscode-languageserver-types'; import { PreviewWidget } from './preview-widget'; import { PreviewHandlerProvider, } from './preview-handler'; import { PreviewUri } from './preview-uri'; import { PreviewPreferences } from './preview-preferences'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); export namespace PreviewCommands { /** diff --git a/packages/preview/src/browser/preview-frontend-module.ts b/packages/preview/src/browser/preview-frontend-module.ts index 7dbabcbcde246..caa3389a43715 100644 --- a/packages/preview/src/browser/preview-frontend-module.ts +++ b/packages/preview/src/browser/preview-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { CommandContribution, MenuContribution, bindContributionProvider, ResourceProvider } from '@theia/core/lib/common'; import { OpenHandler, WidgetFactory, FrontendApplicationContribution, NavigatableWidgetOptions } from '@theia/core/lib/browser'; diff --git a/packages/preview/src/browser/preview-handler.ts b/packages/preview/src/browser/preview-handler.ts index 572bb1431c3e3..39167e2ba17a7 100644 --- a/packages/preview/src/browser/preview-handler.ts +++ b/packages/preview/src/browser/preview-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ContributionProvider, MaybePromise, Prioritizeable } from '@theia/core'; diff --git a/packages/preview/src/browser/preview-link-normalizer.ts b/packages/preview/src/browser/preview-link-normalizer.ts index b9e0dc46f63b6..a618dc99522e9 100644 --- a/packages/preview/src/browser/preview-link-normalizer.ts +++ b/packages/preview/src/browser/preview-link-normalizer.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { MiniBrowserEnvironment } from '@theia/mini-browser/lib/browser/environment/mini-browser-environment'; diff --git a/packages/preview/src/browser/preview-preferences.ts b/packages/preview/src/browser/preview-preferences.ts index 57267aa1790ed..26f78b5c736c6 100644 --- a/packages/preview/src/browser/preview-preferences.ts +++ b/packages/preview/src/browser/preview-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/preview/src/browser/preview-widget.ts b/packages/preview/src/browser/preview-widget.ts index ff5b69c707621..13c4b3414738e 100644 --- a/packages/preview/src/browser/preview-widget.ts +++ b/packages/preview/src/browser/preview-widget.ts @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import throttle = require('lodash.throttle'); -import { inject, injectable } from 'inversify'; +import throttle = require('@theia/core/shared/lodash.throttle'); +import { inject, injectable } from '@theia/core/shared/inversify'; import { Resource, MaybePromise } from '@theia/core'; import { Navigatable } from '@theia/core/lib/browser/navigatable'; import { BaseWidget, Message, addEventListener } from '@theia/core/lib/browser'; @@ -26,7 +26,7 @@ import { ThemeService } from '@theia/core/lib/browser/theming'; import { EditorPreferences } from '@theia/editor/lib/browser'; import { Disposable } from '@theia/core/lib/common/disposable'; import { MonacoWorkspace } from '@theia/monaco/lib/browser/monaco-workspace'; -import { Range, Location } from 'vscode-languageserver-types'; +import { Range, Location } from '@theia/core/shared/vscode-languageserver-types'; export const PREVIEW_WIDGET_CLASS = 'theia-preview-widget'; diff --git a/packages/process/src/common/process-common-module.ts b/packages/process/src/common/process-common-module.ts index 3a93751c95277..08bc35d20b70c 100644 --- a/packages/process/src/common/process-common-module.ts +++ b/packages/process/src/common/process-common-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ShellCommandBuilder } from './shell-command-builder'; export default new ContainerModule((bind, unbind, isBound, rebind) => { diff --git a/packages/process/src/common/shell-command-builder.ts b/packages/process/src/common/shell-command-builder.ts index ede95e1fc0763..a73eb85e122fe 100644 --- a/packages/process/src/common/shell-command-builder.ts +++ b/packages/process/src/common/shell-command-builder.ts @@ -19,7 +19,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { createShellCommandLine, BashQuotingFunctions, PowershellQuotingFunctions, CmdQuotingFunctions, ShellQuoting, ShellQuotedString } from '../common/shell-quoting'; export interface ProcessInfo { diff --git a/packages/process/src/node/multi-ring-buffer.ts b/packages/process/src/node/multi-ring-buffer.ts index c2f0e47b96e9e..1477364e76e46 100644 --- a/packages/process/src/node/multi-ring-buffer.ts +++ b/packages/process/src/node/multi-ring-buffer.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as stream from 'stream'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core/lib/common'; /** diff --git a/packages/process/src/node/process-backend-module.ts b/packages/process/src/node/process-backend-module.ts index 700433eb3a16b..5a030086515eb 100644 --- a/packages/process/src/node/process-backend-module.ts +++ b/packages/process/src/node/process-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, Container } from 'inversify'; +import { ContainerModule, Container } from '@theia/core/shared/inversify'; import { RawProcess, RawProcessOptions, RawProcessFactory, RawForkOptions } from './raw-process'; import { TerminalProcess, TerminalProcessOptions, TerminalProcessFactory } from './terminal-process'; import { BackendApplicationContribution } from '@theia/core/lib/node'; diff --git a/packages/process/src/node/process-manager.ts b/packages/process/src/node/process-manager.ts index 11f177ce42ba0..91aad5ed56b89 100644 --- a/packages/process/src/node/process-manager.ts +++ b/packages/process/src/node/process-manager.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { Process } from './process'; import { Emitter, Event } from '@theia/core/lib/common'; import { ILogger } from '@theia/core/lib/common/logger'; diff --git a/packages/process/src/node/process.ts b/packages/process/src/node/process.ts index c5f485d3642c1..d53b958408f17 100644 --- a/packages/process/src/node/process.ts +++ b/packages/process/src/node/process.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, unmanaged } from 'inversify'; +import { injectable, unmanaged } from '@theia/core/shared/inversify'; import { ProcessManager } from './process-manager'; import { ILogger, Emitter, Event } from '@theia/core/lib/common'; import { FileUri } from '@theia/core/lib/node'; diff --git a/packages/process/src/node/raw-process.ts b/packages/process/src/node/raw-process.ts index 571b85d09c391..567457459a350 100644 --- a/packages/process/src/node/raw-process.ts +++ b/packages/process/src/node/raw-process.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ProcessManager } from './process-manager'; import { ILogger } from '@theia/core/lib/common'; import { Process, ProcessType, ProcessOptions, ForkOptions, ProcessErrorEvent } from './process'; diff --git a/packages/process/src/node/terminal-process.ts b/packages/process/src/node/terminal-process.ts index 7c06bedcfcb86..0aeb3c8a2c246 100644 --- a/packages/process/src/node/terminal-process.ts +++ b/packages/process/src/node/terminal-process.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { isWindows } from '@theia/core'; import { ILogger } from '@theia/core/lib/common'; import { Process, ProcessType, ProcessOptions, ProcessErrorEvent } from './process'; diff --git a/packages/process/src/node/test/process-test-container.ts b/packages/process/src/node/test/process-test-container.ts index 904729d100d68..dbf55051777ad 100644 --- a/packages/process/src/node/test/process-test-container.ts +++ b/packages/process/src/node/test/process-test-container.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { bindLogger } from '@theia/core/lib/node/logger-backend-module'; import processBackendModule from '../process-backend-module'; diff --git a/packages/property-view/src/browser/empty-property-view-widget-provider.tsx b/packages/property-view/src/browser/empty-property-view-widget-provider.tsx index 15f6bdc7f5da3..0eed44ef5be8b 100644 --- a/packages/property-view/src/browser/empty-property-view-widget-provider.tsx +++ b/packages/property-view/src/browser/empty-property-view-widget-provider.tsx @@ -15,8 +15,8 @@ ********************************************************************************/ import { ReactWidget } from '@theia/core/lib/browser'; -import { injectable } from 'inversify'; -import * as React from 'react'; +import { injectable } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; import { PropertyViewContentWidget } from './property-view-content-widget'; import { DefaultPropertyViewWidgetProvider } from './property-view-widget-provider'; diff --git a/packages/property-view/src/browser/property-view-contribution.ts b/packages/property-view/src/browser/property-view-contribution.ts index a4c802fc095cd..afe3646b39665 100644 --- a/packages/property-view/src/browser/property-view-contribution.ts +++ b/packages/property-view/src/browser/property-view-contribution.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { PropertyViewWidget } from './property-view-widget'; @injectable() diff --git a/packages/property-view/src/browser/property-view-frontend-module.ts b/packages/property-view/src/browser/property-view-frontend-module.ts index 5912e5d850ab4..f991ea5832c51 100644 --- a/packages/property-view/src/browser/property-view-frontend-module.ts +++ b/packages/property-view/src/browser/property-view-frontend-module.ts @@ -16,7 +16,7 @@ import { bindViewContribution, WidgetFactory } from '@theia/core/lib/browser'; import { bindContributionProvider } from '@theia/core/lib/common/contribution-provider'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider'; import { PropertyDataService } from './property-data-service'; import { PropertyViewContribution } from './property-view-contribution'; diff --git a/packages/property-view/src/browser/property-view-service.ts b/packages/property-view/src/browser/property-view-service.ts index 6097f1e39a917..4fb208e796d56 100644 --- a/packages/property-view/src/browser/property-view-service.ts +++ b/packages/property-view/src/browser/property-view-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { ContributionProvider, Prioritizeable } from '@theia/core'; -import { inject, injectable, named, postConstruct } from 'inversify'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; import { EmptyPropertyViewWidgetProvider } from './empty-property-view-widget-provider'; import { PropertyViewWidgetProvider } from './property-view-widget-provider'; diff --git a/packages/property-view/src/browser/property-view-widget-provider.ts b/packages/property-view/src/browser/property-view-widget-provider.ts index 50fec1d7e4114..411ef0bd43e9f 100644 --- a/packages/property-view/src/browser/property-view-widget-provider.ts +++ b/packages/property-view/src/browser/property-view-widget-provider.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { ContributionProvider, MaybePromise, Prioritizeable } from '@theia/core'; -import { inject, injectable, named, postConstruct } from 'inversify'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; import { PropertyDataService } from './property-data-service'; import { PropertyViewContentWidget } from './property-view-content-widget'; diff --git a/packages/property-view/src/browser/property-view-widget.tsx b/packages/property-view/src/browser/property-view-widget.tsx index 3606fa6087242..1bd9527212648 100644 --- a/packages/property-view/src/browser/property-view-widget.tsx +++ b/packages/property-view/src/browser/property-view-widget.tsx @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Message } from '@phosphor/messaging/lib'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; import { Disposable, SelectionService } from '@theia/core'; import { BaseWidget, MessageLoop, Widget } from '@theia/core/lib/browser/widgets/widget'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { PropertyViewContentWidget } from './property-view-content-widget'; import { PropertyViewService } from './property-view-service'; diff --git a/packages/property-view/src/browser/resource-property-view/resource-property-data-service.ts b/packages/property-view/src/browser/resource-property-view/resource-property-data-service.ts index b91759b2a85cf..fd604c4e98ce8 100644 --- a/packages/property-view/src/browser/resource-property-view/resource-property-data-service.ts +++ b/packages/property-view/src/browser/resource-property-view/resource-property-data-service.ts @@ -19,7 +19,7 @@ import URI from '@theia/core/lib/common/uri'; import { FileSelection } from '@theia/filesystem/lib/browser/file-selection'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; import { FileStat } from '@theia/filesystem/lib/common/files'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { PropertyDataService } from '../property-data-service'; @injectable() diff --git a/packages/property-view/src/browser/resource-property-view/resource-property-view-label-provider.ts b/packages/property-view/src/browser/resource-property-view/resource-property-view-label-provider.ts index 12e7c6d01dae6..f8bdd998b7e7a 100644 --- a/packages/property-view/src/browser/resource-property-view/resource-property-view-label-provider.ts +++ b/packages/property-view/src/browser/resource-property-view/resource-property-view-label-provider.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { LabelProvider, LabelProviderContribution, TreeNode } from '@theia/core/lib/browser'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { ResourcePropertiesCategoryNode, ResourcePropertiesItemNode } from './resource-property-view-tree-items'; const DEFAULT_INFO_ICON = 'fa fa-info-circle'; diff --git a/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-container.ts b/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-container.ts index b44c498ab0756..c952d6e889bf4 100644 --- a/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-container.ts +++ b/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-container.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { createTreeContainer, LabelProviderContribution, TreeProps, TreeWidget } from '@theia/core/lib/browser'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { PropertyDataService } from '../property-data-service'; import { PropertyViewWidgetProvider } from '../property-view-widget-provider'; import { ResourcePropertyDataService } from './resource-property-data-service'; diff --git a/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-widget.tsx b/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-widget.tsx index 899dc666130bf..364ebd3e1dab9 100644 --- a/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-widget.tsx +++ b/packages/property-view/src/browser/resource-property-view/resource-property-view-tree-widget.tsx @@ -24,8 +24,8 @@ import { TreeWidget } from '@theia/core/lib/browser'; import { FileStat } from '@theia/filesystem/lib/common/files'; -import { inject, injectable, postConstruct } from 'inversify'; -import * as React from 'react'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; import { PropertyDataService } from '../property-data-service'; import { PropertyViewContentWidget } from '../property-view-content-widget'; import { diff --git a/packages/property-view/src/browser/resource-property-view/resource-property-view-widget-provider.ts b/packages/property-view/src/browser/resource-property-view/resource-property-view-widget-provider.ts index bfe6b2117959b..2ec74f978a8c7 100644 --- a/packages/property-view/src/browser/resource-property-view/resource-property-view-widget-provider.ts +++ b/packages/property-view/src/browser/resource-property-view/resource-property-view-widget-provider.ts @@ -16,7 +16,7 @@ import { Navigatable } from '@theia/core/lib/browser'; import { FileSelection } from '@theia/filesystem/lib/browser/file-selection'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { DefaultPropertyViewWidgetProvider } from '../property-view-widget-provider'; import { ResourcePropertyViewTreeWidget } from './resource-property-view-tree-widget'; diff --git a/packages/scm-extra/src/browser/history/scm-history-contribution.ts b/packages/scm-extra/src/browser/history/scm-history-contribution.ts index 9fb5b283d637f..6442c6fe6ffd3 100644 --- a/packages/scm-extra/src/browser/history/scm-history-contribution.ts +++ b/packages/scm-extra/src/browser/history/scm-history-contribution.ts @@ -16,7 +16,7 @@ import { MenuModelRegistry, CommandRegistry, Command, SelectionService } from '@theia/core'; import { AbstractViewContribution, OpenViewArguments } from '@theia/core/lib/browser'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { NavigatorContextMenu } from '@theia/navigator/lib/browser/navigator-contribution'; import { UriCommandHandler, UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/scm-extra/src/browser/history/scm-history-frontend-module.ts b/packages/scm-extra/src/browser/history/scm-history-frontend-module.ts index fde4c0fc9d6d2..4f74febb953cb 100644 --- a/packages/scm-extra/src/browser/history/scm-history-frontend-module.ts +++ b/packages/scm-extra/src/browser/history/scm-history-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ScmHistoryContribution, SCM_HISTORY_ID } from './scm-history-contribution'; import { WidgetFactory, bindViewContribution, ApplicationShellLayoutMigration } from '@theia/core/lib/browser'; import { ScmHistoryWidget } from './scm-history-widget'; diff --git a/packages/scm-extra/src/browser/history/scm-history-widget.tsx b/packages/scm-extra/src/browser/history/scm-history-widget.tsx index 889ad62fbf833..f6f6afd983537 100644 --- a/packages/scm-extra/src/browser/history/scm-history-widget.tsx +++ b/packages/scm-extra/src/browser/history/scm-history-widget.tsx @@ -14,12 +14,12 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Event as TheiaEvent, DisposableCollection } from '@theia/core'; import { OpenerService, open, StatefulWidget, SELECTED_CLASS, WidgetManager, ApplicationShell } from '@theia/core/lib/browser'; import { CancellationTokenSource } from '@theia/core/lib/common/cancellation'; -import { Message } from '@phosphor/messaging'; -import { AutoSizer, List, ListRowRenderer, ListRowProps, InfiniteLoader, IndexRange, ScrollParams, CellMeasurerCache, CellMeasurer } from 'react-virtualized'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { AutoSizer, List, ListRowRenderer, ListRowProps, InfiniteLoader, IndexRange, ScrollParams, CellMeasurerCache, CellMeasurer } from '@theia/core/shared/react-virtualized'; import URI from '@theia/core/lib/common/uri'; import { ScmService } from '@theia/scm/lib/browser/scm-service'; import { ScmHistoryProvider } from '.'; @@ -29,7 +29,7 @@ import { ScmAvatarService } from '@theia/scm/lib/browser/scm-avatar-service'; import { ScmItemComponent } from '../scm-navigable-list-widget'; import { ScmFileChangeNode } from '../scm-file-change-node'; import { ScmNavigableListWidget } from '../scm-navigable-list-widget'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; diff --git a/packages/scm-extra/src/browser/scm-extra-frontend-module.ts b/packages/scm-extra/src/browser/scm-extra-frontend-module.ts index 80efcd0b6a021..9c5a9c63655e6 100644 --- a/packages/scm-extra/src/browser/scm-extra-frontend-module.ts +++ b/packages/scm-extra/src/browser/scm-extra-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindScmHistoryModule } from './history/scm-history-frontend-module'; import { ScmFileChangeLabelProvider } from './scm-file-change-label-provider'; import { LabelProviderContribution } from '@theia/core/lib/browser'; diff --git a/packages/scm-extra/src/browser/scm-extra-layout-migrations.ts b/packages/scm-extra/src/browser/scm-extra-layout-migrations.ts index e29d378b5889b..9b62610aae6bf 100644 --- a/packages/scm-extra/src/browser/scm-extra-layout-migrations.ts +++ b/packages/scm-extra/src/browser/scm-extra-layout-migrations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer'; import { SCM_HISTORY_ID } from './history/scm-history-contribution'; diff --git a/packages/scm-extra/src/browser/scm-file-change-label-provider.ts b/packages/scm-extra/src/browser/scm-file-change-label-provider.ts index 08a0518b68861..396035cfa104e 100644 --- a/packages/scm-extra/src/browser/scm-file-change-label-provider.ts +++ b/packages/scm-extra/src/browser/scm-file-change-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProviderContribution, DidChangeLabelEvent, LabelProvider } from '@theia/core/lib/browser/label-provider'; import { ScmFileChangeNode } from './scm-file-change-node'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/scm-extra/src/browser/scm-navigable-list-widget.tsx b/packages/scm-extra/src/browser/scm-navigable-list-widget.tsx index 0d6ede01ed559..bba4064a396f7 100644 --- a/packages/scm-extra/src/browser/scm-navigable-list-widget.tsx +++ b/packages/scm-extra/src/browser/scm-navigable-list-widget.tsx @@ -18,11 +18,11 @@ import { SELECTED_CLASS, Key, Widget } from '@theia/core/lib/browser'; import { ScmService } from '@theia/scm/lib/browser/scm-service'; import URI from '@theia/core/lib/common/uri'; import { LabelProvider } from '@theia/core/lib/browser/label-provider'; -import { Message } from '@phosphor/messaging'; -import { ElementExt } from '@phosphor/domutils'; -import { inject, injectable } from 'inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { ElementExt } from '@theia/core/shared/@phosphor/domutils'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { ScmFileChangeLabelProvider } from './scm-file-change-label-provider'; import { ScmFileChangeNode } from './scm-file-change-node'; diff --git a/packages/scm/src/browser/decorations/scm-decorations-service.ts b/packages/scm/src/browser/decorations/scm-decorations-service.ts index b35792b853a05..bb79388f9b65f 100644 --- a/packages/scm/src/browser/decorations/scm-decorations-service.ts +++ b/packages/scm/src/browser/decorations/scm-decorations-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Emitter, Event, ResourceProvider } from '@theia/core'; import { DirtyDiffDecorator } from '../dirty-diff/dirty-diff-decorator'; import { DiffComputer } from '../dirty-diff/diff-computer'; diff --git a/packages/scm/src/browser/decorations/scm-navigator-decorator.ts b/packages/scm/src/browser/decorations/scm-navigator-decorator.ts index b187f32fab294..e75f130ded9c1 100644 --- a/packages/scm/src/browser/decorations/scm-navigator-decorator.ts +++ b/packages/scm/src/browser/decorations/scm-navigator-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { Event, Emitter } from '@theia/core/lib/common/event'; import { Tree } from '@theia/core/lib/browser/tree/tree'; diff --git a/packages/scm/src/browser/decorations/scm-tab-bar-decorator.ts b/packages/scm/src/browser/decorations/scm-tab-bar-decorator.ts index 2f53cb8e941db..0fcbef1efdba5 100644 --- a/packages/scm/src/browser/decorations/scm-tab-bar-decorator.ts +++ b/packages/scm/src/browser/decorations/scm-tab-bar-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common/event'; import { SCM_VIEW_CONTAINER_ID } from '../scm-contribution'; import { ScmService } from '../scm-service'; diff --git a/packages/scm/src/browser/dirty-diff/dirty-diff-decorator.ts b/packages/scm/src/browser/dirty-diff/dirty-diff-decorator.ts index 0252f269e661b..5961e5838de92 100644 --- a/packages/scm/src/browser/dirty-diff/dirty-diff-decorator.ts +++ b/packages/scm/src/browser/dirty-diff/dirty-diff-decorator.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Range, Position, diff --git a/packages/scm/src/browser/dirty-diff/dirty-diff-module.ts b/packages/scm/src/browser/dirty-diff/dirty-diff-module.ts index ab56588eee9df..fa553eb8cc35e 100644 --- a/packages/scm/src/browser/dirty-diff/dirty-diff-module.ts +++ b/packages/scm/src/browser/dirty-diff/dirty-diff-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { DirtyDiffDecorator } from './dirty-diff-decorator'; import '../../../src/browser/style/dirty-diff.css'; diff --git a/packages/scm/src/browser/scm-amend-component.tsx b/packages/scm/src/browser/scm-amend-component.tsx index 8d887209eaf69..304864490a8a4 100644 --- a/packages/scm/src/browser/scm-amend-component.tsx +++ b/packages/scm/src/browser/scm-amend-component.tsx @@ -16,7 +16,7 @@ import '../../src/browser/style/scm-amend-component.css'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { ScmAvatarService } from './scm-avatar-service'; import { StorageService } from '@theia/core/lib/browser'; import { Disposable, DisposableCollection } from '@theia/core'; diff --git a/packages/scm/src/browser/scm-amend-widget.tsx b/packages/scm/src/browser/scm-amend-widget.tsx index 296563f9c9fc1..fd777cc304479 100644 --- a/packages/scm/src/browser/scm-amend-widget.tsx +++ b/packages/scm/src/browser/scm-amend-widget.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { SelectionService } from '@theia/core/lib/common'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { ContextMenuRenderer, ReactWidget, LabelProvider, KeybindingRegistry, StorageService } from '@theia/core/lib/browser'; diff --git a/packages/scm/src/browser/scm-avatar-service.ts b/packages/scm/src/browser/scm-avatar-service.ts index 1a416606718b4..614bc0d9688d4 100644 --- a/packages/scm/src/browser/scm-avatar-service.ts +++ b/packages/scm/src/browser/scm-avatar-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Md5 } from 'ts-md5'; @injectable() diff --git a/packages/scm/src/browser/scm-commit-widget.tsx b/packages/scm/src/browser/scm-commit-widget.tsx index 5d570cd3f6b5e..7f1d19a1e21b1 100644 --- a/packages/scm/src/browser/scm-commit-widget.tsx +++ b/packages/scm/src/browser/scm-commit-widget.tsx @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { DisposableCollection } from '@theia/core'; -import { Message } from '@phosphor/messaging'; -import * as React from 'react'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import * as React from '@theia/core/shared/react'; import TextareaAutosize from 'react-autosize-textarea'; import { ScmInput, ScmInputIssueType } from './scm-input'; import { diff --git a/packages/scm/src/browser/scm-context-key-service.ts b/packages/scm/src/browser/scm-context-key-service.ts index 38733195e1978..d645365d0f428 100644 --- a/packages/scm/src/browser/scm-context-key-service.ts +++ b/packages/scm/src/browser/scm-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/scm/src/browser/scm-contribution.ts b/packages/scm/src/browser/scm-contribution.ts index 8e36510ca1eb2..add7d698316f3 100644 --- a/packages/scm/src/browser/scm-contribution.ts +++ b/packages/scm/src/browser/scm-contribution.ts @@ -13,9 +13,9 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; -import { find } from '@phosphor/algorithm'; +import { find } from '@theia/core/shared/@phosphor/algorithm'; import { AbstractViewContribution, FrontendApplicationContribution, LabelProvider, @@ -231,7 +231,7 @@ export class ScmContribution extends AbstractViewContribution impleme if (!repository) { return undefined; } - return repository.provider.acceptInputCommand; + return repository.provider.acceptInputCommand; } protected readonly statusBarDisposable = new DisposableCollection(); diff --git a/packages/scm/src/browser/scm-frontend-module.ts b/packages/scm/src/browser/scm-frontend-module.ts index d173ef6bfc2ac..5bb1b66257982 100644 --- a/packages/scm/src/browser/scm-frontend-module.ts +++ b/packages/scm/src/browser/scm-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { interfaces, ContainerModule, Container } from 'inversify'; +import { interfaces, ContainerModule, Container } from '@theia/core/shared/inversify'; import { bindViewContribution, FrontendApplicationContribution, WidgetFactory, ViewContainer, diff --git a/packages/scm/src/browser/scm-groups-tree-model.ts b/packages/scm/src/browser/scm-groups-tree-model.ts index 8ce27186b544f..578d8a940899f 100644 --- a/packages/scm/src/browser/scm-groups-tree-model.ts +++ b/packages/scm/src/browser/scm-groups-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { ScmService } from './scm-service'; import { ScmTreeModel } from './scm-tree-model'; diff --git a/packages/scm/src/browser/scm-input.ts b/packages/scm/src/browser/scm-input.ts index 91f1dd9ca43a8..5141d268aef79 100644 --- a/packages/scm/src/browser/scm-input.ts +++ b/packages/scm/src/browser/scm-input.ts @@ -18,7 +18,7 @@ import * as debounce from 'p-debounce'; import { Disposable, DisposableCollection, Emitter } from '@theia/core/lib/common'; -import { JSONExt, JSONObject } from '@phosphor/coreutils/lib/json'; +import { JSONExt, JSONObject } from '@theia/core/shared/@phosphor/coreutils'; export interface ScmInputIssue { message: string; diff --git a/packages/scm/src/browser/scm-layout-migrations.ts b/packages/scm/src/browser/scm-layout-migrations.ts index 926e9b8ea10d3..d9c2f58c94758 100644 --- a/packages/scm/src/browser/scm-layout-migrations.ts +++ b/packages/scm/src/browser/scm-layout-migrations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ApplicationShellLayoutMigration, WidgetDescription, ApplicationShellLayoutMigrationContext } from '@theia/core/lib/browser/shell/shell-layout-restorer'; import { SCM_VIEW_CONTAINER_TITLE_OPTIONS, SCM_VIEW_CONTAINER_ID, SCM_WIDGET_FACTORY_ID } from './scm-contribution'; diff --git a/packages/scm/src/browser/scm-no-repository-widget.tsx b/packages/scm/src/browser/scm-no-repository-widget.tsx index f6f98cea0f59c..7fee6aa53f1ed 100644 --- a/packages/scm/src/browser/scm-no-repository-widget.tsx +++ b/packages/scm/src/browser/scm-no-repository-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; -import * as React from 'react'; +import { injectable } from '@theia/core/shared/inversify'; +import * as React from '@theia/core/shared/react'; import { ReactWidget } from '@theia/core/lib/browser'; import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message'; diff --git a/packages/scm/src/browser/scm-preferences.ts b/packages/scm/src/browser/scm-preferences.ts index 14c46cad5b9e8..3c2b2d1bc7ba1 100644 --- a/packages/scm/src/browser/scm-preferences.ts +++ b/packages/scm/src/browser/scm-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, @@ -58,4 +58,3 @@ export function bindScmPreferences(bind: interfaces.Bind): void { bind(PreferenceContribution).toConstantValue({ schema: scmPreferenceSchema }); } - diff --git a/packages/scm/src/browser/scm-quick-open-service.ts b/packages/scm/src/browser/scm-quick-open-service.ts index 7f1faf9ec91ea..0de79a1223815 100644 --- a/packages/scm/src/browser/scm-quick-open-service.ts +++ b/packages/scm/src/browser/scm-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { QuickOpenItem, QuickOpenMode, QuickOpenModel } from '@theia/core/lib/browser/quick-open/quick-open-model'; import { QuickOpenService, QuickOpenOptions } from '@theia/core/lib/browser/quick-open/quick-open-service'; import { MessageService } from '@theia/core/lib/common/message-service'; diff --git a/packages/scm/src/browser/scm-service.ts b/packages/scm/src/browser/scm-service.ts index 457e6d35014d3..8ea9b7d71da16 100644 --- a/packages/scm/src/browser/scm-service.ts +++ b/packages/scm/src/browser/scm-service.ts @@ -17,7 +17,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { DisposableCollection, Emitter } from '@theia/core/lib/common'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ScmContextKeyService } from './scm-context-key-service'; import { ScmRepository, ScmProviderOptions } from './scm-repository'; import { ScmCommand, ScmProvider } from './scm-provider'; diff --git a/packages/scm/src/browser/scm-tree-label-provider.ts b/packages/scm/src/browser/scm-tree-label-provider.ts index 8af91a204b938..2cd60742088b3 100644 --- a/packages/scm/src/browser/scm-tree-label-provider.ts +++ b/packages/scm/src/browser/scm-tree-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { LabelProviderContribution, LabelProvider } from '@theia/core/lib/browser/label-provider'; import { TreeNode } from '@theia/core/lib/browser/tree'; diff --git a/packages/scm/src/browser/scm-tree-model.ts b/packages/scm/src/browser/scm-tree-model.ts index dbd97c1606369..bddf6c08517a1 100644 --- a/packages/scm/src/browser/scm-tree-model.ts +++ b/packages/scm/src/browser/scm-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { TreeModelImpl, TreeNode, TreeProps, CompositeTreeNode, SelectableTreeNode, ExpandableTreeNode } from '@theia/core/lib/browser/tree'; import URI from '@theia/core/lib/common/uri'; import { ScmProvider, ScmResourceGroup, ScmResource, ScmResourceDecorations } from './scm-provider'; @@ -248,14 +248,14 @@ export abstract class ScmTreeModel extends TreeModelImpl { const id = `${parent.groupId}:${String(sourceUri)}`; const oldNode = this.getNode(id); const folderNode: ScmFileChangeFolderNode = { - id, - groupId: parent.groupId, - path: nodeRelativePath, - sourceUri: String(sourceUri), - children: [], - parent, - expanded: ExpandableTreeNode.is(oldNode) ? oldNode.expanded : defaultExpansion, - selected: SelectableTreeNode.is(oldNode) && oldNode.selected, + id, + groupId: parent.groupId, + path: nodeRelativePath, + sourceUri: String(sourceUri), + children: [], + parent, + expanded: ExpandableTreeNode.is(oldNode) ? oldNode.expanded : defaultExpansion, + selected: SelectableTreeNode.is(oldNode) && oldNode.selected, }; folderNode.children = this.buildFileChangeTree(resources, start, end, level, folderNode); return folderNode; @@ -289,7 +289,7 @@ export abstract class ScmTreeModel extends TreeModelImpl { if (ScmFileChangeFolderNode.is(node) || ScmFileChangeNode.is(node)) { const parentNode = node.parent; if (ExpandableTreeNode.is(parentNode)) { - await this.revealNode(parentNode); + await this.revealNode(parentNode); if (!parentNode.expanded) { await this.expandNode(parentNode); } diff --git a/packages/scm/src/browser/scm-tree-widget.tsx b/packages/scm/src/browser/scm-tree-widget.tsx index fd6ce8eb0ed7c..3defd8117f54e 100644 --- a/packages/scm/src/browser/scm-tree-widget.tsx +++ b/packages/scm/src/browser/scm-tree-widget.tsx @@ -16,8 +16,8 @@ /* eslint-disable no-null/no-null, @typescript-eslint/no-explicit-any */ -import * as React from 'react'; -import { injectable, inject } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { isOSX } from '@theia/core/lib/common/os'; import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/scm/src/browser/scm-widget.tsx b/packages/scm/src/browser/scm-widget.tsx index d87f2868827d1..1260d3d3e6df5 100644 --- a/packages/scm/src/browser/scm-widget.tsx +++ b/packages/scm/src/browser/scm-widget.tsx @@ -16,8 +16,8 @@ /* eslint-disable no-null/no-null, @typescript-eslint/no-explicit-any */ -import { Message } from '@phosphor/messaging'; -import { injectable, inject, postConstruct } from 'inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { BaseWidget, Widget, StatefulWidget, Panel, PanelLayout, MessageLoop, CompositeTreeNode, SelectableTreeNode, diff --git a/packages/search-in-workspace/src/browser/in-memory-text-resource.ts b/packages/search-in-workspace/src/browser/in-memory-text-resource.ts index fafa345434740..aa04b3c33d367 100644 --- a/packages/search-in-workspace/src/browser/in-memory-text-resource.ts +++ b/packages/search-in-workspace/src/browser/in-memory-text-resource.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ResourceResolver, Resource } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-context-key-service.ts b/packages/search-in-workspace/src/browser/search-in-workspace-context-key-service.ts index 5f083bef8cd77..30f2d36637587 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-context-key-service.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-frontend-contribution.ts b/packages/search-in-workspace/src/browser/search-in-workspace-frontend-contribution.ts index cf21d194d17be..9f62e9f7827b1 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-frontend-contribution.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-frontend-contribution.ts @@ -16,7 +16,7 @@ import { AbstractViewContribution, KeybindingRegistry, LabelProvider, CommonMenus, FrontendApplication, FrontendApplicationContribution } from '@theia/core/lib/browser'; import { SearchInWorkspaceWidget } from './search-in-workspace-widget'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { CommandRegistry, MenuModelRegistry, SelectionService, Command } from '@theia/core'; import { Widget } from '@theia/core/lib/browser/widgets'; import { NavigatorContextMenu } from '@theia/navigator/lib/browser/navigator-contribution'; @@ -26,7 +26,7 @@ import { WorkspaceService } from '@theia/workspace/lib/browser'; import { SearchInWorkspaceContextKeyService } from './search-in-workspace-context-key-service'; import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; -import { Range } from 'vscode-languageserver-types'; +import { Range } from '@theia/core/shared/vscode-languageserver-types'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; export namespace SearchInWorkspaceCommands { diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-frontend-module.ts b/packages/search-in-workspace/src/browser/search-in-workspace-frontend-module.ts index 5d6ea5bebc682..6133d326b513e 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-frontend-module.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/styles/index.css'; -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { SearchInWorkspaceService, SearchInWorkspaceClientImpl } from './search-in-workspace-service'; import { SearchInWorkspaceServer, SIW_WS_PATH } from '../common/search-in-workspace-interface'; import { diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-label-provider.ts b/packages/search-in-workspace/src/browser/search-in-workspace-label-provider.ts index 1632b6ae1f2f4..09dd3acb56f1c 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-label-provider.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-label-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { LabelProviderContribution, LabelProvider, DidChangeLabelEvent } from '@theia/core/lib/browser/label-provider'; import { SearchInWorkspaceRootFolderNode, SearchInWorkspaceFileNode } from './search-in-workspace-result-tree-widget'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-preferences.ts b/packages/search-in-workspace/src/browser/search-in-workspace-preferences.ts index 77e70f6b344e1..ad653e358136b 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-preferences.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-preferences.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { PreferenceSchema, PreferenceProxy, PreferenceService, createPreferenceProxy, PreferenceContribution } from '@theia/core/lib/browser/preferences'; -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; export const searchInWorkspacePreferencesSchema: PreferenceSchema = { type: 'object', diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx b/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx index e9ed26964b549..b2e414c094765 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx +++ b/packages/search-in-workspace/src/browser/search-in-workspace-result-tree-widget.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { TreeWidget, CompositeTreeNode, @@ -42,13 +42,13 @@ import { SearchInWorkspaceResult, SearchInWorkspaceOptions, SearchMatch } from ' import { SearchInWorkspaceService } from './search-in-workspace-service'; import { MEMORY_TEXT } from './in-memory-text-resource'; import URI from '@theia/core/lib/common/uri'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { SearchInWorkspacePreferences } from './search-in-workspace-preferences'; import { ProgressService } from '@theia/core'; import { ColorRegistry } from '@theia/core/lib/browser/color-registry'; import * as minimatch from 'minimatch'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; -import debounce = require('lodash.debounce'); +import debounce = require('@theia/core/shared/lodash.debounce'); const ROOT_ID = 'ResultTree'; diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-service.ts b/packages/search-in-workspace/src/browser/search-in-workspace-service.ts index cbea67b5756dc..60eb9b2bda010 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-service.ts +++ b/packages/search-in-workspace/src/browser/search-in-workspace-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { SearchInWorkspaceServer, SearchInWorkspaceClient, diff --git a/packages/search-in-workspace/src/browser/search-in-workspace-widget.tsx b/packages/search-in-workspace/src/browser/search-in-workspace-widget.tsx index 1aaf673064513..18e5dc5af75d4 100644 --- a/packages/search-in-workspace/src/browser/search-in-workspace-widget.tsx +++ b/packages/search-in-workspace/src/browser/search-in-workspace-widget.tsx @@ -15,11 +15,11 @@ ********************************************************************************/ import { Widget, Message, BaseWidget, Key, StatefulWidget, MessageLoop, KeyCode } from '@theia/core/lib/browser'; -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { SearchInWorkspaceResultTreeWidget } from './search-in-workspace-result-tree-widget'; import { SearchInWorkspaceOptions } from '../common/search-in-workspace-interface'; -import * as React from 'react'; -import * as ReactDOM from 'react-dom'; +import * as React from '@theia/core/shared/react'; +import * as ReactDOM from '@theia/core/shared/react-dom'; import { Event, Emitter, Disposable } from '@theia/core/lib/common'; import { WorkspaceService } from '@theia/workspace/lib/browser'; import { SearchInWorkspaceContextKeyService } from './search-in-workspace-context-key-service'; diff --git a/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.slow-spec.ts b/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.slow-spec.ts index d3496048112c3..6338f45b4c87a 100644 --- a/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.slow-spec.ts +++ b/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.slow-spec.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { ILogger, isWindows } from '@theia/core'; import { FileUri } from '@theia/core/lib/node/file-uri'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; diff --git a/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.ts b/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.ts index b02fc42c8dcf5..21a410bb6790d 100644 --- a/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.ts +++ b/packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.ts @@ -18,7 +18,7 @@ import { ILogger } from '@theia/core'; import { RawProcess, RawProcessFactory, RawProcessOptions } from '@theia/process/lib/node'; import { FileUri } from '@theia/core/lib/node/file-uri'; import URI from '@theia/core/lib/common/uri'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { SearchInWorkspaceServer, SearchInWorkspaceOptions, SearchInWorkspaceResult, SearchInWorkspaceClient, LinePreview } from '../common/search-in-workspace-interface'; export const RgPath = Symbol('RgPath'); diff --git a/packages/search-in-workspace/src/node/search-in-workspace-backend-module.ts b/packages/search-in-workspace/src/node/search-in-workspace-backend-module.ts index 1898ad34feb88..bb8ccb89ade31 100644 --- a/packages/search-in-workspace/src/node/search-in-workspace-backend-module.ts +++ b/packages/search-in-workspace/src/node/search-in-workspace-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common'; import { SearchInWorkspaceServer, SearchInWorkspaceClient, SIW_WS_PATH } from '../common/search-in-workspace-interface'; import { RipgrepSearchInWorkspaceServer, RgPath } from './ripgrep-search-in-workspace-server'; diff --git a/packages/task/compile.tsconfig.json b/packages/task/compile.tsconfig.json index ce9deba4a1e7f..86534154561bf 100644 --- a/packages/task/compile.tsconfig.json +++ b/packages/task/compile.tsconfig.json @@ -38,6 +38,9 @@ }, { "path": "../workspace/compile.tsconfig.json" + }, + { + "path": "../userstorage/compile.tsconfig.json" } ] } diff --git a/packages/task/package.json b/packages/task/package.json index bc48a1b503f0d..17d0a48000490 100644 --- a/packages/task/package.json +++ b/packages/task/package.json @@ -13,6 +13,7 @@ "@theia/terminal": "1.12.0", "@theia/variable-resolver": "1.12.0", "@theia/workspace": "1.12.0", + "@theia/userstorage": "1.12.0", "ajv": "^6.5.3", "jsonc-parser": "^2.2.0", "p-debounce": "^2.1.0" diff --git a/packages/task/src/browser/process/process-task-contribution.ts b/packages/task/src/browser/process/process-task-contribution.ts index 24e7dce791a77..16c4ab2ec44ec 100644 --- a/packages/task/src/browser/process/process-task-contribution.ts +++ b/packages/task/src/browser/process/process-task-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ProcessTaskResolver } from './process-task-resolver'; import { TaskContribution, TaskResolverRegistry } from '../task-contribution'; diff --git a/packages/task/src/browser/process/process-task-frontend-module.ts b/packages/task/src/browser/process/process-task-frontend-module.ts index 7cd35f495b4da..e4b6ad520987c 100644 --- a/packages/task/src/browser/process/process-task-frontend-module.ts +++ b/packages/task/src/browser/process/process-task-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ProcessTaskContribution } from './process-task-contribution'; import { ProcessTaskResolver } from './process-task-resolver'; import { TaskContribution } from '../task-contribution'; diff --git a/packages/task/src/browser/process/process-task-resolver.ts b/packages/task/src/browser/process/process-task-resolver.ts index 7ca040fc86f2e..76b647c83b2d4 100644 --- a/packages/task/src/browser/process/process-task-resolver.ts +++ b/packages/task/src/browser/process/process-task-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { VariableResolverService } from '@theia/variable-resolver/lib/browser'; import { TaskResolver } from '../task-contribution'; import { TaskConfiguration } from '../../common/task-protocol'; diff --git a/packages/task/src/browser/provided-task-configurations.spec.ts b/packages/task/src/browser/provided-task-configurations.spec.ts index bb71c2b654da5..6305ea68234cd 100644 --- a/packages/task/src/browser/provided-task-configurations.spec.ts +++ b/packages/task/src/browser/provided-task-configurations.spec.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { assert } from 'chai'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { ProvidedTaskConfigurations } from './provided-task-configurations'; import { TaskDefinitionRegistry } from './task-definition-registry'; import { TaskProviderRegistry } from './task-contribution'; diff --git a/packages/task/src/browser/provided-task-configurations.ts b/packages/task/src/browser/provided-task-configurations.ts index c35f2541efec5..5253e63310d1f 100644 --- a/packages/task/src/browser/provided-task-configurations.ts +++ b/packages/task/src/browser/provided-task-configurations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { TaskProviderRegistry } from './task-contribution'; import { TaskDefinitionRegistry } from './task-definition-registry'; import { TaskConfiguration, TaskCustomization, TaskOutputPresentation, TaskConfigurationScope, TaskScope } from '../common'; diff --git a/packages/task/src/browser/quick-open-task.ts b/packages/task/src/browser/quick-open-task.ts index c296c67052749..67f003d83a630 100644 --- a/packages/task/src/browser/quick-open-task.ts +++ b/packages/task/src/browser/quick-open-task.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { TaskService } from './task-service'; import { TaskInfo, TaskConfiguration, TaskCustomization, TaskScope, TaskConfigurationScope } from '../common/task-protocol'; import { TaskDefinitionRegistry } from './task-definition-registry'; diff --git a/packages/task/src/browser/task-configuration-manager.ts b/packages/task/src/browser/task-configuration-manager.ts index d1e37313b7dce..ebb878f5f28c2 100644 --- a/packages/task/src/browser/task-configuration-manager.ts +++ b/packages/task/src/browser/task-configuration-manager.ts @@ -16,7 +16,7 @@ import * as jsoncparser from 'jsonc-parser'; import debounce = require('p-debounce'); -import { inject, injectable, postConstruct, named } from 'inversify'; +import { inject, injectable, postConstruct, named } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { EditorManager, EditorWidget } from '@theia/editor/lib/browser'; diff --git a/packages/task/src/browser/task-configurations.ts b/packages/task/src/browser/task-configurations.ts index 19d47ee290f31..54a6717695603 100644 --- a/packages/task/src/browser/task-configurations.ts +++ b/packages/task/src/browser/task-configurations.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { TaskConfiguration, TaskCustomization, diff --git a/packages/task/src/browser/task-contribution.ts b/packages/task/src/browser/task-contribution.ts index 1f6ed2c4f1266..4dfcccaa389e8 100644 --- a/packages/task/src/browser/task-contribution.ts +++ b/packages/task/src/browser/task-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core/lib/common/disposable'; import { TaskConfiguration } from '../common/task-protocol'; import { WaitUntilEvent, Emitter } from '@theia/core/lib/common/event'; diff --git a/packages/task/src/browser/task-definition-registry.ts b/packages/task/src/browser/task-definition-registry.ts index 370f3c9939946..c80ebdbfaa80d 100644 --- a/packages/task/src/browser/task-definition-registry.ts +++ b/packages/task/src/browser/task-definition-registry.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common'; import { TaskConfiguration, TaskDefinition, TaskCustomization } from '../common'; import { Disposable } from '@theia/core/lib/common/disposable'; diff --git a/packages/task/src/browser/task-frontend-contribution.ts b/packages/task/src/browser/task-frontend-contribution.ts index 893fa296c2c62..a885e27aa4aca 100644 --- a/packages/task/src/browser/task-frontend-contribution.ts +++ b/packages/task/src/browser/task-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named, postConstruct } from 'inversify'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; import { ILogger, ContributionProvider } from '@theia/core/lib/common'; import { QuickOpenTask, TaskTerminateQuickOpen, TaskRunningQuickOpen, TaskRestartRunningQuickOpen } from './quick-open-task'; import { CommandContribution, Command, CommandRegistry, MenuContribution, MenuModelRegistry } from '@theia/core/lib/common'; diff --git a/packages/task/src/browser/task-frontend-module.ts b/packages/task/src/browser/task-frontend-module.ts index 54b5a32f9c55e..879da6d0a27b3 100644 --- a/packages/task/src/browser/task-frontend-module.ts +++ b/packages/task/src/browser/task-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution, QuickOpenContribution, KeybindingContribution } from '@theia/core/lib/browser'; import { CommandContribution, MenuContribution, bindContributionProvider } from '@theia/core/lib/common'; import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging'; diff --git a/packages/task/src/browser/task-name-resolver.ts b/packages/task/src/browser/task-name-resolver.ts index f6ab62683743d..4a049c4b43497 100644 --- a/packages/task/src/browser/task-name-resolver.ts +++ b/packages/task/src/browser/task-name-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { TaskConfiguration } from '../common'; import { TaskDefinitionRegistry } from './task-definition-registry'; import { TaskConfigurations } from './task-configurations'; diff --git a/packages/task/src/browser/task-preferences.ts b/packages/task/src/browser/task-preferences.ts index 9be1987f3f664..7f19b95f0d73f 100644 --- a/packages/task/src/browser/task-preferences.ts +++ b/packages/task/src/browser/task-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser/preferences/preference-contribution'; import { taskSchemaId } from './task-schema-updater'; import { PreferenceConfiguration } from '@theia/core/lib/browser/preferences/preference-configurations'; diff --git a/packages/task/src/browser/task-problem-matcher-registry.ts b/packages/task/src/browser/task-problem-matcher-registry.ts index bb448e65511de..179639812d496 100644 --- a/packages/task/src/browser/task-problem-matcher-registry.ts +++ b/packages/task/src/browser/task-problem-matcher-registry.ts @@ -19,7 +19,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { Event, Emitter } from '@theia/core/lib/common'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; import { diff --git a/packages/task/src/browser/task-problem-pattern-registry.ts b/packages/task/src/browser/task-problem-pattern-registry.ts index 63b36b0518802..3ca853e2ede94 100644 --- a/packages/task/src/browser/task-problem-pattern-registry.ts +++ b/packages/task/src/browser/task-problem-pattern-registry.ts @@ -19,7 +19,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import { NamedProblemPattern, ProblemLocationKind, ProblemPattern, ProblemPatternContribution } from '../common'; import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable'; diff --git a/packages/task/src/browser/task-schema-updater.ts b/packages/task/src/browser/task-schema-updater.ts index 8670cfe791dd1..0c698af967730 100644 --- a/packages/task/src/browser/task-schema-updater.ts +++ b/packages/task/src/browser/task-schema-updater.ts @@ -22,7 +22,7 @@ import * as Ajv from 'ajv'; import debounce = require('p-debounce'); -import { postConstruct, injectable, inject } from 'inversify'; +import { postConstruct, injectable, inject } from '@theia/core/shared/inversify'; import { JsonSchemaContribution, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store'; import { InMemoryResources, deepClone, Emitter } from '@theia/core/lib/common'; import { IJSONSchema } from '@theia/core/lib/common/json-schema'; diff --git a/packages/task/src/browser/task-service.ts b/packages/task/src/browser/task-service.ts index 9d9b57b5cf816..21b47f2e166af 100644 --- a/packages/task/src/browser/task-service.ts +++ b/packages/task/src/browser/task-service.ts @@ -29,8 +29,8 @@ import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget import { TerminalWidgetFactoryOptions } from '@theia/terminal/lib/browser/terminal-widget-impl'; import { VariableResolverService } from '@theia/variable-resolver/lib/browser'; import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service'; -import { inject, injectable, named, postConstruct } from 'inversify'; -import { DiagnosticSeverity, Range } from 'vscode-languageserver-types'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; +import { DiagnosticSeverity, Range } from '@theia/core/shared/vscode-languageserver-types'; import { ApplyToKind, BackgroundTaskEndedEvent, @@ -1022,11 +1022,11 @@ export class TaskService implements TaskConfigurationClient { const registeredProblemMatchers = this.problemMatcherRegistry.getAll(); items.push(...registeredProblemMatchers.map(matcher => - ({ - label: matcher.label, - value: { problemMatchers: [matcher] }, - description: matcher.name.startsWith('$') ? matcher.name : `$${matcher.name}` - }) + ({ + label: matcher.label, + value: { problemMatchers: [matcher] }, + description: matcher.name.startsWith('$') ? matcher.name : `$${matcher.name}` + }) )); return items; } diff --git a/packages/task/src/browser/task-source-resolver.ts b/packages/task/src/browser/task-source-resolver.ts index 407edea9588d7..6377d6c41dc7a 100644 --- a/packages/task/src/browser/task-source-resolver.ts +++ b/packages/task/src/browser/task-source-resolver.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { TaskConfiguration, TaskScope } from '../common'; import { TaskDefinitionRegistry } from './task-definition-registry'; diff --git a/packages/task/src/browser/task-templates.ts b/packages/task/src/browser/task-templates.ts index 06b3db420a3f3..44eb92699d0bd 100644 --- a/packages/task/src/browser/task-templates.ts +++ b/packages/task/src/browser/task-templates.ts @@ -18,7 +18,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { QuickPickItem } from '@theia/core/lib/common/quick-pick-service'; /** The representation of a task template used in the auto-generation of `tasks.json` */ diff --git a/packages/task/src/browser/task-terminal-widget-manager.ts b/packages/task/src/browser/task-terminal-widget-manager.ts index a316a25124aec..b7439eb3e372e 100644 --- a/packages/task/src/browser/task-terminal-widget-manager.ts +++ b/packages/task/src/browser/task-terminal-widget-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { ApplicationShell, WidgetOpenerOptions } from '@theia/core/lib/browser'; import { TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget'; import { TerminalWidgetFactoryOptions } from '@theia/terminal/lib/browser/terminal-widget-impl'; diff --git a/packages/task/src/common/problem-matcher-protocol.ts b/packages/task/src/common/problem-matcher-protocol.ts index 1344048a0df47..284c98e778ce3 100644 --- a/packages/task/src/common/problem-matcher-protocol.ts +++ b/packages/task/src/common/problem-matcher-protocol.ts @@ -22,9 +22,9 @@ *--------------------------------------------------------------------------------------------*/ import { Severity } from '@theia/core/lib/common/severity'; -import { Diagnostic } from 'vscode-languageserver-types'; +import { Diagnostic } from '@theia/core/shared/vscode-languageserver-types'; // TODO use URI from `@theia/core` instead -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { ProblemPatternContribution, WatchingMatcherContribution } from './task-protocol'; export enum ApplyToKind { diff --git a/packages/task/src/common/task-common-module.ts b/packages/task/src/common/task-common-module.ts index 6b34dda687cb4..3d0d58d1effb0 100644 --- a/packages/task/src/common/task-common-module.ts +++ b/packages/task/src/common/task-common-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core'; import { TaskWatcher } from './task-watcher'; diff --git a/packages/task/src/common/task-watcher.ts b/packages/task/src/common/task-watcher.ts index 7215699d911cc..8c4c7becd8f8a 100644 --- a/packages/task/src/common/task-watcher.ts +++ b/packages/task/src/common/task-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { TaskClient, TaskExitedEvent, TaskInfo, TaskOutputProcessedEvent, BackgroundTaskEndedEvent } from './task-protocol'; diff --git a/packages/task/src/node/process/process-task-runner-backend-module.ts b/packages/task/src/node/process/process-task-runner-backend-module.ts index f9bccf94d511f..798f39df88db9 100644 --- a/packages/task/src/node/process/process-task-runner-backend-module.ts +++ b/packages/task/src/node/process/process-task-runner-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { ProcessTask, TaskFactory, TaskProcessOptions } from './process-task'; import { ProcessTaskRunner } from './process-task-runner'; import { ProcessTaskRunnerContribution } from './process-task-runner-contribution'; diff --git a/packages/task/src/node/process/process-task-runner-contribution.ts b/packages/task/src/node/process/process-task-runner-contribution.ts index 0c19fbbc8d8c9..563985ea1ce7a 100644 --- a/packages/task/src/node/process/process-task-runner-contribution.ts +++ b/packages/task/src/node/process/process-task-runner-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ProcessTaskRunner } from './process-task-runner'; import { TaskRunnerContribution, TaskRunnerRegistry } from '../task-runner'; diff --git a/packages/task/src/node/process/process-task-runner.ts b/packages/task/src/node/process/process-task-runner.ts index 25e984c5e8ab8..43779a4b8b1b2 100644 --- a/packages/task/src/node/process/process-task-runner.ts +++ b/packages/task/src/node/process/process-task-runner.ts @@ -19,7 +19,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { isWindows, isOSX, ILogger } from '@theia/core'; import { FileUri } from '@theia/core/lib/node'; import { diff --git a/packages/task/src/node/process/process-task.ts b/packages/task/src/node/process/process-task.ts index d5295881cb1ed..ac5743c6a84ec 100644 --- a/packages/task/src/node/process/process-task.ts +++ b/packages/task/src/node/process/process-task.ts @@ -19,7 +19,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/'; import { Process, IProcessExitEvent } from '@theia/process/lib/node'; import { Task, TaskOptions } from '../task'; diff --git a/packages/task/src/node/task-abstract-line-matcher.ts b/packages/task/src/node/task-abstract-line-matcher.ts index 107497ff63ff7..1cba36c22defd 100644 --- a/packages/task/src/node/task-abstract-line-matcher.ts +++ b/packages/task/src/node/task-abstract-line-matcher.ts @@ -20,14 +20,14 @@ *--------------------------------------------------------------------------------------------*/ import { isWindows } from '@theia/core/lib/common/os'; -import { Diagnostic, DiagnosticSeverity, Range } from 'vscode-languageserver-types'; +import { Diagnostic, DiagnosticSeverity, Range } from '@theia/core/shared/vscode-languageserver-types'; import { FileLocationKind, ProblemMatcher, ProblemPattern, ProblemMatch, ProblemMatchData, ProblemLocationKind } from '../common/problem-matcher-protocol'; import URI from '@theia/core/lib/common/uri'; // TODO use only URI from '@theia/core' -import { URI as vscodeURI } from 'vscode-uri'; +import { URI as vscodeURI } from '@theia/core/shared/vscode-uri'; import { Severity } from '@theia/core/lib/common/severity'; const endOfLine: string = isWindows ? '\r\n' : '\n'; diff --git a/packages/task/src/node/task-backend-application-contribution.ts b/packages/task/src/node/task-backend-application-contribution.ts index dc07c91620e9a..31f45d6df2241 100644 --- a/packages/task/src/node/task-backend-application-contribution.ts +++ b/packages/task/src/node/task-backend-application-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ContributionProvider } from '@theia/core'; import { BackendApplicationContribution } from '@theia/core/lib/node'; import { TaskRunnerContribution, TaskRunnerRegistry } from './task-runner'; diff --git a/packages/task/src/node/task-backend-module.ts b/packages/task/src/node/task-backend-module.ts index 192e58cd211b5..77b0a709027b2 100644 --- a/packages/task/src/node/task-backend-module.ts +++ b/packages/task/src/node/task-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindContributionProvider } from '@theia/core'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging'; import { BackendApplicationContribution } from '@theia/core/lib/node'; diff --git a/packages/task/src/node/task-manager.ts b/packages/task/src/node/task-manager.ts index 8b0f015c0f828..3f45d23ce101d 100644 --- a/packages/task/src/node/task-manager.ts +++ b/packages/task/src/node/task-manager.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { Emitter, Event, ILogger } from '@theia/core/lib/common'; import { BackendApplicationContribution } from '@theia/core/lib/node'; import { Task } from './task'; diff --git a/packages/task/src/node/task-problem-collector.spec.ts b/packages/task/src/node/task-problem-collector.spec.ts index 2931e23f93302..bf84b9b7b156e 100644 --- a/packages/task/src/node/task-problem-collector.spec.ts +++ b/packages/task/src/node/task-problem-collector.spec.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { expect } from 'chai'; -import { DiagnosticSeverity } from 'vscode-languageserver-types'; +import { DiagnosticSeverity } from '@theia/core/shared/vscode-languageserver-types'; import { ProblemCollector } from './task-problem-collector'; import { ApplyToKind, FileLocationKind, ProblemLocationKind, ProblemMatch, ProblemMatchData, ProblemMatcher } from '../common/problem-matcher-protocol'; import { Severity } from '@theia/core/lib/common/severity'; diff --git a/packages/task/src/node/task-runner.ts b/packages/task/src/node/task-runner.ts index 218022c0823d9..e33767eff75f4 100644 --- a/packages/task/src/node/task-runner.ts +++ b/packages/task/src/node/task-runner.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core/lib/common/disposable'; import { ProcessTaskRunner } from './process/process-task-runner'; import { Task } from './task'; diff --git a/packages/task/src/node/task-server.ts b/packages/task/src/node/task-server.ts index 3d415c984d95b..8e7d8ca8ac665 100644 --- a/packages/task/src/node/task-server.ts +++ b/packages/task/src/node/task-server.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection, ILogger } from '@theia/core/lib/common/'; import { TaskClient, diff --git a/packages/task/src/node/task.ts b/packages/task/src/node/task.ts index 02a18fd810197..6064a092ef4f1 100644 --- a/packages/task/src/node/task.ts +++ b/packages/task/src/node/task.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ILogger, Disposable, DisposableCollection, Emitter, Event, MaybePromise } from '@theia/core/lib/common/'; import { TaskManager } from './task-manager'; import { TaskInfo, TaskExitedEvent, TaskConfiguration, TaskOutputEvent } from '../common/task-protocol'; diff --git a/packages/task/src/node/test/task-test-container.ts b/packages/task/src/node/test/task-test-container.ts index f7137d54c74cb..0cd535fb0146d 100644 --- a/packages/task/src/node/test/task-test-container.ts +++ b/packages/task/src/node/test/task-test-container.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { bindLogger } from '@theia/core/lib/node/logger-backend-module'; import { backendApplicationModule } from '@theia/core/lib/node/backend-application-module'; import processBackendModule from '@theia/process/lib/node/process-backend-module'; @@ -22,7 +22,7 @@ import taskBackendModule from '../task-backend-module'; import filesystemBackendModule from '@theia/filesystem/lib/node/filesystem-backend-module'; import workspaceServer from '@theia/workspace/lib/node/workspace-backend-module'; import { messagingBackendModule } from '@theia/core/lib/node/messaging/messaging-backend-module'; -import { ApplicationPackage } from '@theia/application-package/lib/application-package'; +import { ApplicationPackage } from '@theia/core/shared/@theia/application-package'; import { TerminalProcess } from '@theia/process/lib/node'; export function createTaskTestContainer(): Container { diff --git a/packages/terminal/src/browser/search/terminal-search-container.ts b/packages/terminal/src/browser/search/terminal-search-container.ts index 02f249980a089..93e38a6ba54ee 100644 --- a/packages/terminal/src/browser/search/terminal-search-container.ts +++ b/packages/terminal/src/browser/search/terminal-search-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { TerminalSearchWidget, TerminalSearchWidgetFactory } from './terminal-search-widget'; import { Terminal } from 'xterm'; diff --git a/packages/terminal/src/browser/search/terminal-search-widget.tsx b/packages/terminal/src/browser/search/terminal-search-widget.tsx index d7f77cbf2da16..ad37f5fab67a0 100644 --- a/packages/terminal/src/browser/search/terminal-search-widget.tsx +++ b/packages/terminal/src/browser/search/terminal-search-widget.tsx @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ReactWidget } from '@theia/core/lib/browser/widgets/react-widget'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import '../../../src/browser/style/terminal-search.css'; import { Terminal } from 'xterm'; import { SearchAddon, ISearchOptions } from 'xterm-addon-search'; diff --git a/packages/terminal/src/browser/terminal-copy-on-selection-handler.ts b/packages/terminal/src/browser/terminal-copy-on-selection-handler.ts index 23444f04fb6d9..ff93cc5c7e064 100644 --- a/packages/terminal/src/browser/terminal-copy-on-selection-handler.ts +++ b/packages/terminal/src/browser/terminal-copy-on-selection-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, postConstruct } from 'inversify'; +import { injectable, postConstruct } from '@theia/core/shared/inversify'; import { isFirefox } from '@theia/core/lib/browser'; @injectable() diff --git a/packages/terminal/src/browser/terminal-frontend-contribution.ts b/packages/terminal/src/browser/terminal-frontend-contribution.ts index c46ee345d63bf..0de9bcecfb331 100644 --- a/packages/terminal/src/browser/terminal-frontend-contribution.ts +++ b/packages/terminal/src/browser/terminal-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { CommandContribution, Command, diff --git a/packages/terminal/src/browser/terminal-frontend-module.ts b/packages/terminal/src/browser/terminal-frontend-module.ts index 06eecb6aeb327..c8a5d328ea162 100644 --- a/packages/terminal/src/browser/terminal-frontend-module.ts +++ b/packages/terminal/src/browser/terminal-frontend-module.ts @@ -17,7 +17,7 @@ import '../../src/browser/style/terminal.css'; import 'xterm/css/xterm.css'; -import { ContainerModule, Container } from 'inversify'; +import { ContainerModule, Container } from '@theia/core/shared/inversify'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; import { bindContributionProvider } from '@theia/core'; import { KeybindingContribution, WebSocketConnectionProvider, WidgetFactory, KeybindingContext, QuickOpenContribution } from '@theia/core/lib/browser'; diff --git a/packages/terminal/src/browser/terminal-keybinding-contexts.ts b/packages/terminal/src/browser/terminal-keybinding-contexts.ts index 3daa3958d1cc0..e982d6da25a5d 100644 --- a/packages/terminal/src/browser/terminal-keybinding-contexts.ts +++ b/packages/terminal/src/browser/terminal-keybinding-contexts.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { KeybindingContext, ApplicationShell } from '@theia/core/lib/browser'; import { TerminalWidget } from './base/terminal-widget'; diff --git a/packages/terminal/src/browser/terminal-linkmatcher-diff.ts b/packages/terminal/src/browser/terminal-linkmatcher-diff.ts index f775fbe198183..cdec4071f03c9 100644 --- a/packages/terminal/src/browser/terminal-linkmatcher-diff.ts +++ b/packages/terminal/src/browser/terminal-linkmatcher-diff.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { TerminalLinkmatcherFiles } from './terminal-linkmatcher-files'; @injectable() diff --git a/packages/terminal/src/browser/terminal-linkmatcher-files.ts b/packages/terminal/src/browser/terminal-linkmatcher-files.ts index be6472be056e6..f1ce410a26232 100644 --- a/packages/terminal/src/browser/terminal-linkmatcher-files.ts +++ b/packages/terminal/src/browser/terminal-linkmatcher-files.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ApplicationServer } from '@theia/core/lib/common/application-protocol'; import { OS } from '@theia/core/lib/common'; import { OpenerService } from '@theia/core/lib/browser'; diff --git a/packages/terminal/src/browser/terminal-linkmatcher.ts b/packages/terminal/src/browser/terminal-linkmatcher.ts index eafccb58dcc16..787cedbadcd98 100644 --- a/packages/terminal/src/browser/terminal-linkmatcher.ts +++ b/packages/terminal/src/browser/terminal-linkmatcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { isOSX, } from '@theia/core'; import { TerminalContribution } from './terminal-contribution'; import { TerminalWidgetImpl } from './terminal-widget-impl'; diff --git a/packages/terminal/src/browser/terminal-preferences.ts b/packages/terminal/src/browser/terminal-preferences.ts index 7c6b45adddee2..d719b845f76b6 100644 --- a/packages/terminal/src/browser/terminal-preferences.ts +++ b/packages/terminal/src/browser/terminal-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, PreferenceService, PreferenceContribution, PreferenceSchema } from '@theia/core/lib/browser'; import { EDITOR_FONT_DEFAULTS } from '@theia/editor/lib/browser'; diff --git a/packages/terminal/src/browser/terminal-quick-open-service.ts b/packages/terminal/src/browser/terminal-quick-open-service.ts index d0ed9bce9234c..2d683ff9d4920 100644 --- a/packages/terminal/src/browser/terminal-quick-open-service.ts +++ b/packages/terminal/src/browser/terminal-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { QuickOpenModel, QuickOpenGroupItem, QuickOpenHandler, QuickOpenOptions, QuickOpenItemOptions, QuickOpenMode, diff --git a/packages/terminal/src/browser/terminal-theme-service.ts b/packages/terminal/src/browser/terminal-theme-service.ts index 6b7b6cfeb80cc..a14ab55ebc85f 100644 --- a/packages/terminal/src/browser/terminal-theme-service.ts +++ b/packages/terminal/src/browser/terminal-theme-service.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import { ITheme } from 'xterm'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ColorRegistry, ColorDefaults } from '@theia/core/lib/browser/color-registry'; import { ThemeService } from '@theia/core/lib/browser/theming'; diff --git a/packages/terminal/src/browser/terminal-widget-impl.ts b/packages/terminal/src/browser/terminal-widget-impl.ts index fe5ed50bf27b3..c4910bb1c6601 100644 --- a/packages/terminal/src/browser/terminal-widget-impl.ts +++ b/packages/terminal/src/browser/terminal-widget-impl.ts @@ -16,7 +16,7 @@ import { Terminal, RendererType } from 'xterm'; import { FitAddon } from 'xterm-addon-fit'; -import { inject, injectable, named, postConstruct } from 'inversify'; +import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify'; import { ContributionProvider, Disposable, Event, Emitter, ILogger, DisposableCollection } from '@theia/core'; import { Widget, Message, WebSocketConnectionProvider, StatefulWidget, isFirefox, MessageLoop, KeyCode } from '@theia/core/lib/browser'; import { isOSX } from '@theia/core/lib/common'; @@ -26,7 +26,7 @@ import { terminalsPath } from '../common/terminal-protocol'; import { IBaseTerminalServer, TerminalProcessInfo } from '../common/base-terminal-protocol'; import { TerminalWatcher } from '../common/terminal-watcher'; import { TerminalWidgetOptions, TerminalWidget, TerminalDimensions } from './base/terminal-widget'; -import { MessageConnection } from 'vscode-jsonrpc'; +import { MessageConnection } from '@theia/core/shared/vscode-ws-jsonrpc'; import { Deferred } from '@theia/core/lib/common/promise-util'; import { TerminalPreferences, TerminalRendererType, isTerminalRendererType, DEFAULT_TERMINAL_RENDERER_TYPE, CursorStyle } from './terminal-preferences'; import { TerminalContribution } from './terminal-contribution'; diff --git a/packages/terminal/src/common/terminal-common-module.ts b/packages/terminal/src/common/terminal-common-module.ts index 2fe71c351eb44..87a9eb99b19f5 100644 --- a/packages/terminal/src/common/terminal-common-module.ts +++ b/packages/terminal/src/common/terminal-common-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core'; /** diff --git a/packages/terminal/src/common/terminal-watcher.ts b/packages/terminal/src/common/terminal-watcher.ts index b2e345242bef0..be5631dc1b4a9 100644 --- a/packages/terminal/src/common/terminal-watcher.ts +++ b/packages/terminal/src/common/terminal-watcher.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { IBaseTerminalClient, diff --git a/packages/terminal/src/node/base-terminal-server.ts b/packages/terminal/src/node/base-terminal-server.ts index 564155128dd87..57f31cd139dd6 100644 --- a/packages/terminal/src/node/base-terminal-server.ts +++ b/packages/terminal/src/node/base-terminal-server.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { ILogger, DisposableCollection, isWindows } from '@theia/core/lib/common'; import { IBaseTerminalServer, diff --git a/packages/terminal/src/node/shell-process.ts b/packages/terminal/src/node/shell-process.ts index 21dd6424e0e0e..45f3a86ff9d7a 100644 --- a/packages/terminal/src/node/shell-process.ts +++ b/packages/terminal/src/node/shell-process.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import * as os from 'os'; import { ILogger } from '@theia/core/lib/common/logger'; import { TerminalProcess, TerminalProcessOptions, ProcessManager, MultiRingBuffer } from '@theia/process/lib/node'; diff --git a/packages/terminal/src/node/shell-terminal-server.ts b/packages/terminal/src/node/shell-terminal-server.ts index ef50d9113c167..1c045343069f7 100644 --- a/packages/terminal/src/node/shell-terminal-server.ts +++ b/packages/terminal/src/node/shell-terminal-server.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { IShellTerminalServerOptions } from '../common/shell-terminal-protocol'; import { BaseTerminalServer } from '../node/base-terminal-server'; diff --git a/packages/terminal/src/node/terminal-backend-contribution.ts b/packages/terminal/src/node/terminal-backend-contribution.ts index 65caa68938448..7f15a6bf337fa 100644 --- a/packages/terminal/src/node/terminal-backend-contribution.ts +++ b/packages/terminal/src/node/terminal-backend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common'; import { TerminalProcess, ProcessManager } from '@theia/process/lib/node'; import { terminalsPath } from '../common/terminal-protocol'; diff --git a/packages/terminal/src/node/terminal-backend-module.ts b/packages/terminal/src/node/terminal-backend-module.ts index 26d1535d61534..c639392801a36 100644 --- a/packages/terminal/src/node/terminal-backend-module.ts +++ b/packages/terminal/src/node/terminal-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, Container, interfaces } from 'inversify'; +import { ContainerModule, Container, interfaces } from '@theia/core/shared/inversify'; import { TerminalBackendContribution } from './terminal-backend-contribution'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging'; import { ShellProcess, ShellProcessFactory, ShellProcessOptions } from './shell-process'; diff --git a/packages/terminal/src/node/terminal-server.ts b/packages/terminal/src/node/terminal-server.ts index afc526922c97c..235a101dac610 100644 --- a/packages/terminal/src/node/terminal-server.ts +++ b/packages/terminal/src/node/terminal-server.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, named } from 'inversify'; +import { inject, injectable, named } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common/logger'; import { ITerminalServer, diff --git a/packages/terminal/src/node/test/terminal-test-container.ts b/packages/terminal/src/node/test/terminal-test-container.ts index 15ac597d63e75..f070051603b71 100644 --- a/packages/terminal/src/node/test/terminal-test-container.ts +++ b/packages/terminal/src/node/test/terminal-test-container.ts @@ -13,13 +13,13 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { bindLogger } from '@theia/core/lib/node/logger-backend-module'; import { backendApplicationModule } from '@theia/core/lib/node/backend-application-module'; import processBackendModule from '@theia/process/lib/node/process-backend-module'; import { messagingBackendModule } from '@theia/core/lib/node/messaging/messaging-backend-module'; import terminalBackendModule from '../terminal-backend-module'; -import { ApplicationPackage } from '@theia/application-package/lib/application-package'; +import { ApplicationPackage } from '@theia/core/shared/@theia/application-package'; export function createTerminalTestContainer(): Container { const container = new Container(); diff --git a/packages/timeline/src/browser/timeline-context-key-service.ts b/packages/timeline/src/browser/timeline-context-key-service.ts index 18b157a059c3b..9c9110306b564 100644 --- a/packages/timeline/src/browser/timeline-context-key-service.ts +++ b/packages/timeline/src/browser/timeline-context-key-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service'; @injectable() diff --git a/packages/timeline/src/browser/timeline-contribution.ts b/packages/timeline/src/browser/timeline-contribution.ts index b504a60a832fa..21f1d7ba73548 100644 --- a/packages/timeline/src/browser/timeline-contribution.ts +++ b/packages/timeline/src/browser/timeline-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { ViewContainer, WidgetManager, @@ -27,7 +27,7 @@ import { TimelineWidget } from './timeline-widget'; import { TimelineService } from './timeline-service'; import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common'; import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar'; -import { toArray } from '@phosphor/algorithm'; +import { toArray } from '@theia/core/shared/@phosphor/algorithm'; @injectable() export class TimelineContribution implements CommandContribution, TabBarToolbarContribution { @@ -63,11 +63,11 @@ export class TimelineContribution implements CommandContribution, TabBarToolbarC } }; this.widgetManager.onWillCreateWidget(async event => { - if (event.widget.id === EXPLORER_VIEW_CONTAINER_ID && this.timelineService.getSources().length > 0) { - event.waitUntil(attachTimeline(event.widget)); - } + if (event.widget.id === EXPLORER_VIEW_CONTAINER_ID && this.timelineService.getSources().length > 0) { + event.waitUntil(attachTimeline(event.widget)); + } }); - this.timelineService.onDidChangeProviders( async event => { + this.timelineService.onDidChangeProviders(async event => { const explorer = await this.widgetManager.getWidget(EXPLORER_VIEW_CONTAINER_ID); if (explorer && event.added && event.added.length > 0) { attachTimeline(explorer); diff --git a/packages/timeline/src/browser/timeline-empty-widget.tsx b/packages/timeline/src/browser/timeline-empty-widget.tsx index 1e8fd9bc789b2..5524e6d1bce0e 100644 --- a/packages/timeline/src/browser/timeline-empty-widget.tsx +++ b/packages/timeline/src/browser/timeline-empty-widget.tsx @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { ReactWidget } from '@theia/core/lib/browser'; import { AlertMessage } from '@theia/core/lib/browser/widgets/alert-message'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; @injectable() export class TimelineEmptyWidget extends ReactWidget { diff --git a/packages/timeline/src/browser/timeline-frontend-module.ts b/packages/timeline/src/browser/timeline-frontend-module.ts index c42db58264524..0626d51532b99 100644 --- a/packages/timeline/src/browser/timeline-frontend-module.ts +++ b/packages/timeline/src/browser/timeline-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Container, ContainerModule, interfaces } from 'inversify'; +import { Container, ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { WidgetFactory } from '@theia/core/lib/browser/widget-manager'; import { TimelineService } from './timeline-service'; import { TimelineWidget } from './timeline-widget'; diff --git a/packages/timeline/src/browser/timeline-service.ts b/packages/timeline/src/browser/timeline-service.ts index c7bb17f9bff77..8d147a6da8b48 100644 --- a/packages/timeline/src/browser/timeline-service.ts +++ b/packages/timeline/src/browser/timeline-service.ts @@ -14,9 +14,9 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Disposable, Emitter, Event } from '@theia/core/lib/common'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; import { InternalTimelineOptions, Timeline, diff --git a/packages/timeline/src/browser/timeline-tree-model.ts b/packages/timeline/src/browser/timeline-tree-model.ts index 834a2e0b4b777..2e6bf417f9ceb 100644 --- a/packages/timeline/src/browser/timeline-tree-model.ts +++ b/packages/timeline/src/browser/timeline-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { CompositeTreeNode, SelectableTreeNode, @@ -38,14 +38,14 @@ export class TimelineTreeModel extends TreeModelImpl { children: [] } as CompositeTreeNode; const children = items.map(item => - ({ - timelineItem: item, - id: item.id ? item.id : item.timestamp.toString(), - parent: root, - detail: item.detail, - selected: false, - visible: true - } as TimelineNode) + ({ + timelineItem: item, + id: item.id ? item.id : item.timestamp.toString(), + parent: root, + detail: item.detail, + selected: false, + visible: true + } as TimelineNode) ); let loadMore; if (hasMoreItems) { diff --git a/packages/timeline/src/browser/timeline-tree-widget.tsx b/packages/timeline/src/browser/timeline-tree-widget.tsx index 2ff4e78256d9a..481f5ef1550f6 100644 --- a/packages/timeline/src/browser/timeline-tree-widget.tsx +++ b/packages/timeline/src/browser/timeline-tree-widget.tsx @@ -14,14 +14,14 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandRegistry, MenuModelRegistry, MenuPath } from '@theia/core/lib/common'; import { TreeWidget, TreeProps, NodeProps, TREE_NODE_SEGMENT_GROW_CLASS } from '@theia/core/lib/browser/tree'; import { ContextMenuRenderer } from '@theia/core/lib/browser'; import { TimelineNode, TimelineTreeModel } from './timeline-tree-model'; import { TimelineService } from './timeline-service'; import { TimelineContextKeyService } from './timeline-context-key-service'; -import * as React from 'react'; +import * as React from '@theia/core/shared/react'; import { TimelineItem } from '../common/timeline-model'; export const TIMELINE_ITEM_CONTEXT_MENU: MenuPath = ['timeline-item-context-menu']; diff --git a/packages/timeline/src/browser/timeline-widget.tsx b/packages/timeline/src/browser/timeline-widget.tsx index aafeb4ef6ace4..fa4db42026604 100644 --- a/packages/timeline/src/browser/timeline-widget.tsx +++ b/packages/timeline/src/browser/timeline-widget.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { Message } from '@phosphor/messaging'; -import { inject, injectable, postConstruct } from 'inversify'; +import { Message } from '@theia/core/shared/@phosphor/messaging'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { ApplicationShell, BaseWidget, @@ -28,9 +28,9 @@ import { TimelineTreeWidget } from './timeline-tree-widget'; import { TimelineService } from './timeline-service'; import { CommandRegistry, SelectionService } from '@theia/core/lib/common'; import { TimelineEmptyWidget } from './timeline-empty-widget'; -import { toArray } from '@phosphor/algorithm'; +import { toArray } from '@theia/core/shared/@phosphor/algorithm'; import URI from '@theia/core/lib/common/uri'; -import { URI as CodeURI } from 'vscode-uri'; +import { URI as CodeURI } from '@theia/core/shared/vscode-uri'; import { TimelineAggregate } from './timeline-service'; @injectable() diff --git a/packages/timeline/src/common/timeline-model.ts b/packages/timeline/src/common/timeline-model.ts index 7395d55a15a09..a7ce57f5021a1 100644 --- a/packages/timeline/src/common/timeline-model.ts +++ b/packages/timeline/src/common/timeline-model.ts @@ -21,7 +21,7 @@ // some code copied and modified from https://github.com/microsoft/vscode/blob/3aab025eaebde6c9544293b6c7554f3f583e15d0/src/vs/workbench/contrib/timeline/common/timeline.ts import { Command, Disposable, Event } from '@theia/core/lib/common'; -import { URI } from 'vscode-uri'; +import { URI } from '@theia/core/shared/vscode-uri'; export interface TimelineItem { source: string; diff --git a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-container.ts b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-container.ts index d4414687a18ac..a146c573579c1 100644 --- a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-container.ts +++ b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces, Container } from 'inversify'; +import { interfaces, Container } from '@theia/core/shared/inversify'; import { createTreeContainer, Tree, TreeImpl, TreeModel, TreeModelImpl, TreeWidget } from '@theia/core/lib/browser/tree'; import { TypeHierarchyTree } from './typehierarchy-tree'; import { TypeHierarchyTreeModel } from './typehierarchy-tree-model'; diff --git a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-model.ts b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-model.ts index 3dda8974bf29e..5b5b14b272f66 100644 --- a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-model.ts +++ b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { TreeNode } from '@theia/core/lib/browser/tree/tree'; import { TreeModelImpl } from '@theia/core/lib/browser/tree/tree-model'; import { TypeHierarchyRegistry, TypeHierarchyDirection, TypeHierarchyParams } from '../typehierarchy-provider'; diff --git a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-widget.tsx b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-widget.tsx index bb5c56d2545f2..73f1784b0d5b8 100644 --- a/packages/typehierarchy/src/browser/tree/typehierarchy-tree-widget.tsx +++ b/packages/typehierarchy/src/browser/tree/typehierarchy-tree-widget.tsx @@ -14,11 +14,11 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { inject, injectable } from 'inversify'; -import { DockPanel } from '@phosphor/widgets'; +import * as React from '@theia/core/shared/react'; +import { inject, injectable } from '@theia/core/shared/inversify'; +import { DockPanel } from '@theia/core/shared/@phosphor/widgets'; import URI from '@theia/core/lib/common/uri'; -import { SymbolKind, Range } from 'vscode-languageserver-types'; +import { SymbolKind, Range } from '@theia/core/shared/vscode-languageserver-types'; import { TreeNode } from '@theia/core/lib/browser/tree/tree'; import { EditorManager } from '@theia/editor/lib/browser/editor-manager'; import { ContextMenuRenderer } from '@theia/core/lib/browser/context-menu-renderer'; diff --git a/packages/typehierarchy/src/browser/tree/typehierarchy-tree.ts b/packages/typehierarchy/src/browser/tree/typehierarchy-tree.ts index 143d6459f4a1c..ba02766570445 100644 --- a/packages/typehierarchy/src/browser/tree/typehierarchy-tree.ts +++ b/packages/typehierarchy/src/browser/tree/typehierarchy-tree.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { v4 } from 'uuid'; import URI from '@theia/core/lib/common/uri'; import { Location } from '@theia/editor/lib/browser/editor'; diff --git a/packages/typehierarchy/src/browser/typehierarchy-contribution.ts b/packages/typehierarchy/src/browser/typehierarchy-contribution.ts index 19ca13c2eec63..adcaff2a7dfef 100644 --- a/packages/typehierarchy/src/browser/typehierarchy-contribution.ts +++ b/packages/typehierarchy/src/browser/typehierarchy-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { MenuModelRegistry } from '@theia/core/lib/common/menu'; import { ApplicationShell } from '@theia/core/lib/browser/shell'; import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding'; diff --git a/packages/typehierarchy/src/browser/typehierarchy-frontend-module.ts b/packages/typehierarchy/src/browser/typehierarchy-frontend-module.ts index 5d15f90e15433..9ad9a07775b48 100644 --- a/packages/typehierarchy/src/browser/typehierarchy-frontend-module.ts +++ b/packages/typehierarchy/src/browser/typehierarchy-frontend-module.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { WidgetFactory } from '@theia/core/lib/browser/widget-manager'; import { bindViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { TypeHierarchyRegistry } from './typehierarchy-provider'; diff --git a/packages/typehierarchy/src/browser/typehierarchy-provider.ts b/packages/typehierarchy/src/browser/typehierarchy-provider.ts index 3dd91fd5f4068..215356a408e74 100644 --- a/packages/typehierarchy/src/browser/typehierarchy-provider.ts +++ b/packages/typehierarchy/src/browser/typehierarchy-provider.ts @@ -14,10 +14,10 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Disposable } from '@theia/core/lib/common/disposable'; -import { SymbolKind, Range } from 'vscode-languageserver-types'; -import { TextDocumentPositionParams } from 'vscode-languageserver-protocol'; +import { SymbolKind, Range } from '@theia/core/shared/vscode-languageserver-types'; +import { TextDocumentPositionParams } from '@theia/core/shared/vscode-languageserver-protocol'; @injectable() export class TypeHierarchyRegistry { @@ -162,4 +162,3 @@ export interface TypeHierarchyItem { // eslint-disable-next-line @typescript-eslint/no-explicit-any data?: any; } - diff --git a/packages/userstorage/src/browser/user-storage-contribution.ts b/packages/userstorage/src/browser/user-storage-contribution.ts index e2d2371169eaf..886dfcd2ab178 100644 --- a/packages/userstorage/src/browser/user-storage-contribution.ts +++ b/packages/userstorage/src/browser/user-storage-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { DisposableCollection } from '@theia/core/lib/common/disposable'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; diff --git a/packages/userstorage/src/browser/user-storage-frontend-module.ts b/packages/userstorage/src/browser/user-storage-frontend-module.ts index a8c8a898a5383..4239b370a1f50 100644 --- a/packages/userstorage/src/browser/user-storage-frontend-module.ts +++ b/packages/userstorage/src/browser/user-storage-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, } from 'inversify'; +import { ContainerModule, } from '@theia/core/shared/inversify'; import { FileServiceContribution } from '@theia/filesystem/lib/browser/file-service'; import { UserStorageContribution } from './user-storage-contribution'; diff --git a/packages/variable-resolver/src/browser/common-variable-contribution.ts b/packages/variable-resolver/src/browser/common-variable-contribution.ts index 8afac0905435d..3d90c28fd2dcd 100644 --- a/packages/variable-resolver/src/browser/common-variable-contribution.ts +++ b/packages/variable-resolver/src/browser/common-variable-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { VariableContribution, VariableRegistry } from './variable'; import { ApplicationServer } from '@theia/core/lib/common/application-protocol'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; diff --git a/packages/variable-resolver/src/browser/variable-quick-open-service.ts b/packages/variable-resolver/src/browser/variable-quick-open-service.ts index 0943fde4569b8..143948c14ac0b 100644 --- a/packages/variable-resolver/src/browser/variable-quick-open-service.ts +++ b/packages/variable-resolver/src/browser/variable-quick-open-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { MessageService } from '@theia/core/lib/common/message-service'; import { QuickOpenModel, QuickOpenItem, QuickOpenMode } from '@theia/core/lib/common/quick-open-model'; import { QuickOpenService } from '@theia/core/lib/browser/quick-open/quick-open-service'; diff --git a/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.spec.ts b/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.spec.ts index 6693ebbb75dad..b30348ae7818f 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.spec.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.spec.ts @@ -19,7 +19,7 @@ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom'; let disableJSDOM = enableJSDOM(); import * as chai from 'chai'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { ILogger, bindContributionProvider } from '@theia/core/lib/common'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import { VariableContribution, VariableRegistry } from './variable'; diff --git a/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.ts b/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.ts index a36e82afdfbaf..64736830dfbf2 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, named } from 'inversify'; +import { injectable, inject, named } from '@theia/core/shared/inversify'; import { FrontendApplicationContribution } from '@theia/core/lib/browser'; import { Command, CommandContribution, CommandRegistry, ContributionProvider } from '@theia/core/lib/common'; import { VariableContribution, VariableRegistry } from './variable'; diff --git a/packages/variable-resolver/src/browser/variable-resolver-frontend-module.ts b/packages/variable-resolver/src/browser/variable-resolver-frontend-module.ts index a738a4b674d4e..ea890c90a0a28 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-frontend-module.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { bindContributionProvider, CommandContribution } from '@theia/core'; import { FrontendApplicationContribution } from '@theia/core/lib/browser'; import { VariableRegistry, VariableContribution } from './variable'; diff --git a/packages/variable-resolver/src/browser/variable-resolver-service.spec.ts b/packages/variable-resolver/src/browser/variable-resolver-service.spec.ts index d01672bfc52fd..56f6b87d2dc95 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-service.spec.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-service.spec.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as chai from 'chai'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { ILogger } from '@theia/core/lib/common'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import { Variable, VariableRegistry } from './variable'; diff --git a/packages/variable-resolver/src/browser/variable-resolver-service.ts b/packages/variable-resolver/src/browser/variable-resolver-service.ts index d4dd6f7a3320c..32340e452c42f 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-service.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-service.ts @@ -16,10 +16,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { VariableRegistry } from './variable'; import URI from '@theia/core/lib/common/uri'; -import { JSONExt, ReadonlyJSONValue } from '@phosphor/coreutils/lib/json'; +import { JSONExt, ReadonlyJSONValue } from '@theia/core/shared/@phosphor/coreutils'; export interface VariableResolveOptions { context?: URI; diff --git a/packages/variable-resolver/src/browser/variable.spec.ts b/packages/variable-resolver/src/browser/variable.spec.ts index c4d33d5d19355..c40dc78f5105a 100644 --- a/packages/variable-resolver/src/browser/variable.spec.ts +++ b/packages/variable-resolver/src/browser/variable.spec.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import * as chai from 'chai'; -import { Container, ContainerModule } from 'inversify'; +import { Container, ContainerModule } from '@theia/core/shared/inversify'; import { ILogger, Disposable } from '@theia/core/lib/common'; import { MockLogger } from '@theia/core/lib/common/test/mock-logger'; import { Variable, VariableRegistry } from './variable'; diff --git a/packages/variable-resolver/src/browser/variable.ts b/packages/variable-resolver/src/browser/variable.ts index a81fa0a17fa0c..cdf79b501935b 100644 --- a/packages/variable-resolver/src/browser/variable.ts +++ b/packages/variable-resolver/src/browser/variable.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Disposable, DisposableCollection, MaybePromise } from '@theia/core'; import URI from '@theia/core/lib/common/uri'; diff --git a/packages/vsx-registry/compile.tsconfig.json b/packages/vsx-registry/compile.tsconfig.json index dba687d73e555..355e20446e63d 100644 --- a/packages/vsx-registry/compile.tsconfig.json +++ b/packages/vsx-registry/compile.tsconfig.json @@ -14,6 +14,12 @@ }, { "path": "../plugin-ext-vscode/compile.tsconfig.json" + }, + { + "path": "../plugin-ext/compile.tsconfig.json" + }, + { + "path": "../filesystem/compile.tsconfig.json" } ] } diff --git a/packages/vsx-registry/package.json b/packages/vsx-registry/package.json index 2e8d0afdb35a6..20d4366b76472 100644 --- a/packages/vsx-registry/package.json +++ b/packages/vsx-registry/package.json @@ -4,12 +4,13 @@ "description": "Theia - VSX Registry", "dependencies": { "@theia/core": "1.12.0", + "@theia/filesystem": "1.12.0", + "@theia/plugin-ext": "1.12.0", "@theia/plugin-ext-vscode": "1.12.0", "@types/bent": "^7.0.1", "@types/sanitize-html": "^1.13.31", "@types/showdown": "^1.7.1", "bent": "^7.1.0", - "fs-extra": "^4.0.2", "p-debounce": "^2.1.0", "requestretry": "^3.1.0", "sanitize-html": "^1.14.1", diff --git a/packages/vsx-registry/src/browser/vsx-api-version-provider-frontend-impl.ts b/packages/vsx-registry/src/browser/vsx-api-version-provider-frontend-impl.ts index 4d1217542f762..b18c4ac4b2e1f 100644 --- a/packages/vsx-registry/src/browser/vsx-api-version-provider-frontend-impl.ts +++ b/packages/vsx-registry/src/browser/vsx-api-version-provider-frontend-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { VSXEnvironment } from '../common/vsx-environment'; import { VSXApiVersionProvider } from '../common/vsx-api-version-provider'; import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser'; diff --git a/packages/vsx-registry/src/browser/vsx-extension-editor-manager.ts b/packages/vsx-registry/src/browser/vsx-extension-editor-manager.ts index f7febf5c704d3..c14a641e4a187 100644 --- a/packages/vsx-registry/src/browser/vsx-extension-editor-manager.ts +++ b/packages/vsx-registry/src/browser/vsx-extension-editor-manager.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { WidgetOpenHandler } from '@theia/core/lib/browser'; import { VSXExtensionOptions } from './vsx-extension'; diff --git a/packages/vsx-registry/src/browser/vsx-extension-editor.tsx b/packages/vsx-registry/src/browser/vsx-extension-editor.tsx index 33ff618efb7cf..fb903fe077a65 100644 --- a/packages/vsx-registry/src/browser/vsx-extension-editor.tsx +++ b/packages/vsx-registry/src/browser/vsx-extension-editor.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { inject, injectable, postConstruct } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { ReactWidget, Message, Widget } from '@theia/core/lib/browser'; import { VSXExtension, VSXExtensionEditorComponent } from './vsx-extension'; import { VSXExtensionsModel } from './vsx-extensions-model'; diff --git a/packages/vsx-registry/src/browser/vsx-extension.tsx b/packages/vsx-registry/src/browser/vsx-extension.tsx index 62a53bebc4060..f750bd93087d5 100644 --- a/packages/vsx-registry/src/browser/vsx-extension.tsx +++ b/packages/vsx-registry/src/browser/vsx-extension.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, inject } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { TreeElement } from '@theia/core/lib/browser/source-tree'; import { OpenerService, open, OpenerOptions } from '@theia/core/lib/browser/opener-service'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-contribution.ts b/packages/vsx-registry/src/browser/vsx-extensions-contribution.ts index f44f710294c33..ca7de7d914306 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-contribution.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { Command, CommandRegistry } from '@theia/core/lib/common/command'; import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution'; import { VSXExtensionsViewContainer } from './vsx-extensions-view-container'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-model.ts b/packages/vsx-registry/src/browser/vsx-extensions-model.ts index 79ad080c8126c..b011688b4849b 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-model.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import debounce from 'p-debounce'; import * as showdown from 'showdown'; import * as sanitize from 'sanitize-html'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-search-bar.tsx b/packages/vsx-registry/src/browser/vsx-extensions-search-bar.tsx index c9d88fd883eca..9284970710f4f 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-search-bar.tsx +++ b/packages/vsx-registry/src/browser/vsx-extensions-search-bar.tsx @@ -14,8 +14,8 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import * as React from 'react'; -import { injectable, postConstruct, inject } from 'inversify'; +import * as React from '@theia/core/shared/react'; +import { injectable, postConstruct, inject } from '@theia/core/shared/inversify'; import { ReactWidget, Message } from '@theia/core/lib/browser/widgets'; import { VSXExtensionsSearchModel } from './vsx-extensions-search-model'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-search-model.ts b/packages/vsx-registry/src/browser/vsx-extensions-search-model.ts index 84e175479dc1e..38cea4e691c53 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-search-model.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-search-model.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { Emitter } from '@theia/core/lib/common/event'; @injectable() diff --git a/packages/vsx-registry/src/browser/vsx-extensions-source.ts b/packages/vsx-registry/src/browser/vsx-extensions-source.ts index d8fd518cb0b00..4dc3aa956d657 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-source.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-source.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree'; import { VSXExtensionsModel } from './vsx-extensions-model'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts b/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts index 0192fef03ce2b..679466f2621a3 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-view-container.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 *******************************************************************************‚*/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { ViewContainer, PanelLayout, ViewContainerPart, Message } from '@theia/core/lib/browser'; import { VSXExtensionsSearchBar } from './vsx-extensions-search-bar'; import { VSXExtensionsWidget, } from './vsx-extensions-widget'; diff --git a/packages/vsx-registry/src/browser/vsx-extensions-widget.ts b/packages/vsx-registry/src/browser/vsx-extensions-widget.ts index 78bb31a4b8568..f8fdbdc402a91 100644 --- a/packages/vsx-registry/src/browser/vsx-extensions-widget.ts +++ b/packages/vsx-registry/src/browser/vsx-extensions-widget.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, interfaces, postConstruct, inject } from 'inversify'; +import { injectable, interfaces, postConstruct, inject } from '@theia/core/shared/inversify'; import { SourceTreeWidget } from '@theia/core/lib/browser/source-tree'; import { VSXExtensionsSource, VSXExtensionsSourceOptions } from './vsx-extensions-source'; @@ -74,4 +74,3 @@ export class VSXExtensionsWidget extends SourceTreeWidget { } } - diff --git a/packages/vsx-registry/src/browser/vsx-registry-frontend-module.ts b/packages/vsx-registry/src/browser/vsx-registry-frontend-module.ts index bd10988eb8431..ec66b149d62d4 100644 --- a/packages/vsx-registry/src/browser/vsx-registry-frontend-module.ts +++ b/packages/vsx-registry/src/browser/vsx-registry-frontend-module.ts @@ -16,7 +16,7 @@ import '../../src/browser/style/index.css'; -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { WidgetFactory, bindViewContribution, FrontendApplicationContribution, ViewContainerIdentifier, OpenHandler, WidgetManager } from '@theia/core/lib/browser'; import { VSXExtensionsViewContainer } from './vsx-extensions-view-container'; import { VSXExtensionsContribution } from './vsx-extensions-contribution'; diff --git a/packages/vsx-registry/src/common/vsx-environment.tsx b/packages/vsx-registry/src/common/vsx-environment.tsx index a028dfd25d9e2..5f70f3d0d480d 100644 --- a/packages/vsx-registry/src/common/vsx-environment.tsx +++ b/packages/vsx-registry/src/common/vsx-environment.tsx @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import URI from '@theia/core/lib/common/uri'; import { VSCODE_DEFAULT_API_VERSION } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-types'; diff --git a/packages/vsx-registry/src/common/vsx-registry-api.spec.ts b/packages/vsx-registry/src/common/vsx-registry-api.spec.ts index af664d05454e3..419157ed78c1f 100644 --- a/packages/vsx-registry/src/common/vsx-registry-api.spec.ts +++ b/packages/vsx-registry/src/common/vsx-registry-api.spec.ts @@ -16,7 +16,7 @@ import * as chai from 'chai'; import URI from '@theia/core/lib/common/uri'; -import { Container } from 'inversify'; +import { Container } from '@theia/core/shared/inversify'; import { VSXEnvironment } from './vsx-environment'; import { VSXRegistryAPI } from './vsx-registry-api'; import { VSXSearchParam } from './vsx-registry-types'; diff --git a/packages/vsx-registry/src/common/vsx-registry-api.ts b/packages/vsx-registry/src/common/vsx-registry-api.ts index 863882b6ff33e..28ba7878b9992 100644 --- a/packages/vsx-registry/src/common/vsx-registry-api.ts +++ b/packages/vsx-registry/src/common/vsx-registry-api.ts @@ -16,7 +16,7 @@ import * as bent from 'bent'; import * as semver from 'semver'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { VSXExtensionRaw, VSXSearchParam, VSXSearchResult, VSXAllVersions } from './vsx-registry-types'; import { VSXEnvironment } from './vsx-environment'; import { VSXApiVersionProvider } from './vsx-api-version-provider'; diff --git a/packages/vsx-registry/src/node/vsx-api-version-provider-backend-impl.ts b/packages/vsx-registry/src/node/vsx-api-version-provider-backend-impl.ts index ab955137a4a29..8ad03d239fbcb 100644 --- a/packages/vsx-registry/src/node/vsx-api-version-provider-backend-impl.ts +++ b/packages/vsx-registry/src/node/vsx-api-version-provider-backend-impl.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { VSXApiVersionProvider } from '../common/vsx-api-version-provider'; import { VSCODE_DEFAULT_API_VERSION } from '@theia/plugin-ext-vscode/lib/common/plugin-vscode-types'; diff --git a/packages/vsx-registry/src/node/vsx-extension-resolver.ts b/packages/vsx-registry/src/node/vsx-extension-resolver.ts index 7fd0b07c99c1d..0152081892159 100644 --- a/packages/vsx-registry/src/node/vsx-extension-resolver.ts +++ b/packages/vsx-registry/src/node/vsx-extension-resolver.ts @@ -16,10 +16,10 @@ import * as os from 'os'; import * as path from 'path'; -import * as fs from 'fs-extra'; +import * as fs from '@theia/core/shared/fs-extra'; import { v4 as uuidv4 } from 'uuid'; import * as requestretry from 'requestretry'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { PluginDeployerResolver, PluginDeployerResolverContext } from '@theia/plugin-ext/lib/common/plugin-protocol'; import { VSXExtensionUri } from '../common/vsx-extension-uri'; diff --git a/packages/vsx-registry/src/node/vsx-registry-backend-module.ts b/packages/vsx-registry/src/node/vsx-registry-backend-module.ts index dd3df83d5c7b4..5738090d33144 100644 --- a/packages/vsx-registry/src/node/vsx-registry-backend-module.ts +++ b/packages/vsx-registry/src/node/vsx-registry-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { VSXExtensionResolver } from './vsx-extension-resolver'; import { PluginDeployerResolver } from '@theia/plugin-ext/lib/common/plugin-protocol'; import { VSXRegistryAPI } from '../common/vsx-registry-api'; diff --git a/packages/workspace/src/browser/diff-service.ts b/packages/workspace/src/browser/diff-service.ts index 92b25e7e089be..e22ce96ec6a4a 100644 --- a/packages/workspace/src/browser/diff-service.ts +++ b/packages/workspace/src/browser/diff-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { DiffUris } from '@theia/core/lib/browser/diff-uris'; import { open, OpenerService, OpenerOptions } from '@theia/core/lib/browser'; diff --git a/packages/workspace/src/browser/quick-open-workspace.ts b/packages/workspace/src/browser/quick-open-workspace.ts index 2fc690acf65c2..31357a6da9dde 100644 --- a/packages/workspace/src/browser/quick-open-workspace.ts +++ b/packages/workspace/src/browser/quick-open-workspace.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { QuickOpenService, QuickOpenModel, QuickOpenItem, QuickOpenGroupItem, QuickOpenMode, LabelProvider } from '@theia/core/lib/browser'; import { EnvVariablesServer } from '@theia/core/lib/common/env-variables'; import { WorkspaceService } from './workspace-service'; diff --git a/packages/workspace/src/browser/workspace-commands.ts b/packages/workspace/src/browser/workspace-commands.ts index 37e73007ac7e6..334534a75b408 100644 --- a/packages/workspace/src/browser/workspace-commands.ts +++ b/packages/workspace/src/browser/workspace-commands.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { SelectionService } from '@theia/core/lib/common/selection-service'; import { Command, CommandContribution, CommandRegistry } from '@theia/core/lib/common/command'; diff --git a/packages/workspace/src/browser/workspace-compare-handler.ts b/packages/workspace/src/browser/workspace-compare-handler.ts index ffe68d18e4578..4962c28c75a48 100644 --- a/packages/workspace/src/browser/workspace-compare-handler.ts +++ b/packages/workspace/src/browser/workspace-compare-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { UriCommandHandler } from '@theia/core/lib/common/uri-command-handler'; import { DiffService } from './diff-service'; diff --git a/packages/workspace/src/browser/workspace-delete-handler.ts b/packages/workspace/src/browser/workspace-delete-handler.ts index 7e23ecc05c7eb..00886324641e3 100644 --- a/packages/workspace/src/browser/workspace-delete-handler.ts +++ b/packages/workspace/src/browser/workspace-delete-handler.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { ConfirmDialog, ApplicationShell, SaveableWidget, NavigatableWidget } from '@theia/core/lib/browser'; import { UriCommandHandler } from '@theia/core/lib/common/uri-command-handler'; diff --git a/packages/workspace/src/browser/workspace-duplicate-handler.ts b/packages/workspace/src/browser/workspace-duplicate-handler.ts index dca34070e50fc..5a0410cd70481 100644 --- a/packages/workspace/src/browser/workspace-duplicate-handler.ts +++ b/packages/workspace/src/browser/workspace-duplicate-handler.ts @@ -15,7 +15,7 @@ ********************************************************************************/ import URI from '@theia/core/lib/common/uri'; -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { WorkspaceUtils } from './workspace-utils'; import { WorkspaceService } from './workspace-service'; import { UriCommandHandler } from '@theia/core/lib/common/uri-command-handler'; diff --git a/packages/workspace/src/browser/workspace-frontend-contribution.ts b/packages/workspace/src/browser/workspace-frontend-contribution.ts index c57d9322c87e6..e7decbdd92f3e 100644 --- a/packages/workspace/src/browser/workspace-frontend-contribution.ts +++ b/packages/workspace/src/browser/workspace-frontend-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject } from 'inversify'; +import { injectable, inject } from '@theia/core/shared/inversify'; import { CommandContribution, CommandRegistry, MenuContribution, MenuModelRegistry, SelectionService } from '@theia/core/lib/common'; import { isOSX, environment, OS } from '@theia/core'; import { diff --git a/packages/workspace/src/browser/workspace-frontend-module.ts b/packages/workspace/src/browser/workspace-frontend-module.ts index b077e7cb0bc97..35a6dbb74b61a 100644 --- a/packages/workspace/src/browser/workspace-frontend-module.ts +++ b/packages/workspace/src/browser/workspace-frontend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule, interfaces } from 'inversify'; +import { ContainerModule, interfaces } from '@theia/core/shared/inversify'; import { CommandContribution, MenuContribution } from '@theia/core/lib/common'; import { WebSocketConnectionProvider, FrontendApplicationContribution, KeybindingContribution } from '@theia/core/lib/browser'; import { diff --git a/packages/workspace/src/browser/workspace-input-dialog.ts b/packages/workspace/src/browser/workspace-input-dialog.ts index 81e8ac0d72b2a..345981bfc85f9 100644 --- a/packages/workspace/src/browser/workspace-input-dialog.ts +++ b/packages/workspace/src/browser/workspace-input-dialog.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { SingleTextInputDialog, SingleTextInputDialogProps, LabelProvider } from '@theia/core/lib/browser'; diff --git a/packages/workspace/src/browser/workspace-preferences.ts b/packages/workspace/src/browser/workspace-preferences.ts index 0c0bf70042566..9cb886dac94dc 100644 --- a/packages/workspace/src/browser/workspace-preferences.ts +++ b/packages/workspace/src/browser/workspace-preferences.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { interfaces } from 'inversify'; +import { interfaces } from '@theia/core/shared/inversify'; import { createPreferenceProxy, PreferenceProxy, diff --git a/packages/workspace/src/browser/workspace-schema-updater.ts b/packages/workspace/src/browser/workspace-schema-updater.ts index 073c8cc7241db..5bdb0e6905fef 100644 --- a/packages/workspace/src/browser/workspace-schema-updater.ts +++ b/packages/workspace/src/browser/workspace-schema-updater.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { JsonSchemaContribution, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store'; import { InMemoryResources } from '@theia/core/lib/common'; import { IJSONSchema } from '@theia/core/lib/common/json-schema'; diff --git a/packages/workspace/src/browser/workspace-service.ts b/packages/workspace/src/browser/workspace-service.ts index 39c8cc9729b89..48f096de24c9f 100644 --- a/packages/workspace/src/browser/workspace-service.ts +++ b/packages/workspace/src/browser/workspace-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { WorkspaceServer, THEIA_EXT, VSCODE_EXT, getTemporaryWorkspaceFileUri } from '../common'; import { WindowService } from '@theia/core/lib/browser/window/window-service'; diff --git a/packages/workspace/src/browser/workspace-storage-service.ts b/packages/workspace/src/browser/workspace-storage-service.ts index 4eb540877d9d3..40ae6ba65c9e3 100644 --- a/packages/workspace/src/browser/workspace-storage-service.ts +++ b/packages/workspace/src/browser/workspace-storage-service.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { inject, injectable, postConstruct } from 'inversify'; +import { inject, injectable, postConstruct } from '@theia/core/shared/inversify'; import { LocalStorageService } from '@theia/core/lib/browser/storage-service'; import { StorageService } from '@theia/core/lib/browser/storage-service'; import { WorkspaceService } from './workspace-service'; diff --git a/packages/workspace/src/browser/workspace-uri-contribution.spec.ts b/packages/workspace/src/browser/workspace-uri-contribution.spec.ts index 1afcbb95aee9c..22b524d2e4cd4 100644 --- a/packages/workspace/src/browser/workspace-uri-contribution.spec.ts +++ b/packages/workspace/src/browser/workspace-uri-contribution.spec.ts @@ -19,8 +19,8 @@ const disableJSDOM = enableJSDOM(); import { expect } from 'chai'; import * as sinon from 'sinon'; -import { Container } from 'inversify'; -import { Signal } from '@phosphor/signaling'; +import { Container } from '@theia/core/shared/inversify'; +import { Signal } from '@theia/core/shared/@phosphor/signaling'; import { Event } from '@theia/core/lib/common/event'; import { ApplicationShell, WidgetManager } from '@theia/core/lib/browser'; import { DefaultUriLabelProviderContribution } from '@theia/core/lib/browser/label-provider'; diff --git a/packages/workspace/src/browser/workspace-uri-contribution.ts b/packages/workspace/src/browser/workspace-uri-contribution.ts index 95eed68cba407..afd07c37ecb3e 100644 --- a/packages/workspace/src/browser/workspace-uri-contribution.ts +++ b/packages/workspace/src/browser/workspace-uri-contribution.ts @@ -16,7 +16,7 @@ import { DefaultUriLabelProviderContribution, URIIconReference } from '@theia/core/lib/browser/label-provider'; import URI from '@theia/core/lib/common/uri'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { FileStat } from '@theia/filesystem/lib/common/files'; import { WorkspaceVariableContribution } from './workspace-variable-contribution'; diff --git a/packages/workspace/src/browser/workspace-utils.ts b/packages/workspace/src/browser/workspace-utils.ts index 61204a6a73bd4..99d2ba67eac0e 100644 --- a/packages/workspace/src/browser/workspace-utils.ts +++ b/packages/workspace/src/browser/workspace-utils.ts @@ -18,7 +18,7 @@ // TODO get rid of util files, replace with methods in a responsible class import URI from '@theia/core/lib/common/uri'; -import { inject, injectable } from 'inversify'; +import { inject, injectable } from '@theia/core/shared/inversify'; import { WorkspaceService } from './workspace-service'; /** diff --git a/packages/workspace/src/browser/workspace-variable-contribution.ts b/packages/workspace/src/browser/workspace-variable-contribution.ts index a9055818029cf..85c67f06d71b5 100644 --- a/packages/workspace/src/browser/workspace-variable-contribution.ts +++ b/packages/workspace/src/browser/workspace-variable-contribution.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import URI from '@theia/core/lib/common/uri'; import { Path } from '@theia/core/lib/common/path'; import { ApplicationShell, NavigatableWidget, WidgetManager } from '@theia/core/lib/browser'; diff --git a/packages/workspace/src/common/test/mock-workspace-server.ts b/packages/workspace/src/common/test/mock-workspace-server.ts index c85c12df8a76a..9c7e53c66a24f 100644 --- a/packages/workspace/src/common/test/mock-workspace-server.ts +++ b/packages/workspace/src/common/test/mock-workspace-server.ts @@ -13,7 +13,7 @@ * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { injectable } from 'inversify'; +import { injectable } from '@theia/core/shared/inversify'; import { WorkspaceServer } from '../workspace-protocol'; @injectable() diff --git a/packages/workspace/src/node/default-workspace-server.ts b/packages/workspace/src/node/default-workspace-server.ts index d48938ab5fb72..409c8bce601fd 100644 --- a/packages/workspace/src/node/default-workspace-server.ts +++ b/packages/workspace/src/node/default-workspace-server.ts @@ -15,11 +15,11 @@ ********************************************************************************/ import * as path from 'path'; -import * as yargs from 'yargs'; -import * as fs from 'fs-extra'; +import * as yargs from '@theia/core/shared/yargs'; +import * as fs from '@theia/core/shared/fs-extra'; import * as jsoncparser from 'jsonc-parser'; -import { injectable, inject, postConstruct } from 'inversify'; +import { injectable, inject, postConstruct } from '@theia/core/shared/inversify'; import { FileUri } from '@theia/core/lib/node'; import { CliContribution } from '@theia/core/lib/node/cli'; import { Deferred } from '@theia/core/lib/common/promise-util'; diff --git a/packages/workspace/src/node/workspace-backend-module.ts b/packages/workspace/src/node/workspace-backend-module.ts index c4e0753544ff8..d33164e93664d 100644 --- a/packages/workspace/src/node/workspace-backend-module.ts +++ b/packages/workspace/src/node/workspace-backend-module.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { ContainerModule } from 'inversify'; +import { ContainerModule } from '@theia/core/shared/inversify'; import { ConnectionHandler, JsonRpcConnectionHandler } from '@theia/core/lib/common'; import { WorkspaceServer, workspacePath } from '../common'; import { DefaultWorkspaceServer, WorkspaceCliContribution } from './default-workspace-server'; diff --git a/tsconfig.json b/tsconfig.json index 3ef7724ac0815..6dc07ada89dc2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -177,6 +177,9 @@ ], "@theia/property-view/lib/*": [ "packages/property-view/src/*" + ], + "@theia/eslint-plugin/*": [ + "dev-packages/eslint-plugin/*" ] } } diff --git a/yarn.lock b/yarn.lock index f35ecf8b62a7b..59a720e3af513 100644 --- a/yarn.lock +++ b/yarn.lock @@ -947,7 +947,7 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" -"@phosphor/algorithm@^1.2.0": +"@phosphor/algorithm@1", "@phosphor/algorithm@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@phosphor/algorithm/-/algorithm-1.2.0.tgz#4a19aa59261b7270be696672dc3f0663f7bef152" integrity sha512-C9+dnjXyU2QAkWCW6QVDGExk4hhwxzAKf5/FIuYlHAI9X5vFv99PYm0EREDxX1PbMuvfFBZhPNu0PvuSDQ7sFA== @@ -959,7 +959,7 @@ dependencies: "@phosphor/algorithm" "^1.2.0" -"@phosphor/commands@^1.7.2": +"@phosphor/commands@1", "@phosphor/commands@^1.7.2": version "1.7.2" resolved "https://registry.yarnpkg.com/@phosphor/commands/-/commands-1.7.2.tgz#df724f2896ae43c4a3a9e2b5a6445a15e0d60487" integrity sha512-iSyBIWMHsus323BVEARBhuVZNnVel8USo+FIPaAxGcq+icTSSe6+NtSxVQSmZblGN6Qm4iw6I6VtiSx0e6YDgQ== @@ -971,7 +971,7 @@ "@phosphor/keyboard" "^1.1.3" "@phosphor/signaling" "^1.3.1" -"@phosphor/coreutils@^1.3.1": +"@phosphor/coreutils@1", "@phosphor/coreutils@^1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@phosphor/coreutils/-/coreutils-1.3.1.tgz#441e34f42340f7faa742a88b2a181947a88d7226" integrity sha512-9OHCn8LYRcPU/sbHm5v7viCA16Uev3gbdkwqoQqlV+EiauDHl70jmeL7XVDXdigl66Dz0LI11C99XOxp+s3zOA== @@ -984,12 +984,12 @@ "@phosphor/algorithm" "^1.2.0" "@phosphor/signaling" "^1.3.1" -"@phosphor/domutils@^1.1.4": +"@phosphor/domutils@1", "@phosphor/domutils@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@phosphor/domutils/-/domutils-1.1.4.tgz#4c6aecf7902d3793b45db325319340e0a0b5543b" integrity sha512-ivwq5TWjQpKcHKXO8PrMl+/cKqbgxPClPiCKc1gwbMd+6hnW5VLwNG0WBzJTxCzXK43HxX18oH+tOZ3E04wc3w== -"@phosphor/dragdrop@^1.4.1": +"@phosphor/dragdrop@1", "@phosphor/dragdrop@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@phosphor/dragdrop/-/dragdrop-1.4.1.tgz#45887dfe8f5849db2b4d1c0329a377f0f0854464" integrity sha512-77paMoubIWk7pdwA2GVFkqba1WP48hTZZvS17N30+KVOeWfSqBL3flPSnW2yC4y6FnOP2PFOCtuPIbQv+pYhCA== @@ -1002,7 +1002,7 @@ resolved "https://registry.yarnpkg.com/@phosphor/keyboard/-/keyboard-1.1.3.tgz#e5fd13af0479034ef0b5fffcf43ef2d4a266b5b6" integrity sha512-dzxC/PyHiD6mXaESRy6PZTd9JeK+diwG1pyngkyUf127IXOEzubTIbu52VSdpGBklszu33ws05BAGDa4oBE4mQ== -"@phosphor/messaging@^1.3.0": +"@phosphor/messaging@1", "@phosphor/messaging@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@phosphor/messaging/-/messaging-1.3.0.tgz#a140e6dd28a496260779acf74860f738c654c65e" integrity sha512-k0JE+BTMKlkM335S2AmmJxoYYNRwOdW5jKBqLgjJdGRvUQkM0+2i60ahM45+J23atGJDv9esKUUBINiKHFhLew== @@ -1010,26 +1010,26 @@ "@phosphor/algorithm" "^1.2.0" "@phosphor/collections" "^1.2.0" -"@phosphor/properties@^1.1.3": +"@phosphor/properties@1", "@phosphor/properties@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@phosphor/properties/-/properties-1.1.3.tgz#63e4355be5e22a411c566fd1860207038f171598" integrity sha512-GiglqzU77s6+tFVt6zPq9uuyu/PLQPFcqZt914ZhJ4cN/7yNI/SLyMzpYZ56IRMXvzK9TUgbRna6URE3XAwFUg== -"@phosphor/signaling@^1.3.1": +"@phosphor/signaling@1", "@phosphor/signaling@^1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@phosphor/signaling/-/signaling-1.3.1.tgz#1cd10b069bdb2c9adb3ba74245b30141e5afc2d7" integrity sha512-Eq3wVCPQAhUd9+gUGaYygMr+ov7dhSGblSBXiDzpZlSIfa8OVD4P3cCvYXr/acDTNmZ/gHTcSFO8/n3rDkeXzg== dependencies: "@phosphor/algorithm" "^1.2.0" -"@phosphor/virtualdom@^1.2.0": +"@phosphor/virtualdom@1", "@phosphor/virtualdom@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@phosphor/virtualdom/-/virtualdom-1.2.0.tgz#6a233312f817eb02555a0359c4ae3e501fa62bca" integrity sha512-L9mKNhK2XtVjzjuHLG2uYuepSz8uPyu6vhF4EgCP0rt0TiLYaZeHwuNu3XeFbul9DMOn49eBpye/tfQVd4Ks+w== dependencies: "@phosphor/algorithm" "^1.2.0" -"@phosphor/widgets@^1.9.3": +"@phosphor/widgets@1", "@phosphor/widgets@^1.9.3": version "1.9.3" resolved "https://registry.yarnpkg.com/@phosphor/widgets/-/widgets-1.9.3.tgz#b8b7ad69fd7cc7af8e8c312ebead0e0965a4cefd" integrity sha512-61jsxloDrW/+WWQs8wOgsS5waQ/MSsXBuhONt0o6mtdeL93HVz7CYO5krOoot5owammfF6oX1z0sDaUYIYgcPA== @@ -1116,6 +1116,23 @@ dependencies: defer-to-connect "^1.0.1" +"@theia/application-package@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@theia/application-package/-/application-package-1.11.0.tgz#7e1075c3c1741ee008e68a42b7c9cab519618f9d" + integrity sha512-0PlKPd/5wcXOhJFYNFAkAuqMGX64FAjqkOtOdP4LW2d6/OWFnpQcCYxJTiU3BaGQSkPxkP9nQGaTIroJziYzyQ== + dependencies: + "@types/fs-extra" "^4.0.2" + "@types/request" "^2.0.3" + "@types/semver" "^5.4.0" + "@types/write-json-file" "^2.2.1" + changes-stream "^2.2.0" + deepmerge "2.0.1" + fs-extra "^4.0.2" + is-electron "^2.1.0" + request "^2.82.0" + semver "^5.4.1" + write-json-file "^2.2.0" + "@theia/compression-webpack-plugin@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@theia/compression-webpack-plugin/-/compression-webpack-plugin-3.0.0.tgz#3d1b932327caf33b218fd5d3d1a64a5dbee4324a" @@ -1128,6 +1145,60 @@ serialize-javascript "^1.4.0" webpack-sources "^1.0.1" +"@theia/core@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@theia/core/-/core-1.11.0.tgz#0f1316652b8e513c1fe134089277921d1c161c3c" + integrity sha512-G7ZJ7akYYCGjeG5d10vDEI54XtMWtINGdSpEnx1cK3a8iz7mPGkyDooYLvBU97L5Snxtvl1pBBwGtz9aMPq7JA== + dependencies: + "@babel/runtime" "^7.10.0" + "@phosphor/widgets" "^1.9.3" + "@primer/octicons-react" "^9.0.0" + "@theia/application-package" "1.11.0" + "@types/body-parser" "^1.16.4" + "@types/cookie" "^0.3.3" + "@types/express" "^4.16.0" + "@types/fs-extra" "^4.0.2" + "@types/lodash.debounce" "4.0.3" + "@types/lodash.throttle" "^4.1.3" + "@types/react" "^16.8.0" + "@types/react-dom" "^16.8.0" + "@types/react-virtualized" "^9.18.3" + "@types/route-parser" "^0.1.1" + "@types/safer-buffer" "^2.1.0" + "@types/ws" "^5.1.2" + "@types/yargs" "^15" + ajv "^6.5.3" + body-parser "^1.17.2" + cookie "^0.4.0" + drivelist "^9.0.2" + es6-promise "^4.2.4" + express "^4.16.3" + file-icons-js "~1.0.3" + font-awesome "^4.7.0" + fs-extra "^4.0.2" + fuzzy "^0.1.3" + iconv-lite "^0.6.0" + inversify "^5.0.1" + jschardet "^2.1.1" + lodash.debounce "^4.0.8" + lodash.throttle "^4.1.1" + nsfw "^1.2.9" + p-debounce "^2.1.0" + perfect-scrollbar "^1.3.0" + react "^16.8.0" + react-dom "^16.8.0" + react-virtualized "^9.20.0" + reconnecting-websocket "^4.2.0" + reflect-metadata "^0.1.10" + route-parser "^0.0.5" + safer-buffer "^2.1.2" + vscode-languageserver-protocol "~3.15.3" + vscode-languageserver-types "^3.15.1" + vscode-uri "^2.1.1" + vscode-ws-jsonrpc "^0.2.0" + ws "^7.1.2" + yargs "^15.3.1" + "@theia/monaco-editor-core@^0.20.0": version "0.20.0" resolved "https://registry.yarnpkg.com/@theia/monaco-editor-core/-/monaco-editor-core-0.20.0.tgz#0f3cdfd6d1278bbcc3df0224471fc967a4d901c5" @@ -9599,7 +9670,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1, nan@^2.14.0: +nan@^2.0.0, nan@^2.12.1, nan@^2.14.0: version "2.14.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== @@ -9922,6 +9993,13 @@ npmlog@^4.0.1, npmlog@^4.1.2: gauge "~2.7.3" set-blocking "~2.0.0" +nsfw@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/nsfw/-/nsfw-1.2.9.tgz#e49ff5c12593cbcce3fcc90c533947eb4f15a99a" + integrity sha512-/2o89nygBRTTnGRxSHt2wjagbszyh36HlgF61Ec2iaJBTIIQ6QKcqp92EzVxxZX9U/6Qpy+LZL5i8532hXzAHg== + dependencies: + nan "^2.0.0" + nsfw@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/nsfw/-/nsfw-2.1.2.tgz#4fa841e7f7122b60b2e1f61187d1b57ad3403428" @@ -13890,7 +13968,7 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0: +uuid@^8.0.0, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==