@cleandns/whois-rdap 1.0.36 → 1.0.40
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 +18 -16
- package/dist/port43.js +1 -1
- package/dist/port43servers.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/port43.ts +1 -1
- package/src/port43servers.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -77,7 +77,7 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
77
77
|
const registrars = [];
|
|
78
78
|
const resellers = [];
|
|
79
79
|
async function extractRegistrarsAndResellers(response, url, isThick) {
|
|
80
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
81
81
|
for (const ent of [
|
|
82
82
|
...(response.entities || []),
|
|
83
83
|
response.entity ? { events: response.events, ...response.entity } : null,
|
|
@@ -98,38 +98,40 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
98
98
|
|| ((_c = pubIds.find((id) => id.type === "PANDI Registrar ID")) === null || _c === void 0 ? void 0 : _c.identifier)
|
|
99
99
|
|| ((_d = pubIds.find((id) => id.type === "IANA Registrar ID")) === null || _d === void 0 ? void 0 : _d.Identifier)
|
|
100
100
|
|| ((_e = pubIds.find((id) => id.type === "IANA Registrar ID")) === null || _e === void 0 ? void 0 : _e.identifier)
|
|
101
|
+
|| ((_f = pubIds.find((id) => id.type === "IANA RegistrarID")) === null || _f === void 0 ? void 0 : _f.Identifier)
|
|
102
|
+
|| ((_g = pubIds.find((id) => id.type === "IANA RegistrarID")) === null || _g === void 0 ? void 0 : _g.identifier)
|
|
101
103
|
|| pubIds.find((id) => id.type === "IANA Registrar ID");
|
|
102
104
|
if (reg) {
|
|
103
105
|
// console.log(ent.vcardArray);
|
|
104
106
|
const id = typeof reg === 'object' ? 0 : reg;
|
|
105
107
|
const name = (parseInt(id) == id
|
|
106
|
-
&& ((
|
|
108
|
+
&& ((_h = (await ianaIdToRegistrar(parseInt(id)))) === null || _h === void 0 ? void 0 : _h.name))
|
|
107
109
|
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], reg);
|
|
108
|
-
const email = ((
|
|
110
|
+
const email = ((_j = [ent, ...(ent.entities || [])]
|
|
109
111
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
110
112
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
111
|
-
.filter(Boolean)) === null ||
|
|
113
|
+
.filter(Boolean)) === null || _j === void 0 ? void 0 : _j[0]) || "";
|
|
112
114
|
const events = ent.events || response.events || ent.enents || response.enents;
|
|
113
115
|
registrars.push({ id, name, email, events });
|
|
114
116
|
}
|
|
115
117
|
// handles .ca
|
|
116
|
-
else if (((
|
|
117
|
-
const email = ((
|
|
118
|
+
else if (((_m = (_l = (_k = ent.vcardArray) === null || _k === void 0 ? void 0 : _k[1]) === null || _l === void 0 ? void 0 : _l[3]) === null || _m === void 0 ? void 0 : _m[3]) === 'registrar') {
|
|
119
|
+
const email = ((_o = [ent, ...(ent.entities || [])]
|
|
118
120
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
119
121
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
120
|
-
.filter(Boolean)) === null ||
|
|
122
|
+
.filter(Boolean)) === null || _o === void 0 ? void 0 : _o[0]) || "";
|
|
121
123
|
registrars.push({ id: 0, name: ent.vcardArray[1][1][3], email, events: ent.events || response.events || ent.enents || response.enents });
|
|
122
124
|
}
|
|
123
125
|
// handles .si
|
|
124
|
-
else if ((
|
|
125
|
-
const email = ((
|
|
126
|
+
else if ((_p = ent.vcardArray) === null || _p === void 0 ? void 0 : _p[1].find((el) => el[0] === 'fn')) {
|
|
127
|
+
const email = ((_q = [ent, ...(ent.entities || [])]
|
|
126
128
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
127
129
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
128
|
-
.filter(Boolean)) === null ||
|
|
130
|
+
.filter(Boolean)) === null || _q === void 0 ? void 0 : _q[0]) || "";
|
|
129
131
|
if (ent.handle && ent.handle.toString().match(/^\d+$/)) {
|
|
130
132
|
const id = ent.handle;
|
|
131
133
|
const name = (parseInt(id) == id
|
|
132
|
-
&& ((
|
|
134
|
+
&& ((_r = (await ianaIdToRegistrar(parseInt(id)))) === null || _r === void 0 ? void 0 : _r.name))
|
|
133
135
|
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], id);
|
|
134
136
|
registrars.push({ id, name, email, events: ent.events || response.events || ent.enents || response.enents });
|
|
135
137
|
}
|
|
@@ -143,19 +145,19 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
147
|
if (domain.endsWith(".is") &&
|
|
146
|
-
(((
|
|
148
|
+
(((_s = ent.roles) === null || _s === void 0 ? void 0 : _s.includes("technical")) || ent.role === "technical")) {
|
|
147
149
|
const id = ent.handle;
|
|
148
150
|
const name = (parseInt(id) == id
|
|
149
|
-
&& ((
|
|
151
|
+
&& ((_t = (await ianaIdToRegistrar(parseInt(id)))) === null || _t === void 0 ? void 0 : _t.name))
|
|
150
152
|
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], id);
|
|
151
|
-
const email = ((
|
|
153
|
+
const email = ((_u = [ent, ...(ent.entities || [])]
|
|
152
154
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
153
155
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
154
|
-
.filter(Boolean)) === null ||
|
|
156
|
+
.filter(Boolean)) === null || _u === void 0 ? void 0 : _u[0]) || "";
|
|
155
157
|
const events = ent.events || response.events || ent.enents || response.enents;
|
|
156
158
|
registrars.push({ id, name, email, events });
|
|
157
159
|
}
|
|
158
|
-
if ((((
|
|
160
|
+
if ((((_v = ent.roles) === null || _v === void 0 ? void 0 : _v.includes("reseller")) || ent.role === "reseller") &&
|
|
159
161
|
ent.vcardArray) {
|
|
160
162
|
// vcard objects can be unexpectedly and arbitrarily nested
|
|
161
163
|
const name = findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], "");
|
package/dist/port43.js
CHANGED
|
@@ -102,7 +102,7 @@ export async function port43(actor, _fetch) {
|
|
|
102
102
|
!response.reseller &&
|
|
103
103
|
(m = port43response.match(/^(?:Reseller(?: Name)?|reseller_name|reseller):[ \t]*(\S.+)/im)) &&
|
|
104
104
|
(response.reseller = m[1].trim());
|
|
105
|
-
console.log(port43response)
|
|
105
|
+
// console.log(port43response)
|
|
106
106
|
// Updated Date: 2024-11-21T13:42:54Z
|
|
107
107
|
// Creation Date: 2017-12-16T02:11:08Z
|
|
108
108
|
// Registry Expiry Date: 2031-07-10T02:11:08Z
|
package/dist/port43servers.js
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -124,6 +124,8 @@ export async function whois(
|
|
|
124
124
|
|| pubIds.find((id: any) => id.type === "PANDI Registrar ID")?.identifier
|
|
125
125
|
|| pubIds.find((id: any) => id.type === "IANA Registrar ID")?.Identifier
|
|
126
126
|
|| pubIds.find((id: any) => id.type === "IANA Registrar ID")?.identifier
|
|
127
|
+
|| pubIds.find((id: any) => id.type === "IANA RegistrarID")?.Identifier
|
|
128
|
+
|| pubIds.find((id: any) => id.type === "IANA RegistrarID")?.identifier
|
|
127
129
|
|| pubIds.find((id: any) => id.type === "IANA Registrar ID")
|
|
128
130
|
;
|
|
129
131
|
|
package/src/port43.ts
CHANGED
|
@@ -135,7 +135,7 @@ export async function port43(actor: string, _fetch: typeof fetch): Promise<Whois
|
|
|
135
135
|
)) &&
|
|
136
136
|
(response.reseller = m[1].trim());
|
|
137
137
|
|
|
138
|
-
console.log(port43response)
|
|
138
|
+
// console.log(port43response)
|
|
139
139
|
|
|
140
140
|
// Updated Date: 2024-11-21T13:42:54Z
|
|
141
141
|
// Creation Date: 2017-12-16T02:11:08Z
|