@stacksjs/whois 0.66.0 → 0.68.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/dist/constants.d.ts +1 -1
- package/dist/index.d.ts +63 -82
- package/dist/index.js +59 -62
- package/dist/types.d.ts +20 -89
- package/dist/utils.d.ts +1 -7
- package/package.json +3 -5
- package/dist/index.js.map +0 -121
- package/src/constants.ts +0 -325
- package/src/index.ts +0 -383
- package/src/types.ts +0 -97
- package/src/utils.ts +0 -22
package/dist/types.d.ts
CHANGED
|
@@ -1,93 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @interface
|
|
5
|
-
*/
|
|
6
|
-
export interface WhoIsResponse {
|
|
7
|
-
/**
|
|
8
|
-
* Raw text response from WhoIs server
|
|
9
|
-
*/
|
|
10
|
-
_raw: string;
|
|
11
|
-
/**
|
|
12
|
-
* Parsed/Formatted key-value pairs of the response (if parsed is true)
|
|
13
|
-
*/
|
|
14
|
-
parsedData: any | null;
|
|
1
|
+
export declare interface WhoIsResponse {
|
|
2
|
+
_raw: string
|
|
3
|
+
parsedData: any | null
|
|
15
4
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Type of the proxy. Either SOCKS4 or SOCKS5
|
|
18
|
-
* @enum
|
|
19
|
-
*/
|
|
20
5
|
export declare enum ProxyType {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
SOCKS4 = 0,
|
|
25
|
-
/**
|
|
26
|
-
* SOCKS5 type of proxy
|
|
27
|
-
*/
|
|
28
|
-
SOCKS5 = 1,
|
|
6
|
+
SOCKS4 = 0,
|
|
7
|
+
SOCKS5 = 1,
|
|
29
8
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Proxy IP
|
|
38
|
-
*/
|
|
39
|
-
ip: string;
|
|
40
|
-
/**
|
|
41
|
-
* Proxy port
|
|
42
|
-
*/
|
|
43
|
-
port: number;
|
|
44
|
-
/**
|
|
45
|
-
* Username to connect to the proxy
|
|
46
|
-
*/
|
|
47
|
-
username?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Password to connect to the proxy
|
|
50
|
-
*/
|
|
51
|
-
password?: string | null;
|
|
52
|
-
/**
|
|
53
|
-
* {@link ProxyType}
|
|
54
|
-
*/
|
|
55
|
-
type: ProxyType;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* WhoIs options
|
|
59
|
-
* @interface
|
|
60
|
-
*/
|
|
61
|
-
export interface WhoIsOptions {
|
|
62
|
-
/**
|
|
63
|
-
* TLD of the domain. If the {@link tld} is not provided (or null), then it will be automatically determined as to the given domain name
|
|
64
|
-
*/
|
|
65
|
-
tld?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* The encoding type used for WhoIs server and response. By default UTF-8 is used.
|
|
68
|
-
*/
|
|
69
|
-
encoding?: string | null;
|
|
70
|
-
/** {@link ProxyData} */
|
|
71
|
-
proxy?: ProxyData | null;
|
|
72
|
-
/**
|
|
73
|
-
* The WhoIs server to collect data from. If not provided, the server will automatically determined using the {@link tld}
|
|
74
|
-
*/
|
|
75
|
-
server?: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* The port of the WhoIs server. By default, port 43 is used.
|
|
78
|
-
*/
|
|
79
|
-
serverPort?: number | null;
|
|
80
|
-
/**
|
|
81
|
-
* Which data needs to be extracted/parsed from the WhoIs response.
|
|
82
|
-
* An object can be passed which contains keys of the fields of the WhoIs response.
|
|
83
|
-
* A copy of the provided object will be returned with the values filled for the provided keys.
|
|
84
|
-
*
|
|
85
|
-
* The keys can have default value of empty string. However, if the WhoIs response has multiple values for the same field (eg: 'Domain Status'),
|
|
86
|
-
* then all the values can be collected by providing a default value of an Array([]).
|
|
87
|
-
*
|
|
88
|
-
* Following example shows an object used to collect 'Domain Name', 'Domain Status' (multiple values) and 'Registrar' from WhoIs response
|
|
89
|
-
*
|
|
90
|
-
* @example {'Domain Name': '', 'Domain Status': [], 'Registrar': ''}
|
|
91
|
-
*/
|
|
92
|
-
parseData?: object | null;
|
|
9
|
+
export declare interface ProxyData {
|
|
10
|
+
ip: string
|
|
11
|
+
port: number
|
|
12
|
+
username?: string | null
|
|
13
|
+
password?: string | null
|
|
14
|
+
type: ProxyType
|
|
93
15
|
}
|
|
16
|
+
export declare interface WhoIsOptions {
|
|
17
|
+
tld?: string | null
|
|
18
|
+
encoding?: string | null
|
|
19
|
+
|
|
20
|
+
proxy?: ProxyData | null
|
|
21
|
+
server?: string | null
|
|
22
|
+
serverPort?: number | null
|
|
23
|
+
parseData?: object | null
|
|
24
|
+
}
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/whois",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.68.0",
|
|
5
5
|
"description": "Easily get whois info.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
@@ -27,17 +27,15 @@
|
|
|
27
27
|
],
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"bun": "./src/index.ts",
|
|
31
30
|
"types": "./dist/index.d.ts",
|
|
32
31
|
"import": "./dist/index.js"
|
|
33
32
|
},
|
|
34
33
|
"./*": {
|
|
35
|
-
"bun": "./src/*",
|
|
36
34
|
"import": "./dist/*"
|
|
37
35
|
}
|
|
38
36
|
},
|
|
39
37
|
"types": "./dist/index.d.ts",
|
|
40
|
-
"files": ["README.md", "dist"
|
|
38
|
+
"files": ["README.md", "dist"],
|
|
41
39
|
"scripts": {
|
|
42
40
|
"build": "bun build.ts",
|
|
43
41
|
"typecheck": "bun tsc --noEmit",
|
|
@@ -49,6 +47,6 @@
|
|
|
49
47
|
"socks": "^2.8.3"
|
|
50
48
|
},
|
|
51
49
|
"devDependencies": {
|
|
52
|
-
"@stacksjs/development": "0.
|
|
50
|
+
"@stacksjs/development": "0.67.0"
|
|
53
51
|
}
|
|
54
52
|
}
|