@cleandns/whois-rdap 1.0.49 → 1.0.50
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 +10 -10
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -90,7 +90,7 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
90
90
|
const registrars = [];
|
|
91
91
|
const resellers = [];
|
|
92
92
|
async function extractRegistrarsAndResellers(response, url, isThick) {
|
|
93
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u
|
|
93
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
94
94
|
for (const ent of [
|
|
95
95
|
...(response.entities || []),
|
|
96
96
|
response.entity ? { events: response.events, ...response.entity } : null,
|
|
@@ -136,15 +136,15 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
136
136
|
registrars.push({ id: 0, name: ent.vcardArray[1][1][3], email, events: ent.events || response.events || ent.enents || response.enents });
|
|
137
137
|
}
|
|
138
138
|
// handles .si
|
|
139
|
-
else if (
|
|
140
|
-
const email = ((
|
|
139
|
+
else if (ent.vcardArray && ent.vcardArray[1] && ent.vcardArray[1].find((el) => el[0] === 'fn')) {
|
|
140
|
+
const email = ((_p = [ent, ...(ent.entities || [])]
|
|
141
141
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
142
142
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
143
|
-
.filter(Boolean)) === null ||
|
|
143
|
+
.filter(Boolean)) === null || _p === void 0 ? void 0 : _p[0]) || "";
|
|
144
144
|
if (ent.handle && ent.handle.toString().match(/^\d+$/)) {
|
|
145
145
|
const id = ent.handle;
|
|
146
146
|
const name = (parseInt(id) == id
|
|
147
|
-
&& ((
|
|
147
|
+
&& ((_q = (await ianaIdToRegistrar(parseInt(id)))) === null || _q === void 0 ? void 0 : _q.name))
|
|
148
148
|
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], id);
|
|
149
149
|
registrars.push({ id, name, email, events: ent.events || response.events || ent.enents || response.enents });
|
|
150
150
|
}
|
|
@@ -158,19 +158,19 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
if (domain.endsWith(".is") &&
|
|
161
|
-
(((
|
|
161
|
+
(((_r = ent.roles) === null || _r === void 0 ? void 0 : _r.includes("technical")) || ent.role === "technical")) {
|
|
162
162
|
const id = ent.handle;
|
|
163
163
|
const name = (parseInt(id) == id
|
|
164
|
-
&& ((
|
|
164
|
+
&& ((_s = (await ianaIdToRegistrar(parseInt(id)))) === null || _s === void 0 ? void 0 : _s.name))
|
|
165
165
|
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], id);
|
|
166
|
-
const email = ((
|
|
166
|
+
const email = ((_t = [ent, ...(ent.entities || [])]
|
|
167
167
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
168
168
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
169
|
-
.filter(Boolean)) === null ||
|
|
169
|
+
.filter(Boolean)) === null || _t === void 0 ? void 0 : _t[0]) || "";
|
|
170
170
|
const events = ent.events || response.events || ent.enents || response.enents;
|
|
171
171
|
registrars.push({ id, name, email, events });
|
|
172
172
|
}
|
|
173
|
-
if ((((
|
|
173
|
+
if ((((_u = ent.roles) === null || _u === void 0 ? void 0 : _u.includes("reseller")) || ent.role === "reseller") &&
|
|
174
174
|
ent.vcardArray) {
|
|
175
175
|
// vcard objects can be unexpectedly and arbitrarily nested
|
|
176
176
|
const name = findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], "");
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -191,7 +191,7 @@ export async function whois(
|
|
|
191
191
|
registrars.push({ id: 0, name: ent.vcardArray[1][1][3], email, events: ent.events || response.events || ent.enents || response.enents });
|
|
192
192
|
}
|
|
193
193
|
// handles .si
|
|
194
|
-
else if (ent.vcardArray
|
|
194
|
+
else if (ent.vcardArray && ent.vcardArray[1] && ent.vcardArray[1].find((el: string[]) => el[0] === 'fn')) {
|
|
195
195
|
const email =
|
|
196
196
|
[ent, ...(ent.entities || [])]
|
|
197
197
|
.filter((e) => e?.vcardArray)
|