@cleandns/whois-rdap 1.0.23 → 1.0.25

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 CHANGED
@@ -133,10 +133,10 @@ export async function whois(origDomain, options = { fetch: fetch, thinOnly: fals
133
133
  // registrar
134
134
  const { events, ...registrar } = registrars.sort((a, b) => {
135
135
  var _a, _b;
136
- const aDate = (((_a = a.events.find((ev) => ev.eventAction === "registration")) === null || _a === void 0 ? void 0 : _a.eventDate) || 0)
136
+ const aDate = (((_a = (a.events || []).find((ev) => ev.eventAction === "registration")) === null || _a === void 0 ? void 0 : _a.eventDate) || 0)
137
137
  .toString()
138
138
  .replace(/\+0000Z$/, "Z");
139
- const bDate = (((_b = b.events.find((ev) => ev.eventAction === "registration")) === null || _b === void 0 ? void 0 : _b.eventDate) || 0)
139
+ const bDate = (((_b = (b.events || []).find((ev) => ev.eventAction === "registration")) === null || _b === void 0 ? void 0 : _b.eventDate) || 0)
140
140
  .toString()
141
141
  .replace(/\+0000Z$/, "Z");
142
142
  return new Date(bDate).valueOf() - new Date(aDate).valueOf();
@@ -199,7 +199,7 @@ export const port43servers = {
199
199
  coop: "whois.nic.coop",
200
200
  info: "whois.afilias.net",
201
201
  jobs: "jobswhois.verisign-grs.com",
202
- mobi: "whois.dotmobiregistry.net",
202
+ mobi: "whois.nic.mobi",
203
203
  museum: "whois.museum",
204
204
  name: "whois.nic.name",
205
205
  post: "whois.dotpostregistry.net",
package/dist/test.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import { whois } from "./index.js";
2
- whois(process.argv[2]).then((r) => console.log(JSON.stringify(r, undefined, 2)));
2
+ whois(process.argv[2], { thinOnly: Boolean(process.argv[3]) }).then((r) => console.log(JSON.stringify(r, undefined, 2)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleandns/whois-rdap",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -210,13 +210,13 @@ export async function whois(
210
210
  // registrar
211
211
  const { events, ...registrar } = registrars.sort((a: any, b: any) => {
212
212
  const aDate = (
213
- a.events.find((ev: any) => ev.eventAction === "registration")
213
+ (a.events || []).find((ev: any) => ev.eventAction === "registration")
214
214
  ?.eventDate || 0
215
215
  )
216
216
  .toString()
217
217
  .replace(/\+0000Z$/, "Z");
218
218
  const bDate = (
219
- b.events.find((ev: any) => ev.eventAction === "registration")
219
+ (b.events || []).find((ev: any) => ev.eventAction === "registration")
220
220
  ?.eventDate || 0
221
221
  )
222
222
  .toString()
@@ -248,7 +248,7 @@ export const port43servers: Record<string, any> = {
248
248
  coop: "whois.nic.coop",
249
249
  info: "whois.afilias.net",
250
250
  jobs: "jobswhois.verisign-grs.com",
251
- mobi: "whois.dotmobiregistry.net",
251
+ mobi: "whois.nic.mobi",
252
252
  museum: "whois.museum",
253
253
  name: "whois.nic.name",
254
254
  post: "whois.dotpostregistry.net",
package/src/test.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { whois } from "./index.js";
2
2
 
3
- whois(process.argv[2]).then((r) =>
3
+ whois(process.argv[2], { thinOnly: Boolean(process.argv[3]) }).then((r) =>
4
4
  console.log(JSON.stringify(r, undefined, 2))
5
5
  );