@theia/terminal 1.34.2 → 1.34.3

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.
Files changed (121) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +30 -30
  3. package/lib/browser/base/terminal-service.d.ts +34 -34
  4. package/lib/browser/base/terminal-service.js +7 -7
  5. package/lib/browser/base/terminal-widget.d.ts +184 -184
  6. package/lib/browser/base/terminal-widget.js +34 -34
  7. package/lib/browser/index.d.ts +1 -1
  8. package/lib/browser/index.js +28 -28
  9. package/lib/browser/search/terminal-search-container.d.ts +3 -3
  10. package/lib/browser/search/terminal-search-container.js +28 -28
  11. package/lib/browser/search/terminal-search-widget.d.ts +30 -30
  12. package/lib/browser/search/terminal-search-widget.js +147 -147
  13. package/lib/browser/shell-terminal-profile.d.ts +19 -19
  14. package/lib/browser/shell-terminal-profile.js +39 -39
  15. package/lib/browser/terminal-contribution.d.ts +3 -3
  16. package/lib/browser/terminal-contribution.js +20 -20
  17. package/lib/browser/terminal-copy-on-selection-handler.d.ts +10 -10
  18. package/lib/browser/terminal-copy-on-selection-handler.js +103 -103
  19. package/lib/browser/terminal-file-link-provider.d.ts +24 -24
  20. package/lib/browser/terminal-file-link-provider.js +200 -200
  21. package/lib/browser/terminal-frontend-contribution.d.ts +112 -112
  22. package/lib/browser/terminal-frontend-contribution.js +994 -994
  23. package/lib/browser/terminal-frontend-module.d.ts +5 -5
  24. package/lib/browser/terminal-frontend-module.js +115 -115
  25. package/lib/browser/terminal-keybinding-contexts.d.ts +15 -15
  26. package/lib/browser/terminal-keybinding-contexts.js +71 -71
  27. package/lib/browser/terminal-link-helpers.d.ts +27 -27
  28. package/lib/browser/terminal-link-helpers.js +155 -155
  29. package/lib/browser/terminal-link-provider.d.ts +51 -51
  30. package/lib/browser/terminal-link-provider.js +197 -197
  31. package/lib/browser/terminal-preferences.d.ts +61 -61
  32. package/lib/browser/terminal-preferences.js +329 -329
  33. package/lib/browser/terminal-profile-service.d.ts +55 -55
  34. package/lib/browser/terminal-profile-service.js +149 -149
  35. package/lib/browser/terminal-quick-open-service.d.ts +36 -36
  36. package/lib/browser/terminal-quick-open-service.js +137 -137
  37. package/lib/browser/terminal-theme-service.d.ts +21 -21
  38. package/lib/browser/terminal-theme-service.js +218 -218
  39. package/lib/browser/terminal-url-link-provider.d.ts +11 -11
  40. package/lib/browser/terminal-url-link-provider.js +76 -76
  41. package/lib/browser/terminal-widget-impl.d.ts +173 -173
  42. package/lib/browser/terminal-widget-impl.js +769 -769
  43. package/lib/common/base-terminal-protocol.d.ts +100 -100
  44. package/lib/common/base-terminal-protocol.js +88 -88
  45. package/lib/common/shell-terminal-protocol.d.ts +29 -29
  46. package/lib/common/shell-terminal-protocol.js +22 -22
  47. package/lib/common/terminal-common-module.d.ts +7 -7
  48. package/lib/common/terminal-common-module.js +31 -31
  49. package/lib/common/terminal-protocol.d.ts +12 -12
  50. package/lib/common/terminal-protocol.js +21 -21
  51. package/lib/common/terminal-watcher.d.ts +13 -13
  52. package/lib/common/terminal-watcher.js +70 -70
  53. package/lib/node/base-terminal-server.d.ts +36 -36
  54. package/lib/node/base-terminal-server.js +252 -252
  55. package/lib/node/buffering-stream.d.ts +39 -39
  56. package/lib/node/buffering-stream.js +75 -75
  57. package/lib/node/buffering-stream.spec.d.ts +1 -1
  58. package/lib/node/buffering-stream.spec.js +43 -43
  59. package/lib/node/index.d.ts +1 -1
  60. package/lib/node/index.js +28 -28
  61. package/lib/node/shell-process.d.ts +26 -26
  62. package/lib/node/shell-process.js +106 -106
  63. package/lib/node/shell-terminal-server.d.ts +14 -14
  64. package/lib/node/shell-terminal-server.js +114 -114
  65. package/lib/node/shell-terminal-server.spec.d.ts +1 -1
  66. package/lib/node/shell-terminal-server.spec.js +35 -35
  67. package/lib/node/terminal-backend-contribution.d.ts +9 -9
  68. package/lib/node/terminal-backend-contribution.js +75 -75
  69. package/lib/node/terminal-backend-contribution.slow-spec.d.ts +1 -1
  70. package/lib/node/terminal-backend-contribution.slow-spec.js +54 -54
  71. package/lib/node/terminal-backend-module.d.ts +11 -11
  72. package/lib/node/terminal-backend-module.js +69 -69
  73. package/lib/node/terminal-server.d.ts +9 -9
  74. package/lib/node/terminal-server.js +64 -64
  75. package/lib/node/terminal-server.spec.d.ts +1 -1
  76. package/lib/node/terminal-server.spec.js +41 -41
  77. package/lib/node/test/terminal-test-container.d.ts +2 -2
  78. package/lib/node/test/terminal-test-container.js +40 -40
  79. package/lib/package.spec.js +25 -25
  80. package/package.json +9 -9
  81. package/src/browser/base/terminal-service.ts +60 -60
  82. package/src/browser/base/terminal-widget.ts +244 -244
  83. package/src/browser/index.ts +17 -17
  84. package/src/browser/search/terminal-search-container.ts +28 -28
  85. package/src/browser/search/terminal-search-widget.tsx +161 -161
  86. package/src/browser/shell-terminal-profile.ts +40 -40
  87. package/src/browser/style/terminal-search.css +93 -93
  88. package/src/browser/style/terminal.css +33 -33
  89. package/src/browser/terminal-contribution.ts +19 -19
  90. package/src/browser/terminal-copy-on-selection-handler.ts +92 -92
  91. package/src/browser/terminal-file-link-provider.ts +200 -200
  92. package/src/browser/terminal-frontend-contribution.ts +1048 -1048
  93. package/src/browser/terminal-frontend-module.ts +139 -139
  94. package/src/browser/terminal-keybinding-contexts.ts +52 -52
  95. package/src/browser/terminal-link-helpers.ts +187 -187
  96. package/src/browser/terminal-link-provider.ts +203 -203
  97. package/src/browser/terminal-preferences.ts +427 -427
  98. package/src/browser/terminal-profile-service.ts +170 -170
  99. package/src/browser/terminal-quick-open-service.ts +132 -132
  100. package/src/browser/terminal-theme-service.ts +209 -209
  101. package/src/browser/terminal-url-link-provider.ts +66 -66
  102. package/src/browser/terminal-widget-impl.ts +827 -827
  103. package/src/common/base-terminal-protocol.ts +183 -183
  104. package/src/common/shell-terminal-protocol.ts +50 -50
  105. package/src/common/terminal-common-module.ts +30 -30
  106. package/src/common/terminal-protocol.ts +32 -32
  107. package/src/common/terminal-watcher.ts +69 -69
  108. package/src/node/base-terminal-server.ts +279 -279
  109. package/src/node/buffering-stream.spec.ts +46 -46
  110. package/src/node/buffering-stream.ts +95 -95
  111. package/src/node/index.ts +17 -17
  112. package/src/node/shell-process.ts +101 -101
  113. package/src/node/shell-terminal-server.spec.ts +40 -40
  114. package/src/node/shell-terminal-server.ts +95 -95
  115. package/src/node/terminal-backend-contribution.slow-spec.ts +63 -63
  116. package/src/node/terminal-backend-contribution.ts +60 -60
  117. package/src/node/terminal-backend-module.ts +82 -82
  118. package/src/node/terminal-server.spec.ts +47 -47
  119. package/src/node/terminal-server.ts +52 -52
  120. package/src/node/test/terminal-test-container.ts +39 -39
  121. package/src/package.spec.ts +28 -28
