xshell 1.0.191 → 1.0.193
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 +10 -10
- package/prototype.browser.d.ts +4 -0
- package/prototype.browser.js +6 -0
- package/prototype.d.ts +4 -0
- package/prototype.js +6 -0
- package/utils.browser.d.ts +1 -1
- package/utils.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.193",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@babel/core": "^7.26.0",
|
|
53
|
-
"@babel/parser": "^7.26.
|
|
53
|
+
"@babel/parser": "^7.26.2",
|
|
54
54
|
"@babel/traverse": "^7.25.9",
|
|
55
55
|
"@koa/cors": "^5.0.0",
|
|
56
|
-
"@stylistic/eslint-plugin": "^2.
|
|
56
|
+
"@stylistic/eslint-plugin": "^2.10.0",
|
|
57
57
|
"@svgr/webpack": "^8.1.0",
|
|
58
58
|
"@types/sass-loader": "^8.0.9",
|
|
59
59
|
"@types/ws": "^8.5.12",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
61
|
-
"@typescript-eslint/parser": "^8.
|
|
62
|
-
"@typescript-eslint/utils": "^8.
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.12.2",
|
|
61
|
+
"@typescript-eslint/parser": "^8.12.2",
|
|
62
|
+
"@typescript-eslint/utils": "^8.12.2",
|
|
63
63
|
"@xterm/addon-fit": "^0.10.0",
|
|
64
64
|
"@xterm/addon-web-links": "^0.11.0",
|
|
65
65
|
"@xterm/addon-webgl": "^0.18.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"react-i18next": "^15.1.0",
|
|
95
95
|
"react-object-model": "^1.2.15",
|
|
96
96
|
"resolve-path": "^1.4.0",
|
|
97
|
-
"sass": "^1.80.
|
|
97
|
+
"sass": "^1.80.5",
|
|
98
98
|
"sass-loader": "^16.0.2",
|
|
99
99
|
"source-map-loader": "^5.0.0",
|
|
100
100
|
"strip-ansi": "^7.1.0",
|
|
@@ -124,15 +124,15 @@
|
|
|
124
124
|
"@types/gulp-sort": "^2.0.4",
|
|
125
125
|
"@types/koa": "^2.15.0",
|
|
126
126
|
"@types/koa-compress": "^4.0.6",
|
|
127
|
-
"@types/lodash": "^4.17.
|
|
127
|
+
"@types/lodash": "^4.17.13",
|
|
128
128
|
"@types/mime-types": "^2.1.4",
|
|
129
|
-
"@types/node": "^22.8.
|
|
129
|
+
"@types/node": "^22.8.5",
|
|
130
130
|
"@types/react": "^18.3.12",
|
|
131
131
|
"@types/through2": "^2.0.41",
|
|
132
132
|
"@types/tough-cookie": "^4.0.5",
|
|
133
133
|
"@types/ua-parser-js": "^0.7.39",
|
|
134
134
|
"@types/vinyl-fs": "^3.0.5",
|
|
135
|
-
"@types/vscode": "^1.
|
|
135
|
+
"@types/vscode": "^1.95.0",
|
|
136
136
|
"@types/webpack-bundle-analyzer": "^4.7.0"
|
|
137
137
|
},
|
|
138
138
|
"pnpm": {
|
package/prototype.browser.d.ts
CHANGED
|
@@ -76,6 +76,10 @@ declare global {
|
|
|
76
76
|
indent: number;
|
|
77
77
|
text: string;
|
|
78
78
|
};
|
|
79
|
+
/** 将 string 根据首个找到的 splitter 拆分 string 为两个部分(必须包含 splitter,否则抛出错误)
|
|
80
|
+
- spitter: 不会包含在结果中
|
|
81
|
+
- last?: `false` 为 true 时从后往前找 splitter */
|
|
82
|
+
split2(this: string, splitter: string, last?: boolean): [string, string];
|
|
79
83
|
space(this: string): string;
|
|
80
84
|
/** 返回去掉 prefix 开头的字符串
|
|
81
85
|
- validate?: `false` 传 true 时确保字符串以 prefix 开头(失败时抛出错误) */
|
package/prototype.browser.js
CHANGED
|
@@ -259,6 +259,12 @@ Object.defineProperties(String.prototype, {
|
|
|
259
259
|
text: this.slice(i)
|
|
260
260
|
};
|
|
261
261
|
},
|
|
262
|
+
split2(splitter, last = false) {
|
|
263
|
+
const isplitter = last ? this.lastIndexOf(splitter) : this.indexOf(splitter);
|
|
264
|
+
if (isplitter === -1)
|
|
265
|
+
throw new Error(`字符串: ${this} 必须包含 splitter: ${splitter}`);
|
|
266
|
+
return [this.slice(0, isplitter), this.slice(isplitter + splitter.length)];
|
|
267
|
+
},
|
|
262
268
|
strip_start(prefix, validate) {
|
|
263
269
|
if (validate && !this.startsWith(prefix))
|
|
264
270
|
throw new Error(`字符串没有以前缀 ${prefix} 开头: ${this}`);
|
package/prototype.d.ts
CHANGED
|
@@ -93,6 +93,10 @@ declare global {
|
|
|
93
93
|
indent: number;
|
|
94
94
|
text: string;
|
|
95
95
|
};
|
|
96
|
+
/** 将 string 根据首个找到的 splitter 拆分 string 为两个部分(必须包含 splitter,否则抛出错误)
|
|
97
|
+
- spitter: 不会包含在结果中
|
|
98
|
+
- last?: `false` 为 true 时从后往前找 splitter */
|
|
99
|
+
split2(this: string, splitter: string, last?: boolean): [string, string];
|
|
96
100
|
to_base64(this: string): string;
|
|
97
101
|
/** - buffer: `false` 直接返回 Buffer */
|
|
98
102
|
decode_base64(this: string): string;
|
package/prototype.js
CHANGED
|
@@ -263,6 +263,12 @@ if (!globalThis.my_prototype_defined) {
|
|
|
263
263
|
text: this.slice(i)
|
|
264
264
|
};
|
|
265
265
|
},
|
|
266
|
+
split2(splitter, last = false) {
|
|
267
|
+
const isplitter = last ? this.lastIndexOf(splitter) : this.indexOf(splitter);
|
|
268
|
+
if (isplitter === -1)
|
|
269
|
+
throw new Error(`字符串: ${this} 必须包含 splitter: ${splitter}`);
|
|
270
|
+
return [this.slice(0, isplitter), this.slice(isplitter + splitter.length)];
|
|
271
|
+
},
|
|
266
272
|
trim_doc_comment() {
|
|
267
273
|
return `/** ${this.slice(3, -2).replace(/\s*\*\s*/g, ' ').replace(/@(param|params|return) \{.*?\}\s*/g, '').trim()} */`;
|
|
268
274
|
},
|
package/utils.browser.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare function encode(str: string): Uint8Array;
|
|
|
78
78
|
在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
|
|
79
79
|
export declare function decode(buffer: Uint8Array): string;
|
|
80
80
|
/** 字符串字典序比较 */
|
|
81
|
-
export declare function strcmp(l: string, r: string):
|
|
81
|
+
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
82
82
|
/** 比较 1.10.02 这种版本号
|
|
83
83
|
- l, r: 两个版本号字符串
|
|
84
84
|
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|
package/utils.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare function filter_values<TObj extends Record<string, any>>(obj: TOb
|
|
|
42
42
|
/** 忽略对象中的 keys, 返回新对象 */
|
|
43
43
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
44
44
|
/** 字符串字典序比较 */
|
|
45
|
-
export declare function strcmp(l: string, r: string):
|
|
45
|
+
export declare function strcmp(l: string, r: string): 0 | 1 | -1;
|
|
46
46
|
/** 比较 1.10.02 这种版本号
|
|
47
47
|
- l, r: 两个版本号字符串
|
|
48
48
|
- loose?: 宽松模式,允许两个版本号格式(位数)不一致 */
|