@cleandns/whois-rdap 1.0.21 → 1.0.23
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/index.js +0 -3
- package/dist/port43.js +1 -1
- package/dist/port43servers.js +23 -1
- package/dist/test.d.ts +1 -0
- package/dist/test.js +2 -0
- package/package.json +1 -1
- package/src/index.ts +0 -4
- package/src/port43.ts +1 -1
- package/src/port43servers.ts +29 -5
- package/src/test.ts +5 -0
package/dist/index.js
CHANGED
package/dist/port43.js
CHANGED
|
@@ -66,7 +66,7 @@ export async function port43(actor) {
|
|
|
66
66
|
if (!response.found) {
|
|
67
67
|
return response;
|
|
68
68
|
}
|
|
69
|
-
if (port43response.match(/^%*\s+(NOT FOUND|No match|NO OBJECT FOUND|No entries found|No Data Found|No information available|Status: free)\b/im)) {
|
|
69
|
+
if (port43response.match(/^%*\s+(NOT FOUND|No match|NO OBJECT FOUND|No entries found|No Data Found|Domain is available for registration|No information available|Status: free)\b/im)) {
|
|
70
70
|
response.found = false;
|
|
71
71
|
return response;
|
|
72
72
|
}
|
package/dist/port43servers.js
CHANGED
|
@@ -53,6 +53,23 @@ export const port43parsers = {
|
|
|
53
53
|
(m = response.match(/^Expiration Date\s*: (\d\d\d\d). (\d\d). (\d\d)/m)) &&
|
|
54
54
|
(record.ts.expires = new Date(`${m[1]}-${m[2]}-${m[3]}`));
|
|
55
55
|
},
|
|
56
|
+
lk(response, record) {
|
|
57
|
+
var _a;
|
|
58
|
+
const json = JSON.parse(response);
|
|
59
|
+
let m;
|
|
60
|
+
// const response = {
|
|
61
|
+
// "ExpireDate" : "Expiration Date - Saturday, 30th November, 2024",
|
|
62
|
+
// "Message" : "Domain is REGISTERED for - Global Business Process Outsourcing (Pvt) Ltd - Category - Budget ",
|
|
63
|
+
// "Required" : {
|
|
64
|
+
// "Available" : 0,
|
|
65
|
+
// "DomainName" : "globalbpo",
|
|
66
|
+
// "DomainTypeName" : "com.lk",
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
(m = json.ExpireDate.match(/, (\d+)(?:st|nd|rd|th) (\w+), (\d+)/)) &&
|
|
70
|
+
(record.ts.expires = new Date(`${m[2]} ${m[1]}, ${m[3]}`));
|
|
71
|
+
(record.found = !((_a = json.Required) === null || _a === void 0 ? void 0 : _a.Available));
|
|
72
|
+
},
|
|
56
73
|
tr(response, record) {
|
|
57
74
|
let m;
|
|
58
75
|
(m = response.match(/^Organization Name\s*: (.+)/m)) &&
|
|
@@ -147,6 +164,12 @@ export const port43servers = {
|
|
|
147
164
|
"uy.com": "whois.centralnic.net",
|
|
148
165
|
"web.com": "whois.centralnic.net",
|
|
149
166
|
"za.com": "whois.centralnic.net",
|
|
167
|
+
lk: {
|
|
168
|
+
url: `https://www.domains.lk/wp-content/themes/bridge-child/getDomainData.php?domainname=%%domain%%`,
|
|
169
|
+
},
|
|
170
|
+
"*.lk": {
|
|
171
|
+
url: `https://www.domains.lk/wp-content/themes/bridge-child/getDomainData.php?domainname=%%domain%%`,
|
|
172
|
+
},
|
|
150
173
|
"it.com": {
|
|
151
174
|
url: `https://engine.itcomdomains.com/api/v1/domain/%%domain%%/whois_info`,
|
|
152
175
|
},
|
|
@@ -718,7 +741,6 @@ export const port43servers = {
|
|
|
718
741
|
lb: null,
|
|
719
742
|
lc: "whois.afilias-grs.info",
|
|
720
743
|
li: "whois.nic.li",
|
|
721
|
-
lk: "whois.nic.lk",
|
|
722
744
|
lr: null,
|
|
723
745
|
ls: "whois.nic.ls",
|
|
724
746
|
lt: "whois.domreg.lt",
|
package/dist/test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/test.js
ADDED
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/port43.ts
CHANGED
|
@@ -79,7 +79,7 @@ export async function port43(actor: string): Promise<WhoisResponse> {
|
|
|
79
79
|
|
|
80
80
|
if (
|
|
81
81
|
port43response.match(
|
|
82
|
-
/^%*\s+(NOT FOUND|No match|NO OBJECT FOUND|No entries found|No Data Found|No information available|Status: free)\b/im
|
|
82
|
+
/^%*\s+(NOT FOUND|No match|NO OBJECT FOUND|No entries found|No Data Found|Domain is available for registration|No information available|Status: free)\b/im
|
|
83
83
|
)
|
|
84
84
|
) {
|
|
85
85
|
response.found = false;
|
package/src/port43servers.ts
CHANGED
|
@@ -78,6 +78,23 @@ export const port43parsers: Record<
|
|
|
78
78
|
(record.ts.expires = new Date(`${m[1]}-${m[2]}-${m[3]}`));
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
+
lk(response, record) {
|
|
82
|
+
const json = JSON.parse(response);
|
|
83
|
+
let m;
|
|
84
|
+
// const response = {
|
|
85
|
+
// "ExpireDate" : "Expiration Date - Saturday, 30th November, 2024",
|
|
86
|
+
// "Message" : "Domain is REGISTERED for - Global Business Process Outsourcing (Pvt) Ltd - Category - Budget ",
|
|
87
|
+
// "Required" : {
|
|
88
|
+
// "Available" : 0,
|
|
89
|
+
// "DomainName" : "globalbpo",
|
|
90
|
+
// "DomainTypeName" : "com.lk",
|
|
91
|
+
// }
|
|
92
|
+
// }
|
|
93
|
+
(m = json.ExpireDate.match(/, (\d+)(?:st|nd|rd|th) (\w+), (\d+)/)) &&
|
|
94
|
+
(record.ts.expires = new Date(`${m[2]} ${m[1]}, ${m[3]}`));
|
|
95
|
+
(record.found = !json.Required?.Available);
|
|
96
|
+
},
|
|
97
|
+
|
|
81
98
|
tr(response, record) {
|
|
82
99
|
let m;
|
|
83
100
|
|
|
@@ -155,11 +172,11 @@ export const port43parsers: Record<
|
|
|
155
172
|
let m;
|
|
156
173
|
|
|
157
174
|
(m = response.match(/^registered:\s+(\d\d)\.(\d\d)\.(\d\d\d\d) (\d\d:\d\d:\d\d)/m)) &&
|
|
158
|
-
(record.ts.created = new Date
|
|
175
|
+
(record.ts.created = new Date(`${m[3]}-${m[2]}-${m[1]}T${m[4]}Z`));
|
|
159
176
|
(m = response.match(/^changed:\s+(\d\d)\.(\d\d)\.(\d\d\d\d) (\d\d:\d\d:\d\d)/m)) &&
|
|
160
|
-
(record.ts.updated = new Date
|
|
177
|
+
(record.ts.updated = new Date(`${m[3]}-${m[2]}-${m[1]}T${m[4]}Z`));
|
|
161
178
|
(m = response.match(/^expire:\s+(\d\d)\.(\d\d)\.(\d\d\d\d)(?: (\d\d:\d\d:\d\d))?/m)) &&
|
|
162
|
-
(record.ts.expires = new Date
|
|
179
|
+
(record.ts.expires = new Date(`${m[3]}-${m[2]}-${m[1]}T${m[4] || '00:00:00'}Z`));
|
|
163
180
|
}
|
|
164
181
|
|
|
165
182
|
};
|
|
@@ -188,9 +205,17 @@ export const port43servers: Record<string, any> = {
|
|
|
188
205
|
"web.com": "whois.centralnic.net",
|
|
189
206
|
"za.com": "whois.centralnic.net",
|
|
190
207
|
|
|
208
|
+
lk: {
|
|
209
|
+
url: `https://www.domains.lk/wp-content/themes/bridge-child/getDomainData.php?domainname=%%domain%%`,
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
"*.lk": {
|
|
213
|
+
url: `https://www.domains.lk/wp-content/themes/bridge-child/getDomainData.php?domainname=%%domain%%`,
|
|
214
|
+
},
|
|
215
|
+
|
|
191
216
|
"it.com": {
|
|
192
217
|
url: `https://engine.itcomdomains.com/api/v1/domain/%%domain%%/whois_info`,
|
|
193
|
-
},
|
|
218
|
+
},
|
|
194
219
|
|
|
195
220
|
com: {
|
|
196
221
|
host: "whois.verisign-grs.com",
|
|
@@ -767,7 +792,6 @@ export const port43servers: Record<string, any> = {
|
|
|
767
792
|
lb: null,
|
|
768
793
|
lc: "whois.afilias-grs.info",
|
|
769
794
|
li: "whois.nic.li",
|
|
770
|
-
lk: "whois.nic.lk",
|
|
771
795
|
lr: null,
|
|
772
796
|
ls: "whois.nic.ls",
|
|
773
797
|
lt: "whois.domreg.lt",
|