@hasna/domains 0.0.36 → 0.0.37
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/cli/commands/alerts.d.ts.map +1 -1
- package/dist/cli/commands/brandsight.d.ts.map +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/db.d.ts.map +1 -1
- package/dist/cli/commands/dns.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/domain.d.ts.map +1 -1
- package/dist/cli/commands/history.d.ts.map +1 -1
- package/dist/cli/commands/interactive.d.ts +7 -1
- package/dist/cli/commands/interactive.d.ts.map +1 -1
- package/dist/cli/commands/mcp-install.d.ts.map +1 -1
- package/dist/cli/commands/monitor.d.ts.map +1 -1
- package/dist/cli/commands/outreach.d.ts.map +1 -1
- package/dist/cli/commands/owner.d.ts.map +1 -1
- package/dist/cli/commands/provider.d.ts.map +1 -1
- package/dist/cli/commands/providers.d.ts.map +1 -1
- package/dist/cli/commands/provision.d.ts.map +1 -1
- package/dist/cli/commands/reconcile-expiry.d.ts.map +1 -1
- package/dist/cli/commands/research.d.ts.map +1 -1
- package/dist/cli/commands/route53.d.ts.map +1 -1
- package/dist/cli/commands/sedo.d.ts.map +1 -1
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/ssl.d.ts.map +1 -1
- package/dist/cli/commands/wallet.d.ts.map +1 -1
- package/dist/cli/commands/zone.d.ts.map +1 -1
- package/dist/cli/index.js +823 -730
- package/dist/db/dns-tools.d.ts.map +1 -1
- package/dist/index.js +16 -9
- package/dist/lib/stdout.d.ts +54 -0
- package/dist/lib/stdout.d.ts.map +1 -0
- package/dist/mcp/index.js +16 -9
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dns-tools.d.ts","sourceRoot":"","sources":["../../src/db/dns-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OA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B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CA0CjF;AAMD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CA+FvF"}
|
package/dist/index.js
CHANGED
|
@@ -12578,7 +12578,7 @@ var init_bowser = __esm(() => {
|
|
|
12578
12578
|
|
|
12579
12579
|
// node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js
|
|
12580
12580
|
var require_client2 = __commonJS((exports) => {
|
|
12581
|
-
var __dirname = "/home/hasna/.hasna/repos/worktrees/open-domains/
|
|
12581
|
+
var __dirname = "/home/hasna/.hasna/repos/worktrees/open-domains/2a0dcf21-d730-4a74-bfc3-12e59e51ecd5/node_modules/@aws-sdk/core/dist-cjs/submodules/client";
|
|
12582
12582
|
var retry = require_retry();
|
|
12583
12583
|
var protocols = require_protocols();
|
|
12584
12584
|
var lambdaInvokeStore = require_invoke_store();
|
|
@@ -38339,6 +38339,9 @@ function normalizeDnsRecordType(value) {
|
|
|
38339
38339
|
}
|
|
38340
38340
|
return recordType3;
|
|
38341
38341
|
}
|
|
38342
|
+
function getVcardPropertyValue(entry) {
|
|
38343
|
+
return entry.length >= 4 ? entry[3] : entry[2];
|
|
38344
|
+
}
|
|
38342
38345
|
async function rdapLookup(domainName) {
|
|
38343
38346
|
const domain = normalizeDomainName(domainName);
|
|
38344
38347
|
const url = `https://rdap.org/domain/${encodeURIComponent(domain)}`;
|
|
@@ -38387,17 +38390,19 @@ function extractRegistrantFromRdap(rdap) {
|
|
|
38387
38390
|
for (const entry of vcard) {
|
|
38388
38391
|
if (!Array.isArray(entry) || entry.length < 3)
|
|
38389
38392
|
continue;
|
|
38390
|
-
const [prop
|
|
38393
|
+
const [prop] = entry;
|
|
38394
|
+
const value = getVcardPropertyValue(entry);
|
|
38391
38395
|
if (prop === "fn")
|
|
38392
|
-
result.name =
|
|
38396
|
+
result.name = typeof value === "string" ? value : null;
|
|
38393
38397
|
else if (prop === "email")
|
|
38394
|
-
result.email =
|
|
38398
|
+
result.email = typeof value === "string" ? value : null;
|
|
38395
38399
|
else if (prop === "tel")
|
|
38396
|
-
result.phone =
|
|
38400
|
+
result.phone = typeof value === "string" ? value : null;
|
|
38397
38401
|
else if (prop === "org") {
|
|
38398
|
-
|
|
38402
|
+
const organization = Array.isArray(value) ? value[0] : value;
|
|
38403
|
+
result.organization = typeof organization === "string" ? organization : null;
|
|
38399
38404
|
} else if (prop === "n" && !result.name) {
|
|
38400
|
-
const parts = Array.isArray(
|
|
38405
|
+
const parts = Array.isArray(value) ? value.filter((part) => typeof part === "string" && part.length > 0) : typeof value === "string" ? [value] : [];
|
|
38401
38406
|
result.name = parts.reverse().join(" ").trim() || null;
|
|
38402
38407
|
}
|
|
38403
38408
|
}
|
|
@@ -38414,8 +38419,10 @@ function extractRegistrarFromRdap(rdap) {
|
|
|
38414
38419
|
if (entity.vcardArray?.[1]) {
|
|
38415
38420
|
const vcard = entity.vcardArray[1];
|
|
38416
38421
|
for (const entry of vcard) {
|
|
38417
|
-
if (Array.isArray(entry) && entry[0] === "fn")
|
|
38418
|
-
|
|
38422
|
+
if (Array.isArray(entry) && entry[0] === "fn") {
|
|
38423
|
+
const value = getVcardPropertyValue(entry);
|
|
38424
|
+
return typeof value === "string" ? value : null;
|
|
38425
|
+
}
|
|
38419
38426
|
}
|
|
38420
38427
|
}
|
|
38421
38428
|
if (entity.remarks) {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Bytes accepted per attempt. Throws an errno-bearing Error on failure. */
|
|
2
|
+
export interface SyncWriter {
|
|
3
|
+
(chunk: Uint8Array): number;
|
|
4
|
+
}
|
|
5
|
+
export type WriteOutcome = "complete" | "reader-closed";
|
|
6
|
+
/**
|
|
7
|
+
* Write every byte in `bytes`, or stop because the reader closed the pipe.
|
|
8
|
+
*
|
|
9
|
+
* `writer` is injectable so the partial-write, back-pressure and reader-closed
|
|
10
|
+
* paths can be exercised without needing a real full pipe, which is not
|
|
11
|
+
* reproducible on demand in a unit test.
|
|
12
|
+
*/
|
|
13
|
+
export declare function writeAllBytesSync(bytes: Uint8Array, writer: SyncWriter): WriteOutcome;
|
|
14
|
+
export declare function writeAllSync(text: string, writer: SyncWriter): WriteOutcome;
|
|
15
|
+
/** Write `text` to stdout, completing the write before returning. */
|
|
16
|
+
export declare function writeStdout(text: string, writer?: SyncWriter): WriteOutcome;
|
|
17
|
+
/** Write arbitrary bytes to stdout without text encoding or a trailing newline. */
|
|
18
|
+
export declare function writeStdoutBytes(bytes: Uint8Array, writer?: SyncWriter): WriteOutcome;
|
|
19
|
+
/**
|
|
20
|
+
* Render arguments exactly as `console.log` would, plus the trailing newline.
|
|
21
|
+
*
|
|
22
|
+
* Exported so the formatting contract can be asserted directly. 739 call sites
|
|
23
|
+
* were converted mechanically and many of them pass more than one argument or a
|
|
24
|
+
* `%s`/`%d`/`%o` specifier; a replacement that only handled a single string
|
|
25
|
+
* would change their output silently, which would be a worse regression than
|
|
26
|
+
* the truncation being fixed. Testing that through the real fd would measure
|
|
27
|
+
* the writer instead of the formatter, so the seam is here.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatLine(...args: unknown[]): string;
|
|
30
|
+
/**
|
|
31
|
+
* Drop-in replacement for `console.log`, with the write actually completed.
|
|
32
|
+
*
|
|
33
|
+
* Variadic and `util.format`-based so it matches `console.log` argument for
|
|
34
|
+
* argument (`%s`/`%d`/`%o` substitution, space-joined extras, object
|
|
35
|
+
* inspection).
|
|
36
|
+
*/
|
|
37
|
+
export declare function printLine(...args: unknown[]): WriteOutcome;
|
|
38
|
+
/** `console.error` equivalent: completed write to stderr. */
|
|
39
|
+
export declare function printErrorLine(...args: unknown[]): WriteOutcome;
|
|
40
|
+
/**
|
|
41
|
+
* Emit a machine-readable JSON document on stdout.
|
|
42
|
+
*
|
|
43
|
+
* Every `--json` surface is a single write of an unbounded document, so every
|
|
44
|
+
* one of them can exceed a pipe buffer once the portfolio grows. Measured on
|
|
45
|
+
* an 800-row fixture, before this module existed: `domain list --all --json`
|
|
46
|
+
* delivered 65,536 of 822,523 bytes, `domain expiring --json` 65,536 of
|
|
47
|
+
* 784,003, and `domain export --format json` 131,072 of 572,803 — one or two
|
|
48
|
+
* buffers depending on how fast the reader drained, which is why the cut is not
|
|
49
|
+
* a constant anyone can test against.
|
|
50
|
+
*/
|
|
51
|
+
export declare function printJson(value: unknown, writer?: SyncWriter): WriteOutcome;
|
|
52
|
+
/** Single-line JSON, for streams where one record per line is the contract. */
|
|
53
|
+
export declare function printJsonLine(value: unknown, writer?: SyncWriter): WriteOutcome;
|
|
54
|
+
//# sourceMappingURL=stdout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdout.d.ts","sourceRoot":"","sources":["../../src/lib/stdout.ts"],"names":[],"mappings":"AA8EA,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACzB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC;CAC7B;AAgBD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC;AAExD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CA2BrF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAE3E;AAOD,qEAAqE;AACrE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,UAAyB,GAAG,YAAY,CAEzF;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,MAAM,GAAE,UAAyB,GAChC,YAAY,CAEd;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,CAE1D;AAED,6DAA6D;AAC7D,wBAAgB,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,YAAY,CAE/D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,GAAE,UAAyB,GAAG,YAAY,CAEzF;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,GAAE,UAAyB,GAAG,YAAY,CAE7F"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -15752,7 +15752,7 @@ var init_bowser = __esm(() => {
|
|
|
15752
15752
|
|
|
15753
15753
|
// node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js
|
|
15754
15754
|
var require_client2 = __commonJS((exports) => {
|
|
15755
|
-
var __dirname = "/home/hasna/.hasna/repos/worktrees/open-domains/
|
|
15755
|
+
var __dirname = "/home/hasna/.hasna/repos/worktrees/open-domains/2a0dcf21-d730-4a74-bfc3-12e59e51ecd5/node_modules/@aws-sdk/core/dist-cjs/submodules/client";
|
|
15756
15756
|
var retry = require_retry();
|
|
15757
15757
|
var protocols = require_protocols();
|
|
15758
15758
|
var lambdaInvokeStore = require_invoke_store();
|
|
@@ -42534,6 +42534,9 @@ function normalizeDnsRecordType(value) {
|
|
|
42534
42534
|
}
|
|
42535
42535
|
return recordType4;
|
|
42536
42536
|
}
|
|
42537
|
+
function getVcardPropertyValue(entry) {
|
|
42538
|
+
return entry.length >= 4 ? entry[3] : entry[2];
|
|
42539
|
+
}
|
|
42537
42540
|
async function rdapLookup(domainName) {
|
|
42538
42541
|
const domain = normalizeDomainName(domainName);
|
|
42539
42542
|
const url = `https://rdap.org/domain/${encodeURIComponent(domain)}`;
|
|
@@ -42582,17 +42585,19 @@ function extractRegistrantFromRdap(rdap) {
|
|
|
42582
42585
|
for (const entry of vcard) {
|
|
42583
42586
|
if (!Array.isArray(entry) || entry.length < 3)
|
|
42584
42587
|
continue;
|
|
42585
|
-
const [prop
|
|
42588
|
+
const [prop] = entry;
|
|
42589
|
+
const value = getVcardPropertyValue(entry);
|
|
42586
42590
|
if (prop === "fn")
|
|
42587
|
-
result.name =
|
|
42591
|
+
result.name = typeof value === "string" ? value : null;
|
|
42588
42592
|
else if (prop === "email")
|
|
42589
|
-
result.email =
|
|
42593
|
+
result.email = typeof value === "string" ? value : null;
|
|
42590
42594
|
else if (prop === "tel")
|
|
42591
|
-
result.phone =
|
|
42595
|
+
result.phone = typeof value === "string" ? value : null;
|
|
42592
42596
|
else if (prop === "org") {
|
|
42593
|
-
|
|
42597
|
+
const organization = Array.isArray(value) ? value[0] : value;
|
|
42598
|
+
result.organization = typeof organization === "string" ? organization : null;
|
|
42594
42599
|
} else if (prop === "n" && !result.name) {
|
|
42595
|
-
const parts = Array.isArray(
|
|
42600
|
+
const parts = Array.isArray(value) ? value.filter((part) => typeof part === "string" && part.length > 0) : typeof value === "string" ? [value] : [];
|
|
42596
42601
|
result.name = parts.reverse().join(" ").trim() || null;
|
|
42597
42602
|
}
|
|
42598
42603
|
}
|
|
@@ -42609,8 +42614,10 @@ function extractRegistrarFromRdap(rdap) {
|
|
|
42609
42614
|
if (entity.vcardArray?.[1]) {
|
|
42610
42615
|
const vcard = entity.vcardArray[1];
|
|
42611
42616
|
for (const entry of vcard) {
|
|
42612
|
-
if (Array.isArray(entry) && entry[0] === "fn")
|
|
42613
|
-
|
|
42617
|
+
if (Array.isArray(entry) && entry[0] === "fn") {
|
|
42618
|
+
const value = getVcardPropertyValue(entry);
|
|
42619
|
+
return typeof value === "string" ? value : null;
|
|
42620
|
+
}
|
|
42614
42621
|
}
|
|
42615
42622
|
}
|
|
42616
42623
|
if (entity.remarks) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/domains",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"description": "Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP + HTTP API + SDK, local SQLite or cloud Postgres",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|