doomain 0.1.18 → 0.1.20

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.
@@ -1,5 +1,47 @@
1
1
  import { listProviderStatuses } from './providers/status.js';
2
2
  export const commandSchemas = [
3
+ {
4
+ name: 'dns point',
5
+ description: 'Point a DNS name at an IP address or canonical hostname.',
6
+ examples: [
7
+ 'doomain dns point app.example.com --target 203.0.113.10 --json',
8
+ 'doomain dns point app.example.com --target origin.example.net --dry-run --json',
9
+ 'doomain dns point example.com --target 203.0.113.10 --provider spaceship --account work --force --json',
10
+ ],
11
+ agentHint: 'Use this for non-Vercel infrastructure such as a VPS or load balancer. Run without --dry-run unless the user explicitly requests a preview; conflicts fail safely unless --force is explicit.',
12
+ agentInstructions: [
13
+ 'When a user asks to point a domain at a VPS or hostname, run `doomain dns point <domain> --target <ip-or-hostname> --json`.',
14
+ 'Pass --force only after the user has approved replacing an existing DNS target.',
15
+ ],
16
+ agentQuickstart: {
17
+ doNotPreflight: true,
18
+ preferredFirstCommand: 'doomain dns point <domain> --target <ip-or-hostname> --json',
19
+ },
20
+ mutates: true,
21
+ safeForAgents: true,
22
+ flags: [
23
+ { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
24
+ { name: 'domain', type: 'string', description: 'Fully qualified apex or subdomain to point.', required: true },
25
+ { name: 'target', type: 'string', description: 'IPv4, IPv6, or hostname target.', required: true },
26
+ { name: 'type', type: 'string', description: 'A, AAAA, or CNAME. Inferred from the target when omitted.' },
27
+ {
28
+ name: 'provider',
29
+ type: 'string',
30
+ description: 'DNS provider id. Inferred from the target domain when omitted.',
31
+ },
32
+ { name: 'account', type: 'string', description: 'DNS provider profile/account alias.' },
33
+ { name: 'ttl', type: 'integer', description: 'DNS record TTL in seconds.', default: 300 },
34
+ { name: 'dry-run', type: 'boolean', description: 'Preview without writing.' },
35
+ { name: 'force', type: 'boolean', description: 'Overwrite conflicting DNS records.' },
36
+ {
37
+ name: 'wait',
38
+ type: 'boolean',
39
+ description: 'Wait for public DNS propagation. Use --no-wait to skip.',
40
+ default: true,
41
+ },
42
+ { name: 'timeout', type: 'integer', description: 'DNS propagation wait timeout in seconds.', default: 300 },
43
+ ],
44
+ },
3
45
  {
4
46
  name: 'link',
5
47
  description: 'Link a Vercel project to a domain and create DNS records.',
@@ -26,8 +68,16 @@ export const commandSchemas = [
26
68
  safeForAgents: true,
27
69
  flags: [
28
70
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
29
- { name: 'provider', type: 'string', description: 'DNS provider id. Inferred from the target domain when omitted.' },
30
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Defaults to the provider default account.' },
71
+ {
72
+ name: 'provider',
73
+ type: 'string',
74
+ description: 'DNS provider id. Inferred from the target domain when omitted.',
75
+ },
76
+ {
77
+ name: 'account',
78
+ type: 'string',
79
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
80
+ },
31
81
  {
32
82
  name: 'domain',
33
83
  type: 'string',
@@ -35,14 +85,27 @@ export const commandSchemas = [
35
85
  },
36
86
  { name: 'subdomain', type: 'string', description: 'Subdomain to add.' },
37
87
  { name: 'apex', type: 'boolean', description: 'Use the root/apex domain.' },
38
- { name: 'project', type: 'string', description: 'Vercel project id/name. Optional when project inference succeeds.' },
39
- { name: 'dry-run', type: 'boolean', description: 'Preview changes without writing. Intended for human previews; agents should not use this unless explicitly asked.' },
88
+ {
89
+ name: 'project',
90
+ type: 'string',
91
+ description: 'Vercel project id/name. Optional when project inference succeeds.',
92
+ },
93
+ {
94
+ name: 'dry-run',
95
+ type: 'boolean',
96
+ description: 'Preview changes without writing. Intended for human previews; agents should not use this unless explicitly asked.',
97
+ },
40
98
  {
41
99
  name: 'force',
42
100
  type: 'boolean',
43
101
  description: 'Move existing Vercel project domains and overwrite conflicting DNS records. Interactive DNS override confirmation does not move Vercel aliases; pass --force for that.',
44
102
  },
45
- { name: 'wait', type: 'boolean', description: 'Wait for DNS and Vercel verification. Use --no-wait to skip waiting.', default: true },
103
+ {
104
+ name: 'wait',
105
+ type: 'boolean',
106
+ description: 'Wait for DNS and Vercel verification. Use --no-wait to skip waiting.',
107
+ default: true,
108
+ },
46
109
  { name: 'timeout', type: 'integer', description: 'Wait timeout in seconds.', default: 300 },
47
110
  ],
48
111
  },
@@ -64,12 +127,33 @@ export const commandSchemas = [
64
127
  safeForAgents: true,
65
128
  flags: [
66
129
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
67
- { name: 'app', type: 'string', description: 'Clerk application id. Defaults to CLERK_APPLICATION_ID or saved Clerk config.' },
68
- { name: 'provider', type: 'string', description: 'DNS provider id. Inferred from the target domain when omitted.' },
69
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Defaults to the provider default account.' },
70
- { name: 'dry-run', type: 'boolean', description: 'Check application eligibility and DNS zone without creating production.' },
130
+ {
131
+ name: 'app',
132
+ type: 'string',
133
+ description: 'Clerk application id. Defaults to CLERK_APPLICATION_ID or saved Clerk config.',
134
+ },
135
+ {
136
+ name: 'provider',
137
+ type: 'string',
138
+ description: 'DNS provider id. Inferred from the target domain when omitted.',
139
+ },
140
+ {
141
+ name: 'account',
142
+ type: 'string',
143
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
144
+ },
145
+ {
146
+ name: 'dry-run',
147
+ type: 'boolean',
148
+ description: 'Check application eligibility and DNS zone without creating production.',
149
+ },
71
150
  { name: 'force', type: 'boolean', description: 'Overwrite DNS records that conflict with Clerk requirements.' },
72
- { name: 'wait', type: 'boolean', description: 'Wait for Clerk DNS, SSL, and email DNS verification. Use --no-wait to skip waiting.', default: true },
151
+ {
152
+ name: 'wait',
153
+ type: 'boolean',
154
+ description: 'Wait for Clerk DNS, SSL, and email DNS verification. Use --no-wait to skip waiting.',
155
+ default: true,
156
+ },
73
157
  { name: 'timeout', type: 'integer', description: 'Wait timeout in seconds.', default: 300 },
74
158
  ],
75
159
  },
@@ -78,18 +162,14 @@ export const commandSchemas = [
78
162
  description: 'Print machine-readable command schemas for agents.',
79
163
  examples: ['doomain schema --json', 'doomain schema link --json'],
80
164
  safeForAgents: true,
81
- flags: [
82
- { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
83
- ],
165
+ flags: [{ name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' }],
84
166
  },
85
167
  {
86
168
  name: 'providers list',
87
169
  description: 'List supported DNS providers.',
88
170
  examples: ['doomain providers list --json'],
89
171
  safeForAgents: true,
90
- flags: [
91
- { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
92
- ],
172
+ flags: [{ name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' }],
93
173
  },
94
174
  {
95
175
  name: 'providers connect',
@@ -104,7 +184,11 @@ export const commandSchemas = [
104
184
  ],
105
185
  flags: [
106
186
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
107
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Defaults to the provider default account.' },
187
+ {
188
+ name: 'account',
189
+ type: 'string',
190
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
191
+ },
108
192
  { name: 'credential', type: 'string', description: 'Provider credential as key=value. Can be repeated.' },
109
193
  { name: 'api-key', type: 'string', description: 'Spaceship API key.' },
110
194
  { name: 'api-secret', type: 'string', description: 'Spaceship API secret.' },
@@ -114,10 +198,18 @@ export const commandSchemas = [
114
198
  {
115
199
  name: 'providers add',
116
200
  description: 'Alias for providers connect.',
117
- examples: ['doomain providers add', 'doomain providers add namecheap', 'doomain providers add spaceship --account work'],
201
+ examples: [
202
+ 'doomain providers add',
203
+ 'doomain providers add namecheap',
204
+ 'doomain providers add spaceship --account work',
205
+ ],
118
206
  flags: [
119
207
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
120
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Defaults to the provider default account.' },
208
+ {
209
+ name: 'account',
210
+ type: 'string',
211
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
212
+ },
121
213
  { name: 'credential', type: 'string', description: 'Provider credential as key=value. Can be repeated.' },
122
214
  { name: 'no-verify', type: 'boolean', description: 'Save credentials without verifying them first.' },
123
215
  ],
@@ -142,7 +234,11 @@ export const commandSchemas = [
142
234
  ],
143
235
  flags: [
144
236
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
145
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Omit to remove all accounts for the provider.' },
237
+ {
238
+ name: 'account',
239
+ type: 'string',
240
+ description: 'DNS provider profile/account alias. Omit to remove all accounts for the provider.',
241
+ },
146
242
  ],
147
243
  },
148
244
  {
@@ -156,7 +252,11 @@ export const commandSchemas = [
156
252
  ],
157
253
  flags: [
158
254
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
159
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Defaults to the provider default account.' },
255
+ {
256
+ name: 'account',
257
+ type: 'string',
258
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
259
+ },
160
260
  ],
161
261
  },
162
262
  {
@@ -173,9 +273,7 @@ export const commandSchemas = [
173
273
  name: 'auth logout clerk',
174
274
  description: 'Remove saved Clerk credentials locally.',
175
275
  examples: ['doomain auth logout clerk --json'],
176
- flags: [
177
- { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
178
- ],
276
+ flags: [{ name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' }],
179
277
  },
180
278
  {
181
279
  name: 'auth vercel',
@@ -184,16 +282,18 @@ export const commandSchemas = [
184
282
  flags: [
185
283
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
186
284
  { name: 'token', type: 'string', description: 'Vercel API token.' },
187
- { name: 'team-id', type: 'string', description: 'Optional Vercel team id. Interactive mode can fetch and select it.' },
285
+ {
286
+ name: 'team-id',
287
+ type: 'string',
288
+ description: 'Optional Vercel team id. Interactive mode can fetch and select it.',
289
+ },
188
290
  ],
189
291
  },
190
292
  {
191
293
  name: 'auth logout vercel',
192
294
  description: 'Remove saved Vercel credentials locally.',
193
295
  examples: ['doomain auth logout vercel --json'],
194
- flags: [
195
- { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
196
- ],
296
+ flags: [{ name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' }],
197
297
  },
198
298
  {
199
299
  name: 'domains find',
@@ -219,8 +319,16 @@ export const commandSchemas = [
219
319
  safeForAgents: true,
220
320
  flags: [
221
321
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
222
- { name: 'provider', type: 'string', description: 'DNS provider id. Defaults to DOOMAIN_PROVIDER, configured default provider, then spaceship.' },
223
- { name: 'account', type: 'string', description: 'DNS provider profile/account alias. Omit to list all configured accounts for the provider.' },
322
+ {
323
+ name: 'provider',
324
+ type: 'string',
325
+ description: 'DNS provider id. Defaults to DOOMAIN_PROVIDER, configured default provider, then spaceship.',
326
+ },
327
+ {
328
+ name: 'account',
329
+ type: 'string',
330
+ description: 'DNS provider profile/account alias. Omit to list all configured accounts for the provider.',
331
+ },
224
332
  { name: 'domain', type: 'string', description: 'Limit output to one DNS zone.' },
225
333
  ],
226
334
  },
@@ -237,15 +345,27 @@ export const commandSchemas = [
237
345
  {
238
346
  name: 'verify',
239
347
  description: 'Ask Vercel to verify a project domain.',
240
- examples: ['doomain verify --domain app.example.com --project my-app --json', 'doomain verify --domain example.com --apex --project my-app --json'],
348
+ examples: [
349
+ 'doomain verify --domain app.example.com --project my-app --json',
350
+ 'doomain verify --domain example.com --apex --project my-app --json',
351
+ ],
241
352
  mutates: true,
242
353
  safeForAgents: true,
243
354
  flags: [
244
355
  { name: 'json', type: 'boolean', description: 'Output a single JSON object and never prompt.' },
245
- { name: 'domain', type: 'string', description: 'Target domain or base zone, for example app.example.com or example.com.', required: true },
356
+ {
357
+ name: 'domain',
358
+ type: 'string',
359
+ description: 'Target domain or base zone, for example app.example.com or example.com.',
360
+ required: true,
361
+ },
246
362
  { name: 'subdomain', type: 'string', description: 'Subdomain to verify.' },
247
363
  { name: 'apex', type: 'boolean', description: 'Use the root/apex domain.' },
248
- { name: 'project', type: 'string', description: 'Vercel project id/name. Optional when local .vercel/project.json is available.' },
364
+ {
365
+ name: 'project',
366
+ type: 'string',
367
+ description: 'Vercel project id/name. Optional when local .vercel/project.json is available.',
368
+ },
249
369
  ],
250
370
  },
251
371
  ];
@@ -266,7 +386,7 @@ async function configuredProviders() {
266
386
  }));
267
387
  }
268
388
  function withProviderConnections(schema, providers) {
269
- if (schema.name !== 'link' && schema.name !== 'clerk domains add')
389
+ if (schema.name !== 'link' && schema.name !== 'clerk domains add' && schema.name !== 'dns point')
270
390
  return schema;
271
391
  return { ...schema, configuredProviders: providers };
272
392
  }
@@ -122,7 +122,9 @@ async function loadConfiguredProviderZones(providerId, accountInput, toleratePro
122
122
  const account = accountInput ? normalizeProviderAccount(accountInput) : undefined;
123
123
  if (providerId) {
124
124
  const definition = getProviderDefinition(providerId);
125
- const accounts = account ? [explicitAccountRef(definition.id, account)] : listConfiguredProviderAccounts(config, definition);
125
+ const accounts = account
126
+ ? [explicitAccountRef(definition.id, account)]
127
+ : listConfiguredProviderAccounts(config, definition);
126
128
  const selectedAccounts = accounts.length > 0 ? accounts : [defaultAccountRef(definition.id)];
127
129
  const tolerateAccountErrors = tolerateProviderAccountErrors && !account && selectedAccounts.length > 1;
128
130
  const results = await Promise.all(selectedAccounts.map((ref) => tolerateAccountErrors ? loadProviderZonesSafely(definition, ref) : loadProviderZones(definition, ref)));
@@ -174,12 +176,17 @@ export async function resolveProviderTarget(input, options = {}) {
174
176
  domain: requested.fullDomain,
175
177
  recovery: 'Retry with --provider <id> --account <alias> only if another configured provider account owns this zone. Otherwise connect the DNS provider account that owns this domain.',
176
178
  searchedZones: zones.searched,
177
- suggestedCommands: [`doomain link ${requested.fullDomain} --provider <id> --account <alias> --json`, 'doomain providers connect'],
179
+ suggestedCommands: [
180
+ `doomain link ${requested.fullDomain} --provider <id> --account <alias> --json`,
181
+ 'doomain providers connect',
182
+ ],
178
183
  });
179
184
  }
180
185
  const bestLength = matches[0].zone.name.length;
181
186
  const bestMatches = matches.filter((candidate) => candidate.zone.name.length === bestLength);
182
- const uniqueBestMatches = bestMatches.filter((candidate, index, candidates) => candidates.findIndex((item) => item.provider === candidate.provider && item.account === candidate.account && item.zone.name === candidate.zone.name) === index);
187
+ const uniqueBestMatches = bestMatches.filter((candidate, index, candidates) => candidates.findIndex((item) => item.provider === candidate.provider &&
188
+ item.account === candidate.account &&
189
+ item.zone.name === candidate.zone.name) === index);
183
190
  if (uniqueBestMatches.length > 1) {
184
191
  throw new DoomainError('PROVIDER_ZONE_AMBIGUOUS', `Multiple DNS provider accounts have a matching DNS zone for ${requested.fullDomain}. Pass --provider and --account to choose one.`, { candidates: candidateDetails(uniqueBestMatches), domain: requested.fullDomain });
185
192
  }
@@ -1,4 +1,4 @@
1
- export type DoomainErrorCode = 'CONFIG_NOT_FOUND' | 'CLERK_AUTH_FAILED' | 'CLERK_PRODUCTION_EXISTS' | 'DNS_TARGET_CONFLICT' | 'DOMAIN_LINK_FAILED' | 'DOMAIN_PROVIDER_DISCOVERY_FAILED' | 'DOMAIN_ALREADY_ASSIGNED' | 'DOMAIN_VERIFY_FAILED' | 'INVALID_INPUT' | 'MISSING_ARGUMENT' | 'MISSING_CREDENTIALS' | 'PROVIDER_API_ERROR' | 'PROVIDER_AUTH_FAILED' | 'PROVIDER_PERMISSION_DENIED' | 'PROVIDER_NOT_FOUND' | 'PROVIDER_RATE_LIMITED' | 'PROVIDER_RECORD_CONFLICT' | 'PROVIDER_UNSUPPORTED_RECORD' | 'PROVIDER_ZONE_AMBIGUOUS' | 'PROVIDER_ZONE_NOT_FOUND' | 'PROJECT_NOT_FOUND' | 'VERCEL_AUTH_FAILED' | 'VERCEL_PROJECT_NOT_LINKED';
1
+ export type DoomainErrorCode = 'CONFIG_NOT_FOUND' | 'CLERK_AUTH_FAILED' | 'CLERK_PRODUCTION_EXISTS' | 'DNS_POINT_FAILED' | 'DNS_TARGET_CONFLICT' | 'DOMAIN_LINK_FAILED' | 'DOMAIN_PROVIDER_DISCOVERY_FAILED' | 'DOMAIN_ALREADY_ASSIGNED' | 'DOMAIN_VERIFY_FAILED' | 'INVALID_INPUT' | 'MISSING_ARGUMENT' | 'MISSING_CREDENTIALS' | 'PROVIDER_API_ERROR' | 'PROVIDER_AUTH_FAILED' | 'PROVIDER_PERMISSION_DENIED' | 'PROVIDER_NOT_FOUND' | 'PROVIDER_RATE_LIMITED' | 'PROVIDER_RECORD_CONFLICT' | 'PROVIDER_UNSUPPORTED_RECORD' | 'PROVIDER_ZONE_AMBIGUOUS' | 'PROVIDER_ZONE_NOT_FOUND' | 'PROJECT_NOT_FOUND' | 'VERCEL_AUTH_FAILED' | 'VERCEL_PROJECT_NOT_LINKED';
2
2
  export declare class DoomainError extends Error {
3
3
  readonly code: DoomainErrorCode;
4
4
  readonly details?: unknown;
package/dist/lib/flags.js CHANGED
@@ -1,8 +1,14 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  export const jsonFlag = Flags.boolean({ description: 'Output a single JSON object and never prompt.' });
3
- export const providerFlag = Flags.string({ description: 'DNS provider id. Inferred from the target domain when omitted.' });
4
- export const accountFlag = Flags.string({ description: 'DNS provider profile/account alias. Defaults to the provider default account.' });
5
- export const domainFlag = Flags.string({ description: 'Target domain or base zone, for example app.example.com or example.com.' });
3
+ export const providerFlag = Flags.string({
4
+ description: 'DNS provider id. Inferred from the target domain when omitted.',
5
+ });
6
+ export const accountFlag = Flags.string({
7
+ description: 'DNS provider profile/account alias. Defaults to the provider default account.',
8
+ });
9
+ export const domainFlag = Flags.string({
10
+ description: 'Target domain or base zone, for example app.example.com or example.com.',
11
+ });
6
12
  export const subdomainFlag = Flags.string({ description: 'Subdomain to add, for example app for app.example.com.' });
7
13
  export const apexFlag = Flags.boolean({ description: 'Use the root/apex domain instead of a subdomain.' });
8
14
  export const projectFlag = Flags.string({
@@ -6,7 +6,7 @@ import { resolveProviderTarget } from './domain-provider.js';
6
6
  import { DoomainError } from './errors.js';
7
7
  import { detectLocalVercelProject } from './local-vercel.js';
8
8
  import { createProvider } from './providers/registry.js';
9
- import { createVercelClient, resolveVercelConfig, VERCEL_APEX_A_RECORD, VERCEL_CNAME_RECORD } from './vercel.js';
9
+ import { createVercelClient, resolveVercelConfig, VERCEL_APEX_A_RECORD, VERCEL_CNAME_RECORD, } from './vercel.js';
10
10
  function cleanDnsValue(value) {
11
11
  return value.toLowerCase().replace(/\.$/, '');
12
12
  }
@@ -146,7 +146,7 @@ function collectVerificationRecords(raw, seen = new Set()) {
146
146
  const object = raw;
147
147
  const verification = object.verification;
148
148
  const records = Array.isArray(verification) ? verification : [];
149
- const nested = Object.entries(object).flatMap(([key, value]) => (key === 'verification' ? [] : collectVerificationRecords(value, seen)));
149
+ const nested = Object.entries(object).flatMap(([key, value]) => key === 'verification' ? [] : collectVerificationRecords(value, seen));
150
150
  return [...records, ...nested];
151
151
  }
152
152
  function uniqueRecords(records) {
@@ -359,7 +359,12 @@ export async function linkDomain(input) {
359
359
  const zone = await resolveZone(provider, plan.zoneDomain);
360
360
  reportProgress(input, 'vercel:get-target', 'Reading Vercel DNS target');
361
361
  const cname = plan.isApex ? undefined : await vercel.getRecommendedCname(plan.domain);
362
- const baseRecord = planBaseRecord({ isApex: plan.isApex, provider: plan.provider, recordName: plan.recordName, cname });
362
+ const baseRecord = planBaseRecord({
363
+ isApex: plan.isApex,
364
+ provider: plan.provider,
365
+ recordName: plan.recordName,
366
+ cname,
367
+ });
363
368
  const forceDns = await resolveDnsForce(input, { baseRecord, plan, provider, zone });
364
369
  reportProgress(input, 'vercel:add-domain', 'Adding domain to Vercel');
365
370
  const addResult = await vercel.addDomainToProject(plan.project, plan.domain, { force: input.force });
@@ -376,7 +381,9 @@ export async function linkDomain(input) {
376
381
  const dnsResult = await provider.applyChanges(zone, dnsPlan, { force: forceDns });
377
382
  const shouldWait = input.wait ?? true;
378
383
  if (shouldWait) {
379
- reportProgress(input, 'dns:wait', verificationDnsRecords.length > 0 ? 'DNS records saved; asking Vercel to verify ownership' : 'DNS records saved; asking Vercel to verify');
384
+ reportProgress(input, 'dns:wait', verificationDnsRecords.length > 0
385
+ ? 'DNS records saved; asking Vercel to verify ownership'
386
+ : 'DNS records saved; asking Vercel to verify');
380
387
  }
381
388
  const waitResult = shouldWait
382
389
  ? await waitForVercelDomainReady({
@@ -0,0 +1,50 @@
1
+ import { type ResolvedDnsTarget } from './domain-provider.js';
2
+ import { type DnsOverrideWarning } from './link-domain.js';
3
+ import type { DnsProvider, DnsRecordInput } from './providers/types.js';
4
+ export type PointRecordType = 'A' | 'AAAA' | 'CNAME';
5
+ export interface PointDomainInput {
6
+ account?: string;
7
+ domain: string;
8
+ dryRun?: boolean;
9
+ force?: boolean;
10
+ provider?: string;
11
+ recordType?: PointRecordType;
12
+ target: string;
13
+ timeoutSeconds?: number;
14
+ ttl?: number;
15
+ wait?: boolean;
16
+ confirmDnsOverride?: (warning: DnsOverrideWarning) => Promise<boolean>;
17
+ progress?: (message: string) => void;
18
+ }
19
+ export interface PointDomainResult {
20
+ account: string;
21
+ accountInferred: boolean;
22
+ domain: string;
23
+ dryRun: boolean;
24
+ isDefaultAccount: boolean;
25
+ provider: string;
26
+ providerInferred: boolean;
27
+ propagated: boolean;
28
+ record: DnsRecordInput;
29
+ skipped: DnsRecordInput[];
30
+ updated: boolean;
31
+ zoneDomain: string;
32
+ }
33
+ interface PointDomainDependencies {
34
+ createProvider: (provider: string, opts: {
35
+ account?: string;
36
+ }) => Promise<DnsProvider>;
37
+ resolve4?: (hostname: string) => Promise<string[]>;
38
+ resolve6?: (hostname: string) => Promise<string[]>;
39
+ resolveCname?: (hostname: string) => Promise<string[]>;
40
+ resolveTarget: (input: Pick<PointDomainInput, 'account' | 'domain' | 'provider'>) => Promise<ResolvedDnsTarget>;
41
+ }
42
+ export declare function createPointRecord(input: {
43
+ provider: string;
44
+ recordName: string;
45
+ recordType?: PointRecordType;
46
+ target: string;
47
+ ttl?: number;
48
+ }): DnsRecordInput;
49
+ export declare function pointDomain(input: PointDomainInput, dependencies?: PointDomainDependencies): Promise<PointDomainResult>;
50
+ export {};