xshell 1.3.56 → 1.3.58
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.browser.d.ts +1 -1
- package/net.d.ts +1 -1
- package/package.json +3 -3
- package/utils.js +4 -3
package/net.browser.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface RequestError extends Error {
|
|
|
33
33
|
/**
|
|
34
34
|
- url: 可以只有 pathname 部分
|
|
35
35
|
- options?:
|
|
36
|
-
- method?: `有 body 时为 POST, 否则为 GET` 'GET' | 'POST' |
|
|
36
|
+
- method?: `有 body 时为 POST, 否则为 GET` 'GET' | 'POST' | ··
|
|
37
37
|
- queries?: 添加到 url 上的参数,是 Record<string, any>,true/false 会被转换为 0/1
|
|
38
38
|
- headers?: http 请求头 (Record<string, string> 或者 Headers 类型),其中 key 必须是小写的
|
|
39
39
|
- body?: http 请求体,可以是 string, Record<string, any> (会自动 JSON.stringify), ArrayBuffer(View), Blob,
|
package/net.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare class StatusCodeError extends Error {
|
|
|
76
76
|
/**
|
|
77
77
|
- url: 必须是完整 url
|
|
78
78
|
- options?:
|
|
79
|
-
- method?: `有 body 时为 POST, 否则为 GET` 'GET' | 'POST' |
|
|
79
|
+
- method?: `有 body 时为 POST, 否则为 GET` 'GET' | 'POST' | ··
|
|
80
80
|
- queries?: 添加到 url 上的参数,是 Record<string, any>,true/false 会被转换为 0/1
|
|
81
81
|
- headers?: http 请求头,是 Record<string, string>,其中 key 必须是小写的
|
|
82
82
|
- body?: http 请求体,可以是:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xshell",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"tslib": "^2.8.1",
|
|
87
87
|
"typescript": "^6.0.2",
|
|
88
88
|
"undici": "^8.1.0",
|
|
89
|
-
"webpack": "^5.106.
|
|
89
|
+
"webpack": "^5.106.2",
|
|
90
90
|
"webpack-bundle-analyzer": "^5.3.0",
|
|
91
91
|
"ws": "^8.20.0"
|
|
92
92
|
},
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/node": "^25.6.0",
|
|
103
103
|
"@types/react": "^19.2.14",
|
|
104
104
|
"@types/tough-cookie": "^4.0.5",
|
|
105
|
-
"@types/vscode": "^1.
|
|
105
|
+
"@types/vscode": "^1.116.0",
|
|
106
106
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
|
107
107
|
"@types/ws": "^8.18.1"
|
|
108
108
|
}
|
package/utils.js
CHANGED
|
@@ -143,14 +143,15 @@ export function slice_stream(nbytes) {
|
|
|
143
143
|
return new Transform({
|
|
144
144
|
transform(chunk, encoding, callback) {
|
|
145
145
|
if (chunk.length < remaining) {
|
|
146
|
-
this.push(chunk);
|
|
147
146
|
remaining -= chunk.length;
|
|
148
|
-
callback();
|
|
147
|
+
callback(null, chunk);
|
|
149
148
|
return;
|
|
150
149
|
}
|
|
151
150
|
// 最后一块
|
|
152
151
|
check(chunk.length === remaining, '可读流最后一块大小应该不超过 remaining');
|
|
153
|
-
|
|
152
|
+
this.push(chunk);
|
|
153
|
+
this.push(null);
|
|
154
|
+
callback();
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
157
|
}
|