@opensumi/ide-terminal-next 2.14.4 → 2.15.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/component/terminal.view.d.ts.map +1 -1
- package/lib/browser/component/terminal.view.js +7 -1
- package/lib/browser/component/terminal.view.js.map +1 -1
- package/lib/browser/component/terminal.widget.d.ts.map +1 -1
- package/lib/browser/component/terminal.widget.js +12 -3
- package/lib/browser/component/terminal.widget.js.map +1 -1
- package/lib/browser/contribution/index.d.ts +1 -0
- package/lib/browser/contribution/index.d.ts.map +1 -1
- package/lib/browser/contribution/index.js +1 -0
- package/lib/browser/contribution/index.js.map +1 -1
- package/lib/browser/contribution/terminal.preference.d.ts +6 -0
- package/lib/browser/contribution/terminal.preference.d.ts.map +1 -0
- package/lib/browser/contribution/terminal.preference.js +17 -0
- package/lib/browser/contribution/terminal.preference.js.map +1 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +21 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/terminal.api.d.ts.map +1 -1
- package/lib/browser/terminal.api.js +11 -10
- package/lib/browser/terminal.api.js.map +1 -1
- package/lib/browser/terminal.client.d.ts +33 -16
- package/lib/browser/terminal.client.d.ts.map +1 -1
- package/lib/browser/terminal.client.js +248 -113
- package/lib/browser/terminal.client.js.map +1 -1
- package/lib/browser/terminal.contribution.d.ts +7 -0
- package/lib/browser/terminal.contribution.d.ts.map +1 -0
- package/lib/browser/terminal.contribution.js +32 -0
- package/lib/browser/terminal.contribution.js.map +1 -0
- package/lib/browser/terminal.controller.d.ts +14 -3
- package/lib/browser/terminal.controller.d.ts.map +1 -1
- package/lib/browser/terminal.controller.js +44 -9
- package/lib/browser/terminal.controller.js.map +1 -1
- package/lib/browser/terminal.internal.service.d.ts +6 -2
- package/lib/browser/terminal.internal.service.d.ts.map +1 -1
- package/lib/browser/terminal.internal.service.js +27 -0
- package/lib/browser/terminal.internal.service.js.map +1 -1
- package/lib/browser/terminal.profile.d.ts +28 -0
- package/lib/browser/terminal.profile.d.ts.map +1 -0
- package/lib/browser/terminal.profile.internal.d.ts +16 -0
- package/lib/browser/terminal.profile.internal.d.ts.map +1 -0
- package/lib/browser/terminal.profile.internal.js +106 -0
- package/lib/browser/terminal.profile.internal.js.map +1 -0
- package/lib/browser/terminal.profile.js +146 -0
- package/lib/browser/terminal.profile.js.map +1 -0
- package/lib/browser/terminal.service.d.ts +7 -4
- package/lib/browser/terminal.service.d.ts.map +1 -1
- package/lib/browser/terminal.service.js +35 -19
- package/lib/browser/terminal.service.js.map +1 -1
- package/lib/browser/xterm.d.ts +24 -0
- package/lib/browser/xterm.d.ts.map +1 -0
- package/lib/browser/xterm.js +55 -0
- package/lib/browser/xterm.js.map +1 -0
- package/lib/common/client.d.ts +4 -2
- package/lib/common/client.d.ts.map +1 -1
- package/lib/common/client.js +2 -1
- package/lib/common/client.js.map +1 -1
- package/lib/common/controller.d.ts +17 -1
- package/lib/common/controller.d.ts.map +1 -1
- package/lib/common/controller.js.map +1 -1
- package/lib/common/error.d.ts +8 -0
- package/lib/common/error.d.ts.map +1 -1
- package/lib/common/error.js +5 -1
- package/lib/common/error.js.map +1 -1
- package/lib/common/extension.d.ts +28 -2
- package/lib/common/extension.d.ts.map +1 -1
- package/lib/common/extension.js +6 -1
- package/lib/common/extension.js.map +1 -1
- package/lib/common/index.d.ts +2 -0
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +2 -0
- package/lib/common/index.js.map +1 -1
- package/lib/common/preference.d.ts +94 -0
- package/lib/common/preference.d.ts.map +1 -1
- package/lib/common/preference.js +140 -1
- package/lib/common/preference.js.map +1 -1
- package/lib/common/process.d.ts +8 -0
- package/lib/common/process.d.ts.map +1 -0
- package/lib/common/process.js +3 -0
- package/lib/common/process.js.map +1 -0
- package/lib/common/profile.d.ts +101 -0
- package/lib/common/profile.d.ts.map +1 -0
- package/lib/common/profile.js +28 -0
- package/lib/common/profile.js.map +1 -0
- package/lib/common/pty.d.ts +142 -24
- package/lib/common/pty.d.ts.map +1 -1
- package/lib/common/pty.js +2 -2
- package/lib/common/pty.js.map +1 -1
- package/lib/common/service.d.ts +11 -6
- package/lib/common/service.d.ts.map +1 -1
- package/lib/common/service.js.map +1 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +6 -1
- package/lib/node/index.js.map +1 -1
- package/lib/node/pty.d.ts +29 -15
- package/lib/node/pty.d.ts.map +1 -1
- package/lib/node/pty.js +117 -41
- package/lib/node/pty.js.map +1 -1
- package/lib/node/shell.d.ts +11 -1
- package/lib/node/shell.d.ts.map +1 -1
- package/lib/node/shell.js +89 -9
- package/lib/node/shell.js.map +1 -1
- package/lib/node/{terminal-process.service.d.ts → terminal.process.service.d.ts} +1 -1
- package/lib/node/terminal.process.service.d.ts.map +1 -0
- package/lib/node/{terminal-process.service.js → terminal.process.service.js} +1 -1
- package/lib/node/{terminal-process.service.js.map → terminal.process.service.js.map} +1 -1
- package/lib/node/terminal.profile.service.d.ts +19 -0
- package/lib/node/terminal.profile.service.d.ts.map +1 -0
- package/lib/node/terminal.profile.service.js +229 -0
- package/lib/node/terminal.profile.service.js.map +1 -0
- package/lib/node/terminal.service.client.d.ts +8 -1
- package/lib/node/terminal.service.client.d.ts.map +1 -1
- package/lib/node/terminal.service.client.js +40 -13
- package/lib/node/terminal.service.client.js.map +1 -1
- package/lib/node/terminal.service.d.ts +7 -7
- package/lib/node/terminal.service.d.ts.map +1 -1
- package/lib/node/terminal.service.js +41 -23
- package/lib/node/terminal.service.js.map +1 -1
- package/package.json +15 -15
- package/lib/node/terminal-process.service.d.ts.map +0 -1
package/lib/common/pty.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import { WindowsShellType } from './shell';
|
|
|
5
5
|
import { IPty as INodePty } from 'node-pty';
|
|
6
6
|
import { OperatingSystem } from '@opensumi/ide-core-common/lib/platform';
|
|
7
7
|
import { ITerminalError } from './error';
|
|
8
|
-
|
|
8
|
+
import { IDetectProfileOptions, ITerminalProfile } from './profile';
|
|
9
|
+
import { ITerminalEnvironment, ITerminalProcessExtHostProxy, TerminalLocation } from './extension';
|
|
10
|
+
export interface IPtyProcess extends INodePty {
|
|
9
11
|
/**
|
|
10
12
|
* @deprecated 请使用 `IPty.launchConfig` 的 shellPath 字段
|
|
11
13
|
*/
|
|
@@ -121,20 +123,30 @@ export interface TerminalOptions {
|
|
|
121
123
|
*/
|
|
122
124
|
color?: vscode.ThemeColor;
|
|
123
125
|
/**
|
|
126
|
+
* @deprecated Use `ICreateClientWithWidgetOptions.closeWhenExited` instead. Will removed in 2.17.0
|
|
124
127
|
* pty 进程退出后是否自动关闭 terminal 控件
|
|
125
128
|
*/
|
|
126
129
|
closeWhenExited?: boolean;
|
|
127
130
|
/**
|
|
131
|
+
* @deprecated Use `ICreateClientWithWidgetOptions.args` instead. Will removed in 2.17.0
|
|
128
132
|
* 自定义的参数,由上层集成方自行控制
|
|
129
133
|
*/
|
|
130
134
|
args?: any;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Use `ICreateClientWithWidgetOptions.beforeCreate` instead. Will removed in 2.17.0
|
|
137
|
+
* 自定义的参数,由上层集成方自行控制
|
|
138
|
+
*/
|
|
131
139
|
beforeCreate?: (terminalId: string) => void;
|
|
132
140
|
}
|
|
133
141
|
export declare const ITerminalNodeService: unique symbol;
|
|
134
142
|
export interface ITerminalNodeService {
|
|
135
|
-
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated this overload signature will be removed in 2.17.0
|
|
145
|
+
*/
|
|
146
|
+
create2(id: string, launchConfig: IShellLaunchConfig): Promise<IPtyProcess | undefined>;
|
|
147
|
+
create2(id: string, cols: number, rows: number, options: IShellLaunchConfig): Promise<IPtyProcess | undefined>;
|
|
136
148
|
onMessage(id: string, msg: string): void;
|
|
137
|
-
resize(id: string, rows: number, cols: number):
|
|
149
|
+
resize(id: string, rows: number, cols: number): void;
|
|
138
150
|
getShellName(id: string): string;
|
|
139
151
|
getProcessId(id: string): number;
|
|
140
152
|
disposeById(id: string): void;
|
|
@@ -158,12 +170,12 @@ export interface INodePtyInstance {
|
|
|
158
170
|
}
|
|
159
171
|
export declare const ITerminalServiceClient: unique symbol;
|
|
160
172
|
export interface ITerminalServiceClient {
|
|
161
|
-
create2(id: string, launchConfig: IShellLaunchConfig): Promise<INodePtyInstance | undefined>;
|
|
173
|
+
create2(id: string, cols: number, rows: number, launchConfig: IShellLaunchConfig): Promise<INodePtyInstance | undefined>;
|
|
162
174
|
onMessage(id: string, msg: string): void;
|
|
163
175
|
resize(id: string, rows: number, cols: number): void;
|
|
164
176
|
disposeById(id: string): void;
|
|
165
177
|
getProcessId(id: string): number;
|
|
166
|
-
clientMessage(id: string, data:
|
|
178
|
+
clientMessage(id: string, data: string): void;
|
|
167
179
|
closeClient(sessionId: string, data?: ITerminalError | {
|
|
168
180
|
code?: number;
|
|
169
181
|
signal?: number;
|
|
@@ -180,18 +192,23 @@ export interface ITerminalServiceClient {
|
|
|
180
192
|
type: WindowsShellType;
|
|
181
193
|
}>;
|
|
182
194
|
$resolveShellPath(paths: string[]): Promise<string | undefined>;
|
|
195
|
+
detectAvailableProfiles(options: IDetectProfileOptions): Promise<ITerminalProfile[]>;
|
|
196
|
+
getDefaultSystemShell(os: OperatingSystem): Promise<string>;
|
|
197
|
+
getOs(): OperatingSystem;
|
|
198
|
+
getCodePlatformKey(): Promise<'osx' | 'windows' | 'linux'>;
|
|
183
199
|
}
|
|
184
200
|
export interface ITerminalInfo {
|
|
185
201
|
id: string;
|
|
186
202
|
name: string;
|
|
187
203
|
isActive: boolean;
|
|
188
204
|
}
|
|
189
|
-
export declare const
|
|
205
|
+
export declare const IExternalTerminalService: unique symbol;
|
|
190
206
|
/**
|
|
191
207
|
* 使用依赖注入的方式复写这个类型,
|
|
192
|
-
* 支持更多形式的
|
|
208
|
+
* 支持更多形式的 terminal 实现。
|
|
209
|
+
* 搜了一下代码,在 OpenSumi 里已经没有地方引用了。
|
|
193
210
|
*/
|
|
194
|
-
export interface
|
|
211
|
+
export interface IExternalTerminalService {
|
|
195
212
|
/**
|
|
196
213
|
* 创建一个新的 terminal,需要手动的将 xterm 和 pty 的通信关联起来。
|
|
197
214
|
*
|
|
@@ -231,39 +248,140 @@ export interface IExternlTerminalService {
|
|
|
231
248
|
*/
|
|
232
249
|
getProcessId(id: string): Promise<number>;
|
|
233
250
|
}
|
|
251
|
+
export declare type TerminalIcon = Uri | {
|
|
252
|
+
light: Uri;
|
|
253
|
+
dark: Uri;
|
|
254
|
+
} | vscode.ThemeIcon;
|
|
255
|
+
export declare type ITerminalLocationOptions = TerminalLocation | {
|
|
256
|
+
splitActiveTerminal: boolean;
|
|
257
|
+
};
|
|
234
258
|
export interface IShellLaunchConfig {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
259
|
+
/**
|
|
260
|
+
* The name of the terminal, if this is not set the name of the process will be used.
|
|
261
|
+
*/
|
|
262
|
+
name?: string;
|
|
263
|
+
/**
|
|
264
|
+
* An string to follow the name of the terminal with, indicating a special kind of terminal
|
|
265
|
+
*/
|
|
266
|
+
description?: string;
|
|
267
|
+
/**
|
|
268
|
+
* The shell executable (bash, cmd, etc.).
|
|
269
|
+
*/
|
|
270
|
+
executable?: string;
|
|
271
|
+
/**
|
|
272
|
+
* The CLI arguments to use with executable, a string[] is in argv format and will be escaped,
|
|
273
|
+
* a string is in "CommandLine" pre-escaped format and will be used as is. The string option is
|
|
274
|
+
* only supported on Windows and will throw an exception if used on macOS or Linux.
|
|
275
|
+
*/
|
|
276
|
+
args?: string[] | string;
|
|
277
|
+
/**
|
|
278
|
+
* The current working directory of the terminal, this overrides the `terminal.integrated.cwd`
|
|
279
|
+
* settings key.
|
|
280
|
+
*/
|
|
281
|
+
cwd?: string | Uri;
|
|
282
|
+
/**
|
|
283
|
+
* A custom environment for the terminal, if this is not set the environment will be inherited
|
|
284
|
+
* from the VS Code process.
|
|
285
|
+
*/
|
|
286
|
+
env?: ITerminalEnvironment;
|
|
287
|
+
/**
|
|
288
|
+
* Whether to ignore a custom cwd from the `terminal.integrated.cwd` settings key (e.g. if the
|
|
289
|
+
* shell is being launched by an extension).
|
|
290
|
+
*/
|
|
291
|
+
ignoreConfigurationCwd?: boolean;
|
|
292
|
+
/** Whether to wait for a key press before closing the terminal. */
|
|
293
|
+
waitOnExit?: boolean | string;
|
|
294
|
+
/**
|
|
295
|
+
* A string including ANSI escape sequences that will be written to the terminal emulator
|
|
296
|
+
* _before_ the terminal process has launched, a trailing \n is added at the end of the string.
|
|
297
|
+
* This allows for example the terminal instance to display a styled message as the first line
|
|
298
|
+
* of the terminal. Use \x1b over \033 or \e for the escape control character.
|
|
299
|
+
*/
|
|
300
|
+
initialText?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Custom PTY/pseudoterminal process to use.
|
|
303
|
+
*/
|
|
304
|
+
customPtyImplementation?: (sessionId: string, cols: number, rows: number) => ITerminalProcessExtHostProxy;
|
|
305
|
+
/**
|
|
306
|
+
* A UUID generated by the extension host process for terminals created on the extension host process.
|
|
307
|
+
*/
|
|
308
|
+
extHostTerminalId?: string;
|
|
309
|
+
/**
|
|
310
|
+
* This is a terminal that attaches to an already running terminal.
|
|
311
|
+
*/
|
|
238
312
|
/**
|
|
239
313
|
* Whether the terminal process environment should be exactly as provided in
|
|
240
314
|
* `TerminalOptions.env`. When this is false (default), the environment will be based on the
|
|
241
315
|
* window's environment and also apply configured platform settings like
|
|
242
|
-
* `terminal.integrated.windows.env` on top. When this is true, the complete environment
|
|
243
|
-
*
|
|
316
|
+
* `terminal.integrated.windows.env` on top. When this is true, the complete environment must be
|
|
317
|
+
* provided as nothing will be inherited from the process or any configuration.
|
|
244
318
|
*/
|
|
245
319
|
strictEnv?: boolean;
|
|
246
320
|
/**
|
|
247
|
-
*
|
|
321
|
+
* Whether the terminal process environment will inherit VS Code's "shell environment" that may
|
|
322
|
+
* get sourced from running a login shell depnding on how the application was launched.
|
|
323
|
+
* Consumers that rely on development tools being present in the $PATH should set this to true.
|
|
324
|
+
* This will overwrite the value of the inheritEnv setting.
|
|
248
325
|
*/
|
|
249
|
-
|
|
326
|
+
useShellEnvironment?: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* When enabled the terminal will run the process as normal but not be surfaced to the user
|
|
329
|
+
* until `Terminal.show` is called. The typical usage for this is when you need to run
|
|
330
|
+
* something that may need interactivity but only want to tell the user about it when
|
|
331
|
+
* interaction is needed. Note that the terminals will still be exposed to all extensions
|
|
332
|
+
* as normal.
|
|
333
|
+
*/
|
|
334
|
+
hideFromUser?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Whether this terminal is not a terminal that the user directly created and uses, but rather
|
|
337
|
+
* a terminal used to drive some VS Code feature.
|
|
338
|
+
*/
|
|
339
|
+
isFeatureTerminal?: boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Whether this terminal was created by an extension.
|
|
342
|
+
*/
|
|
343
|
+
isExtensionOwnedTerminal?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* The icon for the terminal, used primarily in the terminal tab.
|
|
346
|
+
*/
|
|
347
|
+
icon?: TerminalIcon;
|
|
348
|
+
/**
|
|
349
|
+
* The color ID to use for this terminal. If not specified it will use the default fallback
|
|
350
|
+
*/
|
|
351
|
+
color?: string;
|
|
352
|
+
/**
|
|
353
|
+
* When a parent terminal is provided via API, the group needs
|
|
354
|
+
* to find the index in order to place the child
|
|
355
|
+
* directly to the right of its parent.
|
|
356
|
+
*/
|
|
357
|
+
parentTerminalId?: number;
|
|
250
358
|
/**
|
|
251
|
-
*
|
|
359
|
+
* The dimensions for the instance as set by the user
|
|
360
|
+
* or via Size to Content Width
|
|
252
361
|
*/
|
|
253
|
-
cols: number;
|
|
254
362
|
/**
|
|
255
|
-
*
|
|
363
|
+
* Opt-out of the default terminal persistence on restart and reload
|
|
256
364
|
*/
|
|
257
|
-
|
|
365
|
+
disablePersistence?: boolean;
|
|
366
|
+
}
|
|
367
|
+
export interface ICreateTerminalOptions {
|
|
258
368
|
/**
|
|
259
|
-
*
|
|
369
|
+
* The shell launch config or profile to launch with, when not specified the default terminal
|
|
370
|
+
* profile will be used.
|
|
371
|
+
*/
|
|
372
|
+
config?: IShellLaunchConfig | ITerminalProfile;
|
|
373
|
+
/**
|
|
374
|
+
* The current working directory to start with, this will override IShellLaunchConfig.cwd if
|
|
375
|
+
* specified.
|
|
260
376
|
*/
|
|
261
377
|
cwd?: string | Uri;
|
|
262
378
|
/**
|
|
263
|
-
*
|
|
379
|
+
* The terminal's resource, passed when the terminal has moved windows.
|
|
264
380
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
381
|
+
resource?: Uri;
|
|
382
|
+
/**
|
|
383
|
+
* The terminal's location (editor or panel), it's terminal parent (split to the right), or editor group
|
|
384
|
+
*/
|
|
385
|
+
location?: ITerminalLocationOptions;
|
|
268
386
|
}
|
|
269
387
|
//# sourceMappingURL=pty.d.ts.map
|
package/lib/common/pty.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty.d.ts","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,IAAI,KAAK,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"pty.d.ts","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,IAAI,KAAK,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C,EAAE,OAAO,CAAC;IAEnC;;OAEG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IAGH;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,GAAG,gBAAgB,CAAC;IAC/C;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC"}
|
package/lib/common/pty.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.IExternalTerminalService = exports.ITerminalServiceClient = exports.ITerminalProcessService = exports.ITerminalNodeService = exports.ITerminalProcessPath = exports.ITerminalServicePath = void 0;
|
|
4
4
|
exports.ITerminalServicePath = 'ITerminalServicePath';
|
|
5
5
|
exports.ITerminalProcessPath = 'ITerminalProcessPath';
|
|
6
6
|
exports.ITerminalNodeService = Symbol('ITerminalNodeService');
|
|
7
7
|
exports.ITerminalProcessService = Symbol('ITerminalProcessService');
|
|
8
8
|
exports.ITerminalServiceClient = Symbol('ITerminalServiceClient');
|
|
9
9
|
// 搜了一下代码,在 OpenSumi 里已经没有地方引用了
|
|
10
|
-
exports.
|
|
10
|
+
exports.IExternalTerminalService = Symbol('IExternalTerminalService');
|
|
11
11
|
//# sourceMappingURL=pty.js.map
|
package/lib/common/pty.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty.js","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"pty.js","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":";;;AAmBa,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAkJ9C,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAkBtD,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAa5D,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AA6CvE,+BAA+B;AAClB,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC"}
|
package/lib/common/service.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IDisposable } from '@opensumi/ide-core-common';
|
|
2
2
|
import { OperatingSystem } from '@opensumi/ide-core-common/lib/platform';
|
|
3
|
-
import { ITerminalOptions, Terminal } from 'xterm';
|
|
3
|
+
import { ITerminalOptions as IXtermTerminalOptions, Terminal } from 'xterm';
|
|
4
4
|
import { ITerminalError } from './error';
|
|
5
|
-
import { TerminalOptions } from './pty';
|
|
5
|
+
import { IShellLaunchConfig, TerminalOptions } from './pty';
|
|
6
6
|
import { ITerminalConnection } from './client';
|
|
7
|
+
import { ITerminalProfile } from './profile';
|
|
7
8
|
export interface IPtyExitEvent {
|
|
8
9
|
sessionId: string;
|
|
9
10
|
code?: number;
|
|
@@ -19,7 +20,7 @@ export interface ITerminalService {
|
|
|
19
20
|
* Xterm 终端的构造选项,
|
|
20
21
|
* 默认返回为 {}
|
|
21
22
|
*/
|
|
22
|
-
getOptions?():
|
|
23
|
+
getOptions?(): IXtermTerminalOptions;
|
|
23
24
|
/**
|
|
24
25
|
* 检测还在会话中的终端后台是否还处于保活状态,
|
|
25
26
|
* 默认返回为 true
|
|
@@ -28,7 +29,7 @@ export interface ITerminalService {
|
|
|
28
29
|
*/
|
|
29
30
|
check?(sessionIds: string[]): Promise<boolean>;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
+
* @deprecated will remove on 2.17.0, please use `attachByLaunchConfig` instead
|
|
32
33
|
* @param sessionId 会话唯一标识
|
|
33
34
|
* @param xterm 返回的 Xterm 终端实例
|
|
34
35
|
* @param rows 终端初始化使用的列数
|
|
@@ -36,7 +37,8 @@ export interface ITerminalService {
|
|
|
36
37
|
* @param options 创建一个新终端的进程选项
|
|
37
38
|
* @param shellType 终端类型
|
|
38
39
|
*/
|
|
39
|
-
attach(sessionId: string, xterm: Terminal,
|
|
40
|
+
attach(sessionId: string, xterm: Terminal, cols: number, rows: number, options?: TerminalOptions, shellType?: string): Promise<ITerminalConnection | undefined>;
|
|
41
|
+
attachByLaunchConfig(sessionId: string, cols: number, rows: number, launchConfig: IShellLaunchConfig): Promise<ITerminalConnection | undefined>;
|
|
40
42
|
/**
|
|
41
43
|
*
|
|
42
44
|
* @param id 会话唯一标识
|
|
@@ -78,11 +80,14 @@ export interface ITerminalService {
|
|
|
78
80
|
* 返回终端环境的 OS
|
|
79
81
|
*/
|
|
80
82
|
getOs(): Promise<OperatingSystem>;
|
|
83
|
+
getProfiles(autoDetect: boolean): Promise<ITerminalProfile[]>;
|
|
84
|
+
getDefaultSystemShell(): Promise<string>;
|
|
85
|
+
getCodePlatformKey(): Promise<'osx' | 'windows' | 'linux'>;
|
|
81
86
|
}
|
|
82
87
|
export declare const ITerminalInternalService: unique symbol;
|
|
83
88
|
export interface ITerminalInternalService extends ITerminalService {
|
|
84
89
|
generateSessionId(): string;
|
|
85
|
-
getOptions():
|
|
90
|
+
getOptions(): IXtermTerminalOptions;
|
|
86
91
|
check(sessionIds: string[]): Promise<boolean>;
|
|
87
92
|
}
|
|
88
93
|
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/common/service.ts"],"names":[],"mappings":"AAAA,OAAO,EA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,CAAC;IACpC,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/common/service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/common/service.ts"],"names":[],"mappings":";;;AAca,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAuF9C,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC"}
|
package/lib/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAcrD,qBACa,qBAAsB,SAAQ,UAAU;IACnD,SAAS,EAAE,QAAQ,EAAE,CAqBnB;IAEF,YAAY;;;QASV;CACH"}
|
package/lib/node/index.js
CHANGED
|
@@ -7,8 +7,9 @@ const ide_core_node_1 = require("@opensumi/ide-core-node");
|
|
|
7
7
|
const terminal_service_1 = require("./terminal.service");
|
|
8
8
|
const terminal_service_client_1 = require("./terminal.service.client");
|
|
9
9
|
const common_1 = require("../common");
|
|
10
|
-
const terminal_process_service_1 = require("./terminal
|
|
10
|
+
const terminal_process_service_1 = require("./terminal.process.service");
|
|
11
11
|
const pty_1 = require("./pty");
|
|
12
|
+
const terminal_profile_service_1 = require("./terminal.profile.service");
|
|
12
13
|
let TerminalNodePtyModule = class TerminalNodePtyModule extends ide_core_node_1.NodeModule {
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
@@ -29,6 +30,10 @@ let TerminalNodePtyModule = class TerminalNodePtyModule extends ide_core_node_1.
|
|
|
29
30
|
token: pty_1.IPtyService,
|
|
30
31
|
useClass: pty_1.PtyService,
|
|
31
32
|
},
|
|
33
|
+
{
|
|
34
|
+
token: terminal_profile_service_1.ITerminalProfileServiceNode,
|
|
35
|
+
useClass: terminal_profile_service_1.TerminalProfileServiceNode,
|
|
36
|
+
},
|
|
32
37
|
];
|
|
33
38
|
this.backServices = [
|
|
34
39
|
{
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAoD;AACpD,2DAAqD;AACrD,yDAAyD;AACzD,uEAAsE;AACtE,sCAMmB;AACnB,yEAAwE;AACxE,+BAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAoD;AACpD,2DAAqD;AACrD,yDAAyD;AACzD,uEAAsE;AACtE,sCAMmB;AACnB,yEAAwE;AACxE,+BAAgD;AAChD,yEAAqG;AAGrG,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,0BAAU;IAArD;;QACE,cAAS,GAAe;YACtB;gBACE,KAAK,EAAE,6BAAoB;gBAC3B,QAAQ,EAAE,sCAAmB;aAC9B;YACD;gBACE,KAAK,EAAE,+BAAsB;gBAC7B,QAAQ,EAAE,mDAAyB;aACpC;YACD;gBACE,KAAK,EAAE,gCAAuB;gBAC9B,QAAQ,EAAE,qDAA0B;aACrC;YACD;gBACE,KAAK,EAAE,iBAAW;gBAClB,QAAQ,EAAE,gBAAU;aACrB;YACD;gBACE,KAAK,EAAE,sDAA2B;gBAClC,QAAQ,EAAE,qDAA0B;aACrC;SACF,CAAC;QAEF,iBAAY,GAAG;YACb;gBACE,WAAW,EAAE,6BAAoB;gBACjC,KAAK,EAAE,+BAAsB;aAC9B;YACD;gBACE,WAAW,EAAE,6BAAoB;gBACjC,KAAK,EAAE,gCAAuB;aAC/B;SACF,CAAC;IACJ,CAAC;CAAA,CAAA;AAlCY,qBAAqB;IADjC,IAAA,eAAU,GAAE;GACA,qBAAqB,CAkCjC;AAlCY,sDAAqB"}
|
package/lib/node/pty.d.ts
CHANGED
|
@@ -1,19 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export { pty };
|
|
1
|
+
import { IShellLaunchConfig, ITerminalLaunchError } from '../common';
|
|
2
|
+
import { IPtyProcess } from '../common/pty';
|
|
3
|
+
import { Disposable } from '@opensumi/ide-core-node';
|
|
4
|
+
import { IProcessReadyEvent, IProcessExitEvent } from '../common/process';
|
|
6
5
|
export declare const IPtyService: unique symbol;
|
|
7
|
-
export declare class PtyService {
|
|
6
|
+
export declare class PtyService extends Disposable {
|
|
7
|
+
id: string;
|
|
8
|
+
private readonly shellLaunchConfig;
|
|
8
9
|
private readonly logger;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
private readonly _ptyOptions;
|
|
11
|
+
private _ptyProcess;
|
|
12
|
+
private readonly _onData;
|
|
13
|
+
readonly onData: import("@opensumi/ide-core-node").Event<string>;
|
|
14
|
+
private readonly _onReady;
|
|
15
|
+
readonly onReady: import("@opensumi/ide-core-node").Event<IProcessReadyEvent>;
|
|
16
|
+
private readonly _onExit;
|
|
17
|
+
readonly onExit: import("@opensumi/ide-core-node").Event<IProcessExitEvent>;
|
|
18
|
+
private readonly _initialCwd;
|
|
19
|
+
get pty(): IPtyProcess | undefined;
|
|
20
|
+
constructor(id: string, shellLaunchConfig: IShellLaunchConfig, cols: number, rows: number);
|
|
21
|
+
kill(): Promise<void>;
|
|
22
|
+
_validateCwd(): Promise<ITerminalLaunchError | undefined>;
|
|
23
|
+
_validateExecutable(): Promise<ITerminalLaunchError | undefined>;
|
|
24
|
+
start(): Promise<ITerminalLaunchError | undefined>;
|
|
25
|
+
private setupPtyProcess;
|
|
26
|
+
private _sendProcessId;
|
|
27
|
+
parseCwd(): string;
|
|
28
|
+
getShellName(): string;
|
|
29
|
+
getPid(): number;
|
|
30
|
+
resize(rows: number, cols: number): boolean;
|
|
31
|
+
onMessage(data: string): void;
|
|
18
32
|
}
|
|
19
33
|
//# sourceMappingURL=pty.d.ts.map
|
package/lib/node/pty.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pty.d.ts","sourceRoot":"","sources":["../../src/node/pty.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pty.d.ts","sourceRoot":"","sources":["../../src/node/pty.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAwB,MAAM,yBAAyB,CAAC;AAK3E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD,qBACa,UAAW,SAAQ,UAAU;IAoBrB,EAAE,EAAE,MAAM;IAAE,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAlBjE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IAErC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmD;IAC/E,OAAO,CAAC,WAAW,CAA0B;IAE7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,QAAQ,CAAC,MAAM,kDAAsB;IACrC,OAAO,CAAC,QAAQ,CAAC,Q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