@theia/terminal 1.77.0-next.95 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/base/terminal-service.d.ts +1 -1
- package/lib/browser/base/terminal-service.d.ts.map +1 -1
- package/lib/browser/base/terminal-service.js +1 -4
- package/lib/browser/base/terminal-service.js.map +1 -1
- package/lib/browser/base/terminal-widget.d.ts +2 -2
- package/lib/browser/base/terminal-widget.d.ts.map +1 -1
- package/lib/browser/base/terminal-widget.js +5 -9
- package/lib/browser/base/terminal-widget.js.map +1 -1
- package/lib/browser/index.d.ts +2 -2
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +2 -5
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/search/terminal-search-container.d.ts +1 -1
- package/lib/browser/search/terminal-search-container.d.ts.map +1 -1
- package/lib/browser/search/terminal-search-container.js +7 -9
- package/lib/browser/search/terminal-search-container.js.map +1 -1
- package/lib/browser/search/terminal-search-widget.d.ts +1 -1
- package/lib/browser/search/terminal-search-widget.d.ts.map +1 -1
- package/lib/browser/search/terminal-search-widget.js +24 -30
- package/lib/browser/search/terminal-search-widget.js.map +1 -1
- package/lib/browser/shell-terminal-profile.d.ts +3 -3
- package/lib/browser/shell-terminal-profile.d.ts.map +1 -1
- package/lib/browser/shell-terminal-profile.js +1 -5
- package/lib/browser/shell-terminal-profile.js.map +1 -1
- package/lib/browser/terminal-command-history.d.ts +1 -1
- package/lib/browser/terminal-command-history.d.ts.map +1 -1
- package/lib/browser/terminal-command-history.js +10 -14
- package/lib/browser/terminal-command-history.js.map +1 -1
- package/lib/browser/terminal-contribution.d.ts +1 -1
- package/lib/browser/terminal-contribution.d.ts.map +1 -1
- package/lib/browser/terminal-contribution.js +3 -5
- package/lib/browser/terminal-contribution.js.map +1 -1
- package/lib/browser/terminal-copy-on-selection-handler.js +9 -15
- package/lib/browser/terminal-copy-on-selection-handler.js.map +1 -1
- package/lib/browser/terminal-creation-handler.d.ts +1 -1
- package/lib/browser/terminal-creation-handler.d.ts.map +1 -1
- package/lib/browser/terminal-creation-handler.js +1 -4
- package/lib/browser/terminal-creation-handler.js.map +1 -1
- package/lib/browser/terminal-file-link-provider.d.ts +3 -3
- package/lib/browser/terminal-file-link-provider.d.ts.map +1 -1
- package/lib/browser/terminal-file-link-provider.js +37 -44
- package/lib/browser/terminal-file-link-provider.js.map +1 -1
- package/lib/browser/terminal-file-link-provider.spec.js +9 -12
- package/lib/browser/terminal-file-link-provider.spec.js.map +1 -1
- package/lib/browser/terminal-file-opening-link-provider.d.ts +2 -2
- package/lib/browser/terminal-file-opening-link-provider.d.ts.map +1 -1
- package/lib/browser/terminal-file-opening-link-provider.js +11 -16
- package/lib/browser/terminal-file-opening-link-provider.js.map +1 -1
- package/lib/browser/terminal-file-uri-link-provider.d.ts +3 -3
- package/lib/browser/terminal-file-uri-link-provider.d.ts.map +1 -1
- package/lib/browser/terminal-file-uri-link-provider.js +13 -17
- package/lib/browser/terminal-file-uri-link-provider.js.map +1 -1
- package/lib/browser/terminal-file-uri-link-provider.spec.js +16 -19
- package/lib/browser/terminal-file-uri-link-provider.spec.js.map +1 -1
- package/lib/browser/terminal-frontend-contribution.d.ts +8 -8
- package/lib/browser/terminal-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/terminal-frontend-contribution.js +194 -221
- package/lib/browser/terminal-frontend-contribution.js.map +1 -1
- package/lib/browser/terminal-frontend-module.js +94 -96
- package/lib/browser/terminal-frontend-module.js.map +1 -1
- package/lib/browser/terminal-link-helpers.js +3 -8
- package/lib/browser/terminal-link-helpers.js.map +1 -1
- package/lib/browser/terminal-link-provider.d.ts +4 -4
- package/lib/browser/terminal-link-provider.d.ts.map +1 -1
- package/lib/browser/terminal-link-provider.js +46 -60
- package/lib/browser/terminal-link-provider.js.map +1 -1
- package/lib/browser/terminal-profile-service.d.ts +1 -1
- package/lib/browser/terminal-profile-service.d.ts.map +1 -1
- package/lib/browser/terminal-profile-service.js +23 -27
- package/lib/browser/terminal-profile-service.js.map +1 -1
- package/lib/browser/terminal-quick-open-service.d.ts +2 -2
- package/lib/browser/terminal-quick-open-service.d.ts.map +1 -1
- package/lib/browser/terminal-quick-open-service.js +30 -38
- package/lib/browser/terminal-quick-open-service.js.map +1 -1
- package/lib/browser/terminal-secondary-window-close-contribution.d.ts +1 -1
- package/lib/browser/terminal-secondary-window-close-contribution.d.ts.map +1 -1
- package/lib/browser/terminal-secondary-window-close-contribution.js +10 -14
- package/lib/browser/terminal-secondary-window-close-contribution.js.map +1 -1
- package/lib/browser/terminal-shell-handler.d.ts +3 -3
- package/lib/browser/terminal-shell-handler.d.ts.map +1 -1
- package/lib/browser/terminal-shell-handler.js +17 -22
- package/lib/browser/terminal-shell-handler.js.map +1 -1
- package/lib/browser/terminal-theme-service.js +15 -20
- package/lib/browser/terminal-theme-service.js.map +1 -1
- package/lib/browser/terminal-theme-service.spec.js +30 -35
- package/lib/browser/terminal-theme-service.spec.js.map +1 -1
- package/lib/browser/terminal-url-link-provider.d.ts +2 -2
- package/lib/browser/terminal-url-link-provider.d.ts.map +1 -1
- package/lib/browser/terminal-url-link-provider.js +11 -15
- package/lib/browser/terminal-url-link-provider.js.map +1 -1
- package/lib/browser/terminal-widget-impl.d.ts +11 -11
- package/lib/browser/terminal-widget-impl.d.ts.map +1 -1
- package/lib/browser/terminal-widget-impl.js +148 -173
- package/lib/browser/terminal-widget-impl.js.map +1 -1
- package/lib/browser-only/browser-only-terminal-frontend-contribution.d.ts +3 -3
- package/lib/browser-only/browser-only-terminal-frontend-contribution.d.ts.map +1 -1
- package/lib/browser-only/browser-only-terminal-frontend-contribution.js +12 -16
- package/lib/browser-only/browser-only-terminal-frontend-contribution.js.map +1 -1
- package/lib/browser-only/browser-only-terminal-frontend-contribution.spec.js +68 -70
- package/lib/browser-only/browser-only-terminal-frontend-contribution.spec.js.map +1 -1
- package/lib/browser-only/terminal-frontend-only-module.js +5 -7
- package/lib/browser-only/terminal-frontend-only-module.js.map +1 -1
- package/lib/common/base-terminal-protocol.js +7 -11
- package/lib/common/base-terminal-protocol.js.map +1 -1
- package/lib/common/shell-terminal-protocol.d.ts +1 -1
- package/lib/common/shell-terminal-protocol.d.ts.map +1 -1
- package/lib/common/shell-terminal-protocol.js +6 -9
- package/lib/common/shell-terminal-protocol.js.map +1 -1
- package/lib/common/shell-type.js +12 -20
- package/lib/common/shell-type.js.map +1 -1
- package/lib/common/shell-type.spec.js +69 -71
- package/lib/common/shell-type.spec.js.map +1 -1
- package/lib/common/terminal-preferences.js +77 -83
- package/lib/common/terminal-preferences.js.map +1 -1
- package/lib/common/terminal-protocol.d.ts +1 -1
- package/lib/common/terminal-protocol.d.ts.map +1 -1
- package/lib/common/terminal-protocol.js +3 -6
- package/lib/common/terminal-protocol.js.map +1 -1
- package/lib/common/terminal-watcher.d.ts +1 -1
- package/lib/common/terminal-watcher.d.ts.map +1 -1
- package/lib/common/terminal-watcher.js +10 -13
- package/lib/common/terminal-watcher.js.map +1 -1
- package/lib/node/base-terminal-server.d.ts +1 -1
- package/lib/node/base-terminal-server.d.ts.map +1 -1
- package/lib/node/base-terminal-server.js +24 -28
- package/lib/node/base-terminal-server.js.map +1 -1
- package/lib/node/buffering-stream.js +5 -11
- package/lib/node/buffering-stream.js.map +1 -1
- package/lib/node/buffering-stream.spec.js +18 -20
- package/lib/node/buffering-stream.spec.js.map +1 -1
- package/lib/node/index.d.ts +1 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +1 -4
- package/lib/node/index.js.map +1 -1
- package/lib/node/shell-integration-injector.d.ts +1 -1
- package/lib/node/shell-integration-injector.d.ts.map +1 -1
- package/lib/node/shell-integration-injector.js +19 -24
- package/lib/node/shell-integration-injector.js.map +1 -1
- package/lib/node/shell-integration-injector.spec.js +24 -27
- package/lib/node/shell-integration-injector.spec.js.map +1 -1
- package/lib/node/shell-process.js +28 -34
- package/lib/node/shell-process.js.map +1 -1
- package/lib/node/shell-terminal-server.d.ts +3 -3
- package/lib/node/shell-terminal-server.d.ts.map +1 -1
- package/lib/node/shell-terminal-server.js +39 -44
- package/lib/node/shell-terminal-server.js.map +1 -1
- package/lib/node/shell-terminal-server.spec.js +12 -14
- package/lib/node/shell-terminal-server.spec.js.map +1 -1
- package/lib/node/terminal-backend-contribution.js +17 -22
- package/lib/node/terminal-backend-contribution.js.map +1 -1
- package/lib/node/terminal-backend-contribution.slow-spec.js +10 -12
- package/lib/node/terminal-backend-contribution.slow-spec.js.map +1 -1
- package/lib/node/terminal-backend-module.d.ts +1 -1
- package/lib/node/terminal-backend-module.d.ts.map +1 -1
- package/lib/node/terminal-backend-module.js +36 -39
- package/lib/node/terminal-backend-module.js.map +1 -1
- package/lib/node/terminal-server.d.ts +2 -2
- package/lib/node/terminal-server.d.ts.map +1 -1
- package/lib/node/terminal-server.js +14 -19
- package/lib/node/terminal-server.js.map +1 -1
- package/lib/node/terminal-server.spec.js +5 -8
- package/lib/node/terminal-server.spec.js.map +1 -1
- package/lib/node/test/terminal-test-container.js +17 -21
- package/lib/node/test/terminal-test-container.js.map +1 -1
- package/lib/package.spec.d.ts +1 -0
- package/lib/package.spec.js +1 -1
- package/lib/package.spec.js.map +1 -1
- package/package.json +21 -10
- package/src/browser/base/terminal-service.ts +1 -1
- package/src/browser/base/terminal-widget.ts +2 -2
- package/src/browser/index.ts +2 -2
- package/src/browser/search/terminal-search-container.ts +4 -3
- package/src/browser/search/terminal-search-widget.tsx +3 -2
- package/src/browser/shell-terminal-profile.ts +3 -3
- package/src/browser/terminal-command-history.ts +1 -1
- package/src/browser/terminal-contribution.ts +1 -1
- package/src/browser/terminal-creation-handler.ts +1 -1
- package/src/browser/terminal-file-link-provider.spec.ts +2 -2
- package/src/browser/terminal-file-link-provider.ts +4 -4
- package/src/browser/terminal-file-opening-link-provider.ts +2 -2
- package/src/browser/terminal-file-uri-link-provider.spec.ts +2 -2
- package/src/browser/terminal-file-uri-link-provider.ts +3 -3
- package/src/browser/terminal-frontend-contribution.ts +12 -10
- package/src/browser/terminal-frontend-module.ts +23 -23
- package/src/browser/terminal-link-provider.ts +4 -4
- package/src/browser/terminal-profile-service.ts +2 -2
- package/src/browser/terminal-quick-open-service.ts +3 -3
- package/src/browser/terminal-secondary-window-close-contribution.ts +2 -2
- package/src/browser/terminal-shell-handler.ts +3 -3
- package/src/browser/terminal-theme-service.spec.ts +1 -1
- package/src/browser/terminal-theme-service.ts +1 -1
- package/src/browser/terminal-url-link-provider.ts +2 -2
- package/src/browser/terminal-widget-impl.ts +17 -16
- package/src/browser-only/browser-only-terminal-frontend-contribution.spec.ts +9 -9
- package/src/browser-only/browser-only-terminal-frontend-contribution.ts +3 -3
- package/src/browser-only/terminal-frontend-only-module.ts +2 -2
- package/src/common/shell-terminal-protocol.ts +1 -1
- package/src/common/shell-type.spec.ts +1 -1
- package/src/common/terminal-protocol.ts +1 -1
- package/src/common/terminal-watcher.ts +1 -1
- package/src/node/base-terminal-server.ts +2 -2
- package/src/node/buffering-stream.spec.ts +1 -1
- package/src/node/index.ts +1 -1
- package/src/node/shell-integration-injector.spec.ts +2 -2
- package/src/node/shell-integration-injector.ts +4 -4
- package/src/node/shell-terminal-server.spec.ts +5 -4
- package/src/node/shell-terminal-server.ts +3 -3
- package/src/node/terminal-backend-contribution.slow-spec.ts +3 -3
- package/src/node/terminal-backend-contribution.ts +2 -2
- package/src/node/terminal-backend-module.ts +10 -10
- package/src/node/terminal-server.spec.ts +2 -2
- package/src/node/terminal-server.ts +2 -2
- package/src/node/test/terminal-test-container.ts +1 -1
|
@@ -39,12 +39,14 @@ import {
|
|
|
39
39
|
} from '@theia/core/lib/browser';
|
|
40
40
|
import { ClipboardService } from '@theia/core/lib/browser/clipboard-service';
|
|
41
41
|
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
42
|
-
import { TERMINAL_WIDGET_FACTORY_ID, TerminalWidgetFactoryOptions, TerminalWidgetImpl, nextTerminalCreationToken } from './terminal-widget-impl';
|
|
43
|
-
import { TerminalService } from './base/terminal-service';
|
|
44
|
-
import { TerminalWidgetOptions, TerminalWidget } from './base/terminal-widget';
|
|
45
|
-
import {
|
|
42
|
+
import { TERMINAL_WIDGET_FACTORY_ID, TerminalWidgetFactoryOptions, TerminalWidgetImpl, nextTerminalCreationToken } from './terminal-widget-impl.js';
|
|
43
|
+
import { TerminalService } from './base/terminal-service.js';
|
|
44
|
+
import { TerminalWidgetOptions, TerminalWidget } from './base/terminal-widget.js';
|
|
45
|
+
import {
|
|
46
|
+
ContributedTerminalProfileStore, NULL_PROFILE, TerminalProfile, TerminalProfileService, TerminalProfileStore, UserTerminalProfileStore
|
|
47
|
+
} from './terminal-profile-service.js';
|
|
46
48
|
import { UriAwareCommandHandler } from '@theia/core/lib/common/uri-command-handler';
|
|
47
|
-
import { ShellTerminalServerProxy } from '../common/shell-terminal-protocol';
|
|
49
|
+
import { ShellTerminalServerProxy } from '../common/shell-terminal-protocol.js';
|
|
48
50
|
import URI from '@theia/core/lib/common/uri';
|
|
49
51
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
50
52
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
@@ -52,15 +54,15 @@ import { ColorContribution } from '@theia/core/lib/browser/color-application-con
|
|
|
52
54
|
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
|
53
55
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
54
56
|
import { FileStat } from '@theia/filesystem/lib/common/files';
|
|
55
|
-
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler';
|
|
56
|
-
import { TerminalWatcher } from '../common/terminal-watcher';
|
|
57
|
+
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler.js';
|
|
58
|
+
import { TerminalWatcher } from '../common/terminal-watcher.js';
|
|
57
59
|
import { nls } from '@theia/core/lib/common/nls';
|
|
58
|
-
import { Profiles, terminalAnsiColorMap, TerminalPreferences } from '../common/terminal-preferences';
|
|
59
|
-
import { ShellTerminalProfile } from './shell-terminal-profile';
|
|
60
|
+
import { Profiles, terminalAnsiColorMap, TerminalPreferences } from '../common/terminal-preferences.js';
|
|
61
|
+
import { ShellTerminalProfile } from './shell-terminal-profile.js';
|
|
60
62
|
import { VariableResolverService } from '@theia/variable-resolver/lib/browser';
|
|
61
63
|
import { Color } from '@theia/core/lib/common/color';
|
|
62
64
|
import { ContributionProvider, ILogger } from '@theia/core';
|
|
63
|
-
import { TerminalCreationHandler } from './terminal-creation-handler';
|
|
65
|
+
import { TerminalCreationHandler } from './terminal-creation-handler.js';
|
|
64
66
|
|
|
65
67
|
export namespace TerminalMenus {
|
|
66
68
|
export const TERMINAL = [...MAIN_MENU_BAR, '7_terminal'];
|
|
@@ -22,35 +22,35 @@ import { CommandContribution, MenuContribution, nls } from '@theia/core/lib/comm
|
|
|
22
22
|
import { bindRootContributionProvider } from '@theia/core';
|
|
23
23
|
import { KeybindingContribution, WebSocketConnectionProvider, WidgetFactory, FrontendApplicationContribution } from '@theia/core/lib/browser';
|
|
24
24
|
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
25
|
-
import { TerminalFrontendContribution } from './terminal-frontend-contribution';
|
|
26
|
-
import { TerminalSecondaryWindowCloseContribution } from './terminal-secondary-window-close-contribution';
|
|
25
|
+
import { TerminalFrontendContribution } from './terminal-frontend-contribution.js';
|
|
26
|
+
import { TerminalSecondaryWindowCloseContribution } from './terminal-secondary-window-close-contribution.js';
|
|
27
27
|
import { SecondaryWindowCloseContribution } from '@theia/core/lib/browser/window/secondary-window-close-contribution';
|
|
28
|
-
import { TerminalWidgetImpl, TERMINAL_WIDGET_FACTORY_ID } from './terminal-widget-impl';
|
|
29
|
-
import { TerminalWidget, TerminalWidgetOptions } from './base/terminal-widget';
|
|
30
|
-
import { ITerminalServer, terminalPath } from '../common/terminal-protocol';
|
|
31
|
-
import { TerminalWatcher } from '../common/terminal-watcher';
|
|
32
|
-
import { IShellTerminalServer, shellTerminalPath, ShellTerminalServerProxy } from '../common/shell-terminal-protocol';
|
|
33
|
-
import { TerminalService } from './base/terminal-service';
|
|
34
|
-
import { bindTerminalPreferences } from '../common/terminal-preferences';
|
|
35
|
-
import { TerminalContribution } from './terminal-contribution';
|
|
36
|
-
import { TerminalCreationHandler } from './terminal-creation-handler';
|
|
37
|
-
import { TerminalShellHandler } from './terminal-shell-handler';
|
|
38
|
-
import { TerminalSearchWidgetFactory } from './search/terminal-search-widget';
|
|
39
|
-
import { TerminalQuickOpenService, TerminalQuickOpenContribution } from './terminal-quick-open-service';
|
|
40
|
-
import { createTerminalSearchFactory } from './search/terminal-search-container';
|
|
41
|
-
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler';
|
|
28
|
+
import { TerminalWidgetImpl, TERMINAL_WIDGET_FACTORY_ID } from './terminal-widget-impl.js';
|
|
29
|
+
import { TerminalWidget, TerminalWidgetOptions } from './base/terminal-widget.js';
|
|
30
|
+
import { ITerminalServer, terminalPath } from '../common/terminal-protocol.js';
|
|
31
|
+
import { TerminalWatcher } from '../common/terminal-watcher.js';
|
|
32
|
+
import { IShellTerminalServer, shellTerminalPath, ShellTerminalServerProxy } from '../common/shell-terminal-protocol.js';
|
|
33
|
+
import { TerminalService } from './base/terminal-service.js';
|
|
34
|
+
import { bindTerminalPreferences } from '../common/terminal-preferences.js';
|
|
35
|
+
import { TerminalContribution } from './terminal-contribution.js';
|
|
36
|
+
import { TerminalCreationHandler } from './terminal-creation-handler.js';
|
|
37
|
+
import { TerminalShellHandler } from './terminal-shell-handler.js';
|
|
38
|
+
import { TerminalSearchWidgetFactory } from './search/terminal-search-widget.js';
|
|
39
|
+
import { TerminalQuickOpenService, TerminalQuickOpenContribution } from './terminal-quick-open-service.js';
|
|
40
|
+
import { createTerminalSearchFactory } from './search/terminal-search-container.js';
|
|
41
|
+
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler.js';
|
|
42
42
|
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
|
43
|
-
import { TerminalThemeService } from './terminal-theme-service';
|
|
43
|
+
import { TerminalThemeService } from './terminal-theme-service.js';
|
|
44
44
|
import { QuickAccessContribution } from '@theia/core/lib/browser/quick-input/quick-access';
|
|
45
|
-
import { createXtermLinkFactory, TerminalLinkProvider, TerminalLinkProviderContribution, XtermLinkFactory } from './terminal-link-provider';
|
|
46
|
-
import { UrlLinkProvider } from './terminal-url-link-provider';
|
|
47
|
-
import { FileDiffPostLinkProvider, FileDiffPreLinkProvider, FileLinkProvider, LocalFileLinkProvider } from './terminal-file-link-provider';
|
|
48
|
-
import { FileUriLinkProvider } from './terminal-file-uri-link-provider';
|
|
45
|
+
import { createXtermLinkFactory, TerminalLinkProvider, TerminalLinkProviderContribution, XtermLinkFactory } from './terminal-link-provider.js';
|
|
46
|
+
import { UrlLinkProvider } from './terminal-url-link-provider.js';
|
|
47
|
+
import { FileDiffPostLinkProvider, FileDiffPreLinkProvider, FileLinkProvider, LocalFileLinkProvider } from './terminal-file-link-provider.js';
|
|
48
|
+
import { FileUriLinkProvider } from './terminal-file-uri-link-provider.js';
|
|
49
49
|
import {
|
|
50
50
|
ContributedTerminalProfileStore, DefaultProfileStore, DefaultTerminalProfileService,
|
|
51
51
|
TerminalProfileService, TerminalProfileStore, UserTerminalProfileStore
|
|
52
|
-
} from './terminal-profile-service';
|
|
53
|
-
import { TerminalCommandHistoryStateFactory, TerminalCommandHistoryStateImpl } from './terminal-command-history';
|
|
52
|
+
} from './terminal-profile-service.js';
|
|
53
|
+
import { TerminalCommandHistoryStateFactory, TerminalCommandHistoryStateImpl } from './terminal-command-history.js';
|
|
54
54
|
|
|
55
55
|
export default new ContainerModule(bind => {
|
|
56
56
|
bindTerminalPreferences(bind);
|
|
@@ -18,10 +18,10 @@ import { CancellationToken, ContributionProvider, DisposableCollection, disposab
|
|
|
18
18
|
import { PreferenceService } from '@theia/core/lib/common';
|
|
19
19
|
import { inject, injectable, interfaces, named, postConstruct } from '@theia/core/shared/inversify';
|
|
20
20
|
import { IBufferRange, ILink, ILinkDecorations } from 'xterm';
|
|
21
|
-
import { TerminalWidget } from './base/terminal-widget';
|
|
22
|
-
import { TerminalContribution } from './terminal-contribution';
|
|
23
|
-
import { convertLinkRangeToBuffer, getLinkContext, LinkContext } from './terminal-link-helpers';
|
|
24
|
-
import { TerminalWidgetImpl } from './terminal-widget-impl';
|
|
21
|
+
import { TerminalWidget } from './base/terminal-widget.js';
|
|
22
|
+
import { TerminalContribution } from './terminal-contribution.js';
|
|
23
|
+
import { convertLinkRangeToBuffer, getLinkContext, LinkContext } from './terminal-link-helpers.js';
|
|
24
|
+
import { TerminalWidgetImpl } from './terminal-widget-impl.js';
|
|
25
25
|
|
|
26
26
|
export const TerminalLinkProvider = Symbol('TerminalLinkProvider');
|
|
27
27
|
export interface TerminalLinkProvider {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { Emitter, Event } from '@theia/core';
|
|
18
18
|
import { injectable, unmanaged } from '@theia/core/shared/inversify';
|
|
19
|
-
import { TerminalWidget } from './base/terminal-widget';
|
|
20
|
-
import { ShellTerminalProfile } from './shell-terminal-profile';
|
|
19
|
+
import { TerminalWidget } from './base/terminal-widget.js';
|
|
20
|
+
import { ShellTerminalProfile } from './shell-terminal-profile.js';
|
|
21
21
|
|
|
22
22
|
export const TerminalProfileService = Symbol('TerminalProfileService');
|
|
23
23
|
export const ContributedTerminalProfileStore = Symbol('ContributedTerminalProfileStore');
|
|
@@ -23,9 +23,9 @@ import {
|
|
|
23
23
|
QuickInputService
|
|
24
24
|
} from '@theia/core/lib/browser';
|
|
25
25
|
import { CancellationToken, CommandContribution, CommandRegistry, CommandService, nls } from '@theia/core/lib/common';
|
|
26
|
-
import { TerminalWidget } from './base/terminal-widget';
|
|
27
|
-
import { TerminalService } from './base/terminal-service';
|
|
28
|
-
import { TerminalCommands } from './terminal-frontend-contribution';
|
|
26
|
+
import { TerminalWidget } from './base/terminal-widget.js';
|
|
27
|
+
import { TerminalService } from './base/terminal-service.js';
|
|
28
|
+
import { TerminalCommands } from './terminal-frontend-contribution.js';
|
|
29
29
|
import { filterItems, QuickPickItem, QuickPicks } from '@theia/core/lib/browser/quick-input/quick-input-service';
|
|
30
30
|
|
|
31
31
|
@injectable()
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
18
|
import { Widget } from '@theia/core/lib/browser/widgets';
|
|
19
19
|
import { SecondaryWindowCloseContribution } from '@theia/core/lib/browser/window/secondary-window-close-contribution';
|
|
20
|
-
import { TerminalWidget } from './base/terminal-widget';
|
|
21
|
-
import { TerminalPreferences } from '../common/terminal-preferences';
|
|
20
|
+
import { TerminalWidget } from './base/terminal-widget.js';
|
|
21
|
+
import { TerminalPreferences } from '../common/terminal-preferences.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Moves terminals back to the main window when their secondary window is closed if closing the application
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
18
|
import { ViewColumn } from '@theia/core/lib/common';
|
|
19
19
|
import { ApplicationShell, WidgetOpenerOptions } from '@theia/core/lib/browser';
|
|
20
|
-
import { TerminalCreationHandler } from './terminal-creation-handler';
|
|
21
|
-
import { TerminalWidget, TerminalLocation } from './base/terminal-widget';
|
|
22
|
-
import { TerminalService } from './base/terminal-service';
|
|
20
|
+
import { TerminalCreationHandler } from './terminal-creation-handler.js';
|
|
21
|
+
import { TerminalWidget, TerminalLocation } from './base/terminal-widget.js';
|
|
22
|
+
import { TerminalService } from './base/terminal-service.js';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Default {@link TerminalCreationHandler} that places terminals into the
|
|
@@ -23,7 +23,7 @@ import { Emitter } from '@theia/core';
|
|
|
23
23
|
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
|
24
24
|
import { ThemeService } from '@theia/core/lib/browser/theming';
|
|
25
25
|
import { Theme, ThemeChangeEvent } from '@theia/core/lib/common/theme';
|
|
26
|
-
import { TerminalThemeService } from './terminal-theme-service';
|
|
26
|
+
import { TerminalThemeService } from './terminal-theme-service.js';
|
|
27
27
|
|
|
28
28
|
disableJSDOM();
|
|
29
29
|
|
|
@@ -20,7 +20,7 @@ import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
|
|
20
20
|
import { ThemeService } from '@theia/core/lib/browser/theming';
|
|
21
21
|
import { ThemeChangeEvent } from '@theia/core/lib/common/theme';
|
|
22
22
|
import { Emitter, Event } from '@theia/core';
|
|
23
|
-
import { terminalAnsiColorMap } from '../common/terminal-preferences';
|
|
23
|
+
import { terminalAnsiColorMap } from '../common/terminal-preferences.js';
|
|
24
24
|
|
|
25
25
|
@injectable()
|
|
26
26
|
export class TerminalThemeService {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
18
18
|
import { OpenerService, open } from '@theia/core/lib/browser';
|
|
19
|
-
import { TerminalWidget } from './base/terminal-widget';
|
|
20
|
-
import { TerminalLink, TerminalLinkProvider } from './terminal-link-provider';
|
|
19
|
+
import { TerminalWidget } from './base/terminal-widget.js';
|
|
20
|
+
import { TerminalLink, TerminalLinkProvider } from './terminal-link-provider.js';
|
|
21
21
|
import URI from '@theia/core/lib/common/uri';
|
|
22
22
|
|
|
23
23
|
@injectable()
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// A CommonJS module whose exports cannot be detected statically, so it is imported as a whole.
|
|
18
|
+
import xterm, { type Terminal, type IMarker } from 'xterm';
|
|
18
19
|
import { FitAddon } from 'xterm-addon-fit';
|
|
19
20
|
import { WebglAddon } from 'xterm-addon-webgl';
|
|
20
21
|
import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
|
|
@@ -25,37 +26,37 @@ import {
|
|
|
25
26
|
} from '@theia/core/lib/browser';
|
|
26
27
|
import { isOSX } from '@theia/core/lib/common';
|
|
27
28
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
28
|
-
import { ShellTerminalServerProxy, IShellTerminalPreferences } from '../common/shell-terminal-protocol';
|
|
29
|
-
import { terminalsPath } from '../common/terminal-protocol';
|
|
30
|
-
import { IBaseTerminalServer, TerminalProcessInfo, TerminalExitReason } from '../common/base-terminal-protocol';
|
|
31
|
-
import { TerminalWatcher } from '../common/terminal-watcher';
|
|
29
|
+
import { ShellTerminalServerProxy, IShellTerminalPreferences } from '../common/shell-terminal-protocol.js';
|
|
30
|
+
import { terminalsPath } from '../common/terminal-protocol.js';
|
|
31
|
+
import { IBaseTerminalServer, TerminalProcessInfo, TerminalExitReason } from '../common/base-terminal-protocol.js';
|
|
32
|
+
import { TerminalWatcher } from '../common/terminal-watcher.js';
|
|
32
33
|
import {
|
|
33
34
|
TerminalWidgetOptions, TerminalWidget, TerminalDimensions, TerminalExitStatus, TerminalLocationOptions,
|
|
34
35
|
TerminalLocation,
|
|
35
36
|
TerminalBuffer,
|
|
36
37
|
TerminalBlock,
|
|
37
38
|
TerminalCommandHistoryState
|
|
38
|
-
} from './base/terminal-widget';
|
|
39
|
+
} from './base/terminal-widget.js';
|
|
39
40
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
40
|
-
import { TerminalPreferences } from '../common/terminal-preferences';
|
|
41
|
+
import { TerminalPreferences } from '../common/terminal-preferences.js';
|
|
41
42
|
import URI from '@theia/core/lib/common/uri';
|
|
42
|
-
import { TerminalService } from './base/terminal-service';
|
|
43
|
-
import { TerminalSearchWidgetFactory, TerminalSearchWidget } from './search/terminal-search-widget';
|
|
44
|
-
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler';
|
|
45
|
-
import { TerminalThemeService } from './terminal-theme-service';
|
|
43
|
+
import { TerminalService } from './base/terminal-service.js';
|
|
44
|
+
import { TerminalSearchWidgetFactory, TerminalSearchWidget } from './search/terminal-search-widget.js';
|
|
45
|
+
import { TerminalCopyOnSelectionHandler } from './terminal-copy-on-selection-handler.js';
|
|
46
|
+
import { TerminalThemeService } from './terminal-theme-service.js';
|
|
46
47
|
import { CommandLineOptions, ShellCommandBuilder } from '@theia/process/lib/common/shell-command-builder';
|
|
47
48
|
import { Key } from '@theia/core/lib/browser/keys';
|
|
48
49
|
import { nls } from '@theia/core/lib/common/nls';
|
|
49
|
-
import { TerminalMenus } from './terminal-frontend-contribution';
|
|
50
|
-
import debounce
|
|
50
|
+
import { TerminalMenus } from './terminal-frontend-contribution.js';
|
|
51
|
+
import debounce from 'p-debounce';
|
|
51
52
|
import { MarkdownString, MarkdownStringImpl } from '@theia/core/lib/common/markdown-rendering/markdown-string';
|
|
52
53
|
import { EnhancedPreviewWidget } from '@theia/core/lib/browser/widgets/enhanced-preview-widget';
|
|
53
54
|
import { MarkdownRenderer, MarkdownRendererFactory } from '@theia/core/lib/browser/markdown-rendering/markdown-renderer';
|
|
54
55
|
import { RemoteConnectionProvider, ServiceConnectionProvider } from '@theia/core/lib/browser/messaging/service-connection-provider';
|
|
55
56
|
import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
|
|
56
57
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
57
|
-
import { cleanTerminalTitle, guessShellTypeFromExecutable } from '../common/shell-type';
|
|
58
|
-
import { TerminalCommandHistoryStateFactory } from './terminal-command-history';
|
|
58
|
+
import { cleanTerminalTitle, guessShellTypeFromExecutable } from '../common/shell-type.js';
|
|
59
|
+
import { TerminalCommandHistoryStateFactory } from './terminal-command-history.js';
|
|
59
60
|
|
|
60
61
|
export const TERMINAL_WIDGET_FACTORY_ID = 'terminal';
|
|
61
62
|
|
|
@@ -254,7 +255,7 @@ export class TerminalWidgetImpl extends TerminalWidget implements StatefulWidget
|
|
|
254
255
|
this.title.closable = true;
|
|
255
256
|
this.addClass('terminal-container');
|
|
256
257
|
|
|
257
|
-
this.term = new Terminal({
|
|
258
|
+
this.term = new xterm.Terminal({
|
|
258
259
|
cursorBlink: this.preferences['terminal.integrated.cursorBlinking'],
|
|
259
260
|
cursorStyle: this.preferences['terminal.integrated.cursorStyle'] === 'line' ? 'bar' : this.preferences['terminal.integrated.cursorStyle'],
|
|
260
261
|
cursorWidth: this.preferences['terminal.integrated.cursorWidth'],
|
|
@@ -39,15 +39,15 @@ import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
|
39
39
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
40
40
|
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
41
41
|
import { VariableResolverService } from '@theia/variable-resolver/lib/browser';
|
|
42
|
-
import { TerminalService } from '../browser/base/terminal-service';
|
|
43
|
-
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution';
|
|
44
|
-
import { TerminalWatcher } from '../common/terminal-watcher';
|
|
45
|
-
import { ShellTerminalServerProxy } from '../common/shell-terminal-protocol';
|
|
46
|
-
import { TerminalPreferences } from '../common/terminal-preferences';
|
|
47
|
-
import { TerminalCopyOnSelectionHandler } from '../browser/terminal-copy-on-selection-handler';
|
|
48
|
-
import { TerminalCreationHandler } from '../browser/terminal-creation-handler';
|
|
49
|
-
import { ContributedTerminalProfileStore, TerminalProfileService, UserTerminalProfileStore } from '../browser/terminal-profile-service';
|
|
50
|
-
import { BrowserOnlyTerminalFrontendContribution } from './browser-only-terminal-frontend-contribution';
|
|
42
|
+
import { TerminalService } from '../browser/base/terminal-service.js';
|
|
43
|
+
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution.js';
|
|
44
|
+
import { TerminalWatcher } from '../common/terminal-watcher.js';
|
|
45
|
+
import { ShellTerminalServerProxy } from '../common/shell-terminal-protocol.js';
|
|
46
|
+
import { TerminalPreferences } from '../common/terminal-preferences.js';
|
|
47
|
+
import { TerminalCopyOnSelectionHandler } from '../browser/terminal-copy-on-selection-handler.js';
|
|
48
|
+
import { TerminalCreationHandler } from '../browser/terminal-creation-handler.js';
|
|
49
|
+
import { ContributedTerminalProfileStore, TerminalProfileService, UserTerminalProfileStore } from '../browser/terminal-profile-service.js';
|
|
50
|
+
import { BrowserOnlyTerminalFrontendContribution } from './browser-only-terminal-frontend-contribution.js';
|
|
51
51
|
|
|
52
52
|
disableJSDOM();
|
|
53
53
|
|
|
@@ -19,9 +19,9 @@ import { MessageService } from '@theia/core/lib/common/message-service';
|
|
|
19
19
|
import { nls } from '@theia/core/lib/common/nls';
|
|
20
20
|
import { ApplicationShell } from '@theia/core/lib/browser';
|
|
21
21
|
import URI from '@theia/core/lib/common/uri';
|
|
22
|
-
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution';
|
|
23
|
-
import { TerminalWidgetOptions, TerminalWidget } from '../browser/base/terminal-widget';
|
|
24
|
-
import { TerminalProfile } from '../browser/terminal-profile-service';
|
|
22
|
+
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution.js';
|
|
23
|
+
import { TerminalWidgetOptions, TerminalWidget } from '../browser/base/terminal-widget.js';
|
|
24
|
+
import { TerminalProfile } from '../browser/terminal-profile-service.js';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* A browser-only application has no backend to run a shell in, so it can't open terminals.
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule } from '@theia/core/shared/inversify';
|
|
18
|
-
import { BrowserOnlyTerminalFrontendContribution } from './browser-only-terminal-frontend-contribution';
|
|
19
|
-
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution';
|
|
18
|
+
import { BrowserOnlyTerminalFrontendContribution } from './browser-only-terminal-frontend-contribution.js';
|
|
19
|
+
import { TerminalFrontendContribution } from '../browser/terminal-frontend-contribution.js';
|
|
20
20
|
|
|
21
21
|
export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
22
22
|
rebind(TerminalFrontendContribution).to(BrowserOnlyTerminalFrontendContribution).inSingletonScope();
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { RpcProxy } from '@theia/core';
|
|
18
|
-
import { IBaseTerminalServer, IBaseTerminalServerOptions } from './base-terminal-protocol';
|
|
18
|
+
import { IBaseTerminalServer, IBaseTerminalServerOptions } from './base-terminal-protocol.js';
|
|
19
19
|
import { OS } from '@theia/core/lib/common/os';
|
|
20
20
|
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering/markdown-string';
|
|
21
21
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { expect } from 'chai';
|
|
18
18
|
import { OS } from '@theia/core';
|
|
19
|
-
import { cleanTerminalTitle, GeneralShellType, guessShellTypeFromExecutable, looksLikeHostPrompt, looksLikePath, WindowsShellType } from './shell-type';
|
|
19
|
+
import { cleanTerminalTitle, GeneralShellType, guessShellTypeFromExecutable, looksLikeHostPrompt, looksLikePath, WindowsShellType } from './shell-type.js';
|
|
20
20
|
|
|
21
21
|
// Save original environment state
|
|
22
22
|
const originalIsWindows = OS.backend.isWindows;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { IBaseTerminalServer, IBaseTerminalServerOptions } from './base-terminal-protocol';
|
|
17
|
+
import { IBaseTerminalServer, IBaseTerminalServerOptions } from './base-terminal-protocol.js';
|
|
18
18
|
|
|
19
19
|
export const ITerminalServer = Symbol('ITerminalServer');
|
|
20
20
|
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
IBaseTerminalClient,
|
|
23
23
|
TerminalProcessInfo,
|
|
24
24
|
TerminalExitReason
|
|
25
|
-
} from '../common/base-terminal-protocol';
|
|
25
|
+
} from '../common/base-terminal-protocol.js';
|
|
26
26
|
import { TerminalProcess, ProcessManager, TaskTerminalProcess } from '@theia/process/lib/node';
|
|
27
|
-
import { ShellProcess } from './shell-process';
|
|
27
|
+
import { ShellProcess } from './shell-process.js';
|
|
28
28
|
|
|
29
29
|
@injectable()
|
|
30
30
|
export abstract class BaseTerminalServer implements IBaseTerminalServer {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { wait } from '@theia/core/lib/common/promise-util';
|
|
18
18
|
import { expect } from 'chai';
|
|
19
|
-
import { BufferBufferingStream } from './buffering-stream';
|
|
19
|
+
import { BufferBufferingStream } from './buffering-stream.js';
|
|
20
20
|
|
|
21
21
|
describe('BufferringStream', () => {
|
|
22
22
|
|
package/src/node/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ import { OS } from '@theia/core';
|
|
|
24
24
|
import { ILogger } from '@theia/core/lib/common/logger';
|
|
25
25
|
import { MockLogger } from '@theia/core/lib/common/test/mock-logger';
|
|
26
26
|
import { BundledResourceProvider } from '@theia/core/lib/node';
|
|
27
|
-
import { ShellIntegrationInjector } from './shell-integration-injector';
|
|
27
|
+
import { ShellIntegrationInjector } from './shell-integration-injector.js';
|
|
28
28
|
|
|
29
29
|
describe('ShellIntegrationInjector', () => {
|
|
30
30
|
|
|
@@ -73,7 +73,7 @@ describe('ShellIntegrationInjector', () => {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
it('resolves the bundled scripts to a location that shells can read', () => {
|
|
76
|
-
expect(requestedPath).to.equal(path.join(
|
|
76
|
+
expect(requestedPath).to.equal(path.join(import.meta.dirname, 'shell-integrations'));
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
it('passes the resolved bash script to bash', () => {
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import path
|
|
17
|
+
import * as path from 'path';
|
|
18
18
|
import * as fs from 'fs';
|
|
19
|
-
import { GeneralShellType, guessShellTypeFromExecutable } from '../common/shell-type';
|
|
20
|
-
import { ShellProcess, ShellProcessOptions } from './shell-process';
|
|
19
|
+
import { GeneralShellType, guessShellTypeFromExecutable } from '../common/shell-type.js';
|
|
20
|
+
import { ShellProcess, ShellProcessOptions } from './shell-process.js';
|
|
21
21
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
22
22
|
import { ILogger, MaybePromise } from '@theia/core';
|
|
23
23
|
import { BackendApplicationContribution, BundledResourceProvider } from '@theia/core/lib/node';
|
|
@@ -95,7 +95,7 @@ export class ShellIntegrationInjector implements BackendApplicationContribution
|
|
|
95
95
|
*/
|
|
96
96
|
protected resolveIntegrationRoot(): Promise<void> {
|
|
97
97
|
return this.resolvingIntegrationRoot ??= (async () => {
|
|
98
|
-
const bundledPath = path.join(
|
|
98
|
+
const bundledPath = path.join(import.meta.dirname, this.INTEGRATION_ROOT_DIR);
|
|
99
99
|
try {
|
|
100
100
|
this.integrationRootPath = await this.bundledResourceProvider.resolveExternalPath(bundledPath);
|
|
101
101
|
} catch (error) {
|
|
@@ -17,8 +17,9 @@ import * as chai from 'chai';
|
|
|
17
17
|
import * as os from 'os';
|
|
18
18
|
import * as path from 'path';
|
|
19
19
|
import { FileUri } from '@theia/core/lib/common/file-uri';
|
|
20
|
-
import { createTerminalTestContainer } from './test/terminal-test-container';
|
|
21
|
-
import { IShellTerminalServer, IShellTerminalServerOptions } from '../common/shell-terminal-protocol';
|
|
20
|
+
import { createTerminalTestContainer } from './test/terminal-test-container.js';
|
|
21
|
+
import { IShellTerminalServer, IShellTerminalServerOptions } from '../common/shell-terminal-protocol.js';
|
|
22
|
+
import * as fs from 'fs';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Globals
|
|
@@ -103,12 +104,12 @@ describe('ShellServer', function (): void {
|
|
|
103
104
|
|
|
104
105
|
it('should reset rootURI pointing to a file instead of directory', () => {
|
|
105
106
|
const filePath = path.join(os.tmpdir(), 'theia-test-' + Date.now());
|
|
106
|
-
|
|
107
|
+
fs.writeFileSync(filePath, 'test');
|
|
107
108
|
try {
|
|
108
109
|
const options = validate({ rootURI: FileUri.create(filePath).toString() });
|
|
109
110
|
expect(options.rootURI).to.be.undefined;
|
|
110
111
|
} finally {
|
|
111
|
-
|
|
112
|
+
fs.unlinkSync(filePath);
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
|
|
@@ -19,8 +19,8 @@ import * as fs from 'fs';
|
|
|
19
19
|
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
20
20
|
import { ILogger } from '@theia/core/lib/common/logger';
|
|
21
21
|
import { EnvironmentUtils } from '@theia/core/lib/node/environment-utils';
|
|
22
|
-
import { BaseTerminalServer } from './base-terminal-server';
|
|
23
|
-
import { ShellProcessFactory, getRootPath } from './shell-process';
|
|
22
|
+
import { BaseTerminalServer } from './base-terminal-server.js';
|
|
23
|
+
import { ShellProcessFactory, getRootPath } from './shell-process.js';
|
|
24
24
|
import { ProcessManager, TerminalProcess } from '@theia/process/lib/node';
|
|
25
25
|
import { isWindows } from '@theia/core/lib/common/os';
|
|
26
26
|
import * as cp from 'child_process';
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
EnvironmentVariableCollectionWithPersistence, EnvironmentVariableMutatorType, NO_ROOT_URI, SerializableEnvironmentVariableCollection,
|
|
29
29
|
IShellTerminalServer, IShellTerminalServerOptions
|
|
30
30
|
}
|
|
31
|
-
from '../common/shell-terminal-protocol';
|
|
31
|
+
from '../common/shell-terminal-protocol.js';
|
|
32
32
|
import { URI } from '@theia/core';
|
|
33
33
|
import { MultiKeyMap } from '@theia/core/lib/common/collections';
|
|
34
34
|
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering/markdown-string';
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { createTerminalTestContainer } from './test/terminal-test-container';
|
|
17
|
+
import { createTerminalTestContainer } from './test/terminal-test-container.js';
|
|
18
18
|
import { BackendApplication } from '@theia/core/lib/node/backend-application';
|
|
19
|
-
import { IShellTerminalServer } from '../common/shell-terminal-protocol';
|
|
19
|
+
import { IShellTerminalServer } from '../common/shell-terminal-protocol.js';
|
|
20
20
|
import * as http from 'http';
|
|
21
21
|
import * as https from 'https';
|
|
22
|
-
import { terminalsPath } from '../common/terminal-protocol';
|
|
22
|
+
import { terminalsPath } from '../common/terminal-protocol.js';
|
|
23
23
|
import { TestWebSocketChannelSetup } from '@theia/core/lib/node/messaging/test/test-web-socket-channel';
|
|
24
24
|
|
|
25
25
|
describe('Terminal Backend Contribution', function (): void {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
18
18
|
import { ILogger } from '@theia/core/lib/common';
|
|
19
19
|
import { TerminalProcess, ProcessManager } from '@theia/process/lib/node';
|
|
20
|
-
import { terminalsPath } from '../common/terminal-protocol';
|
|
20
|
+
import { terminalsPath } from '../common/terminal-protocol.js';
|
|
21
21
|
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
|
22
|
-
import { StringBufferingStream } from './buffering-stream';
|
|
22
|
+
import { StringBufferingStream } from './buffering-stream.js';
|
|
23
23
|
|
|
24
24
|
@injectable()
|
|
25
25
|
export class TerminalBackendContribution implements MessagingService.Contribution {
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import { ContainerModule, Container, interfaces } from '@theia/core/shared/inversify';
|
|
18
|
-
import { TerminalBackendContribution } from './terminal-backend-contribution';
|
|
18
|
+
import { TerminalBackendContribution } from './terminal-backend-contribution.js';
|
|
19
19
|
import { ConnectionHandler, RpcConnectionHandler } from '@theia/core/lib/common/messaging';
|
|
20
|
-
import { ShellProcess, ShellProcessFactory, ShellProcessOptions } from './shell-process';
|
|
21
|
-
import { ITerminalServer, terminalPath } from '../common/terminal-protocol';
|
|
22
|
-
import { IBaseTerminalClient, DispatchingBaseTerminalClient, IBaseTerminalServer } from '../common/base-terminal-protocol';
|
|
23
|
-
import { TerminalServer } from './terminal-server';
|
|
24
|
-
import { IShellTerminalServer, shellTerminalPath } from '../common/shell-terminal-protocol';
|
|
25
|
-
import { ShellTerminalServer } from '../node/shell-terminal-server';
|
|
26
|
-
import { TerminalWatcher } from '../common/terminal-watcher';
|
|
20
|
+
import { ShellProcess, ShellProcessFactory, ShellProcessOptions } from './shell-process.js';
|
|
21
|
+
import { ITerminalServer, terminalPath } from '../common/terminal-protocol.js';
|
|
22
|
+
import { IBaseTerminalClient, DispatchingBaseTerminalClient, IBaseTerminalServer } from '../common/base-terminal-protocol.js';
|
|
23
|
+
import { TerminalServer } from './terminal-server.js';
|
|
24
|
+
import { IShellTerminalServer, shellTerminalPath } from '../common/shell-terminal-protocol.js';
|
|
25
|
+
import { ShellTerminalServer } from '../node/shell-terminal-server.js';
|
|
26
|
+
import { TerminalWatcher } from '../common/terminal-watcher.js';
|
|
27
27
|
import { MessagingService } from '@theia/core/lib/node/messaging/messaging-service';
|
|
28
|
-
import { bindTerminalPreferences } from '../common/terminal-preferences';
|
|
29
|
-
import { ShellIntegrationInjector } from './shell-integration-injector';
|
|
28
|
+
import { bindTerminalPreferences } from '../common/terminal-preferences.js';
|
|
29
|
+
import { ShellIntegrationInjector } from './shell-integration-injector.js';
|
|
30
30
|
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
31
31
|
|
|
32
32
|
export function bindTerminalServer(bind: interfaces.Bind, { path, identifier, constructor }: {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as chai from 'chai';
|
|
18
|
-
import { createTerminalTestContainer } from './test/terminal-test-container';
|
|
19
|
-
import { ITerminalServer } from '../common/terminal-protocol';
|
|
18
|
+
import { createTerminalTestContainer } from './test/terminal-test-container.js';
|
|
19
|
+
import { ITerminalServer } from '../common/terminal-protocol.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Globals
|
|
@@ -19,8 +19,8 @@ import { ILogger } from '@theia/core/lib/common/logger';
|
|
|
19
19
|
import {
|
|
20
20
|
ITerminalServer,
|
|
21
21
|
ITerminalServerOptions
|
|
22
|
-
} from '../common/terminal-protocol';
|
|
23
|
-
import { BaseTerminalServer } from './base-terminal-server';
|
|
22
|
+
} from '../common/terminal-protocol.js';
|
|
23
|
+
import { BaseTerminalServer } from './base-terminal-server.js';
|
|
24
24
|
import { TerminalProcessFactory, ProcessManager } from '@theia/process/lib/node';
|
|
25
25
|
|
|
26
26
|
@injectable()
|
|
@@ -18,7 +18,7 @@ import { bindLogger } from '@theia/core/lib/node/logger-backend-module';
|
|
|
18
18
|
import { backendApplicationModule } from '@theia/core/lib/node/backend-application-module';
|
|
19
19
|
import processBackendModule from '@theia/process/lib/node/process-backend-module';
|
|
20
20
|
import { messagingBackendModule } from '@theia/core/lib/node/messaging/messaging-backend-module';
|
|
21
|
-
import terminalBackendModule from '../terminal-backend-module';
|
|
21
|
+
import terminalBackendModule from '../terminal-backend-module.js';
|
|
22
22
|
import { ApplicationPackage } from '@theia/core/shared/@theia/application-package';
|
|
23
23
|
import { ProcessUtils } from '@theia/core/lib/node/process-utils';
|
|
24
24
|
|