xshell 1.0.83 → 1.0.85
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/net.js +1 -1
- package/package.json +19 -19
- package/path.d.ts +2 -2
- package/process.d.ts +1 -2
- package/process.js +1 -2
- package/prototype.browser.d.ts +4 -0
- package/prototype.browser.js +12 -0
- package/prototype.d.ts +4 -0
- package/prototype.js +12 -0
- package/server.js +2 -1
- package/utils.browser.d.ts +1 -1
- package/utils.d.ts +1 -1
- /package/patches/{koa@2.15.0.patch → koa@2.15.2.patch} +0 -0
package/net.js
CHANGED
|
@@ -80,7 +80,7 @@ export async function request(url, options = {}) {
|
|
|
80
80
|
let headers = {
|
|
81
81
|
'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ja-JP;q=0.6,ja;q=0.5',
|
|
82
82
|
'accept-encoding': 'gzip, deflate, br',
|
|
83
|
-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
|
83
|
+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
|
|
84
84
|
'sec-ch-ua-platform': '"Windows"',
|
|
85
85
|
'sec-ch-ua-platform-version': '"15.0.0"',
|
|
86
86
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -53,43 +53,43 @@
|
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@babel/parser": "^7.
|
|
58
|
-
"@babel/traverse": "^7.
|
|
56
|
+
"@babel/core": "^7.24.3",
|
|
57
|
+
"@babel/parser": "^7.24.1",
|
|
58
|
+
"@babel/traverse": "^7.24.1",
|
|
59
59
|
"@koa/cors": "^5.0.0",
|
|
60
60
|
"@types/ws": "^8.5.10",
|
|
61
61
|
"ali-oss": "^6.20.0",
|
|
62
|
-
"archiver": "^
|
|
62
|
+
"archiver": "^7.0.1",
|
|
63
63
|
"byte-size": "^8.1.1",
|
|
64
64
|
"chalk": "^5.3.0",
|
|
65
65
|
"chardet": "^2.0.0",
|
|
66
|
-
"cli-table3": "^0.6.
|
|
66
|
+
"cli-table3": "^0.6.4",
|
|
67
67
|
"cli-truncate": "^4.0.0",
|
|
68
68
|
"colors": "^1.4.0",
|
|
69
69
|
"commander": "^12.0.0",
|
|
70
70
|
"emoji-regex": "^10.3.0",
|
|
71
71
|
"gulp-sort": "^2.0.0",
|
|
72
72
|
"hash-string": "^1.0.0",
|
|
73
|
-
"i18next": "^23.
|
|
73
|
+
"i18next": "^23.10.1",
|
|
74
74
|
"i18next-scanner": "^4.4.0",
|
|
75
75
|
"js-cookie": "^3.0.5",
|
|
76
|
-
"koa": "^2.15.
|
|
76
|
+
"koa": "^2.15.2",
|
|
77
77
|
"koa-compress": "^5.1.1",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"map-stream": "0.0.7",
|
|
80
80
|
"mime-types": "^2.1.35",
|
|
81
81
|
"ora": "^8.0.1",
|
|
82
82
|
"react": "^18.2.0",
|
|
83
|
-
"react-i18next": "^14.0
|
|
84
|
-
"react-object-model": "^1.2.
|
|
83
|
+
"react-i18next": "^14.1.0",
|
|
84
|
+
"react-object-model": "^1.2.3",
|
|
85
85
|
"resolve-path": "^1.4.0",
|
|
86
86
|
"strip-ansi": "^7.1.0",
|
|
87
87
|
"through2": "^4.0.2",
|
|
88
88
|
"tough-cookie": "^4.1.3",
|
|
89
89
|
"tslib": "^2.6.2",
|
|
90
|
-
"typescript": "^5.
|
|
90
|
+
"typescript": "^5.4.3",
|
|
91
91
|
"ua-parser-js": "2.0.0-alpha.2",
|
|
92
|
-
"undici": "^6.
|
|
92
|
+
"undici": "^6.10.1",
|
|
93
93
|
"vinyl": "^3.0.0",
|
|
94
94
|
"vinyl-fs": "^4.0.0",
|
|
95
95
|
"ws": "^8.16.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"xterm-addon-webgl": "^0.16.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@babel/types": "^7.
|
|
102
|
+
"@babel/types": "^7.24.0",
|
|
103
103
|
"@types/ali-oss": "^6.16.11",
|
|
104
104
|
"@types/archiver": "^6.0.2",
|
|
105
105
|
"@types/babel__traverse": "^7.20.5",
|
|
@@ -107,22 +107,22 @@
|
|
|
107
107
|
"@types/chardet": "^0.8.3",
|
|
108
108
|
"@types/gulp-sort": "2.0.4",
|
|
109
109
|
"@types/js-cookie": "^3.0.6",
|
|
110
|
-
"@types/koa": "^2.
|
|
110
|
+
"@types/koa": "^2.15.0",
|
|
111
111
|
"@types/koa-compress": "^4.0.6",
|
|
112
|
-
"@types/lodash": "^4.
|
|
112
|
+
"@types/lodash": "^4.17.0",
|
|
113
113
|
"@types/mime-types": "^2.1.4",
|
|
114
|
-
"@types/node": "^20.11.
|
|
115
|
-
"@types/react": "^18.2.
|
|
114
|
+
"@types/node": "^20.11.30",
|
|
115
|
+
"@types/react": "^18.2.70",
|
|
116
116
|
"@types/through2": "^2.0.41",
|
|
117
117
|
"@types/tough-cookie": "^4.0.5",
|
|
118
118
|
"@types/ua-parser-js": "^0.7.39",
|
|
119
119
|
"@types/vinyl-fs": "^3.0.5",
|
|
120
|
-
"@types/vscode": "^1.
|
|
120
|
+
"@types/vscode": "^1.87.0"
|
|
121
121
|
},
|
|
122
122
|
"pnpm": {
|
|
123
123
|
"patchedDependencies": {
|
|
124
124
|
"@types/byte-size@8.1.2": "patches/@types__byte-size@8.1.2.patch",
|
|
125
|
-
"koa@2.15.
|
|
125
|
+
"koa@2.15.2": "patches/koa@2.15.2.patch"
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
package/path.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare function extname(path: string): string;
|
|
|
54
54
|
/** `/` */
|
|
55
55
|
export declare const sep = "/";
|
|
56
56
|
/** The platform-specific file delimiter. ';' or ':'. */
|
|
57
|
-
export declare const delimiter: "
|
|
57
|
+
export declare const delimiter: ";" | ":";
|
|
58
58
|
/** Returns an object from a path string - the opposite of format().
|
|
59
59
|
@param path path to evaluate.
|
|
60
60
|
@throws {TypeError} if `path` is not a string. */
|
|
@@ -81,7 +81,7 @@ export declare let path: {
|
|
|
81
81
|
basename: typeof basename;
|
|
82
82
|
extname: typeof extname;
|
|
83
83
|
sep: string;
|
|
84
|
-
delimiter: "
|
|
84
|
+
delimiter: ";" | ":";
|
|
85
85
|
parse: typeof parse;
|
|
86
86
|
format: typeof format;
|
|
87
87
|
toNamespacedPath: typeof toNamespacedPath;
|
package/process.d.ts
CHANGED
|
@@ -48,8 +48,7 @@ interface StartOptions {
|
|
|
48
48
|
- encoding?: `'utf-8'` 子进程输出编码 child output encoding
|
|
49
49
|
- print?: `true` print 选项,支持设置细项 print option (with details)
|
|
50
50
|
- stdio?: `'pipe'` 设置为 'ignore' 时忽略 stdio 处理 when 'ignore' then ignore stdio processing
|
|
51
|
-
- detached?: `false` 是否断开和 child 的关系 (ignore stdio, unref) whether to break the connection with child (ignore stdio, unref)
|
|
52
|
-
*/
|
|
51
|
+
- detached?: `false` 是否断开和 child 的关系 (ignore stdio, unref) whether to break the connection with child (ignore stdio, unref) */
|
|
53
52
|
export declare function start(exe: string, args?: string[], { cwd, encoding, print, stdio, detached, envs, window: _window, }?: StartOptions): Promise<ChildProcess>;
|
|
54
53
|
export declare function start_nodejs(js: string, args?: string[], options?: StartOptions): Promise<ChildProcess>;
|
|
55
54
|
export interface CallOptions extends StartOptions {
|
package/process.js
CHANGED
|
@@ -15,8 +15,7 @@ export const username = os.userInfo().username;
|
|
|
15
15
|
- encoding?: `'utf-8'` 子进程输出编码 child output encoding
|
|
16
16
|
- print?: `true` print 选项,支持设置细项 print option (with details)
|
|
17
17
|
- stdio?: `'pipe'` 设置为 'ignore' 时忽略 stdio 处理 when 'ignore' then ignore stdio processing
|
|
18
|
-
- detached?: `false` 是否断开和 child 的关系 (ignore stdio, unref) whether to break the connection with child (ignore stdio, unref)
|
|
19
|
-
*/
|
|
18
|
+
- detached?: `false` 是否断开和 child 的关系 (ignore stdio, unref) whether to break the connection with child (ignore stdio, unref) */
|
|
20
19
|
export async function start(exe, args = [], { cwd, encoding = 'utf-8', print = true, stdio = 'pipe', detached = false, envs, window: _window = true, } = {}) {
|
|
21
20
|
const options = {
|
|
22
21
|
cwd,
|
package/prototype.browser.d.ts
CHANGED
|
@@ -75,6 +75,10 @@ declare global {
|
|
|
75
75
|
text: string;
|
|
76
76
|
};
|
|
77
77
|
space(this: string): string;
|
|
78
|
+
/** assert 确保字符串以 prefix 开头(失败时抛出错误),并返回去掉该 prefix 的字符串 */
|
|
79
|
+
strip_start(this: string, prefix: string): string;
|
|
80
|
+
/** assert 确保字符串以 suffix 结尾(失败时抛出错误),并返回去掉该 suffix 的字符串 */
|
|
81
|
+
strip_end(this: string, suffix: string): string;
|
|
78
82
|
/** 等价于 .endsWith('/') */
|
|
79
83
|
isdir: boolean;
|
|
80
84
|
/** 以 `/` 分割的路径,可能以 / 结尾 */
|
package/prototype.browser.js
CHANGED
|
@@ -259,6 +259,18 @@ Object.defineProperties(String.prototype, {
|
|
|
259
259
|
text: this.slice(i)
|
|
260
260
|
};
|
|
261
261
|
},
|
|
262
|
+
strip_start(prefix) {
|
|
263
|
+
if (this.startsWith(prefix))
|
|
264
|
+
return this.slice(prefix.length);
|
|
265
|
+
else
|
|
266
|
+
throw new Error(`字符串没有以前缀 ${prefix} 开头: ${this}`);
|
|
267
|
+
},
|
|
268
|
+
strip_end(suffix) {
|
|
269
|
+
if (this.endsWith(suffix))
|
|
270
|
+
return this.slice(0, -suffix.length);
|
|
271
|
+
else
|
|
272
|
+
throw new Error(`字符串没有以后缀 ${suffix} 结尾: ${this}`);
|
|
273
|
+
},
|
|
262
274
|
space() {
|
|
263
275
|
if (!this)
|
|
264
276
|
return this;
|
package/prototype.d.ts
CHANGED
|
@@ -98,6 +98,10 @@ declare global {
|
|
|
98
98
|
decode_base64(this: string, buffer: true): Buffer;
|
|
99
99
|
decode_base64(this: string, buffer?: boolean): string | Buffer;
|
|
100
100
|
space(this: string): string;
|
|
101
|
+
/** assert 确保字符串以 prefix 开头(失败时抛出错误),并返回去掉该 prefix 的字符串 */
|
|
102
|
+
strip_start(this: string, prefix: string): string;
|
|
103
|
+
/** assert 确保字符串以 suffix 结尾(失败时抛出错误),并返回去掉该 suffix 的字符串 */
|
|
104
|
+
strip_end(this: string, suffix: string): string;
|
|
101
105
|
/** 等价于 .endsWith('/') */
|
|
102
106
|
isdir: boolean;
|
|
103
107
|
/** 以 `/` 分割的路径,可能以 / 结尾 */
|
package/prototype.js
CHANGED
|
@@ -278,6 +278,18 @@ if (!globalThis.my_prototype_defined) {
|
|
|
278
278
|
strip_ansi() {
|
|
279
279
|
return strip_ansi(this);
|
|
280
280
|
},
|
|
281
|
+
strip_start(prefix) {
|
|
282
|
+
if (this.startsWith(prefix))
|
|
283
|
+
return this.slice(prefix.length);
|
|
284
|
+
else
|
|
285
|
+
throw new Error(`字符串没有以前缀 ${prefix} 开头: ${this}`);
|
|
286
|
+
},
|
|
287
|
+
strip_end(suffix) {
|
|
288
|
+
if (this.endsWith(suffix))
|
|
289
|
+
return this.slice(0, -suffix.length);
|
|
290
|
+
else
|
|
291
|
+
throw new Error(`字符串没有以后缀 ${suffix} 结尾: ${this}`);
|
|
292
|
+
},
|
|
281
293
|
space() {
|
|
282
294
|
if (!this)
|
|
283
295
|
return this;
|
package/server.js
CHANGED
|
@@ -439,11 +439,12 @@ export class Server {
|
|
|
439
439
|
async proxy(ctx,
|
|
440
440
|
/** 只含 host, path, 不含 queries 的 url */
|
|
441
441
|
path_url, headers_ = {}, redirect = 'manual') {
|
|
442
|
-
const { request: { method, headers, body, ip } } = ctx;
|
|
442
|
+
const { request: { method, headers, query, body, ip } } = ctx;
|
|
443
443
|
let { response } = ctx;
|
|
444
444
|
try {
|
|
445
445
|
const response_ = await _request(path_url, {
|
|
446
446
|
method: method,
|
|
447
|
+
queries: query,
|
|
447
448
|
body,
|
|
448
449
|
headers: {
|
|
449
450
|
...headers,
|
package/utils.browser.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare function encode(str: string): Uint8Array;
|
|
|
56
56
|
在流式处理 (buffer 可能不完整) 时,应使用独立的 TextDecoder 实例调用 decode(buffer, { stream: true }) */
|
|
57
57
|
export declare function decode(buffer: Uint8Array): string;
|
|
58
58
|
/** 字符串字典序比较 */
|
|
59
|
-
export declare function strcmp(l: string, r: string):
|
|
59
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
60
60
|
/** 比较 1.10.02 这种版本号 */
|
|
61
61
|
export declare function vercmp(l: string, r: string): number;
|
|
62
62
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
package/utils.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export declare function filter_keys<TObj>(obj: TObj, filter: (key: string) => an
|
|
|
34
34
|
/** 忽略对象中的 keys, 返回新对象 */
|
|
35
35
|
export declare function omit<TObj>(obj: TObj, omit_keys: string[]): TObj;
|
|
36
36
|
/** 字符串字典序比较 */
|
|
37
|
-
export declare function strcmp(l: string, r: string):
|
|
37
|
+
export declare function strcmp(l: string, r: string): 1 | 0 | -1;
|
|
38
38
|
/** 比较 1.10.02 这种版本号 */
|
|
39
39
|
export declare function vercmp(l: string, r: string): number;
|
|
40
40
|
export declare function get<TReturn = any>(obj: any, keypath: string): TReturn;
|
|
File without changes
|