doomain 0.1.13 → 0.1.14

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/README.md CHANGED
@@ -13,6 +13,7 @@ Use the interactive wizard when working by hand. Use explicit commands with `--j
13
13
  - Vercel project detection from `.vercel/project.json`.
14
14
  - DNS provider inference by longest matching configured zone.
15
15
  - Dry-run plans before writing changes.
16
+ - Safety checks before replacing DNS records that point elsewhere.
16
17
  - DNS propagation and Vercel verification wait loop.
17
18
  - DNS provider support for Spaceship, Namecheap, Cloudflare, and Hostinger.
18
19
 
@@ -40,7 +41,8 @@ The wizard will:
40
41
  4. Connect a DNS provider if none is configured.
41
42
  5. List domains from configured DNS providers.
42
43
  6. Preview the Vercel and DNS changes.
43
- 7. Apply the changes and request Vercel verification.
44
+ 7. Warn if the current DNS target points elsewhere and ask before overriding it.
45
+ 8. Apply the changes and request Vercel verification.
44
46
 
45
47
  If you already know the target project and domain, run the link command directly:
46
48
 
@@ -84,6 +86,8 @@ Apply it:
84
86
  doomain link app.example.com --project my-vercel-project --json
85
87
  ```
86
88
 
89
+ If JSON mode returns `DNS_TARGET_CONFLICT`, the current DNS target appears to point to another project or site. Re-run with `--force` only when you intend to replace that DNS target.
90
+
87
91
  ## Provider Setup
88
92
 
89
93
  Doomain stores local credentials in `~/.doomain/config.json` with `0600` file permissions. Environment variables override saved config values.
@@ -257,8 +261,10 @@ DNS conflict rules:
257
261
 
258
262
  - Existing exact records are skipped.
259
263
  - TXT records can coexist at the same name.
260
- - Same-name, same-type conflicts require `--force`.
261
- - CNAME slot conflicts require `--force` because a CNAME cannot share a name with most other record types.
264
+ - Same-name, same-type conflicts trigger an interactive override prompt or require `--force` in JSON/non-interactive mode.
265
+ - CNAME slot conflicts trigger an interactive override prompt or require `--force` in JSON/non-interactive mode because a CNAME cannot share a name with most other record types.
266
+
267
+ For real links, Doomain inspects the target `A` or `CNAME` DNS slot before adding the domain to Vercel. In interactive mode, it shows the existing and desired records and asks whether to override. In JSON mode, it fails with `DNS_TARGET_CONFLICT` instead of prompting.
262
268
 
263
269
  Use `--force` only when you intend to replace conflicting DNS records or move an existing Vercel alias:
264
270
 
@@ -268,6 +274,8 @@ doomain link app.example.com --project my-app --force
268
274
 
269
275
  `--force` can remove an existing Vercel alias from another project and add it to the target project.
270
276
 
277
+ Confirming the interactive DNS override only forces DNS writes. If Vercel says the domain is already assigned to another project, re-run with `--force` to move that Vercel alias.
278
+
271
279
  Namecheap note: Namecheap's API writes DNS through `setHosts`, which replaces the full host list. Doomain reads all existing records first, applies planned changes in memory, preserves unrelated records, then submits the complete final record set.
272
280
 
273
281
  ## JSON And Agent Usage
@@ -333,7 +341,7 @@ Common flags:
333
341
  - `-p, --project <project>`: Vercel project id or name.
334
342
  - `--provider <id>`: DNS provider id.
335
343
  - `--dry-run`: preview without writing.
336
- - `--force`: overwrite DNS conflicts and allow Vercel alias moves.
344
+ - `--force`: overwrite DNS conflicts without prompting and allow Vercel alias moves.
337
345
  - `--wait`, `--no-wait`: wait for DNS and Vercel verification. Default is `--wait`.
338
346
  - `--timeout <seconds>`: wait timeout. Default is `300`.
339
347
  - `--json`: output one JSON object.
