xshell 1.2.65 → 1.2.67
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/package.json +6 -6
- package/prototype.browser.js +7 -7
- package/prototype.common.d.ts +4 -3
- package/prototype.js +7 -7
- package/react.production.js +1323 -1323
- package/react.production.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.67",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
"commander": "^14.0.0",
|
|
66
66
|
"css-loader": "^7.1.2",
|
|
67
67
|
"emoji-regex": "^10.4.0",
|
|
68
|
-
"eslint": "^9.
|
|
68
|
+
"eslint": "^9.32.0",
|
|
69
69
|
"eslint-plugin-import": "^2.32.0",
|
|
70
70
|
"eslint-plugin-react": "^7.37.5",
|
|
71
71
|
"https-proxy-agent": "^7.0.6",
|
|
72
72
|
"i18next": "^25.3.2",
|
|
73
73
|
"i18next-scanner": "^4.6.0",
|
|
74
|
-
"koa": "^3.0.
|
|
74
|
+
"koa": "^3.0.1",
|
|
75
75
|
"koa-compress": "^5.1.1",
|
|
76
76
|
"license-webpack-plugin": "^4.0.2",
|
|
77
77
|
"map-stream": "^0.0.7",
|
|
78
78
|
"mime-types": "^3.0.1",
|
|
79
79
|
"p-map": "^7.0.3",
|
|
80
|
-
"react": "^19.1.
|
|
80
|
+
"react": "^19.1.1",
|
|
81
81
|
"react-i18next": "^15.6.1",
|
|
82
82
|
"resolve-path": "^1.4.0",
|
|
83
83
|
"sass": "^1.89.2",
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
"typescript": "^5.8.3",
|
|
92
92
|
"ua-parser-js": "^2.0.4",
|
|
93
93
|
"undici": "^7.12.0",
|
|
94
|
-
"webpack": "^5.
|
|
94
|
+
"webpack": "^5.101.0",
|
|
95
95
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
96
96
|
"ws": "^8.18.3"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@babel/types": "^7.28.
|
|
99
|
+
"@babel/types": "^7.28.2",
|
|
100
100
|
"@types/archiver": "^6.0.3",
|
|
101
101
|
"@types/babel__traverse": "^7.20.7",
|
|
102
102
|
"@types/eslint": "^9.6.1",
|
package/prototype.browser.js
CHANGED
|
@@ -23,12 +23,12 @@ if (!globalThis.my_prototype_defined) {
|
|
|
23
23
|
}),
|
|
24
24
|
// ------------ 文本处理工具方法
|
|
25
25
|
...to_method_property_descriptors({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
truncate(width, storage = false) {
|
|
27
|
+
if (storage)
|
|
28
|
+
return this.length <= width ?
|
|
29
|
+
this
|
|
30
|
+
:
|
|
31
|
+
this.slice(0, width - 2) + '··';
|
|
32
32
|
const color_bak = this.startsWith('\u001b') ? this.slice(0, 5) : '';
|
|
33
33
|
if (width <= 2)
|
|
34
34
|
return this.slice(0, width);
|
|
@@ -52,7 +52,7 @@ if (!globalThis.my_prototype_defined) {
|
|
|
52
52
|
cur_width += w;
|
|
53
53
|
if (cur_width > width) {
|
|
54
54
|
const i_fitted_next = i_fitted + 1;
|
|
55
|
-
const t = this.slice(0, i_fitted_next) + ' '.repeat(width - 2 - fitted_width) + '
|
|
55
|
+
const t = this.slice(0, i_fitted_next) + ' '.repeat(width - 2 - fitted_width) + '··';
|
|
56
56
|
return color_bak ? color_bak + t + '\u001b[39m' : t;
|
|
57
57
|
}
|
|
58
58
|
}
|
package/prototype.common.d.ts
CHANGED
|
@@ -4,11 +4,12 @@ declare global {
|
|
|
4
4
|
interface String {
|
|
5
5
|
readonly width: number;
|
|
6
6
|
/** 截取字符串不超过 width 显示宽度的部分,并保留颜色
|
|
7
|
-
找到并记录能容纳 字符串 +
|
|
7
|
+
找到并记录能容纳 字符串 + ·· 的最后一个字符的位置 i_fitted
|
|
8
8
|
若完整的字符串长度超过 width,返回 slice(0, i_fitted + 1) + …
|
|
9
9
|
否则 返回 this
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
- width: 显示宽度或者存储长度
|
|
11
|
+
- storage?: 根据存储长度(width 作为 length)来截取 */
|
|
12
|
+
truncate(this: string, width: number, storage?: boolean): string;
|
|
12
13
|
/** pad string to `<width>`
|
|
13
14
|
- character?: `' '`
|
|
14
15
|
- position?: `'right'` */
|
package/prototype.js
CHANGED
|
@@ -25,12 +25,12 @@ if (!globalThis.my_prototype_defined) {
|
|
|
25
25
|
}),
|
|
26
26
|
// ------------ 文本处理工具方法
|
|
27
27
|
...to_method_property_descriptors({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
truncate(width, storage = false) {
|
|
29
|
+
if (storage)
|
|
30
|
+
return this.length <= width ?
|
|
31
|
+
this
|
|
32
|
+
:
|
|
33
|
+
this.slice(0, width - 2) + '··';
|
|
34
34
|
const color_bak = this.startsWith('\u001b') ? this.slice(0, 5) : '';
|
|
35
35
|
const s = strip_ansi(this);
|
|
36
36
|
if (width <= 2)
|
|
@@ -55,7 +55,7 @@ if (!globalThis.my_prototype_defined) {
|
|
|
55
55
|
cur_width += w;
|
|
56
56
|
if (cur_width > width) {
|
|
57
57
|
const i_fitted_next = i_fitted + 1;
|
|
58
|
-
// … 在 winterm 中对不齐,使用
|
|
58
|
+
// … 在 winterm 中对不齐,使用 ·· 代替
|
|
59
59
|
const t = s.slice(0, i_fitted_next) + ' '.repeat(width - 2 - fitted_width) + '··';
|
|
60
60
|
return color_bak ? color_bak + t + '\u001b[39m' : t;
|
|
61
61
|
}
|