xshell 1.2.5 → 1.2.6
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.d.ts +2 -2
- package/net.js +3 -1
- package/package.json +1 -1
- package/path.d.ts +2 -2
package/net.d.ts
CHANGED
|
@@ -66,10 +66,10 @@ export interface RequestFullOptions extends RequestOptions {
|
|
|
66
66
|
export interface RequestRawOptions extends RequestOptions {
|
|
67
67
|
raw: true;
|
|
68
68
|
}
|
|
69
|
-
export interface RequestError extends Error {
|
|
69
|
+
export interface RequestError<TBody extends string | Buffer = string> extends Error {
|
|
70
70
|
url: URL;
|
|
71
71
|
options: RequestOptions | RequestFullOptions | RequestRawOptions;
|
|
72
|
-
response?: FullResponse<
|
|
72
|
+
response?: FullResponse<TBody>;
|
|
73
73
|
[inspect.custom]: Function;
|
|
74
74
|
}
|
|
75
75
|
export interface StatusCodeError {
|
package/net.js
CHANGED
|
@@ -245,7 +245,9 @@ export async function request(url, options = {}) {
|
|
|
245
245
|
value: {
|
|
246
246
|
status: response.status,
|
|
247
247
|
headers: response.headers,
|
|
248
|
-
body:
|
|
248
|
+
body: decode
|
|
249
|
+
? await stream_to_text(response.body)
|
|
250
|
+
: await stream_to_buffer(response.body),
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
253
|
} : {},
|
package/package.json
CHANGED
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;
|