ddan-js 2.6.44 → 2.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/LICENSE +7 -7
- package/README.md +10 -10
- package/bin/ddan-js.esm.js +1 -1
- package/bin/ddan-js.js +1 -1
- package/bin/lib/modules/node/socks5.js +11 -27
- package/bin/lib/modules/qs/index.js +2 -2
- package/bin/lib/modules/rule/async-validator/rule/url.js +11 -11
- package/bin/types/index.d.ts +4 -4
- package/bin/types/modules/node/socks5.d.ts +0 -6
- package/bin/types/modules/qs/index.d.ts +1 -1
- package/bin/types/modules/rule/async-validator/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -12,17 +12,17 @@ exports.default = () => {
|
|
|
12
12
|
: '';
|
|
13
13
|
const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
|
|
14
14
|
const v6seg = '[a-fA-F\\d]{1,4}';
|
|
15
|
-
const v6 = `
|
|
16
|
-
(?:
|
|
17
|
-
(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
18
|
-
(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
19
|
-
(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
20
|
-
(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
21
|
-
(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
22
|
-
(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
23
|
-
(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
24
|
-
(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
25
|
-
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
15
|
+
const v6 = `
|
|
16
|
+
(?:
|
|
17
|
+
(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
18
|
+
(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
19
|
+
(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
20
|
+
(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
21
|
+
(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
22
|
+
(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
23
|
+
(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
24
|
+
(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
25
|
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
26
26
|
`
|
|
27
27
|
.replace(/\s*\/\/.*$/gm, '')
|
|
28
28
|
.replace(/\n/g, '')
|
package/bin/types/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ declare const dHook: {
|
|
|
259
259
|
parseHost: (url: string) => import("./typings").Ddan.IHttpHost;
|
|
260
260
|
join: (...args: string[]) => string;
|
|
261
261
|
shExpMatch: (text: string, pattern: string) => boolean;
|
|
262
|
-
|
|
262
|
+
isLocalIpAddress: (addr: string) => boolean;
|
|
263
263
|
};
|
|
264
264
|
singleton: <T>() => {
|
|
265
265
|
new (): {};
|
|
@@ -382,7 +382,7 @@ declare const dMini: {
|
|
|
382
382
|
parseHost: (url: string) => import("./typings").Ddan.IHttpHost;
|
|
383
383
|
join: (...args: string[]) => string;
|
|
384
384
|
shExpMatch: (text: string, pattern: string) => boolean;
|
|
385
|
-
|
|
385
|
+
isLocalIpAddress: (addr: string) => boolean;
|
|
386
386
|
};
|
|
387
387
|
icon: import("./class/icon").DIcon;
|
|
388
388
|
html: {
|
|
@@ -523,7 +523,7 @@ declare const dWeb: {
|
|
|
523
523
|
parseHost: (url: string) => import("./typings").Ddan.IHttpHost;
|
|
524
524
|
join: (...args: string[]) => string;
|
|
525
525
|
shExpMatch: (text: string, pattern: string) => boolean;
|
|
526
|
-
|
|
526
|
+
isLocalIpAddress: (addr: string) => boolean;
|
|
527
527
|
};
|
|
528
528
|
icon: import("./class/icon").DIcon;
|
|
529
529
|
html: {
|
|
@@ -819,7 +819,7 @@ declare const _default: {
|
|
|
819
819
|
parseHost: (url: string) => import("./typings").Ddan.IHttpHost;
|
|
820
820
|
join: (...args: string[]) => string;
|
|
821
821
|
shExpMatch: (text: string, pattern: string) => boolean;
|
|
822
|
-
|
|
822
|
+
isLocalIpAddress: (addr: string) => boolean;
|
|
823
823
|
};
|
|
824
824
|
css: {
|
|
825
825
|
stringify: (styleObj: Record<string, string | number>) => string;
|
|
@@ -45,6 +45,6 @@ declare const _default: {
|
|
|
45
45
|
parseHost: (url: string) => Ddan.IHttpHost;
|
|
46
46
|
join: (...args: string[]) => string;
|
|
47
47
|
shExpMatch: (text: string, pattern: string) => boolean;
|
|
48
|
-
|
|
48
|
+
isLocalIpAddress: (addr: string) => boolean;
|
|
49
49
|
};
|
|
50
50
|
export default _default;
|
|
@@ -14,6 +14,12 @@ declare class Schema {
|
|
|
14
14
|
string: import("./interface").ExecuteValidator;
|
|
15
15
|
method: import("./interface").ExecuteValidator;
|
|
16
16
|
number: import("./interface").ExecuteValidator;
|
|
17
|
+
/**
|
|
18
|
+
* Encapsulates a validation schema.
|
|
19
|
+
*
|
|
20
|
+
* @param descriptor An object declaring validation rules
|
|
21
|
+
* for this schema.
|
|
22
|
+
*/
|
|
17
23
|
boolean: import("./interface").ExecuteValidator;
|
|
18
24
|
regexp: import("./interface").ExecuteValidator;
|
|
19
25
|
integer: import("./interface").ExecuteValidator;
|