package/README.md CHANGED
@@ -1,30 +1,30 @@
1
- <div align='center'>
2
-
3
- <br />
4
-
5
- <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
-
7
- <h2>ECLIPSE THEIA - TERMINAL EXTENSION</h2>
8
-
9
- <hr />
10
-
11
- </div>
12
-
13
- ## Description
14
-
15
- The `@theia/terminal` extension contributes the ability to spawn integrated terminals in the application which can be used in a variety of different scenarios.
16
-
17
- ## Additional Information
18
-
19
- - [API documentation for `@theia/terminal`](https://eclipse-theia.github.io/theia/docs/next/modules/terminal.html)
20
- - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
- - [Theia - Website](https://theia-ide.org/)
22
-
23
- ## License
24
-
25
- - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
- - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
-
28
- ## Trademark
29
- "Theia" is a trademark of the Eclipse Foundation
30
- https://www.eclipse.org/theia
1
+ <div align='center'>
2
+
3
+ <br />
4
+
5
+ <img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
6
+
7
+ <h2>ECLIPSE THEIA - TERMINAL EXTENSION</h2>
8
+
9
+ <hr />
10
+
11
+ </div>
12
+
13
+ ## Description
14
+
15
+ The `@theia/terminal` extension contributes the ability to spawn integrated terminals in the application which can be used in a variety of different scenarios.
16
+
17
+ ## Additional Information
18
+
19
+ - [API documentation for `@theia/terminal`](https://eclipse-theia.github.io/theia/docs/next/modules/terminal.html)
20
+ - [Theia - GitHub](https://github.com/eclipse-theia/theia)
21
+ - [Theia - Website](https://theia-ide.org/)
22
+
23
+ ## License
24
+
25
+ - [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
26
+ - [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
27
+
28
+ ## Trademark
29
+ "Theia" is a trademark of the Eclipse Foundation
30
+ https://www.eclipse.org/theia
@@ -1,35 +1,35 @@
1
- import { Event } from '@theia/core/lib/common/event';
2
- import { WidgetOpenerOptions } from '@theia/core/lib/browser';
3
- import { TerminalWidgetOptions, TerminalWidget } from './terminal-widget';
4
- /**
5
- * Service manipulating terminal widgets.
6
- */
7
- export declare const TerminalService: unique symbol;
8
- export interface TerminalService {
9
- /**
10
- * Create new terminal with predefined options.
11
- * @param options - terminal options.
12
- */
13
- newTerminal(options: TerminalWidgetOptions): Promise<TerminalWidget>;
14
- open(terminal: TerminalWidget, options?: WidgetOpenerOptions): void;
15
- readonly all: TerminalWidget[];
16
- /**
17
- * @param id - the widget id (NOT the terminal id!)
18
- * @return the widget
19
- */
20
- getById(id: string): TerminalWidget | undefined;
21
- /**
22
- * @param id - the terminal id (NOT the terminal widget id!)
23
- * @return the widget
24
- */
25
- getByTerminalId(terminalId: number): TerminalWidget | undefined;
26
- /**
27
- * Returns detected default shell.
28
- */
29
- getDefaultShell(): Promise<string>;
30
- readonly onDidCreateTerminal: Event<TerminalWidget>;
31
- readonly currentTerminal: TerminalWidget | undefined;
32
- readonly onDidChangeCurrentTerminal: Event<TerminalWidget | undefined>;
33
- readonly lastUsedTerminal: TerminalWidget | undefined;
34
- }
1
+ import { Event } from '@theia/core/lib/common/event';
2
+ import { WidgetOpenerOptions } from '@theia/core/lib/browser';
3
+ import { TerminalWidgetOptions, TerminalWidget } from './terminal-widget';
4
+ /**
5
+ * Service manipulating terminal widgets.
6
+ */
7
+ export declare const TerminalService: unique symbol;
8
+ export interface TerminalService {
9
+ /**
10
+ * Create new terminal with predefined options.
11
+ * @param options - terminal options.
12
+ */
13
+ newTerminal(options: TerminalWidgetOptions): Promise<TerminalWidget>;
14
+ open(terminal: TerminalWidget, options?: WidgetOpenerOptions): void;
15
+ readonly all: TerminalWidget[];
16
+ /**
17
+ * @param id - the widget id (NOT the terminal id!)
18
+ * @return the widget
19
+ */
20
+ getById(id: string): TerminalWidget | undefined;
21
+ /**
22
+ * @param id - the terminal id (NOT the terminal widget id!)
23
+ * @return the widget
24
+ */
25
+ getByTerminalId(terminalId: number): TerminalWidget | undefined;
26
+ /**
27
+ * Returns detected default shell.
28
+ */
29
+ getDefaultShell(): Promise<string>;
30
+ readonly onDidCreateTerminal: Event<TerminalWidget>;
31
+ readonly currentTerminal: TerminalWidget | undefined;
32
+ readonly onDidChangeCurrentTerminal: Event<TerminalWidget | undefined>;
33
+ readonly lastUsedTerminal: TerminalWidget | undefined;
34
+ }
35
35
  //# sourceMappingURL=terminal-service.d.ts.map
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TerminalService = void 0;
4
- /**
5
- * Service manipulating terminal widgets.
6
- */
7
- exports.TerminalService = Symbol('TerminalService');
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TerminalService = void 0;
4
+ /**
5
+ * Service manipulating terminal widgets.
6
+ */
7
+ exports.TerminalService = Symbol('TerminalService');
8
8
  //# sourceMappingURL=terminal-service.js.map
@@ -1,185 +1,185 @@
1
- import { Event, ViewColumn } from '@theia/core';
2
- import { BaseWidget } from '@theia/core/lib/browser';
3
- import { CommandLineOptions } from '@theia/process/lib/common/shell-command-builder';
4
- import { TerminalSearchWidget } from '../search/terminal-search-widget';
5
- import { TerminalProcessInfo } from '../../common/base-terminal-protocol';
6
- import URI from '@theia/core/lib/common/uri';
7
- export interface TerminalDimensions {
8
- cols: number;
9
- rows: number;
10
- }
11
- export interface TerminalExitStatus {
12
- readonly code: number | undefined;
13
- }
14
- export declare type TerminalLocationOptions = TerminalLocation | TerminalEditorLocation | TerminalSplitLocation;
15
- export declare enum TerminalLocation {
16
- Panel = 1,
17
- Editor = 2
18
- }
19
- export interface TerminalEditorLocation {
20
- readonly viewColumn: ViewColumn;
21
- readonly preserveFocus?: boolean;
22
- }
23
- export interface TerminalSplitLocation {
24
- readonly parentTerminal: string;
25
- }
26
- /**
27
- * Terminal UI widget.
28
- */
29
- export declare abstract class TerminalWidget extends BaseWidget {
30
- abstract processId: Promise<number>;
31
- /**
32
- * Get the current executable and arguments.
33
- */
34
- abstract processInfo: Promise<TerminalProcessInfo>;
35
- /** Terminal kind that indicates whether a terminal is created by a user or by some extension for a user */
36
- abstract readonly kind: 'user' | string;
37
- abstract readonly terminalId: number;
38
- abstract readonly dimensions: TerminalDimensions;
39
- abstract readonly exitStatus: TerminalExitStatus | undefined;
40
- /** Terminal widget can be hidden from users until explicitly shown once. */
41
- abstract readonly hiddenFromUser: boolean;
42
- /** The position of the terminal widget. */
43
- abstract readonly location: TerminalLocationOptions;
44
- /** The last CWD assigned to the terminal, useful when attempting getCwdURI on a task terminal fails */
45
- lastCwd: URI;
46
- /**
47
- * Start terminal and return terminal id.
48
- * @param id - terminal id.
49
- */
50
- abstract start(id?: number): Promise<number>;
51
- /**
52
- * Send text to the terminal server.
53
- * @param text - text content.
54
- */
55
- abstract sendText(text: string): void;
56
- /**
57
- * Resolves when the command is successfully sent, this doesn't mean that it
58
- * was evaluated. Might reject if terminal wasn't properly started yet.
59
- *
60
- * Note that this method will try to escape your arguments as if it was
61
- * someone inputting everything in a shell.
62
- *
63
- * Supported shells: `bash`, `cmd.exe`, `wsl.exe`, `pwsh/powershell.exe`
64
- */
65
- abstract executeCommand(commandOptions: CommandLineOptions): Promise<void>;
66
- /** Event that fires when the terminal is connected or reconnected */
67
- abstract onDidOpen: Event<void>;
68
- /** Event that fires when the terminal fails to connect or reconnect */
69
- abstract onDidOpenFailure: Event<void>;
70
- /** Event that fires when the terminal size changed */
71
- abstract onSizeChanged: Event<{
72
- cols: number;
73
- rows: number;
74
- }>;
75
- /** Event that fires when the terminal receives a key event. */
76
- abstract onKey: Event<{
77
- key: string;
78
- domEvent: KeyboardEvent;
79
- }>;
80
- /** Event that fires when the terminal input data */
81
- abstract onData: Event<string>;
82
- abstract scrollLineUp(): void;
83
- abstract scrollLineDown(): void;
84
- abstract scrollToTop(): void;
85
- abstract scrollToBottom(): void;
86
- abstract scrollPageUp(): void;
87
- abstract scrollPageDown(): void;
88
- abstract resetTerminal(): void;
89
- /**
90
- * Event which fires when terminal did closed. Event value contains closed terminal widget definition.
91
- */
92
- abstract onTerminalDidClose: Event<TerminalWidget>;
93
- /**
94
- * Cleat terminal output.
95
- */
96
- abstract clearOutput(): void;
97
- abstract writeLine(line: string): void;
98
- abstract write(data: string): void;
99
- abstract resize(cols: number, rows: number): void;
100
- /**
101
- * Return Terminal search box widget.
102
- */
103
- abstract getSearchBox(): TerminalSearchWidget;
104
- /**
105
- * Whether the terminal process has child processes.
106
- */
107
- abstract hasChildProcesses(): Promise<boolean>;
108
- abstract setTitle(title: string): void;
109
- abstract waitOnExit(waitOnExit?: boolean | string): void;
110
- }
111
- /**
112
- * Terminal widget options.
113
- */
114
- export declare const TerminalWidgetOptions: unique symbol;
115
- export interface TerminalWidgetOptions {
116
- /**
117
- * Human readable terminal representation on the UI.
118
- */
119
- readonly title?: string;
120
- /**
121
- * icon class
122
- */
123
- readonly iconClass?: string;
124
- /**
125
- * Path to the executable shell. For example: `/bin/bash`, `bash`, `sh`.
126
- */
127
- readonly shellPath?: string;
128
- /**
129
- * Args for the custom shell executable. A string can be used on Windows only which allows
130
- * specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6).
131
- */
132
- readonly shellArgs?: string[] | string;
133
- /**
134
- * Current working directory.
135
- */
136
- readonly cwd?: string | URI;
137
- /**
138
- * Environment variables for terminal.
139
- */
140
- readonly env?: {
141
- [key: string]: string | null;
142
- };
143
- /**
144
- * Whether the terminal process environment should be exactly as provided in `env`.
145
- */
146
- readonly strictEnv?: boolean;
147
- /**
148
- * In case `destroyTermOnClose` is true - terminal process will be destroyed on close terminal widget, otherwise will be kept
149
- * alive.
150
- */
151
- readonly destroyTermOnClose?: boolean;
152
- /**
153
- * Terminal server side can send to the client `terminal title` to display this value on the UI. If
154
- * useServerTitle = true then display this title, otherwise display title defined by 'title' argument.
155
- */
156
- readonly useServerTitle?: boolean;
157
- /**
158
- * Whether it is a pseudo terminal where an extension controls its input and output.
159
- */
160
- readonly isPseudoTerminal?: boolean;
161
- /**
162
- * Terminal id. Should be unique for all DOM.
163
- */
164
- readonly id?: string;
165
- /**
166
- * Terminal attributes. Can be useful to apply some implementation specific information.
167
- */
168
- readonly attributes?: {
169
- [key: string]: string | null;
170
- };
171
- /**
172
- * Terminal kind that indicates whether a terminal is created by a user or by some extension for a user
173
- */
174
- readonly kind?: 'user' | string;
175
- /**
176
- * When enabled the terminal will run the process as normal but not be surfaced to the user until `Terminal.show` is called.
177
- */
178
- readonly hideFromUser?: boolean;
179
- readonly location?: TerminalLocationOptions;
180
- /**
181
- * When enabled, the terminal will not be persisted across window reloads.
182
- */
183
- readonly isTransient?: boolean;
184
- }
1
+ import { Event, ViewColumn } from '@theia/core';
2
+ import { BaseWidget } from '@theia/core/lib/browser';
3
+ import { CommandLineOptions } from '@theia/process/lib/common/shell-command-builder';
4
+ import { TerminalSearchWidget } from '../search/terminal-search-widget';
5
+ import { TerminalProcessInfo } from '../../common/base-terminal-protocol';
6
+ import URI from '@theia/core/lib/common/uri';
7
+ export interface TerminalDimensions {
8
+ cols: number;
9
+ rows: number;
10
+ }
11
+ export interface TerminalExitStatus {
12
+ readonly code: number | undefined;
13
+ }
14
+ export declare type TerminalLocationOptions = TerminalLocation | TerminalEditorLocation | TerminalSplitLocation;
15
+ export declare enum TerminalLocation {
16
+ Panel = 1,
17
+ Editor = 2
18
+ }
19
+ export interface TerminalEditorLocation {
20
+ readonly viewColumn: ViewColumn;
21
+ readonly preserveFocus?: boolean;
22
+ }
23
+ export interface TerminalSplitLocation {
24
+ readonly parentTerminal: string;
25
+ }
26
+ /**
27
+ * Terminal UI widget.
28
+ */
29
+ export declare abstract class TerminalWidget extends BaseWidget {
30
+ abstract processId: Promise<number>;
31
+ /**
32
+ * Get the current executable and arguments.
33
+ */
34
+ abstract processInfo: Promise<TerminalProcessInfo>;
35
+ /** Terminal kind that indicates whether a terminal is created by a user or by some extension for a user */
36
+ abstract readonly kind: 'user' | string;
37
+ abstract readonly terminalId: number;
38
+ abstract readonly dimensions: TerminalDimensions;
39
+ abstract readonly exitStatus: TerminalExitStatus | undefined;
40
+ /** Terminal widget can be hidden from users until explicitly shown once. */
41
+ abstract readonly hiddenFromUser: boolean;
42
+ /** The position of the terminal widget. */
43
+ abstract readonly location: TerminalLocationOptions;
44
+ /** The last CWD assigned to the terminal, useful when attempting getCwdURI on a task terminal fails */
45
+ lastCwd: URI;
46
+ /**
47
+ * Start terminal and return terminal id.
48
+ * @param id - terminal id.
49
+ */
50
+ abstract start(id?: number): Promise<number>;
51
+ /**
52
+ * Send text to the terminal server.
53
+ * @param text - text content.
54
+ */
55
+ abstract sendText(text: string): void;
56
+ /**
57
+ * Resolves when the command is successfully sent, this doesn't mean that it
58
+ * was evaluated. Might reject if terminal wasn't properly started yet.
59
+ *
60
+ * Note that this method will try to escape your arguments as if it was
61
+ * someone inputting everything in a shell.
62
+ *
63
+ * Supported shells: `bash`, `cmd.exe`, `wsl.exe`, `pwsh/powershell.exe`
64
+ */
65
+ abstract executeCommand(commandOptions: CommandLineOptions): Promise<void>;
66
+ /** Event that fires when the terminal is connected or reconnected */
67
+ abstract onDidOpen: Event<void>;
68
+ /** Event that fires when the terminal fails to connect or reconnect */
69
+ abstract onDidOpenFailure: Event<void>;
70
+ /** Event that fires when the terminal size changed */
71
+ abstract onSizeChanged: Event<{
72
+ cols: number;
73
+ rows: number;
74
+ }>;
75
+ /** Event that fires when the terminal receives a key event. */
76
+ abstract onKey: Event<{
77
+ key: string;
78
+ domEvent: KeyboardEvent;
79
+ }>;
80
+ /** Event that fires when the terminal input data */
81
+ abstract onData: Event<string>;
82
+ abstract scrollLineUp(): void;
83
+ abstract scrollLineDown(): void;
84
+ abstract scrollToTop(): void;
85
+ abstract scrollToBottom(): void;
86
+ abstract scrollPageUp(): void;
87
+ abstract scrollPageDown(): void;
88
+ abstract resetTerminal(): void;
89
+ /**
90
+ * Event which fires when terminal did closed. Event value contains closed terminal widget definition.
91
+ */
92
+ abstract onTerminalDidClose: Event<TerminalWidget>;
93
+ /**
94
+ * Cleat terminal output.
95
+ */
96
+ abstract clearOutput(): void;
97
+ abstract writeLine(line: string): void;
98
+ abstract write(data: string): void;
99
+ abstract resize(cols: number, rows: number): void;
100
+ /**
101
+ * Return Terminal search box widget.
102
+ */
103
+ abstract getSearchBox(): TerminalSearchWidget;
104
+ /**
105
+ * Whether the terminal process has child processes.
106
+ */
107
+ abstract hasChildProcesses(): Promise<boolean>;
108
+ abstract setTitle(title: string): void;
109
+ abstract waitOnExit(waitOnExit?: boolean | string): void;
110
+ }
111
+ /**
112
+ * Terminal widget options.
113
+ */
114
+ export declare const TerminalWidgetOptions: unique symbol;
115
+ export interface TerminalWidgetOptions {
116
+ /**
117
+ * Human readable terminal representation on the UI.
118
+ */
119
+ readonly title?: string;
120
+ /**
121
+ * icon class
122
+ */
123
+ readonly iconClass?: string;
124
+ /**
125
+ * Path to the executable shell. For example: `/bin/bash`, `bash`, `sh`.
126
+ */
127
+ readonly shellPath?: string;
128
+ /**
129
+ * Args for the custom shell executable. A string can be used on Windows only which allows
130
+ * specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6).
131
+ */
132
+ readonly shellArgs?: string[] | string;
133
+ /**
134
+ * Current working directory.
135
+ */
136
+ readonly cwd?: string | URI;
137
+ /**
138
+ * Environment variables for terminal.
139
+ */
140
+ readonly env?: {
141
+ [key: string]: string | null;
142
+ };
143
+ /**
144
+ * Whether the terminal process environment should be exactly as provided in `env`.
145
+ */
146
+ readonly strictEnv?: boolean;
147
+ /**
148
+ * In case `destroyTermOnClose` is true - terminal process will be destroyed on close terminal widget, otherwise will be kept
149
+ * alive.
150
+ */
151
+ readonly destroyTermOnClose?: boolean;
152
+ /**
153
+ * Terminal server side can send to the client `terminal title` to display this value on the UI. If
154
+ * useServerTitle = true then display this title, otherwise display title defined by 'title' argument.
155
+ */
156
+ readonly useServerTitle?: boolean;
157
+ /**
158
+ * Whether it is a pseudo terminal where an extension controls its input and output.
159
+ */
160
+ readonly isPseudoTerminal?: boolean;
161
+ /**
162
+ * Terminal id. Should be unique for all DOM.
163
+ */
164
+ readonly id?: string;
165
+ /**
166
+ * Terminal attributes. Can be useful to apply some implementation specific information.
167
+ */
168
+ readonly attributes?: {
169
+ [key: string]: string | null;
170
+ };
171
+ /**
172
+ * Terminal kind that indicates whether a terminal is created by a user or by some extension for a user
173
+ */
174
+ readonly kind?: 'user' | string;
175
+ /**
176
+ * When enabled the terminal will run the process as normal but not be surfaced to the user until `Terminal.show` is called.
177
+ */
178
+ readonly hideFromUser?: boolean;
179
+ readonly location?: TerminalLocationOptions;
180
+ /**
181
+ * When enabled, the terminal will not be persisted across window reloads.
182
+ */
183
+ readonly isTransient?: boolean;
184
+ }
185
185
  //# sourceMappingURL=terminal-widget.d.ts.map
@@ -1,35 +1,35 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.TerminalWidgetOptions = exports.TerminalWidget = exports.TerminalLocation = void 0;
19
- const browser_1 = require("@theia/core/lib/browser");
20
- var TerminalLocation;
21
- (function (TerminalLocation) {
22
- TerminalLocation[TerminalLocation["Panel"] = 1] = "Panel";
23
- TerminalLocation[TerminalLocation["Editor"] = 2] = "Editor";
24
- })(TerminalLocation = exports.TerminalLocation || (exports.TerminalLocation = {}));
25
- /**
26
- * Terminal UI widget.
27
- */
28
- class TerminalWidget extends browser_1.BaseWidget {
29
- }
30
- exports.TerminalWidget = TerminalWidget;
31
- /**
32
- * Terminal widget options.
33
- */
34
- exports.TerminalWidgetOptions = Symbol('TerminalWidgetOptions');
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 Red Hat, Inc. and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TerminalWidgetOptions = exports.TerminalWidget = exports.TerminalLocation = void 0;
19
+ const browser_1 = require("@theia/core/lib/browser");
20
+ var TerminalLocation;
21
+ (function (TerminalLocation) {
22
+ TerminalLocation[TerminalLocation["Panel"] = 1] = "Panel";
23
+ TerminalLocation[TerminalLocation["Editor"] = 2] = "Editor";
24
+ })(TerminalLocation = exports.TerminalLocation || (exports.TerminalLocation = {}));
25
+ /**
26
+ * Terminal UI widget.
27
+ */
28
+ class TerminalWidget extends browser_1.BaseWidget {
29
+ }
30
+ exports.TerminalWidget = TerminalWidget;
31
+ /**
32
+ * Terminal widget options.
33
+ */
34
+ exports.TerminalWidgetOptions = Symbol('TerminalWidgetOptions');
35
35
  //# sourceMappingURL=terminal-widget.js.map
@@ -1,2 +1,2 @@
1
- export * from './terminal-frontend-module';
1
+ export * from './terminal-frontend-module';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,29 +1,29 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2017 TypeFox and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- __exportStar(require("./terminal-frontend-module"), exports);
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2017 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ __exportStar(require("./terminal-frontend-module"), exports);
29
29
  //# sourceMappingURL=index.js.map