@cleandns/whois-rdap 1.0.16 → 1.0.18
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 +7 -6
- package/package.json +2 -1
- package/src/index.ts +7 -6
package/dist/index.js
CHANGED
|
@@ -88,10 +88,11 @@ export async function whois(origDomain, options = { fetch: fetch }) {
|
|
|
88
88
|
((_d = pubIds.find((id) => id.type === "IANA Registrar ID")) === null || _d === void 0 ? void 0 : _d.Identifier) ||
|
|
89
89
|
((_e = pubIds.find((id) => id.type === "IANA Registrar ID")) === null || _e === void 0 ? void 0 : _e.identifier);
|
|
90
90
|
if (reg) {
|
|
91
|
+
// console.log(ent.vcardArray);
|
|
91
92
|
const id = reg;
|
|
92
|
-
const name = parseInt(id) == id
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
const name = (parseInt(id) == id
|
|
94
|
+
&& ((_f = (await ianaIdToRegistrar(parseInt(id)))) === null || _f === void 0 ? void 0 : _f.name))
|
|
95
|
+
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], reg);
|
|
95
96
|
const email = ((_g = [ent, ...(ent.entities || [])]
|
|
96
97
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
97
98
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
|
@@ -103,9 +104,9 @@ export async function whois(origDomain, options = { fetch: fetch }) {
|
|
|
103
104
|
if (domain.endsWith(".is") &&
|
|
104
105
|
(((_h = ent.roles) === null || _h === void 0 ? void 0 : _h.includes("technical")) || ent.role === "technical")) {
|
|
105
106
|
const id = ent.handle;
|
|
106
|
-
const name = parseInt(id) == id
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
const name = (parseInt(id) == id
|
|
108
|
+
&& ((_j = (await ianaIdToRegistrar(parseInt(id)))) === null || _j === void 0 ? void 0 : _j.name))
|
|
109
|
+
|| findInObject(ent.vcardArray, (el) => Array.isArray(el) && (el[0] === "fn" || el[0] === "org"), (el) => el[3], id);
|
|
109
110
|
const email = ((_k = [ent, ...(ent.entities || [])]
|
|
110
111
|
.filter((e) => e === null || e === void 0 ? void 0 : e.vcardArray)
|
|
111
112
|
.map((e) => findInObject(e.vcardArray, (el) => Array.isArray(el) && el[0] === "email", (el) => el[3], ""))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleandns/whois-rdap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/cleandns-inc/tool-whois#readme",
|
|
21
21
|
"devDependencies": {
|
|
22
|
+
"@types/node": "^22.0.2",
|
|
22
23
|
"typescript": "^5.4.3"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
package/src/index.ts
CHANGED
|
@@ -117,11 +117,12 @@ export async function whois(
|
|
|
117
117
|
pubIds.find((id: any) => id.type === "IANA Registrar ID")?.identifier;
|
|
118
118
|
|
|
119
119
|
if (reg) {
|
|
120
|
+
// console.log(ent.vcardArray);
|
|
120
121
|
const id = reg;
|
|
121
122
|
const name =
|
|
122
|
-
parseInt(id) == id
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
(parseInt(id) == id
|
|
124
|
+
&& (await ianaIdToRegistrar(parseInt(id)))?.name)
|
|
125
|
+
|| findInObject(
|
|
125
126
|
ent.vcardArray,
|
|
126
127
|
(el: any) =>
|
|
127
128
|
Array.isArray(el) && (el[0] === "fn" || el[0] === "org"),
|
|
@@ -153,9 +154,9 @@ export async function whois(
|
|
|
153
154
|
) {
|
|
154
155
|
const id = ent.handle;
|
|
155
156
|
const name =
|
|
156
|
-
parseInt(id) == id
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
(parseInt(id) == id
|
|
158
|
+
&& (await ianaIdToRegistrar(parseInt(id)))?.name)
|
|
159
|
+
|| findInObject(
|
|
159
160
|
ent.vcardArray,
|
|
160
161
|
(el: any) =>
|
|
161
162
|
Array.isArray(el) && (el[0] === "fn" || el[0] === "org"),
|