@opensumi/ide-terminal-next 3.0.2-next-1715852509.0 → 3.0.2-next-1715930644.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/contribution/terminal.command.d.ts +3 -2
- package/lib/browser/contribution/terminal.command.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.command.js +5 -1
- package/lib/browser/contribution/terminal.command.js.map +1 -1
- package/lib/browser/terminal.client.d.ts +2 -0
- package/lib/browser/terminal.client.d.ts.map +1 -1
- package/lib/browser/terminal.client.js +29 -0
- package/lib/browser/terminal.client.js.map +1 -1
- package/lib/browser/terminal.controller.d.ts.map +1 -1
- package/lib/browser/terminal.controller.js +7 -5
- package/lib/browser/terminal.controller.js.map +1 -1
- package/lib/browser/terminal.view.d.ts.map +1 -1
- package/lib/browser/terminal.view.js +1 -4
- package/lib/browser/terminal.view.js.map +1 -1
- package/lib/common/client.d.ts +8 -0
- package/lib/common/client.d.ts.map +1 -1
- package/lib/common/client.js.map +1 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +5 -0
- package/lib/node/index.js.map +1 -1
- package/lib/node/pty.d.ts +2 -0
- package/lib/node/pty.d.ts.map +1 -1
- package/lib/node/pty.js +7 -3
- package/lib/node/pty.js.map +1 -1
- package/lib/node/shell-integration.service.d.ts +21 -0
- package/lib/node/shell-integration.service.d.ts.map +1 -0
- package/lib/node/shell-integration.service.js +70 -0
- package/lib/node/shell-integration.service.js.map +1 -0
- package/lib/node/terminal.service.client.d.ts.map +1 -1
- package/lib/node/terminal.service.client.js +2 -1
- package/lib/node/terminal.service.client.js.map +1 -1
- package/lib/node/terminal.service.d.ts.map +1 -1
- package/lib/node/terminal.service.js +4 -3
- package/lib/node/terminal.service.js.map +1 -1
- package/package.json +16 -16
- package/src/browser/contribution/terminal.command.ts +8 -2
- package/src/browser/terminal.client.ts +40 -1
- package/src/browser/terminal.controller.ts +8 -5
- package/src/browser/terminal.view.ts +1 -4
- package/src/common/client.ts +10 -0
- package/src/node/index.ts +5 -0
- package/src/node/pty.ts +6 -3
- package/src/node/shell-integration.service.ts +77 -0
- package/src/node/terminal.service.client.ts +2 -1
- package/src/node/terminal.service.ts +4 -3
- package/lib/node/easy-shell-intergration.d.ts +0 -9
- package/lib/node/easy-shell-intergration.d.ts.map +0 -1
- package/lib/node/easy-shell-intergration.js +0 -54
- package/lib/node/easy-shell-intergration.js.map +0 -1
- package/src/node/easy-shell-intergration.ts +0 -53
|
@@ -261,9 +261,10 @@ export class TerminalServiceImpl implements ITerminalNodeService {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
dispose() {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
// TODO 后续需要一个合理的 Dispose 逻辑,暂时不要 Dispose,避免重连时终端不可用
|
|
265
|
+
// this.serviceClientMap.forEach((client) => {
|
|
266
|
+
// client.dispose();
|
|
267
|
+
// });
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
private getTerminal(id: string) {
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const shellIntergrationDirPath: string;
|
|
2
|
-
export declare const bashIntergrationPath: string;
|
|
3
|
-
/**
|
|
4
|
-
注入的 bash initfile,用于 ShellIntergration 功能的搭建
|
|
5
|
-
后续会针对 ShellIntergation 做整体的架构设计,目前满足基础功能需求
|
|
6
|
-
*/
|
|
7
|
-
export declare const bashIntergrationContent: string;
|
|
8
|
-
export declare const initShellIntergrationFile: () => Promise<void>;
|
|
9
|
-
//# sourceMappingURL=easy-shell-intergration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"easy-shell-intergration.d.ts","sourceRoot":"","sources":["../../src/node/easy-shell-intergration.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB,QAA8D,CAAC;AAEpG,eAAO,MAAM,oBAAoB,QAAgE,CAAC;AAElG;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAiCnC,CAAC;AAEF,eAAO,MAAM,yBAAyB,qBAGrC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initShellIntergrationFile = exports.bashIntergrationContent = exports.bashIntergrationPath = exports.shellIntergrationDirPath = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const os_1 = tslib_1.__importDefault(require("os"));
|
|
6
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
8
|
-
// 未来适配 OpenSumi 的时候需要调整
|
|
9
|
-
exports.shellIntergrationDirPath = path_1.default.join(os_1.default.tmpdir(), '.sumi-shell', 'shell-intergration');
|
|
10
|
-
exports.bashIntergrationPath = path_1.default.join(exports.shellIntergrationDirPath, 'bash-intergration.bash');
|
|
11
|
-
/**
|
|
12
|
-
注入的 bash initfile,用于 ShellIntergration 功能的搭建
|
|
13
|
-
后续会针对 ShellIntergation 做整体的架构设计,目前满足基础功能需求
|
|
14
|
-
*/
|
|
15
|
-
exports.bashIntergrationContent = String.raw `
|
|
16
|
-
|
|
17
|
-
if [ -r /etc/profile ]; then
|
|
18
|
-
. /etc/profile
|
|
19
|
-
fi
|
|
20
|
-
if [ -r ~/.bashrc ]; then
|
|
21
|
-
. ~/.bashrc
|
|
22
|
-
fi
|
|
23
|
-
if [ -r ~/.bash_profile ]; then
|
|
24
|
-
. ~/.bash_profile
|
|
25
|
-
elif [ -r ~/.bash_login ]; then
|
|
26
|
-
. ~/.bash_login
|
|
27
|
-
elif [ -r ~/.profile ]; then
|
|
28
|
-
. ~/.profile
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
__is_prompt_start() {
|
|
32
|
-
builtin printf '\e]6973;PS\a'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
__is_prompt_end() {
|
|
36
|
-
builtin printf '\e]6973;PE\a'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
__is_update_prompt() {
|
|
40
|
-
if [[ "$__is_custom_PS1" == "" || "$__is_custom_PS1" != "$PS1" ]]; then
|
|
41
|
-
__is_original_PS1=$PS1
|
|
42
|
-
__is_custom_PS1="\[$(__is_prompt_start)\]$__is_original_PS1\[$(__is_prompt_end)\]"
|
|
43
|
-
export PS1="$__is_custom_PS1"
|
|
44
|
-
fi
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
__is_update_prompt
|
|
48
|
-
`;
|
|
49
|
-
const initShellIntergrationFile = async () => {
|
|
50
|
-
await fs_extra_1.default.mkdirp(exports.shellIntergrationDirPath);
|
|
51
|
-
await fs_extra_1.default.writeFile(exports.bashIntergrationPath, exports.bashIntergrationContent);
|
|
52
|
-
};
|
|
53
|
-
exports.initShellIntergrationFile = initShellIntergrationFile;
|
|
54
|
-
//# sourceMappingURL=easy-shell-intergration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"easy-shell-intergration.js","sourceRoot":"","sources":["../../src/node/easy-shell-intergration.ts"],"names":[],"mappings":";;;;AAAA,oDAAoB;AACpB,wDAAwB;AAExB,gEAA0B;AAE1B,wBAAwB;AACX,QAAA,wBAAwB,GAAG,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAC;AAEvF,QAAA,oBAAoB,GAAG,cAAI,CAAC,IAAI,CAAC,gCAAwB,EAAE,wBAAwB,CAAC,CAAC;AAElG;;;GAGG;AACU,QAAA,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChD,CAAC;AAEK,MAAM,yBAAyB,GAAG,KAAK,IAAI,EAAE;IAClD,MAAM,kBAAE,CAAC,MAAM,CAAC,gCAAwB,CAAC,CAAC;IAC1C,MAAM,kBAAE,CAAC,SAAS,CAAC,4BAAoB,EAAE,+BAAuB,CAAC,CAAC;AACpE,CAAC,CAAC;AAHW,QAAA,yBAAyB,6BAGpC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import os from 'os';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
|
|
6
|
-
// 未来适配 OpenSumi 的时候需要调整
|
|
7
|
-
export const shellIntergrationDirPath = path.join(os.tmpdir(), '.sumi-shell', 'shell-intergration');
|
|
8
|
-
|
|
9
|
-
export const bashIntergrationPath = path.join(shellIntergrationDirPath, 'bash-intergration.bash');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
注入的 bash initfile,用于 ShellIntergration 功能的搭建
|
|
13
|
-
后续会针对 ShellIntergation 做整体的架构设计,目前满足基础功能需求
|
|
14
|
-
*/
|
|
15
|
-
export const bashIntergrationContent = String.raw`
|
|
16
|
-
|
|
17
|
-
if [ -r /etc/profile ]; then
|
|
18
|
-
. /etc/profile
|
|
19
|
-
fi
|
|
20
|
-
if [ -r ~/.bashrc ]; then
|
|
21
|
-
. ~/.bashrc
|
|
22
|
-
fi
|
|
23
|
-
if [ -r ~/.bash_profile ]; then
|
|
24
|
-
. ~/.bash_profile
|
|
25
|
-
elif [ -r ~/.bash_login ]; then
|
|
26
|
-
. ~/.bash_login
|
|
27
|
-
elif [ -r ~/.profile ]; then
|
|
28
|
-
. ~/.profile
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
__is_prompt_start() {
|
|
32
|
-
builtin printf '\e]6973;PS\a'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
__is_prompt_end() {
|
|
36
|
-
builtin printf '\e]6973;PE\a'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
__is_update_prompt() {
|
|
40
|
-
if [[ "$__is_custom_PS1" == "" || "$__is_custom_PS1" != "$PS1" ]]; then
|
|
41
|
-
__is_original_PS1=$PS1
|
|
42
|
-
__is_custom_PS1="\[$(__is_prompt_start)\]$__is_original_PS1\[$(__is_prompt_end)\]"
|
|
43
|
-
export PS1="$__is_custom_PS1"
|
|
44
|
-
fi
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
__is_update_prompt
|
|
48
|
-
`;
|
|
49
|
-
|
|
50
|
-
export const initShellIntergrationFile = async () => {
|
|
51
|
-
await fs.mkdirp(shellIntergrationDirPath);
|
|
52
|
-
await fs.writeFile(bashIntergrationPath, bashIntergrationContent);
|
|
53
|
-
};
|