@@ -345,6 +353,7 @@ doomain link app.example.com --project my-app
345
353
  doomain link --domain example.com --subdomain app --project my-app
346
354
  doomain link --domain example.com --apex --project my-app
347
355
  doomain link app.example.com --project my-app --dry-run --json
356
+ doomain link app.example.com --project my-app --force
348
357
  ```
349
358
 
350
359
  ### `doomain auth vercel`
@@ -567,6 +576,10 @@ DNS propagation timeout
567
576
 
568
577
  The DNS records may have been saved even if Vercel verification timed out. Check the domain in Vercel, inspect records with `doomain domains list`, or re-run verification with `doomain verify`.
569
578
 
579
+ DNS target conflict
580
+
581
+ The domain already has a conflicting `A` or `CNAME` record, which usually means it points to another project or site. In interactive mode, confirm the override only if you intend to replace that target. In JSON mode, re-run `doomain link` with `--force` to overwrite DNS.
582
+
570
583
  Domain already assigned to another Vercel project
571
584
 
572
585
  If you intend to move it, re-run `doomain link` with `--force`. This can remove the alias from the previous Vercel project.
@@ -316,41 +316,6 @@
316
316
  "list.js"
317
317
  ]
318
318
  },
319
- "projects:list": {
320
- "aliases": [],
321
- "args": {},
322
- "description": "List Vercel projects.",
323
- "flags": {
324
- "json": {
325
- "description": "Output a single JSON object and never prompt.",
326
- "name": "json",
327
- "allowNo": false,
328
- "type": "boolean"
329
- },
330
- "search": {
331
- "description": "Filter projects by search term.",
332
- "name": "search",
333
- "hasDynamicHelp": false,
334
- "multiple": false,
335
- "type": "option"
336
- }
337
- },
338
- "hasDynamicHelp": false,
339
- "hiddenAliases": [],
340
- "id": "projects:list",
341
- "pluginAlias": "doomain",
342
- "pluginName": "doomain",
343
- "pluginType": "core",
344
- "strict": true,
345
- "enableJsonFlag": false,
346
- "isESM": true,
347
- "relativePath": [
348
- "dist",
349
- "commands",
350
- "projects",
351
- "list.js"
352
- ]
353
- },
354
319
  "providers:add": {
355
320
  "aliases": [],
356
321
  "args": {
@@ -639,6 +604,41 @@
639
604
  "verify.js"
640
605
  ]
641
606
  },
607
+ "projects:list": {
608
+ "aliases": [],
609
+ "args": {},
610
+ "description": "List Vercel projects.",
611
+ "flags": {
612
+ "json": {
613
+ "description": "Output a single JSON object and never prompt.",
614
+ "name": "json",
615
+ "allowNo": false,
616
+ "type": "boolean"
617
+ },
618
+ "search": {
619
+ "description": "Filter projects by search term.",
620
+ "name": "search",
621
+ "hasDynamicHelp": false,
622
+ "multiple": false,
623
+ "type": "option"
624
+ }
625
+ },
626
+ "hasDynamicHelp": false,
627
+ "hiddenAliases": [],
628
+ "id": "projects:list",
629
+ "pluginAlias": "doomain",
630
+ "pluginName": "doomain",
631
+ "pluginType": "core",
632
+ "strict": true,
633
+ "enableJsonFlag": false,
634
+ "isESM": true,
635
+ "relativePath": [
636
+ "dist",
637
+ "commands",
638
+ "projects",
639
+ "list.js"
640
+ ]
641
+ },
642
642
  "auth:logout:vercel": {
643
643
  "aliases": [],
644
644
  "args": {},
@@ -673,5 +673,5 @@
673
673
  ]
674
674
  }
675
675
  },
676
- "version": "0.1.13"
676
+ "version": "0.1.14"
677
677
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "doomain",
3
3
  "description": "Link your vercel project and domain in seconds",
4
- "version": "0.1.13",
4
+ "version": "0.1.14",
5
5
  "author": "Crafter Station",
6
6
  "packageManager": "bun@1.3.13",
7
7
  "bin": {