jsonified-whois 1.0.1 → 1.1.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/README.md +97 -0
- package/package.json +8 -3
- package/src/index.ts +3 -3
- package/src/types/index.d.ts +1 -1
- package/tsconfig.json +10 -3
- package/tsup.config.ts +10 -0
package/README.md
CHANGED
|
@@ -55,6 +55,103 @@ See [src/example/index.ts](src/example/index.ts) for a usage example.
|
|
|
55
55
|
|
|
56
56
|
- `fetchData()`: Returns a Promise resolving to WHOIS data.
|
|
57
57
|
|
|
58
|
+
#### Response Example
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"createdAt": "2022-02-04T09:28:59.20Z",
|
|
63
|
+
"domainName": "pinghome.io",
|
|
64
|
+
"expiresAt": "2026-02-04T09:28:59.20Z",
|
|
65
|
+
"ipAddresses": {
|
|
66
|
+
"ipv4": ["18.244.87.32", "18.244.87.23", "18.244.87.115", "18.244.87.71"],
|
|
67
|
+
"ipv6": []
|
|
68
|
+
},
|
|
69
|
+
"nameServers": [
|
|
70
|
+
"ns-183.awsdns-22.com",
|
|
71
|
+
"ns-957.awsdns-55.net",
|
|
72
|
+
"ns-1524.awsdns-62.org",
|
|
73
|
+
"ns-1601.awsdns-08.co.uk"
|
|
74
|
+
],
|
|
75
|
+
"registrar": "whois.namecheap.com",
|
|
76
|
+
"updateAt": "2024-01-15T17:49:12.10Z",
|
|
77
|
+
"queriedWhoisServer": "whois.namecheap.com",
|
|
78
|
+
"queryData": [
|
|
79
|
+
{
|
|
80
|
+
"createdAt": "1997-09-16",
|
|
81
|
+
"domainName": "pinghome.io",
|
|
82
|
+
"expiresAt": "",
|
|
83
|
+
"ipAddresses": {
|
|
84
|
+
"ipv4": [
|
|
85
|
+
"18.244.87.32",
|
|
86
|
+
"18.244.87.23",
|
|
87
|
+
"18.244.87.115",
|
|
88
|
+
"18.244.87.71"
|
|
89
|
+
],
|
|
90
|
+
"ipv6": []
|
|
91
|
+
},
|
|
92
|
+
"nameServers": [
|
|
93
|
+
"A0.NIC.IO 2a01:8840:9e:0:0:0:0:17 65.22.160.17",
|
|
94
|
+
"A2.NIC.IO 2a01:8840:a1:0:0:0:0:17 65.22.163.17",
|
|
95
|
+
"B0.NIC.IO 2a01:8840:9f:0:0:0:0:17 65.22.161.17",
|
|
96
|
+
"C0.NIC.IO 2a01:8840:a0:0:0:0:0:17 65.22.162.17"
|
|
97
|
+
],
|
|
98
|
+
"registrar": "whois.nic.io",
|
|
99
|
+
"updateAt": "2023-01-18",
|
|
100
|
+
"queriedWhoisServer": "whois.iana.org",
|
|
101
|
+
"raw": "..."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"createdAt": "2022-02-04T09:28:59Z",
|
|
105
|
+
"domainName": "pinghome.io",
|
|
106
|
+
"expiresAt": "2026-02-04T09:28:59Z",
|
|
107
|
+
"ipAddresses": {
|
|
108
|
+
"ipv4": [
|
|
109
|
+
"18.244.87.32",
|
|
110
|
+
"18.244.87.23",
|
|
111
|
+
"18.244.87.115",
|
|
112
|
+
"18.244.87.71"
|
|
113
|
+
],
|
|
114
|
+
"ipv6": []
|
|
115
|
+
},
|
|
116
|
+
"nameServers": [
|
|
117
|
+
"ns-957.awsdns-55.net",
|
|
118
|
+
"ns-1601.awsdns-08.co.uk",
|
|
119
|
+
"ns-1524.awsdns-62.org",
|
|
120
|
+
"ns-183.awsdns-22.com"
|
|
121
|
+
],
|
|
122
|
+
"registrar": "whois.namecheap.com",
|
|
123
|
+
"updateAt": "2024-01-20T17:49:55Z",
|
|
124
|
+
"queriedWhoisServer": "whois.nic.io",
|
|
125
|
+
"raw": "..."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"createdAt": "2022-02-04T09:28:59.20Z",
|
|
129
|
+
"domainName": "pinghome.io",
|
|
130
|
+
"expiresAt": "2026-02-04T09:28:59.20Z",
|
|
131
|
+
"ipAddresses": {
|
|
132
|
+
"ipv4": [
|
|
133
|
+
"18.244.87.32",
|
|
134
|
+
"18.244.87.23",
|
|
135
|
+
"18.244.87.115",
|
|
136
|
+
"18.244.87.71"
|
|
137
|
+
],
|
|
138
|
+
"ipv6": []
|
|
139
|
+
},
|
|
140
|
+
"nameServers": [
|
|
141
|
+
"ns-183.awsdns-22.com",
|
|
142
|
+
"ns-957.awsdns-55.net",
|
|
143
|
+
"ns-1524.awsdns-62.org",
|
|
144
|
+
"ns-1601.awsdns-08.co.uk"
|
|
145
|
+
],
|
|
146
|
+
"registrar": "whois.namecheap.com",
|
|
147
|
+
"updateAt": "2024-01-15T17:49:12.10Z",
|
|
148
|
+
"queriedWhoisServer": "whois.namecheap.com",
|
|
149
|
+
"raw": "..."
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
58
155
|
## License
|
|
59
156
|
|
|
60
157
|
MIT © 2025 Pinghome
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsonified-whois",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A simple, open-source WHOIS client for Node.js that returns unified data as json",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"module": "./dist/index.cjs",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "
|
|
10
|
+
"build": "tsup",
|
|
10
11
|
"start": "node --watch --experimental-strip-types src/index.ts"
|
|
11
12
|
},
|
|
12
13
|
"repository": "https://github.com/Ping-Home/jsonified-whois",
|
|
13
14
|
"author": "ISnowFoxI",
|
|
14
15
|
"license": "MIT",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"whois-json"
|
|
18
|
+
],
|
|
15
19
|
"bugs": "https://github.com/Ping-Home/jsonified-whois/issues",
|
|
16
20
|
"homepage": "https://github.com/Ping-Home/jsonified-whois#readme",
|
|
17
21
|
"devDependencies": {
|
|
18
22
|
"@types/node": "*",
|
|
23
|
+
"tsup": "^8.5.0",
|
|
19
24
|
"typescript": "*"
|
|
20
25
|
},
|
|
21
26
|
"dependencies": {
|
package/src/index.ts
CHANGED
|
@@ -24,9 +24,9 @@ class WhoisClient {
|
|
|
24
24
|
url && verifyDomain(url);
|
|
25
25
|
this.port = port || 43;
|
|
26
26
|
this.whoisServer = whoisServer || ianaWhoIsServer;
|
|
27
|
-
this.fallbackEnabled = fallback;
|
|
28
|
-
this.domain = tldts.getDomain(url);
|
|
29
|
-
this.hostname = tldts.getHostname(url);
|
|
27
|
+
this.fallbackEnabled = fallback || false;
|
|
28
|
+
this.domain = tldts.getDomain(url) || "";
|
|
29
|
+
this.hostname = tldts.getHostname(url) || "";
|
|
30
30
|
} catch (error) {
|
|
31
31
|
logError("Something went wrong when initializing the client \n");
|
|
32
32
|
throw error;
|
package/src/types/index.d.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"module": "NodeNext",
|
|
4
4
|
"moduleResolution": "NodeNext",
|
|
5
|
-
"target": "
|
|
5
|
+
"target": "ES2022",
|
|
6
6
|
"sourceMap": true,
|
|
7
7
|
"outDir": "dist",
|
|
8
8
|
"resolveJsonModule": true,
|
|
9
9
|
"allowImportingTsExtensions": true,
|
|
10
|
-
"noEmit": true
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noImplicitAny": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"strictNullChecks": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"isolatedModules": true
|
|
11
17
|
},
|
|
12
|
-
"include": ["src
|
|
18
|
+
"include": ["src"],
|
|
19
|
+
"exclude": ["node_modules"]
|
|
13
20
|
}
|