xjs-node 1.0.7 → 2.0.1-alpha.1
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/{dist → build}/func/u-file.d.ts +44 -45
- package/{dist → build}/func/u-file.js +171 -161
- package/{dist → build}/func/u.d.ts +3 -3
- package/{dist → build}/func/u.js +51 -42
- package/{dist → build}/index.d.ts +5 -5
- package/{dist → build}/index.js +23 -23
- package/{dist → build}/prcs/http/http-resolver-context.d.ts +59 -60
- package/{dist → build}/prcs/http/http-resolver-context.js +337 -327
- package/{dist → build}/prcs/http/http-resolver.d.ts +50 -51
- package/{dist → build}/prcs/http/http-resolver.js +53 -53
- package/{dist → build}/prcs/http/i-http-client.d.ts +88 -90
- package/{dist → build}/prcs/http/i-http-client.js +2 -2
- package/package.json +18 -11
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
private readonly
|
|
22
|
-
private readonly
|
|
23
|
-
private readonly
|
|
24
|
-
private readonly
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
private
|
|
48
|
-
private
|
|
49
|
-
private
|
|
50
|
-
private
|
|
51
|
-
private
|
|
52
|
-
private
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
import { ClientOption, HttpResponse, IHttpClient, RequestOption } from "./i-http-client";
|
|
2
|
+
import { Loggable } from "xjs-common";
|
|
3
|
+
export declare const s_clientMode: {
|
|
4
|
+
nodejs: {
|
|
5
|
+
id: number;
|
|
6
|
+
cipherOrder: any;
|
|
7
|
+
};
|
|
8
|
+
chrome: {
|
|
9
|
+
id: number;
|
|
10
|
+
cipherOrder: number[];
|
|
11
|
+
};
|
|
12
|
+
firefox: {
|
|
13
|
+
id: number;
|
|
14
|
+
cipherOrder: number[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare class HttpResolverContext implements IHttpClient {
|
|
18
|
+
readonly cmv: number;
|
|
19
|
+
private _l;
|
|
20
|
+
private readonly _als;
|
|
21
|
+
private readonly _mode;
|
|
22
|
+
private readonly _ciphers;
|
|
23
|
+
private readonly _proxyConfig?;
|
|
24
|
+
private readonly _chHeaders;
|
|
25
|
+
private _cookies?;
|
|
26
|
+
get clientMode(): string;
|
|
27
|
+
constructor(cmv: number, op?: ClientOption, _l?: Loggable);
|
|
28
|
+
get(url: string, op?: RequestOption & {
|
|
29
|
+
outerRedirectCount?: number;
|
|
30
|
+
responseType: "string";
|
|
31
|
+
}): Promise<HttpResponse<string>>;
|
|
32
|
+
get(url: string, op?: RequestOption & {
|
|
33
|
+
outerRedirectCount?: number;
|
|
34
|
+
responseType: "buffer";
|
|
35
|
+
}): Promise<HttpResponse<Buffer>>;
|
|
36
|
+
get(url: string, op?: RequestOption & {
|
|
37
|
+
outerRedirectCount?: number;
|
|
38
|
+
}): Promise<HttpResponse<string>>;
|
|
39
|
+
post(url: string, payload: any, op?: RequestOption & {
|
|
40
|
+
responseType: "string";
|
|
41
|
+
}): Promise<HttpResponse<string>>;
|
|
42
|
+
post(url: string, payload: any, op?: RequestOption & {
|
|
43
|
+
responseType: "buffer";
|
|
44
|
+
}): Promise<HttpResponse<Buffer>>;
|
|
45
|
+
post(url: string, payload: any, op?: RequestOption): Promise<HttpResponse<string>>;
|
|
46
|
+
private createProxyAgent;
|
|
47
|
+
private getIn;
|
|
48
|
+
private postIn;
|
|
49
|
+
private reqHttps;
|
|
50
|
+
private processResponse;
|
|
51
|
+
private resolveDownloadPath;
|
|
52
|
+
private handleRedirect;
|
|
53
|
+
private createCiphers;
|
|
54
|
+
private setCookies;
|
|
55
|
+
private storeCookies;
|
|
56
|
+
private log;
|
|
57
|
+
private warn;
|
|
58
|
+
private error;
|
|
59
|
+
}
|