ddan-js 3.6.5 → 3.7.0
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/bin/ddan-js.browser.js +1 -1
- package/bin/ddan-js.js +1 -1
- package/bin/ddan-js.mjs +1 -1
- package/bin/modules/fetch.d.ts +23 -0
- package/bin/modules/qs/index.d.ts +5 -1
- package/bin/tiny/hook.d.ts +5 -1
- package/bin/tiny/mini.d.ts +5 -1
- package/bin/tiny/web.d.ts +28 -1
- package/package.json +1 -1
package/bin/modules/fetch.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
declare class Fetch {
|
|
2
|
+
baseURL: string;
|
|
3
|
+
defaultHeaders: Record<string, string>;
|
|
4
|
+
constructor(config?: {
|
|
5
|
+
baseURL?: string;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
});
|
|
8
|
+
query(options: {
|
|
9
|
+
url: string;
|
|
10
|
+
method?: string;
|
|
11
|
+
headers?: Record<string, any>;
|
|
12
|
+
cache?: RequestCache;
|
|
13
|
+
}, params?: object): Promise<string>;
|
|
14
|
+
request(url: string, args?: {
|
|
15
|
+
params?: Record<string, any>;
|
|
16
|
+
method?: 'POST' | 'GET';
|
|
17
|
+
baseURL?: string;
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
cache?: RequestCache;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
formatError(response: Response | null, responseText: string | null, networkError?: any): any;
|
|
22
|
+
}
|
|
1
23
|
declare const _default: {
|
|
2
24
|
getDataURL: (url: string, cache?: RequestCache | undefined) => Promise<[null, {
|
|
3
25
|
contentType: string;
|
|
@@ -12,5 +34,6 @@ declare const _default: {
|
|
|
12
34
|
}) => Promise<Uint8Array | undefined>;
|
|
13
35
|
getText: (url: string, cache?: RequestCache | undefined) => Promise<[any, undefined] | [null, string]>;
|
|
14
36
|
cache: (url: string, cache?: RequestCache) => Promise<[any, undefined] | [null, boolean]>;
|
|
37
|
+
Fetch: typeof Fetch;
|
|
15
38
|
};
|
|
16
39
|
export default _default;
|
|
@@ -63,7 +63,11 @@ declare const _default: {
|
|
|
63
63
|
query: string;
|
|
64
64
|
params: {};
|
|
65
65
|
};
|
|
66
|
-
isPrivateIP: (addr: string) => boolean;
|
|
67
66
|
isIP: (addr: string) => boolean;
|
|
67
|
+
isIPv4: (addr: string) => boolean;
|
|
68
|
+
isIPv6: (addr: string) => boolean;
|
|
69
|
+
isPrivateIP: (addr: string) => boolean;
|
|
70
|
+
isPrivateIPv4: (addr: string) => boolean;
|
|
71
|
+
isPrivateIPv6: (addr: string) => boolean;
|
|
68
72
|
};
|
|
69
73
|
export default _default;
|
package/bin/tiny/hook.d.ts
CHANGED
|
@@ -56,8 +56,12 @@ declare const dHook: {
|
|
|
56
56
|
query: string;
|
|
57
57
|
params: {};
|
|
58
58
|
};
|
|
59
|
-
isPrivateIP: (addr: string) => boolean;
|
|
60
59
|
isIP: (addr: string) => boolean;
|
|
60
|
+
isIPv4: (addr: string) => boolean;
|
|
61
|
+
isIPv6: (addr: string) => boolean;
|
|
62
|
+
isPrivateIP: (addr: string) => boolean;
|
|
63
|
+
isPrivateIPv4: (addr: string) => boolean;
|
|
64
|
+
isPrivateIPv6: (addr: string) => boolean;
|
|
61
65
|
};
|
|
62
66
|
ali: {
|
|
63
67
|
urlAuthA: (uri: string, exp?: number, key?: string) => string;
|
package/bin/tiny/mini.d.ts
CHANGED
|
@@ -75,8 +75,12 @@ declare const dMini: {
|
|
|
75
75
|
query: string;
|
|
76
76
|
params: {};
|
|
77
77
|
};
|
|
78
|
-
isPrivateIP: (addr: string) => boolean;
|
|
79
78
|
isIP: (addr: string) => boolean;
|
|
79
|
+
isIPv4: (addr: string) => boolean;
|
|
80
|
+
isIPv6: (addr: string) => boolean;
|
|
81
|
+
isPrivateIP: (addr: string) => boolean;
|
|
82
|
+
isPrivateIPv4: (addr: string) => boolean;
|
|
83
|
+
isPrivateIPv6: (addr: string) => boolean;
|
|
80
84
|
};
|
|
81
85
|
icon: import("../class/icon").DIcon;
|
|
82
86
|
html: {
|
package/bin/tiny/web.d.ts
CHANGED
|
@@ -15,6 +15,29 @@ declare const dWeb: {
|
|
|
15
15
|
}) => Promise<Uint8Array | undefined>;
|
|
16
16
|
getText: (url: string, cache?: RequestCache | undefined) => Promise<[any, undefined] | [null, string]>;
|
|
17
17
|
cache: (url: string, cache?: RequestCache) => Promise<[any, undefined] | [null, boolean]>;
|
|
18
|
+
Fetch: {
|
|
19
|
+
new (config?: {
|
|
20
|
+
baseURL?: string | undefined;
|
|
21
|
+
headers?: Record<string, string> | undefined;
|
|
22
|
+
}): {
|
|
23
|
+
baseURL: string;
|
|
24
|
+
defaultHeaders: Record<string, string>;
|
|
25
|
+
query(options: {
|
|
26
|
+
url: string;
|
|
27
|
+
method?: string | undefined;
|
|
28
|
+
headers?: Record<string, any> | undefined;
|
|
29
|
+
cache?: RequestCache | undefined;
|
|
30
|
+
}, params?: object): Promise<string>;
|
|
31
|
+
request(url: string, args?: {
|
|
32
|
+
params?: Record<string, any> | undefined;
|
|
33
|
+
method?: "POST" | "GET" | undefined;
|
|
34
|
+
baseURL?: string | undefined;
|
|
35
|
+
headers?: Record<string, string> | undefined;
|
|
36
|
+
cache?: RequestCache | undefined;
|
|
37
|
+
}): Promise<string>;
|
|
38
|
+
formatError(response: Response | null, responseText: string | null, networkError?: any): any;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
18
41
|
};
|
|
19
42
|
Http: typeof Http;
|
|
20
43
|
css: {
|
|
@@ -84,8 +107,12 @@ declare const dWeb: {
|
|
|
84
107
|
query: string;
|
|
85
108
|
params: {};
|
|
86
109
|
};
|
|
87
|
-
isPrivateIP: (addr: string) => boolean;
|
|
88
110
|
isIP: (addr: string) => boolean;
|
|
111
|
+
isIPv4: (addr: string) => boolean;
|
|
112
|
+
isIPv6: (addr: string) => boolean;
|
|
113
|
+
isPrivateIP: (addr: string) => boolean;
|
|
114
|
+
isPrivateIPv4: (addr: string) => boolean;
|
|
115
|
+
isPrivateIPv6: (addr: string) => boolean;
|
|
89
116
|
};
|
|
90
117
|
icon: import("../class/icon").DIcon;
|
|
91
118
|
html: {
|