vercel-cli 48.2.2__py3-none-any.whl → 48.2.9__py3-none-any.whl

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.

Potentially problematic release.


This version of vercel-cli might be problematic. Click here for more details.

@@ -2383,7 +2383,7 @@ var require_ensure = __commonJS2({
2383
2383
  // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
2384
2384
  var require_utils2 = __commonJS2({
2385
2385
  "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports2, module2) {
2386
- function stringify3(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
2386
+ function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
2387
2387
  const EOF = finalEOL ? EOL : "";
2388
2388
  const str = JSON.stringify(obj, replacer, spaces);
2389
2389
  return str.replace(/\n/g, EOL) + EOF;
@@ -2393,7 +2393,7 @@ var require_utils2 = __commonJS2({
2393
2393
  content = content.toString("utf8");
2394
2394
  return content.replace(/^\uFEFF/, "");
2395
2395
  }
2396
- module2.exports = { stringify: stringify3, stripBom };
2396
+ module2.exports = { stringify: stringify2, stripBom };
2397
2397
  }
2398
2398
  });
2399
2399
 
@@ -2407,7 +2407,7 @@ var require_jsonfile = __commonJS2({
2407
2407
  _fs = require("fs");
2408
2408
  }
2409
2409
  var universalify = require_universalify();
2410
- var { stringify: stringify3, stripBom } = require_utils2();
2410
+ var { stringify: stringify2, stripBom } = require_utils2();
2411
2411
  async function _readFile(file, options = {}) {
2412
2412
  if (typeof options === "string") {
2413
2413
  options = { encoding: options };
@@ -2451,13 +2451,13 @@ var require_jsonfile = __commonJS2({
2451
2451
  }
2452
2452
  async function _writeFile(file, obj, options = {}) {
2453
2453
  const fs15 = options.fs || _fs;
2454
- const str = stringify3(obj, options);
2454
+ const str = stringify2(obj, options);
2455
2455
  await universalify.fromCallback(fs15.writeFile)(file, str, options);
2456
2456
  }
2457
2457
  var writeFile4 = universalify.fromPromise(_writeFile);
2458
2458
  function writeFileSync(file, obj, options = {}) {
2459
2459
  const fs15 = options.fs || _fs;
2460
- const str = stringify3(obj, options);
2460
+ const str = stringify2(obj, options);
2461
2461
  return fs15.writeFileSync(file, str, options);
2462
2462
  }
2463
2463
  var jsonfile = {
@@ -2531,10 +2531,10 @@ var require_output = __commonJS2({
2531
2531
  var require_output_json = __commonJS2({
2532
2532
  "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
2533
2533
  "use strict";
2534
- var { stringify: stringify3 } = require_utils2();
2534
+ var { stringify: stringify2 } = require_utils2();
2535
2535
  var { outputFile: outputFile2 } = require_output();
2536
2536
  async function outputJson2(file, data, options = {}) {
2537
- const str = stringify3(data, options);
2537
+ const str = stringify2(data, options);
2538
2538
  await outputFile2(file, str, options);
2539
2539
  }
2540
2540
  module2.exports = outputJson2;
@@ -2545,10 +2545,10 @@ var require_output_json = __commonJS2({
2545
2545
  var require_output_json_sync = __commonJS2({
2546
2546
  "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
2547
2547
  "use strict";
2548
- var { stringify: stringify3 } = require_utils2();
2548
+ var { stringify: stringify2 } = require_utils2();
2549
2549
  var { outputFileSync } = require_output();
2550
2550
  function outputJsonSync(file, data, options) {
2551
- const str = stringify3(data, options);
2551
+ const str = stringify2(data, options);
2552
2552
  outputFileSync(file, str, options);
2553
2553
  }
2554
2554
  module2.exports = outputJsonSync;
@@ -31623,16 +31623,14 @@ var init_command3 = __esm({
31623
31623
  {
31624
31624
  ...yesOption,
31625
31625
  description: "Skip the confirmation prompt about pulling environment variables and project settings when not found locally"
31626
+ },
31627
+ {
31628
+ name: "standalone",
31629
+ description: "Create a standalone build with all dependencies inlined into function output folders",
31630
+ shorthand: null,
31631
+ type: Boolean,
31632
+ deprecated: false
31626
31633
  }
31627
- // FIXME: standalone:replace env var with flag
31628
- // {
31629
- // name: 'experimentalStandalone',
31630
- // description:
31631
- // 'Create a standalone build with all dependencies inlined into function output folders',
31632
- // shorthand: null,
31633
- // type: Boolean,
31634
- // deprecated: false,
31635
- // },
31636
31634
  ],
31637
31635
  examples: [
31638
31636
  {
@@ -35097,7 +35095,7 @@ var init_code = __esm({
35097
35095
  function isAPIError(v) {
35098
35096
  return (0, import_error_utils2.isError)(v) && "status" in v;
35099
35097
  }
35100
- var import_bytes, import_build_utils, import_chalk8, import_error_utils2, APIError, TeamDeleted, InvalidToken, MissingUser, DomainAlreadyExists, DomainPermissionDenied, DomainExternal, SourceNotFound, InvalidTransferAuthCode, DomainRegistrationFailed, DomainNotFound, DomainNotVerified, DomainVerificationFailed, InvalidDomain, NotDomainOwner, InvalidDeploymentId, UnsupportedTLD, DomainNotAvailable, DomainServiceNotAvailable, DomainNotTransferable, UnexpectedDomainPurchaseError, DomainPaymentError, DomainPurchasePending, UserAborted, CertNotFound, CertsPermissionDenied, CertOrderNotFound, TooManyRequests, CertError, CertConfigurationError, DeploymentNotFound, DeploymentNotReady, DeploymentFailedAliasImpossible, DeploymentPermissionDenied, InvalidAlias, AliasInUse, CertMissing, CantParseJSONFile, ConflictingConfigFiles, CantFindConfig, WorkingDirectoryDoesNotExist, NoAliasInConfig, InvalidAliasInConfig, DNSPermissionDenied, DNSInvalidPort, DNSInvalidType, DNSConflictingRecord, DomainRemovalConflict, DomainMoveConflict, InvalidMoveDestination, LambdaSizeExceededError, MissingDotenvVarsError, DeploymentsRateLimited, BuildsRateLimited, ProjectNotFound, AliasDomainConfigured, MissingBuildScript, ConflictingFilePath, ConflictingPathSegment, BuildError, SchemaValidationFailed, InvalidLocalConfig;
35098
+ var import_bytes, import_build_utils, import_chalk8, import_error_utils2, APIError, TeamDeleted, InvalidToken, MissingUser, DomainAlreadyExists, DomainPermissionDenied, DomainExternal, SourceNotFound, DomainNotFound, DomainNotVerified, DomainVerificationFailed, InvalidDomain, NotDomainOwner, InvalidDeploymentId, UnsupportedTLD, TLDNotSupportedViaCLI, DomainNotAvailable, UnexpectedDomainPurchaseError, UnexpectedDomainTransferError, DomainPaymentError, DomainPurchasePending, UserAborted, CertNotFound, CertsPermissionDenied, CertOrderNotFound, TooManyRequests, CertError, CertConfigurationError, DeploymentNotFound, DeploymentNotReady, DeploymentFailedAliasImpossible, DeploymentPermissionDenied, InvalidAlias, AliasInUse, CertMissing, CantParseJSONFile, ConflictingConfigFiles, CantFindConfig, WorkingDirectoryDoesNotExist, NoAliasInConfig, InvalidAliasInConfig, DNSPermissionDenied, DNSInvalidPort, DNSInvalidType, DNSConflictingRecord, DomainRemovalConflict, DomainMoveConflict, InvalidMoveDestination, LambdaSizeExceededError, MissingDotenvVarsError, DeploymentsRateLimited, BuildsRateLimited, ProjectNotFound, AliasDomainConfigured, MissingBuildScript, ConflictingFilePath, ConflictingPathSegment, BuildError, SchemaValidationFailed, InvalidLocalConfig;
35101
35099
  var init_errors_ts = __esm({
35102
35100
  "src/util/errors-ts.ts"() {
35103
35101
  "use strict";
@@ -35197,24 +35195,6 @@ var init_errors_ts = __esm({
35197
35195
  });
35198
35196
  }
35199
35197
  };
35200
- InvalidTransferAuthCode = class extends NowError {
35201
- constructor(domain, authCode) {
35202
- super({
35203
- code: "INVALID_TRANSFER_AUTH_CODE",
35204
- meta: { domain, authCode },
35205
- message: `The provided auth code does not match with the one expected by the current registar`
35206
- });
35207
- }
35208
- };
35209
- DomainRegistrationFailed = class extends NowError {
35210
- constructor(domain, message2) {
35211
- super({
35212
- code: "DOMAIN_REGISTRATION_FAILED",
35213
- meta: { domain },
35214
- message: message2
35215
- });
35216
- }
35217
- };
35218
35198
  DomainNotFound = class extends NowError {
35219
35199
  constructor(domain, contextName) {
35220
35200
  super({
@@ -35283,39 +35263,39 @@ var init_errors_ts = __esm({
35283
35263
  });
35284
35264
  }
35285
35265
  };
35286
- DomainNotAvailable = class extends NowError {
35266
+ TLDNotSupportedViaCLI = class extends NowError {
35287
35267
  constructor(domain) {
35288
35268
  super({
35289
- code: "DOMAIN_NOT_AVAILABLE",
35269
+ code: "UNSUPPORTED_TLD_VIA_CLI",
35290
35270
  meta: { domain },
35291
- message: `The domain ${domain} is not available to be purchased.`
35271
+ message: `Purchased for the TLD for domain name ${domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`
35292
35272
  });
35293
35273
  }
35294
35274
  };
35295
- DomainServiceNotAvailable = class extends NowError {
35275
+ DomainNotAvailable = class extends NowError {
35296
35276
  constructor(domain) {
35297
35277
  super({
35298
- code: "DOMAIN_SERVICE_NOT_AVAILABLE",
35278
+ code: "DOMAIN_NOT_AVAILABLE",
35299
35279
  meta: { domain },
35300
- message: `The domain purchase is unavailable, try again later.`
35280
+ message: `The domain ${domain} is not available to be purchased.`
35301
35281
  });
35302
35282
  }
35303
35283
  };
35304
- DomainNotTransferable = class extends NowError {
35284
+ UnexpectedDomainPurchaseError = class extends NowError {
35305
35285
  constructor(domain) {
35306
35286
  super({
35307
- code: "DOMAIN_NOT_TRANSFERABLE",
35287
+ code: "UNEXPECTED_DOMAIN_PURCHASE_ERROR",
35308
35288
  meta: { domain },
35309
- message: `The domain ${domain} is not available to be transferred.`
35289
+ message: `An unexpected error happened while purchasing.`
35310
35290
  });
35311
35291
  }
35312
35292
  };
35313
- UnexpectedDomainPurchaseError = class extends NowError {
35293
+ UnexpectedDomainTransferError = class extends NowError {
35314
35294
  constructor(domain) {
35315
35295
  super({
35316
- code: "UNEXPECTED_DOMAIN_PURCHASE_ERROR",
35296
+ code: "UNEXPECTED_DOMAIN_TRANSFER_ERROR",
35317
35297
  meta: { domain },
35318
- message: `An unexpected error happened while purchasing.`
35298
+ message: `An unexpected error happened while transferring.`
35319
35299
  });
35320
35300
  }
35321
35301
  };
@@ -48407,7 +48387,7 @@ var require_jsonfile3 = __commonJS2({
48407
48387
  }
48408
48388
  }
48409
48389
  }
48410
- function stringify3(obj, options) {
48390
+ function stringify2(obj, options) {
48411
48391
  var spaces;
48412
48392
  var EOL = "\n";
48413
48393
  if (typeof options === "object" && options !== null) {
@@ -48430,7 +48410,7 @@ var require_jsonfile3 = __commonJS2({
48430
48410
  var fs15 = options.fs || _fs;
48431
48411
  var str = "";
48432
48412
  try {
48433
- str = stringify3(obj, options);
48413
+ str = stringify2(obj, options);
48434
48414
  } catch (err) {
48435
48415
  if (callback)
48436
48416
  callback(err, null);
@@ -48441,7 +48421,7 @@ var require_jsonfile3 = __commonJS2({
48441
48421
  function writeFileSync(file, obj, options) {
48442
48422
  options = options || {};
48443
48423
  var fs15 = options.fs || _fs;
48444
- var str = stringify3(obj, options);
48424
+ var str = stringify2(obj, options);
48445
48425
  return fs15.writeFileSync(file, str, options);
48446
48426
  }
48447
48427
  function stripBom(content) {
@@ -49570,7 +49550,7 @@ var require_package = __commonJS2({
49570
49550
  "../client/package.json"(exports2, module2) {
49571
49551
  module2.exports = {
49572
49552
  name: "@vercel/client",
49573
- version: "17.0.1",
49553
+ version: "17.0.3",
49574
49554
  main: "dist/index.js",
49575
49555
  typings: "dist/index.d.ts",
49576
49556
  homepage: "https://vercel.com",
@@ -49609,7 +49589,7 @@ var require_package = __commonJS2({
49609
49589
  vitest: "2.0.1"
49610
49590
  },
49611
49591
  dependencies: {
49612
- "@vercel/build-utils": "12.1.0",
49592
+ "@vercel/build-utils": "12.1.2",
49613
49593
  "@vercel/error-utils": "2.0.3",
49614
49594
  "@vercel/microfrontends": "1.2.2",
49615
49595
  "@vercel/routing-utils": "5.2.0",
@@ -52576,7 +52556,7 @@ var require_stringify = __commonJS2({
52576
52556
  "use strict";
52577
52557
  var utils = require_utils9();
52578
52558
  module2.exports = (ast, options = {}) => {
52579
- const stringify3 = (node, parent = {}) => {
52559
+ const stringify2 = (node, parent = {}) => {
52580
52560
  const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
52581
52561
  const invalidNode = node.invalid === true && options.escapeInvalid === true;
52582
52562
  let output2 = "";
@@ -52591,12 +52571,12 @@ var require_stringify = __commonJS2({
52591
52571
  }
52592
52572
  if (node.nodes) {
52593
52573
  for (const child of node.nodes) {
52594
- output2 += stringify3(child);
52574
+ output2 += stringify2(child);
52595
52575
  }
52596
52576
  }
52597
52577
  return output2;
52598
52578
  };
52599
- return stringify3(ast);
52579
+ return stringify2(ast);
52600
52580
  };
52601
52581
  }
52602
52582
  });
@@ -52854,7 +52834,7 @@ var require_fill_range = __commonJS2({
52854
52834
  ;
52855
52835
  return index > 0;
52856
52836
  };
52857
- var stringify3 = (start, end, options) => {
52837
+ var stringify2 = (start, end, options) => {
52858
52838
  if (typeof start === "string" || typeof end === "string") {
52859
52839
  return true;
52860
52840
  }
@@ -52956,7 +52936,7 @@ var require_fill_range = __commonJS2({
52956
52936
  step = Math.max(Math.abs(step), 1);
52957
52937
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
52958
52938
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
52959
- let toNumber = padded === false && stringify3(start, end, options) === false;
52939
+ let toNumber = padded === false && stringify2(start, end, options) === false;
52960
52940
  let format7 = options.transform || transform(toNumber);
52961
52941
  if (options.toRegex && step === 1) {
52962
52942
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
@@ -53092,7 +53072,7 @@ var require_expand = __commonJS2({
53092
53072
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"(exports2, module2) {
53093
53073
  "use strict";
53094
53074
  var fill = require_fill_range();
53095
- var stringify3 = require_stringify();
53075
+ var stringify2 = require_stringify();
53096
53076
  var utils = require_utils9();
53097
53077
  var append = (queue = "", stash = "", enclose = false) => {
53098
53078
  const result = [];
@@ -53129,7 +53109,7 @@ var require_expand = __commonJS2({
53129
53109
  q = p.queue;
53130
53110
  }
53131
53111
  if (node.invalid || node.dollar) {
53132
- q.push(append(q.pop(), stringify3(node, options)));
53112
+ q.push(append(q.pop(), stringify2(node, options)));
53133
53113
  return;
53134
53114
  }
53135
53115
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
@@ -53143,7 +53123,7 @@ var require_expand = __commonJS2({
53143
53123
  }
53144
53124
  let range = fill(...args2, options);
53145
53125
  if (range.length === 0) {
53146
- range = stringify3(node, options);
53126
+ range = stringify2(node, options);
53147
53127
  }
53148
53128
  q.push(append(q.pop(), range));
53149
53129
  node.nodes = [];
@@ -53289,7 +53269,7 @@ var require_constants3 = __commonJS2({
53289
53269
  var require_parse2 = __commonJS2({
53290
53270
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"(exports2, module2) {
53291
53271
  "use strict";
53292
- var stringify3 = require_stringify();
53272
+ var stringify2 = require_stringify();
53293
53273
  var {
53294
53274
  MAX_LENGTH,
53295
53275
  CHAR_BACKSLASH,
@@ -53462,7 +53442,7 @@ var require_parse2 = __commonJS2({
53462
53442
  if (block.ranges > 0) {
53463
53443
  block.ranges = 0;
53464
53444
  const open7 = block.nodes.shift();
53465
- block.nodes = [open7, { type: "text", value: stringify3(block) }];
53445
+ block.nodes = [open7, { type: "text", value: stringify2(block) }];
53466
53446
  }
53467
53447
  push({ type: "comma", value });
53468
53448
  block.commas++;
@@ -53531,7 +53511,7 @@ var require_parse2 = __commonJS2({
53531
53511
  var require_braces = __commonJS2({
53532
53512
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"(exports2, module2) {
53533
53513
  "use strict";
53534
- var stringify3 = require_stringify();
53514
+ var stringify2 = require_stringify();
53535
53515
  var compile = require_compile();
53536
53516
  var expand = require_expand();
53537
53517
  var parse11 = require_parse2();
@@ -53557,9 +53537,9 @@ var require_braces = __commonJS2({
53557
53537
  braces.parse = (input, options = {}) => parse11(input, options);
53558
53538
  braces.stringify = (input, options = {}) => {
53559
53539
  if (typeof input === "string") {
53560
- return stringify3(braces.parse(input, options), options);
53540
+ return stringify2(braces.parse(input, options), options);
53561
53541
  }
53562
- return stringify3(input, options);
53542
+ return stringify2(input, options);
53563
53543
  };
53564
53544
  braces.compile = (input, options = {}) => {
53565
53545
  if (typeof input === "string") {
@@ -98644,13 +98624,12 @@ var require_pluralize = __commonJS2({
98644
98624
  });
98645
98625
 
98646
98626
  // src/util/domains/get-domain-price.ts
98647
- async function getDomainPrice(client2, name, type) {
98627
+ async function getDomainPrice(client2, name) {
98648
98628
  try {
98649
- const querystr = type ? (0, import_querystring.stringify)({ name, type }) : (0, import_querystring.stringify)({ name });
98650
- return await client2.fetch(`/v3/domains/price?${querystr}`);
98629
+ return await client2.fetch(`/v1/registrar/domains/${name}/price`);
98651
98630
  } catch (err) {
98652
98631
  if (isAPIError(err)) {
98653
- if (err.code === "unsupported_tld") {
98632
+ if (err.code === "tld_not_supported") {
98654
98633
  return new UnsupportedTLD(name);
98655
98634
  }
98656
98635
  if (err.status < 500) {
@@ -98660,11 +98639,9 @@ async function getDomainPrice(client2, name, type) {
98660
98639
  throw err;
98661
98640
  }
98662
98641
  }
98663
- var import_querystring;
98664
98642
  var init_get_domain_price = __esm({
98665
98643
  "src/util/domains/get-domain-price.ts"() {
98666
98644
  "use strict";
98667
- import_querystring = require("querystring");
98668
98645
  init_errors_ts();
98669
98646
  }
98670
98647
  });
@@ -98672,47 +98649,147 @@ var init_get_domain_price = __esm({
98672
98649
  // src/util/domains/get-domain-status.ts
98673
98650
  async function getDomainStatus(client2, domain) {
98674
98651
  return client2.fetch(
98675
- `/v3/domains/status?${import_querystring2.default.stringify({ name: domain })}`
98652
+ `/v1/registrar/domains/${encodeURIComponent(domain)}/availability`
98676
98653
  );
98677
98654
  }
98678
- var import_querystring2;
98679
98655
  var init_get_domain_status = __esm({
98680
98656
  "src/util/domains/get-domain-status.ts"() {
98681
98657
  "use strict";
98682
- import_querystring2 = __toESM3(require("querystring"));
98658
+ }
98659
+ });
98660
+
98661
+ // src/util/domains/get-order.ts
98662
+ async function getOrder(client2, orderId) {
98663
+ const { team } = await getScope(client2);
98664
+ const teamParam = team ? `?teamId=${team.slug}` : "";
98665
+ try {
98666
+ return await client2.fetch(
98667
+ `/v1/registrar/orders/${orderId}${teamParam}`
98668
+ );
98669
+ } catch (err) {
98670
+ if (isAPIError(err)) {
98671
+ if (err.code === "not_found") {
98672
+ return null;
98673
+ }
98674
+ if (err.status < 500) {
98675
+ return err;
98676
+ }
98677
+ }
98678
+ throw err;
98679
+ }
98680
+ }
98681
+ var pollForOrder;
98682
+ var init_get_order = __esm({
98683
+ "src/util/domains/get-order.ts"() {
98684
+ "use strict";
98685
+ init_errors_ts();
98686
+ init_sleep();
98687
+ init_get_scope();
98688
+ pollForOrder = async (client2, orderId, timeoutMs = 1e4) => {
98689
+ const intervalMs = 500;
98690
+ const startTime = Date.now();
98691
+ while (Date.now() - startTime < timeoutMs) {
98692
+ const order = await getOrder(client2, orderId);
98693
+ if (order !== null && (order.status === "completed" || order.status === "failed")) {
98694
+ return order;
98695
+ }
98696
+ await sleep(intervalMs);
98697
+ }
98698
+ return null;
98699
+ };
98700
+ }
98701
+ });
98702
+
98703
+ // src/util/domains/get-domain.ts
98704
+ async function getDomain(client2, contextName, domainName) {
98705
+ output_manager_default.spinner(
98706
+ `Fetching domain ${domainName} under ${import_chalk29.default.bold(contextName)}`
98707
+ );
98708
+ try {
98709
+ const { domain } = await client2.fetch(
98710
+ `/v5/domains/${domainName}`
98711
+ );
98712
+ return domain;
98713
+ } catch (err) {
98714
+ if (isAPIError(err) && err.status < 500) {
98715
+ return err;
98716
+ }
98717
+ throw err;
98718
+ }
98719
+ }
98720
+ var import_chalk29;
98721
+ var init_get_domain = __esm({
98722
+ "src/util/domains/get-domain.ts"() {
98723
+ "use strict";
98724
+ import_chalk29 = __toESM3(require_source());
98725
+ init_errors_ts();
98726
+ init_output_manager();
98683
98727
  }
98684
98728
  });
98685
98729
 
98686
98730
  // src/util/domains/purchase-domain.ts
98687
- async function purchaseDomain(client2, name, expectedPrice, renew = true) {
98731
+ async function purchaseDomain(client2, name, expectedPrice, years, autoRenew = true) {
98732
+ const { team, contextName } = await getScope(client2);
98733
+ const teamParam = team ? `?teamId=${team.slug}` : "";
98688
98734
  try {
98689
- return await client2.fetch(`/v3/domains/buy`, {
98690
- body: { name, expectedPrice, renew },
98691
- method: "POST"
98692
- });
98735
+ const { orderId } = await client2.fetch(
98736
+ `/v1/registrar/domains/${name}/buy${teamParam}`,
98737
+ {
98738
+ body: {
98739
+ expectedPrice,
98740
+ autoRenew,
98741
+ years,
98742
+ contactInformation: {
98743
+ firstName: "Vercel",
98744
+ lastName: "Whois",
98745
+ email: "domains@registrar.vercel.com",
98746
+ phone: "+14153985463",
98747
+ address1: "100 First Street, Suite 2400",
98748
+ city: "San Fransisco",
98749
+ state: "CA",
98750
+ zip: "94105",
98751
+ country: "US",
98752
+ companyName: "Vercel Inc."
98753
+ }
98754
+ },
98755
+ method: "POST"
98756
+ }
98757
+ );
98758
+ const order = await pollForOrder(client2, orderId);
98759
+ if (order === null) {
98760
+ return new UnexpectedDomainPurchaseError(name);
98761
+ }
98762
+ if (order.status === "completed") {
98763
+ const domain = order.domains.find((domain2) => domain2.domainName === name);
98764
+ if (domain?.status === "completed") {
98765
+ const domain2 = await getDomain(client2, contextName, name);
98766
+ if (domain2 instanceof APIError) {
98767
+ throw domain2;
98768
+ }
98769
+ return domain2;
98770
+ }
98771
+ }
98772
+ if (order.error?.code === "payment_failed") {
98773
+ return new DomainPaymentError();
98774
+ }
98775
+ return new UnexpectedDomainPurchaseError(name);
98693
98776
  } catch (err) {
98694
98777
  if (isAPIError(err)) {
98695
98778
  if (err.code === "invalid_domain") {
98696
98779
  return new InvalidDomain(name);
98697
98780
  }
98698
- if (err.code === "not_available") {
98781
+ if (err.code === "domain_not_available") {
98699
98782
  return new DomainNotAvailable(name);
98700
98783
  }
98701
- if (err.code === "service_unavailabe") {
98702
- return new DomainServiceNotAvailable(name);
98703
- }
98704
- if (err.code === "unexpected_error") {
98784
+ if (err.code === "internal_server_error") {
98705
98785
  return new UnexpectedDomainPurchaseError(name);
98706
98786
  }
98707
- if (err.code === "source_not_found") {
98708
- return new SourceNotFound();
98709
- }
98710
- if (err.code === "payment_error") {
98711
- return new DomainPaymentError();
98712
- }
98713
- if (err.code === "unsupported_tld") {
98787
+ if (err.code === "tld_not_supported") {
98714
98788
  return new UnsupportedTLD(name);
98715
98789
  }
98790
+ if (err.code === "additional_contact_info_required") {
98791
+ return new TLDNotSupportedViaCLI(name);
98792
+ }
98716
98793
  }
98717
98794
  throw err;
98718
98795
  }
@@ -98721,12 +98798,15 @@ var init_purchase_domain = __esm({
98721
98798
  "src/util/domains/purchase-domain.ts"() {
98722
98799
  "use strict";
98723
98800
  init_errors_ts();
98801
+ init_get_order();
98802
+ init_get_domain();
98803
+ init_get_scope();
98724
98804
  }
98725
98805
  });
98726
98806
 
98727
98807
  // src/util/domains/purchase-domain-if-available.ts
98728
98808
  async function purchaseDomainIfAvailable(client2, domain, contextName) {
98729
- output_manager_default.spinner(`Checking status of ${import_chalk29.default.bold(domain)}`);
98809
+ output_manager_default.spinner(`Checking status of ${import_chalk30.default.bold(domain)}`);
98730
98810
  const buyDomainStamp = stamp_default();
98731
98811
  const { available } = await getDomainStatus(client2, domain);
98732
98812
  if (available) {
@@ -98743,39 +98823,44 @@ async function purchaseDomainIfAvailable(client2, domain, contextName) {
98743
98823
  if (domainPrice instanceof Error) {
98744
98824
  throw domainPrice;
98745
98825
  }
98746
- const { price, period } = domainPrice;
98826
+ const { purchasePrice, years } = domainPrice;
98827
+ if (purchasePrice === null) {
98828
+ output_manager_default.error(
98829
+ `The domain ${param(domain)} is ${import_chalk30.default.underline(
98830
+ "unavailable"
98831
+ )}! ${buyDomainStamp()}`
98832
+ );
98833
+ return new DomainNotAvailable(domain);
98834
+ }
98747
98835
  output_manager_default.log(
98748
- `Domain not found, but you can buy it under ${import_chalk29.default.bold(
98836
+ `Domain not found, but you can buy it under ${import_chalk30.default.bold(
98749
98837
  contextName
98750
98838
  )}! ${buyDomainStamp()}`
98751
98839
  );
98752
98840
  if (!await client2.input.confirm(
98753
- `Buy ${import_chalk29.default.underline(domain)} for ${import_chalk29.default.bold(
98754
- `$${price}`
98755
- )} (${(0, import_pluralize.default)("yr", period, true)})?`,
98841
+ `Buy ${import_chalk30.default.underline(domain)} for ${import_chalk30.default.bold(
98842
+ `$${purchasePrice}`
98843
+ )} (${(0, import_pluralize.default)("yr", years, true)})?`,
98756
98844
  false
98757
98845
  )) {
98758
98846
  output_manager_default.print(eraseLines(1));
98759
98847
  return new UserAborted();
98760
98848
  }
98761
98849
  output_manager_default.print(eraseLines(1));
98762
- const result = await purchaseDomain(client2, domain, price);
98850
+ const result = await purchaseDomain(client2, domain, purchasePrice, years);
98763
98851
  if (result instanceof Error) {
98764
98852
  return result;
98765
98853
  }
98766
- if (result.pending) {
98767
- return new DomainPurchasePending(domain);
98768
- }
98769
98854
  return true;
98770
98855
  }
98771
98856
  output_manager_default.debug(`Domain ${domain} is not available to be purchased`);
98772
98857
  return false;
98773
98858
  }
98774
- var import_chalk29, import_pluralize, isTTY;
98859
+ var import_chalk30, import_pluralize, isTTY;
98775
98860
  var init_purchase_domain_if_available = __esm({
98776
98861
  "src/util/domains/purchase-domain-if-available.ts"() {
98777
98862
  "use strict";
98778
- import_chalk29 = __toESM3(require_source());
98863
+ import_chalk30 = __toESM3(require_source());
98779
98864
  import_pluralize = __toESM3(require_pluralize());
98780
98865
  init_erase_lines();
98781
98866
  init_get_domain_price();
@@ -98784,6 +98869,7 @@ var init_purchase_domain_if_available = __esm({
98784
98869
  init_stamp();
98785
98870
  init_errors_ts();
98786
98871
  init_output_manager();
98872
+ init_param();
98787
98873
  isTTY = process.stdout.isTTY;
98788
98874
  }
98789
98875
  });
@@ -98957,7 +99043,7 @@ async function getAppLastDeployment(client2, appName, user, contextName) {
98957
99043
  return null;
98958
99044
  }
98959
99045
  async function getDeploymentForAlias(client2, args2, localConfigPath, user, contextName, localConfig) {
98960
- output_manager_default.spinner(`Fetching deployment to alias in ${import_chalk30.default.bold(contextName)}`);
99046
+ output_manager_default.spinner(`Fetching deployment to alias in ${import_chalk31.default.bold(contextName)}`);
98961
99047
  if (args2.length === 2) {
98962
99048
  const [deploymentId] = args2;
98963
99049
  try {
@@ -98976,12 +99062,12 @@ async function getDeploymentForAlias(client2, args2, localConfigPath, user, cont
98976
99062
  output_manager_default.stopSpinner();
98977
99063
  }
98978
99064
  }
98979
- var import_path9, import_chalk30;
99065
+ var import_path9, import_chalk31;
98980
99066
  var init_get_deployment_by_alias = __esm({
98981
99067
  "src/util/alias/get-deployment-by-alias.ts"() {
98982
99068
  "use strict";
98983
99069
  import_path9 = __toESM3(require("path"));
98984
- import_chalk30 = __toESM3(require_source());
99070
+ import_chalk31 = __toESM3(require_source());
98985
99071
  init_get_deployments_by_appname();
98986
99072
  init_get_deployment();
98987
99073
  init_output_manager();
@@ -98992,13 +99078,13 @@ var init_get_deployment_by_alias = __esm({
98992
99078
  function formatDNSTable(rows) {
98993
99079
  return table([HEADER, ...rows], { hsep: 8 });
98994
99080
  }
98995
- var import_chalk31, HEADER;
99081
+ var import_chalk32, HEADER;
98996
99082
  var init_format_dns_table = __esm({
98997
99083
  "src/util/format-dns-table.ts"() {
98998
99084
  "use strict";
98999
99085
  init_table();
99000
- import_chalk31 = __toESM3(require_source());
99001
- HEADER = ["name", "type", "value"].map((v) => (0, import_chalk31.gray)(v));
99086
+ import_chalk32 = __toESM3(require_source());
99087
+ HEADER = ["name", "type", "value"].map((v) => (0, import_chalk32.gray)(v));
99002
99088
  }
99003
99089
  });
99004
99090
 
@@ -99030,7 +99116,7 @@ function handleCertError(error3) {
99030
99116
  if (error3 instanceof CertConfigurationError) {
99031
99117
  const { external, cns } = error3.meta;
99032
99118
  output_manager_default.error(
99033
- `We couldn't verify the propagation of the DNS settings for ${error3.meta.cns.map((cn) => import_chalk32.default.underline(cn)).join(", ")}`
99119
+ `We couldn't verify the propagation of the DNS settings for ${error3.meta.cns.map((cn) => import_chalk33.default.underline(cn)).join(", ")}`
99034
99120
  );
99035
99121
  if (external) {
99036
99122
  output_manager_default.print(
@@ -99071,13 +99157,13 @@ function handleCertError(error3) {
99071
99157
  }
99072
99158
  return error3;
99073
99159
  }
99074
- var import_ms4, import_tldts3, import_chalk32;
99160
+ var import_ms4, import_tldts3, import_chalk33;
99075
99161
  var init_handle_cert_error = __esm({
99076
99162
  "src/util/certs/handle-cert-error.ts"() {
99077
99163
  "use strict";
99078
99164
  import_ms4 = __toESM3(require_ms());
99079
99165
  import_tldts3 = __toESM3(require_cjs7());
99080
- import_chalk32 = __toESM3(require_source());
99166
+ import_chalk33 = __toESM3(require_source());
99081
99167
  init_errors_ts();
99082
99168
  init_format_dns_table();
99083
99169
  init_pkg_name();
@@ -99213,7 +99299,7 @@ async function set(client2, argv) {
99213
99299
  return 1;
99214
99300
  }
99215
99301
  output_manager_default.success(
99216
- `${import_chalk33.default.bold(
99302
+ `${import_chalk34.default.bold(
99217
99303
  `${isWildcardAlias(target) ? "" : "https://"}${handleResult2.alias}`
99218
99304
  )} now points to https://${deployment2.url} ${setStamp()}`
99219
99305
  );
@@ -99249,16 +99335,16 @@ async function set(client2, argv) {
99249
99335
  }
99250
99336
  const prefix = isWildcard ? "" : "https://";
99251
99337
  output_manager_default.success(
99252
- `${import_chalk33.default.bold(`${prefix}${handleResult.alias}`)} now points to https://${deployment.url} ${setStamp()}`
99338
+ `${import_chalk34.default.bold(`${prefix}${handleResult.alias}`)} now points to https://${deployment.url} ${setStamp()}`
99253
99339
  );
99254
99340
  return 0;
99255
99341
  }
99256
99342
  function handleSetupDomainError(error3) {
99257
99343
  if (error3 instanceof DomainPermissionDenied) {
99258
99344
  output_manager_default.error(
99259
- `You don't have permissions over domain ${import_chalk33.default.underline(
99345
+ `You don't have permissions over domain ${import_chalk34.default.underline(
99260
99346
  error3.meta.domain
99261
- )} under ${import_chalk33.default.bold(error3.meta.context)}.`
99347
+ )} under ${import_chalk34.default.bold(error3.meta.context)}.`
99262
99348
  );
99263
99349
  return 1;
99264
99350
  }
@@ -99288,12 +99374,6 @@ function handleSetupDomainError(error3) {
99288
99374
  );
99289
99375
  return 1;
99290
99376
  }
99291
- if (error3 instanceof DomainServiceNotAvailable) {
99292
- output_manager_default.error(
99293
- "The domain purchase service is not available. Try again later."
99294
- );
99295
- return 1;
99296
- }
99297
99377
  if (error3 instanceof UnexpectedDomainPurchaseError) {
99298
99378
  output_manager_default.error("There was an unexpected error while purchasing the domain.");
99299
99379
  return 1;
@@ -99327,6 +99407,12 @@ function handleSetupDomainError(error3) {
99327
99407
  output_manager_default.print(" Please add a valid payment method and retry.\n");
99328
99408
  return 1;
99329
99409
  }
99410
+ if (error3 instanceof TLDNotSupportedViaCLI) {
99411
+ output_manager_default.error(
99412
+ `The TLD for domain name ${error3.meta.domain} is not supported via the CLI. Use the REST API or the dashboard to purchase.`
99413
+ );
99414
+ return 1;
99415
+ }
99330
99416
  return error3;
99331
99417
  }
99332
99418
  function handleCreateAliasError(errorOrResult) {
@@ -99336,7 +99422,7 @@ function handleCreateAliasError(errorOrResult) {
99336
99422
  }
99337
99423
  if (error3 instanceof AliasInUse) {
99338
99424
  output_manager_default.error(
99339
- `The alias ${import_chalk33.default.dim(
99425
+ `The alias ${import_chalk34.default.dim(
99340
99426
  error3.meta.alias
99341
99427
  )} is a deployment URL or it's in use by a different team.`
99342
99428
  );
@@ -99344,7 +99430,7 @@ function handleCreateAliasError(errorOrResult) {
99344
99430
  }
99345
99431
  if (error3 instanceof DeploymentNotFound) {
99346
99432
  output_manager_default.error(
99347
- `Failed to find deployment ${import_chalk33.default.dim(error3.meta.id)} under ${import_chalk33.default.bold(
99433
+ `Failed to find deployment ${import_chalk34.default.dim(error3.meta.id)} under ${import_chalk34.default.bold(
99348
99434
  error3.meta.context
99349
99435
  )}`
99350
99436
  );
@@ -99358,9 +99444,9 @@ function handleCreateAliasError(errorOrResult) {
99358
99444
  }
99359
99445
  if (error3 instanceof DeploymentPermissionDenied) {
99360
99446
  output_manager_default.error(
99361
- `No permission to access deployment ${import_chalk33.default.dim(
99447
+ `No permission to access deployment ${import_chalk34.default.dim(
99362
99448
  error3.meta.id
99363
- )} under ${import_chalk33.default.bold(error3.meta.context)}`
99449
+ )} under ${import_chalk34.default.bold(error3.meta.context)}`
99364
99450
  );
99365
99451
  return 1;
99366
99452
  }
@@ -99403,11 +99489,11 @@ function getTargetsForAlias(args2, { alias: alias2 } = {}) {
99403
99489
  }
99404
99490
  return typeof alias2 === "string" ? [alias2] : alias2;
99405
99491
  }
99406
- var import_chalk33;
99492
+ var import_chalk34;
99407
99493
  var init_set2 = __esm({
99408
99494
  "src/commands/alias/set.ts"() {
99409
99495
  "use strict";
99410
- import_chalk33 = __toESM3(require_source());
99496
+ import_chalk34 = __toESM3(require_source());
99411
99497
  init_errors_ts();
99412
99498
  init_assign_alias();
99413
99499
  init_get_deployment();
@@ -100391,30 +100477,30 @@ var require_format = __commonJS2({
100391
100477
  // src/util/format-date.ts
100392
100478
  function formatDate(dateStrOrNumber) {
100393
100479
  if (!dateStrOrNumber) {
100394
- return import_chalk34.default.gray("-");
100480
+ return import_chalk35.default.gray("-");
100395
100481
  }
100396
100482
  const date = new Date(dateStrOrNumber);
100397
100483
  const diff = date.getTime() - Date.now();
100398
- return diff < 0 ? `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk34.default.gray(
100484
+ return diff < 0 ? `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk35.default.gray(
100399
100485
  `[${(0, import_ms5.default)(-diff)} ago]`
100400
- )}` : `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk34.default.gray(
100486
+ )}` : `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk35.default.gray(
100401
100487
  `[in ${(0, import_ms5.default)(diff)}]`
100402
100488
  )}`;
100403
100489
  }
100404
100490
  function formatDateWithoutTime(dateStrOrNumber) {
100405
100491
  if (!dateStrOrNumber) {
100406
- return import_chalk34.default.gray("-");
100492
+ return import_chalk35.default.gray("-");
100407
100493
  }
100408
100494
  const date = new Date(dateStrOrNumber);
100409
100495
  const diff = date.getTime() - Date.now();
100410
- return diff < 0 ? `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk34.default.gray(`[${(0, import_ms5.default)(-diff)} ago]`)}` : `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk34.default.gray(`[in ${(0, import_ms5.default)(diff)}]`)}`;
100496
+ return diff < 0 ? `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk35.default.gray(`[${(0, import_ms5.default)(-diff)} ago]`)}` : `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk35.default.gray(`[in ${(0, import_ms5.default)(diff)}]`)}`;
100411
100497
  }
100412
- var import_ms5, import_chalk34, import_format2;
100498
+ var import_ms5, import_chalk35, import_format2;
100413
100499
  var init_format_date = __esm({
100414
100500
  "src/util/format-date.ts"() {
100415
100501
  "use strict";
100416
100502
  import_ms5 = __toESM3(require_ms());
100417
- import_chalk34 = __toESM3(require_source());
100503
+ import_chalk35 = __toESM3(require_source());
100418
100504
  import_format2 = __toESM3(require_format());
100419
100505
  }
100420
100506
  });
@@ -100535,9 +100621,9 @@ async function bisect(client2) {
100535
100621
  if (typeof parsed.path === "string" && parsed.path !== "/") {
100536
100622
  if (subpath && subpath !== parsed.path) {
100537
100623
  output_manager_default.note(
100538
- `Ignoring subpath ${import_chalk35.default.bold(
100624
+ `Ignoring subpath ${import_chalk36.default.bold(
100539
100625
  parsed.path
100540
- )} in favor of \`--path\` argument ${import_chalk35.default.bold(subpath)}`
100626
+ )} in favor of \`--path\` argument ${import_chalk36.default.bold(subpath)}`
100541
100627
  );
100542
100628
  } else {
100543
100629
  subpath = parsed.path;
@@ -100552,9 +100638,9 @@ async function bisect(client2) {
100552
100638
  good = parsed.hostname;
100553
100639
  if (typeof parsed.path === "string" && parsed.path !== "/" && subpath && subpath !== parsed.path) {
100554
100640
  output_manager_default.note(
100555
- `Ignoring subpath ${import_chalk35.default.bold(
100641
+ `Ignoring subpath ${import_chalk36.default.bold(
100556
100642
  parsed.path
100557
- )} which does not match ${import_chalk35.default.bold(subpath)}`
100643
+ )} which does not match ${import_chalk36.default.bold(subpath)}`
100558
100644
  );
100559
100645
  }
100560
100646
  if (!subpath) {
@@ -100577,7 +100663,7 @@ async function bisect(client2) {
100577
100663
  }
100578
100664
  bad = badDeployment.url;
100579
100665
  } else {
100580
- output_manager_default.error(`Failed to retrieve ${import_chalk35.default.bold("bad")} Deployment: ${bad}`);
100666
+ output_manager_default.error(`Failed to retrieve ${import_chalk36.default.bold("bad")} Deployment: ${bad}`);
100581
100667
  return 1;
100582
100668
  }
100583
100669
  const goodDeployment = await getDeployment(client2, contextName, good).catch(
@@ -100594,7 +100680,7 @@ async function bisect(client2) {
100594
100680
  good = goodDeployment.url;
100595
100681
  } else {
100596
100682
  output_manager_default.error(
100597
- `Failed to retrieve ${import_chalk35.default.bold("good")} Deployment: ${good}`
100683
+ `Failed to retrieve ${import_chalk36.default.bold("good")} Deployment: ${good}`
100598
100684
  );
100599
100685
  return 1;
100600
100686
  }
@@ -100655,21 +100741,21 @@ async function bisect(client2) {
100655
100741
  const steps = Math.floor(Math.log2(deployments.length));
100656
100742
  const pSteps = (0, import_pluralize2.default)("step", steps, true);
100657
100743
  output_manager_default.log(
100658
- import_chalk35.default.magenta(
100659
- `${import_chalk35.default.bold(
100744
+ import_chalk36.default.magenta(
100745
+ `${import_chalk36.default.bold(
100660
100746
  "Bisecting:"
100661
100747
  )} ${rem} left to test after this (roughly ${pSteps})`
100662
100748
  ),
100663
- import_chalk35.default.magenta
100749
+ import_chalk36.default.magenta
100664
100750
  );
100665
100751
  const testUrl = `https://${deployment.url}${subpath}`;
100666
- output_manager_default.log(`${import_chalk35.default.bold("Deployment URL:")} ${link_default(testUrl)}`);
100667
- output_manager_default.log(`${import_chalk35.default.bold("Date:")} ${formatDate(deployment.createdAt)}`);
100752
+ output_manager_default.log(`${import_chalk36.default.bold("Deployment URL:")} ${link_default(testUrl)}`);
100753
+ output_manager_default.log(`${import_chalk36.default.bold("Date:")} ${formatDate(deployment.createdAt)}`);
100668
100754
  const commit2 = getCommit(deployment);
100669
100755
  if (commit2) {
100670
100756
  const shortSha = commit2.sha.substring(0, 7);
100671
100757
  const firstLine = commit2.message?.split("\n")[0];
100672
- output_manager_default.log(`${import_chalk35.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
100758
+ output_manager_default.log(`${import_chalk36.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
100673
100759
  }
100674
100760
  let action;
100675
100761
  if (run) {
@@ -100689,17 +100775,17 @@ async function bisect(client2) {
100689
100775
  const { exitCode: exitCode2 } = proc;
100690
100776
  let color;
100691
100777
  if (exitCode2 === 0) {
100692
- color = import_chalk35.default.green;
100778
+ color = import_chalk36.default.green;
100693
100779
  action = "good";
100694
100780
  } else if (exitCode2 === 125) {
100695
100781
  action = "skip";
100696
- color = import_chalk35.default.grey;
100782
+ color = import_chalk36.default.grey;
100697
100783
  } else {
100698
100784
  action = "bad";
100699
- color = import_chalk35.default.red;
100785
+ color = import_chalk36.default.red;
100700
100786
  }
100701
100787
  output_manager_default.log(
100702
- `Run script returned exit code ${import_chalk35.default.bold(String(exitCode2))}: ${color(
100788
+ `Run script returned exit code ${import_chalk36.default.bold(String(exitCode2))}: ${color(
100703
100789
  action
100704
100790
  )}`
100705
100791
  );
@@ -100727,19 +100813,19 @@ async function bisect(client2) {
100727
100813
  }
100728
100814
  output_manager_default.print("\n");
100729
100815
  const result = [
100730
- import_chalk35.default.bold(
100816
+ import_chalk36.default.bold(
100731
100817
  `The first bad deployment is: ${link_default(`https://${lastBad.url}`)}`
100732
100818
  ),
100733
100819
  "",
100734
- ` ${import_chalk35.default.bold("Date:")} ${formatDate(lastBad.createdAt)}`
100820
+ ` ${import_chalk36.default.bold("Date:")} ${formatDate(lastBad.createdAt)}`
100735
100821
  ];
100736
100822
  const commit = getCommit(lastBad);
100737
100823
  if (commit) {
100738
100824
  const shortSha = commit.sha.substring(0, 7);
100739
100825
  const firstLine = commit.message?.split("\n")[0];
100740
- result.push(` ${import_chalk35.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
100826
+ result.push(` ${import_chalk36.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
100741
100827
  }
100742
- result.push(`${import_chalk35.default.bold("Inspect:")} ${link_default(lastBad.inspectorUrl)}`);
100828
+ result.push(`${import_chalk36.default.bold("Inspect:")} ${link_default(lastBad.inspectorUrl)}`);
100743
100829
  output_manager_default.print(box(result.join("\n")));
100744
100830
  output_manager_default.print("\n");
100745
100831
  return 0;
@@ -100751,7 +100837,7 @@ function getCommit(deployment) {
100751
100837
  const message2 = deployment.meta?.githubCommitMessage || deployment.meta?.gitlabCommitMessage || deployment.meta?.bitbucketCommitMessage;
100752
100838
  return { sha, message: message2 };
100753
100839
  }
100754
- var import_open2, import_execa2, import_pluralize2, import_path10, import_chalk35, import_url6;
100840
+ var import_open2, import_execa2, import_pluralize2, import_path10, import_chalk36, import_url6;
100755
100841
  var init_bisect2 = __esm({
100756
100842
  "src/commands/bisect/index.ts"() {
100757
100843
  "use strict";
@@ -100759,7 +100845,7 @@ var init_bisect2 = __esm({
100759
100845
  import_execa2 = __toESM3(require_execa());
100760
100846
  import_pluralize2 = __toESM3(require_pluralize());
100761
100847
  import_path10 = require("path");
100762
- import_chalk35 = __toESM3(require_source());
100848
+ import_chalk36 = __toESM3(require_source());
100763
100849
  import_url6 = require("url");
100764
100850
  init_box();
100765
100851
  init_format_date();
@@ -100888,7 +100974,7 @@ async function list2(client2, argv, rwToken) {
100888
100974
  const urls = [];
100889
100975
  const tablePrint = table(
100890
100976
  [
100891
- headers.map((header) => import_chalk36.default.dim(header)),
100977
+ headers.map((header) => import_chalk37.default.dim(header)),
100892
100978
  ...list9.blobs.map((blob5) => {
100893
100979
  urls.push(blob5.url);
100894
100980
  const uploadedAt = (0, import_ms6.default)(Date.now() - new Date(blob5.uploadedAt).getTime());
@@ -100915,14 +101001,14 @@ ${tablePrint}
100915
101001
  }
100916
101002
  return 0;
100917
101003
  }
100918
- var blob, import_chalk36, import_ms6;
101004
+ var blob, import_chalk37, import_ms6;
100919
101005
  var init_list3 = __esm({
100920
101006
  "src/commands/blob/list.ts"() {
100921
101007
  "use strict";
100922
101008
  init_output_manager();
100923
101009
  blob = __toESM3(require("@vercel/blob"));
100924
101010
  init_table();
100925
- import_chalk36 = __toESM3(require_source());
101011
+ import_chalk37 = __toESM3(require_source());
100926
101012
  import_ms6 = __toESM3(require_ms());
100927
101013
  init_get_command_flags();
100928
101014
  init_get_args();
@@ -101086,15 +101172,15 @@ async function put2(client2, argv, rwToken) {
101086
101172
  if (!filePath) {
101087
101173
  if (client2.stdin.isTTY) {
101088
101174
  output_manager_default.error(
101089
- `Missing input. Usage: ${import_chalk37.default.cyan(
101175
+ `Missing input. Usage: ${import_chalk38.default.cyan(
101090
101176
  `${getCommandName("blob put <file>")}`
101091
- )} or pipe data: ${import_chalk37.default.cyan("cat file.txt | vercel blob put --pathname <pathname>")}`
101177
+ )} or pipe data: ${import_chalk38.default.cyan("cat file.txt | vercel blob put --pathname <pathname>")}`
101092
101178
  );
101093
101179
  return 1;
101094
101180
  }
101095
101181
  if (!pathnameFlag) {
101096
101182
  output_manager_default.error(
101097
- `Missing pathname. When reading from stdin, you must specify --pathname. Usage: ${import_chalk37.default.cyan(
101183
+ `Missing pathname. When reading from stdin, you must specify --pathname. Usage: ${import_chalk38.default.cyan(
101098
101184
  "cat file.txt | vercel blob put --pathname <pathname>"
101099
101185
  )}`
101100
101186
  );
@@ -101127,9 +101213,9 @@ async function put2(client2, argv, rwToken) {
101127
101213
  }
101128
101214
  if (!pathname || !putBody) {
101129
101215
  output_manager_default.error(
101130
- `Missing pathname or input. Usage: ${import_chalk37.default.cyan(
101216
+ `Missing pathname or input. Usage: ${import_chalk38.default.cyan(
101131
101217
  `${getCommandName("blob put <file>")}`
101132
- )} or ${import_chalk37.default.cyan(
101218
+ )} or ${import_chalk38.default.cyan(
101133
101219
  `cat file.txt | ${getCommandName("blob put --pathname <pathname>")}`
101134
101220
  )}`
101135
101221
  );
@@ -101156,7 +101242,7 @@ async function put2(client2, argv, rwToken) {
101156
101242
  output_manager_default.success(result.url);
101157
101243
  return 0;
101158
101244
  }
101159
- var blob2, import_node_fs, import_promises, import_error_utils10, import_node_path, import_chalk37;
101245
+ var blob2, import_node_fs, import_promises, import_error_utils10, import_node_path, import_chalk38;
101160
101246
  var init_put2 = __esm({
101161
101247
  "src/commands/blob/put.ts"() {
101162
101248
  "use strict";
@@ -101170,7 +101256,7 @@ var init_put2 = __esm({
101170
101256
  import_error_utils10 = __toESM3(require_dist2());
101171
101257
  import_node_path = require("path");
101172
101258
  init_pkg_name();
101173
- import_chalk37 = __toESM3(require_source());
101259
+ import_chalk38 = __toESM3(require_source());
101174
101260
  init_put();
101175
101261
  init_error2();
101176
101262
  }
@@ -103060,7 +103146,7 @@ var require_fast_json_stable_stringify = __commonJS2({
103060
103146
  };
103061
103147
  }(opts.cmp);
103062
103148
  var seen = [];
103063
- return function stringify3(node) {
103149
+ return function stringify2(node) {
103064
103150
  if (node && node.toJSON && typeof node.toJSON === "function") {
103065
103151
  node = node.toJSON();
103066
103152
  }
@@ -103076,7 +103162,7 @@ var require_fast_json_stable_stringify = __commonJS2({
103076
103162
  for (i = 0; i < node.length; i++) {
103077
103163
  if (i)
103078
103164
  out += ",";
103079
- out += stringify3(node[i]) || "null";
103165
+ out += stringify2(node[i]) || "null";
103080
103166
  }
103081
103167
  return out + "]";
103082
103168
  }
@@ -103092,7 +103178,7 @@ var require_fast_json_stable_stringify = __commonJS2({
103092
103178
  out = "";
103093
103179
  for (i = 0; i < keys.length; i++) {
103094
103180
  var key = keys[i];
103095
- var value = stringify3(node[key]);
103181
+ var value = stringify2(node[key]);
103096
103182
  if (!value)
103097
103183
  continue;
103098
103184
  if (out)
@@ -107747,9 +107833,9 @@ var require_ajv = __commonJS2({
107747
107833
  // src/util/projects/get-project-by-id-or-name.ts
107748
107834
  async function getProjectByNameOrId(client2, projectNameOrId, accountId, includeRollbackInfo) {
107749
107835
  try {
107750
- const qs3 = includeRollbackInfo ? "?rollbackInfo=true" : "";
107836
+ const qs2 = includeRollbackInfo ? "?rollbackInfo=true" : "";
107751
107837
  const project = await client2.fetch(
107752
- `/v9/projects/${encodeURIComponent(projectNameOrId)}${qs3}`,
107838
+ `/v9/projects/${encodeURIComponent(projectNameOrId)}${qs2}`,
107753
107839
  { accountId }
107754
107840
  );
107755
107841
  return project;
@@ -113995,9 +114081,9 @@ var require_parse6 = __commonJS2({
113995
114081
  var require_stringify2 = __commonJS2({
113996
114082
  "../../node_modules/.pnpm/@iarna+toml@2.2.3/node_modules/@iarna/toml/stringify.js"(exports2, module2) {
113997
114083
  "use strict";
113998
- module2.exports = stringify3;
114084
+ module2.exports = stringify2;
113999
114085
  module2.exports.value = stringifyInline;
114000
- function stringify3(obj) {
114086
+ function stringify2(obj) {
114001
114087
  if (obj === null)
114002
114088
  throw typeError("null");
114003
114089
  if (obj === void 0)
@@ -116362,6 +116448,57 @@ var require_frameworks = __commonJS2({
116362
116448
  }
116363
116449
  ]
116364
116450
  },
116451
+ {
116452
+ name: "Flask",
116453
+ slug: "flask",
116454
+ logo: "https://api-frameworks.vercel.sh/framework-logos/flask.svg",
116455
+ tagline: "The Python micro web framework",
116456
+ description: "A Flask app, ready for production",
116457
+ website: "https://flask.palletsprojects.com",
116458
+ useRuntime: { src: "index.py", use: "@vercel/python" },
116459
+ detectors: {
116460
+ some: [
116461
+ {
116462
+ path: "requirements.txt",
116463
+ matchContent: "flask"
116464
+ },
116465
+ {
116466
+ path: "pyproject.toml",
116467
+ matchContent: "flask"
116468
+ },
116469
+ {
116470
+ path: "Pipfile",
116471
+ matchContent: "flask"
116472
+ }
116473
+ ]
116474
+ },
116475
+ settings: {
116476
+ installCommand: {
116477
+ placeholder: "`pip install -r requirements.txt`"
116478
+ },
116479
+ buildCommand: {
116480
+ placeholder: "None",
116481
+ value: null
116482
+ },
116483
+ devCommand: {
116484
+ placeholder: "None",
116485
+ value: null
116486
+ },
116487
+ outputDirectory: {
116488
+ value: "N/A"
116489
+ }
116490
+ },
116491
+ getOutputDirName: async () => "public",
116492
+ defaultRoutes: [
116493
+ {
116494
+ handle: "filesystem"
116495
+ },
116496
+ {
116497
+ src: "/(.*)",
116498
+ dest: "/"
116499
+ }
116500
+ ]
116501
+ },
116365
116502
  {
116366
116503
  name: "FastHTML",
116367
116504
  slug: "fasthtml",
@@ -126052,7 +126189,7 @@ var require_parse7 = __commonJS2({
126052
126189
  var require_stringify3 = __commonJS2({
126053
126190
  "../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/stringify.js"(exports2, module2) {
126054
126191
  var util = require_util8();
126055
- module2.exports = function stringify3(value, replacer, space) {
126192
+ module2.exports = function stringify2(value, replacer, space) {
126056
126193
  const stack2 = [];
126057
126194
  let indent = "";
126058
126195
  let propertyList;
@@ -126271,10 +126408,10 @@ var require_stringify3 = __commonJS2({
126271
126408
  var require_lib12 = __commonJS2({
126272
126409
  "../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/index.js"(exports2, module2) {
126273
126410
  var parse11 = require_parse7();
126274
- var stringify3 = require_stringify3();
126411
+ var stringify2 = require_stringify3();
126275
126412
  var JSON5 = {
126276
126413
  parse: parse11,
126277
- stringify: stringify3
126414
+ stringify: stringify2
126278
126415
  };
126279
126416
  module2.exports = JSON5;
126280
126417
  }
@@ -127237,13 +127374,13 @@ async function connectGitProvider(client2, projectId, type, repo) {
127237
127374
  const apiError = isAPIError(err);
127238
127375
  if (apiError && (err.action === "Install GitHub App" || err.code === "repo_not_found")) {
127239
127376
  output_manager_default.error(
127240
- `Failed to connect ${import_chalk38.default.cyan(
127377
+ `Failed to connect ${import_chalk39.default.cyan(
127241
127378
  repo
127242
127379
  )} to project. Make sure there aren't any typos and that you have access to the repository if it's private.`
127243
127380
  );
127244
127381
  } else if (apiError && err.action === "Add a Login Connection") {
127245
127382
  output_manager_default.error(
127246
- err.message.replace(repo, import_chalk38.default.cyan(repo)) + `
127383
+ err.message.replace(repo, import_chalk39.default.cyan(repo)) + `
127247
127384
  Visit ${link_default(err.link)} for more information.`
127248
127385
  );
127249
127386
  } else {
@@ -127314,7 +127451,7 @@ function parseRepoUrl(originUrl) {
127314
127451
  }
127315
127452
  function printRemoteUrls(remoteUrls) {
127316
127453
  for (const [name, url3] of Object.entries(remoteUrls)) {
127317
- output_manager_default.print(` \u2022 ${name}: ${import_chalk38.default.cyan(url3)}
127454
+ output_manager_default.print(` \u2022 ${name}: ${import_chalk39.default.cyan(url3)}
127318
127455
  `);
127319
127456
  }
127320
127457
  }
@@ -127322,7 +127459,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
127322
127459
  const choices = [];
127323
127460
  for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
127324
127461
  choices.push({
127325
- name: `${urlValue} ${import_chalk38.default.gray(`(${urlKey})`)}`,
127462
+ name: `${urlValue} ${import_chalk39.default.gray(`(${urlKey})`)}`,
127326
127463
  value: urlValue,
127327
127464
  short: urlKey
127328
127465
  });
@@ -127346,7 +127483,7 @@ async function selectAndParseRemoteUrl(client2, remoteUrls) {
127346
127483
  }
127347
127484
  const repoInfo = parseRepoUrl(remoteUrl);
127348
127485
  if (!repoInfo) {
127349
- output_manager_default.log(`Connecting Git repository: ${import_chalk38.default.cyan(remoteUrl)}`);
127486
+ output_manager_default.log(`Connecting Git repository: ${import_chalk39.default.cyan(remoteUrl)}`);
127350
127487
  output_manager_default.error(
127351
127488
  `Failed to parse Git repo data from the following remote URL: ${link_default(
127352
127489
  remoteUrl
@@ -127369,7 +127506,7 @@ async function checkExistsAndConnect({
127369
127506
  }) {
127370
127507
  const displayUrl = buildRepoUrl(provider, gitOrg, repo) || repoPath;
127371
127508
  output_manager_default.log(
127372
- `Connecting ${formatProvider(provider)} repository: ${import_chalk38.default.cyan(displayUrl)}`
127509
+ `Connecting ${formatProvider(provider)} repository: ${import_chalk39.default.cyan(displayUrl)}`
127373
127510
  );
127374
127511
  if (!gitProviderLink) {
127375
127512
  const connect2 = await connectGitProvider(
@@ -127389,7 +127526,7 @@ async function checkExistsAndConnect({
127389
127526
  const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
127390
127527
  if (isSameRepo) {
127391
127528
  output_manager_default.log(
127392
- `${import_chalk38.default.cyan(connectedRepoPath)} is already connected to your project.`
127529
+ `${import_chalk39.default.cyan(connectedRepoPath)} is already connected to your project.`
127393
127530
  );
127394
127531
  return 1;
127395
127532
  }
@@ -127421,7 +127558,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
127421
127558
  shouldReplaceProject = await client2.input.confirm(
127422
127559
  `Looks like you already have a ${formatProvider(
127423
127560
  connectedProvider
127424
- )} repository connected: ${import_chalk38.default.cyan(
127561
+ )} repository connected: ${import_chalk39.default.cyan(
127425
127562
  connectedRepoPath
127426
127563
  )}. Do you want to replace it?`,
127427
127564
  true
@@ -127432,12 +127569,12 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
127432
127569
  }
127433
127570
  return shouldReplaceProject;
127434
127571
  }
127435
- var import_url7, import_chalk38;
127572
+ var import_url7, import_chalk39;
127436
127573
  var init_connect_git_provider = __esm({
127437
127574
  "src/util/git/connect-git-provider.ts"() {
127438
127575
  "use strict";
127439
127576
  import_url7 = require("url");
127440
- import_chalk38 = __toESM3(require_source());
127577
+ import_chalk39 = __toESM3(require_source());
127441
127578
  init_link();
127442
127579
  init_errors_ts();
127443
127580
  init_output_manager();
@@ -127510,7 +127647,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
127510
127647
  return /* @__PURE__ */ new Map();
127511
127648
  });
127512
127649
  const shouldLink = yes || await client2.input.confirm(
127513
- `Link Git repository at ${import_chalk39.default.cyan(
127650
+ `Link Git repository at ${import_chalk40.default.cyan(
127514
127651
  `\u201C${humanizePath(rootPath)}\u201D`
127515
127652
  )} to your Project(s)?`,
127516
127653
  true
@@ -127557,7 +127694,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
127557
127694
  fallback: () => link_default(repoUrl)
127558
127695
  });
127559
127696
  output_manager_default.spinner(
127560
- `Fetching Projects for ${repoUrlLink} under ${import_chalk39.default.bold(org.slug)}\u2026`
127697
+ `Fetching Projects for ${repoUrlLink} under ${import_chalk40.default.bold(org.slug)}\u2026`
127561
127698
  );
127562
127699
  let projects = [];
127563
127700
  const query = new URLSearchParams({ repoUrl });
@@ -127566,12 +127703,12 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
127566
127703
  for await (const chunk of projectsIterator) {
127567
127704
  projects = projects.concat(chunk.projects);
127568
127705
  if (chunk.pagination.next) {
127569
- output_manager_default.spinner(`Found ${import_chalk39.default.bold(projects.length)} Projects\u2026`, 0);
127706
+ output_manager_default.spinner(`Found ${import_chalk40.default.bold(projects.length)} Projects\u2026`, 0);
127570
127707
  }
127571
127708
  }
127572
127709
  if (projects.length === 0) {
127573
127710
  output_manager_default.log(
127574
- `No Projects are linked to ${repoUrlLink} under ${import_chalk39.default.bold(
127711
+ `No Projects are linked to ${repoUrlLink} under ${import_chalk40.default.bold(
127575
127712
  org.slug
127576
127713
  )}.`
127577
127714
  );
@@ -127581,7 +127718,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
127581
127718
  "Project",
127582
127719
  projects.length,
127583
127720
  true
127584
- )} linked to ${repoUrlLink} under ${import_chalk39.default.bold(org.slug)}`
127721
+ )} linked to ${repoUrlLink} under ${import_chalk40.default.bold(org.slug)}`
127585
127722
  );
127586
127723
  }
127587
127724
  for (const project of projects) {
@@ -127697,7 +127834,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
127697
127834
  "Project",
127698
127835
  selected.length,
127699
127836
  true
127700
- )} under ${import_chalk39.default.bold(org.slug)} (created ${VERCEL_DIR2}${isGitIgnoreUpdated ? " and added it to .gitignore" : ""})`,
127837
+ )} under ${import_chalk40.default.bold(org.slug)} (created ${VERCEL_DIR2}${isGitIgnoreUpdated ? " and added it to .gitignore" : ""})`,
127701
127838
  emoji("link")
127702
127839
  ) + "\n"
127703
127840
  );
@@ -127754,11 +127891,11 @@ function findProjectsFromPath(projects, path11) {
127754
127891
  const firstMatch = matches[0];
127755
127892
  return matches.filter((match) => match.directory === firstMatch.directory);
127756
127893
  }
127757
- var import_chalk39, import_pluralize3, import_os7, import_slugify, import_path14, import_build_utils5, import_fs_extra6, home;
127894
+ var import_chalk40, import_pluralize3, import_os7, import_slugify, import_path14, import_build_utils5, import_fs_extra6, home;
127758
127895
  var init_repo = __esm({
127759
127896
  "src/util/link/repo.ts"() {
127760
127897
  "use strict";
127761
- import_chalk39 = __toESM3(require_source());
127898
+ import_chalk40 = __toESM3(require_source());
127762
127899
  init_esm4();
127763
127900
  import_pluralize3 = __toESM3(require_pluralize());
127764
127901
  import_os7 = require("os");
@@ -127974,20 +128111,20 @@ async function linkFolderToProject(client2, path11, projectLink, projectName, or
127974
128111
  const isGitIgnoreUpdated = await addToGitIgnore(path11);
127975
128112
  output_manager_default.print(
127976
128113
  prependEmoji(
127977
- `Linked to ${import_chalk40.default.bold(
128114
+ `Linked to ${import_chalk41.default.bold(
127978
128115
  `${orgSlug}/${projectName}`
127979
128116
  )} (created ${VERCEL_DIR2}${isGitIgnoreUpdated ? " and added it to .gitignore" : ""})`,
127980
128117
  emoji(successEmoji)
127981
128118
  ) + "\n"
127982
128119
  );
127983
128120
  }
127984
- var import_fs4, import_ajv, import_chalk40, import_path15, import_fs_extra7, import_util2, import_build_utils6, import_error_utils12, readFile3, writeFile2, VERCEL_DIR2, VERCEL_DIR_FALLBACK, VERCEL_DIR_README, VERCEL_DIR_PROJECT, VERCEL_DIR_REPO, linkSchema;
128121
+ var import_fs4, import_ajv, import_chalk41, import_path15, import_fs_extra7, import_util2, import_build_utils6, import_error_utils12, readFile3, writeFile2, VERCEL_DIR2, VERCEL_DIR_FALLBACK, VERCEL_DIR_README, VERCEL_DIR_PROJECT, VERCEL_DIR_REPO, linkSchema;
127985
128122
  var init_link2 = __esm({
127986
128123
  "src/util/projects/link.ts"() {
127987
128124
  "use strict";
127988
128125
  import_fs4 = __toESM3(require("fs"));
127989
128126
  import_ajv = __toESM3(require_ajv());
127990
- import_chalk40 = __toESM3(require_source());
128127
+ import_chalk41 = __toESM3(require_source());
127991
128128
  import_path15 = require("path");
127992
128129
  import_fs_extra7 = __toESM3(require_lib());
127993
128130
  import_util2 = require("util");
@@ -128154,7 +128291,7 @@ async function addStore(client2, argv) {
128154
128291
  ]
128155
128292
  });
128156
128293
  output_manager_default.spinner(
128157
- `Connecting ${import_chalk41.default.bold(name)} to ${import_chalk41.default.bold(link4.project.name)}...`
128294
+ `Connecting ${import_chalk42.default.bold(name)} to ${import_chalk42.default.bold(link4.project.name)}...`
128158
128295
  );
128159
128296
  await connectResourceToProject(
128160
128297
  client2,
@@ -128164,7 +128301,7 @@ async function addStore(client2, argv) {
128164
128301
  link4.org.id
128165
128302
  );
128166
128303
  output_manager_default.success(
128167
- `Blob store ${import_chalk41.default.bold(name)} linked to ${import_chalk41.default.bold(
128304
+ `Blob store ${import_chalk42.default.bold(name)} linked to ${import_chalk42.default.bold(
128168
128305
  link4.project.name
128169
128306
  )}. Make sure to pull the new environment variables using ${getCommandName("env pull")}`
128170
128307
  );
@@ -128172,14 +128309,14 @@ async function addStore(client2, argv) {
128172
128309
  }
128173
128310
  return 0;
128174
128311
  }
128175
- var import_chalk41;
128312
+ var import_chalk42;
128176
128313
  var init_store_add2 = __esm({
128177
128314
  "src/commands/blob/store-add.ts"() {
128178
128315
  "use strict";
128179
128316
  init_output_manager();
128180
128317
  init_link2();
128181
128318
  init_connect_resource_to_project();
128182
- import_chalk41 = __toESM3(require_source());
128319
+ import_chalk42 = __toESM3(require_source());
128183
128320
  init_pkg_name();
128184
128321
  init_get_flags_specification();
128185
128322
  init_get_args();
@@ -130659,8 +130796,8 @@ async function getStore2(client2, argv, rwToken) {
130659
130796
  const regionInfo = store2.store.region ? `
130660
130797
  Region: ${store2.store.region}` : "";
130661
130798
  output_manager_default.print(
130662
- `Blob Store: ${import_chalk42.default.bold(store2.store.name)} (${import_chalk42.default.dim(store2.store.id)})
130663
- Billing State: ${store2.store.billingState === "active" ? import_chalk42.default.green("Active") : import_chalk42.default.red("Inactive")}
130799
+ `Blob Store: ${import_chalk43.default.bold(store2.store.name)} (${import_chalk43.default.dim(store2.store.id)})
130800
+ Billing State: ${store2.store.billingState === "active" ? import_chalk43.default.green("Active") : import_chalk43.default.red("Inactive")}
130664
130801
  Size: ${(0, import_bytes3.default)(store2.store.size)}${regionInfo}
130665
130802
  Created At: ${(0, import_date_fns.format)(new Date(store2.store.createdAt), dateTimeFormat2)}
130666
130803
  Updated At: ${(0, import_date_fns.format)(new Date(store2.store.updatedAt), dateTimeFormat2)}
@@ -130673,7 +130810,7 @@ Updated At: ${(0, import_date_fns.format)(new Date(store2.store.updatedAt), date
130673
130810
  output_manager_default.stopSpinner();
130674
130811
  return 0;
130675
130812
  }
130676
- var import_bytes3, import_date_fns, import_chalk42;
130813
+ var import_bytes3, import_date_fns, import_chalk43;
130677
130814
  var init_store_get2 = __esm({
130678
130815
  "src/commands/blob/store-get.ts"() {
130679
130816
  "use strict";
@@ -130685,7 +130822,7 @@ var init_store_get2 = __esm({
130685
130822
  init_link2();
130686
130823
  init_command36();
130687
130824
  import_date_fns = __toESM3(require_date_fns());
130688
- import_chalk42 = __toESM3(require_source());
130825
+ import_chalk43 = __toESM3(require_source());
130689
130826
  init_store_get();
130690
130827
  }
130691
130828
  });
@@ -130843,33 +130980,33 @@ function findChanges(oldEnv, newEnv) {
130843
130980
  function buildDeltaString(oldEnv, newEnv) {
130844
130981
  const { added, changed, removed } = findChanges(oldEnv, newEnv);
130845
130982
  let deltaString = "";
130846
- deltaString += import_chalk43.default.green(addDeltaSection("+", changed, true));
130847
- deltaString += import_chalk43.default.green(addDeltaSection("+", added));
130848
- deltaString += import_chalk43.default.red(addDeltaSection("-", removed));
130849
- return deltaString ? import_chalk43.default.gray("Changes:\n") + deltaString + "\n" : deltaString;
130983
+ deltaString += import_chalk44.default.green(addDeltaSection("+", changed, true));
130984
+ deltaString += import_chalk44.default.green(addDeltaSection("+", added));
130985
+ deltaString += import_chalk44.default.red(addDeltaSection("-", removed));
130986
+ return deltaString ? import_chalk44.default.gray("Changes:\n") + deltaString + "\n" : deltaString;
130850
130987
  }
130851
130988
  function addDeltaSection(prefix, arr, changed = false) {
130852
130989
  if (arr.length === 0)
130853
130990
  return "";
130854
130991
  return arr.sort().map((item) => `${prefix} ${item}${changed ? " (Updated)" : ""}`).join("\n") + "\n";
130855
130992
  }
130856
- var import_fs_extra8, import_chalk43;
130993
+ var import_fs_extra8, import_chalk44;
130857
130994
  var init_diff_env_files = __esm({
130858
130995
  "src/util/env/diff-env-files.ts"() {
130859
130996
  "use strict";
130860
130997
  import_fs_extra8 = __toESM3(require_lib());
130861
130998
  init_parse_env();
130862
- import_chalk43 = __toESM3(require_source());
130999
+ import_chalk44 = __toESM3(require_source());
130863
131000
  init_output_manager();
130864
131001
  }
130865
131002
  });
130866
131003
 
130867
131004
  // src/util/output/list-item.ts
130868
- var import_chalk44, listItem, list_item_default;
131005
+ var import_chalk45, listItem, list_item_default;
130869
131006
  var init_list_item = __esm({
130870
131007
  "src/util/output/list-item.ts"() {
130871
131008
  "use strict";
130872
- import_chalk44 = __toESM3(require_source());
131009
+ import_chalk45 = __toESM3(require_source());
130873
131010
  listItem = (msg, n) => {
130874
131011
  if (!n) {
130875
131012
  n = "-";
@@ -130877,7 +131014,7 @@ var init_list_item = __esm({
130877
131014
  if (Number(n)) {
130878
131015
  n += ".";
130879
131016
  }
130880
- return `${(0, import_chalk44.default)(n.toString())} ${msg}`;
131017
+ return `${(0, import_chalk45.default)(n.toString())} ${msg}`;
130881
131018
  };
130882
131019
  list_item_default = listItem;
130883
131020
  }
@@ -145748,18 +145885,18 @@ var init_get_env_records = __esm({
145748
145885
  function formatProject(orgSlug, projectSlug, options) {
145749
145886
  const orgProjectSlug = `${orgSlug}/${projectSlug}`;
145750
145887
  const projectUrl = `https://vercel.com/${orgProjectSlug}`;
145751
- const projectSlugLink = output_manager_default.link(import_chalk45.default.bold(orgProjectSlug), projectUrl, {
145752
- fallback: () => import_chalk45.default.bold(orgProjectSlug),
145888
+ const projectSlugLink = output_manager_default.link(import_chalk46.default.bold(orgProjectSlug), projectUrl, {
145889
+ fallback: () => import_chalk46.default.bold(orgProjectSlug),
145753
145890
  color: false,
145754
145891
  ...options
145755
145892
  });
145756
145893
  return projectSlugLink;
145757
145894
  }
145758
- var import_chalk45;
145895
+ var import_chalk46;
145759
145896
  var init_format_project = __esm({
145760
145897
  "src/util/projects/format-project.ts"() {
145761
145898
  "use strict";
145762
- import_chalk45 = __toESM3(require_source());
145899
+ import_chalk46 = __toESM3(require_source());
145763
145900
  init_output_manager();
145764
145901
  }
145765
145902
  });
@@ -145902,7 +146039,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
145902
146039
  const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
145903
146040
  const exists = typeof head !== "undefined";
145904
146041
  if (head === CONTENTS_PREFIX) {
145905
- output_manager_default.log(`Overwriting existing ${import_chalk46.default.bold(filename)} file`);
146042
+ output_manager_default.log(`Overwriting existing ${import_chalk47.default.bold(filename)} file`);
145906
146043
  } else if (exists && !skipConfirmation && !await client2.input.confirm(
145907
146044
  `Found existing file ${param(filename)}. Do you want to overwrite?`,
145908
146045
  false
@@ -145912,7 +146049,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
145912
146049
  }
145913
146050
  const projectSlugLink = formatProject(link4.org.slug, link4.project.name);
145914
146051
  output_manager_default.log(
145915
- `Downloading \`${import_chalk46.default.cyan(
146052
+ `Downloading \`${import_chalk47.default.cyan(
145916
146053
  environment
145917
146054
  )}\` Environment Variables for ${projectSlugLink}`
145918
146055
  );
@@ -145945,7 +146082,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
145945
146082
  }
145946
146083
  output_manager_default.print(
145947
146084
  `${prependEmoji(
145948
- `${exists ? "Updated" : "Created"} ${import_chalk46.default.bold(filename)} file ${isGitIgnoreUpdated ? "and added it to .gitignore" : ""} ${import_chalk46.default.gray(pullStamp())}`,
146085
+ `${exists ? "Updated" : "Created"} ${import_chalk47.default.bold(filename)} file ${isGitIgnoreUpdated ? "and added it to .gitignore" : ""} ${import_chalk47.default.gray(pullStamp())}`,
145949
146086
  emoji("success")
145950
146087
  )}
145951
146088
  `
@@ -145954,11 +146091,11 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
145954
146091
  function escapeValue(value) {
145955
146092
  return value ? value.replace(new RegExp("\n", "g"), "\\n").replace(new RegExp("\r", "g"), "\\r") : "";
145956
146093
  }
145957
- var import_chalk46, import_fs_extra15, import_fs5, import_path24, import_error_utils16, import_json_parse_better_errors2, CONTENTS_PREFIX, VARIABLES_TO_IGNORE;
146094
+ var import_chalk47, import_fs_extra15, import_fs5, import_path24, import_error_utils16, import_json_parse_better_errors2, CONTENTS_PREFIX, VARIABLES_TO_IGNORE;
145958
146095
  var init_pull2 = __esm({
145959
146096
  "src/commands/env/pull.ts"() {
145960
146097
  "use strict";
145961
- import_chalk46 = __toESM3(require_source());
146098
+ import_chalk47 = __toESM3(require_source());
145962
146099
  import_fs_extra15 = __toESM3(require_lib());
145963
146100
  import_fs5 = require("fs");
145964
146101
  import_path24 = require("path");
@@ -146014,7 +146151,7 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
146014
146151
  );
146015
146152
  } else {
146016
146153
  if (await client2.input.confirm(
146017
- `Found project ${import_chalk47.default.cyan(
146154
+ `Found project ${import_chalk48.default.cyan(
146018
146155
  `\u201C${org.slug}/${detectedProject.name}\u201D`
146019
146156
  )}. Link to it?`,
146020
146157
  true
@@ -146059,12 +146196,12 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
146059
146196
  }
146060
146197
  });
146061
146198
  }
146062
- var import_chalk47, import_slugify2;
146199
+ var import_chalk48, import_slugify2;
146063
146200
  var init_input_project = __esm({
146064
146201
  "src/util/input/input-project.ts"() {
146065
146202
  "use strict";
146066
146203
  init_get_project_by_id_or_name();
146067
- import_chalk47 = __toESM3(require_source());
146204
+ import_chalk48 = __toESM3(require_source());
146068
146205
  init_errors_ts();
146069
146206
  import_slugify2 = __toESM3(require_slugify());
146070
146207
  init_output_manager();
@@ -146077,7 +146214,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
146077
146214
  const suffix = errorSuffix ? ` ${errorSuffix}` : "";
146078
146215
  if (!pathStat) {
146079
146216
  output_manager_default.error(
146080
- `The provided path ${import_chalk48.default.cyan(
146217
+ `The provided path ${import_chalk49.default.cyan(
146081
146218
  `\u201C${humanizePath(path11)}\u201D`
146082
146219
  )} does not exist.${suffix}`
146083
146220
  );
@@ -146085,7 +146222,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
146085
146222
  }
146086
146223
  if (!pathStat.isDirectory()) {
146087
146224
  output_manager_default.error(
146088
- `The provided path ${import_chalk48.default.cyan(
146225
+ `The provided path ${import_chalk49.default.cyan(
146089
146226
  `\u201C${humanizePath(path11)}\u201D`
146090
146227
  )} is a file, but expected a directory.${suffix}`
146091
146228
  );
@@ -146093,7 +146230,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
146093
146230
  }
146094
146231
  if (!path11.startsWith(cwd)) {
146095
146232
  output_manager_default.error(
146096
- `The provided path ${import_chalk48.default.cyan(
146233
+ `The provided path ${import_chalk49.default.cyan(
146097
146234
  `\u201C${humanizePath(path11)}\u201D`
146098
146235
  )} is outside of the project.${suffix}`
146099
146236
  );
@@ -146109,7 +146246,7 @@ async function validatePaths(client2, paths) {
146109
146246
  const path11 = paths[0];
146110
146247
  const pathStat = await (0, import_fs_extra16.lstat)(path11).catch(() => null);
146111
146248
  if (!pathStat) {
146112
- output_manager_default.error(`Could not find ${import_chalk48.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}`);
146249
+ output_manager_default.error(`Could not find ${import_chalk49.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}`);
146113
146250
  return { valid: false, exitCode: 1 };
146114
146251
  }
146115
146252
  if (!pathStat.isDirectory()) {
@@ -146132,12 +146269,12 @@ async function validatePaths(client2, paths) {
146132
146269
  }
146133
146270
  return { valid: true, path: path11 };
146134
146271
  }
146135
- var import_fs_extra16, import_chalk48, import_os8;
146272
+ var import_fs_extra16, import_chalk49, import_os8;
146136
146273
  var init_validate_paths = __esm({
146137
146274
  "src/util/validate-paths.ts"() {
146138
146275
  "use strict";
146139
146276
  import_fs_extra16 = __toESM3(require_lib());
146140
- import_chalk48 = __toESM3(require_source());
146277
+ import_chalk49 = __toESM3(require_source());
146141
146278
  import_os8 = require("os");
146142
146279
  init_humanize_path();
146143
146280
  init_output_manager();
@@ -146153,7 +146290,7 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
146153
146290
  const rootDirectory = await client2.input.text({
146154
146291
  message: `In which directory is your code located?`,
146155
146292
  transformer: (input) => {
146156
- return `${import_chalk49.default.dim(`./`)}${input}`;
146293
+ return `${import_chalk50.default.dim(`./`)}${input}`;
146157
146294
  }
146158
146295
  });
146159
146296
  if (!rootDirectory) {
@@ -146174,12 +146311,12 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
146174
146311
  return normal;
146175
146312
  }
146176
146313
  }
146177
- var import_path25, import_chalk49;
146314
+ var import_path25, import_chalk50;
146178
146315
  var init_input_root_directory = __esm({
146179
146316
  "src/util/input/input-root-directory.ts"() {
146180
146317
  "use strict";
146181
146318
  import_path25 = __toESM3(require("path"));
146182
- import_chalk49 = __toESM3(require_source());
146319
+ import_chalk50 = __toESM3(require_source());
146183
146320
  init_validate_paths();
146184
146321
  }
146185
146322
  });
@@ -146218,8 +146355,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
146218
146355
  const override = localConfigurationOverrides[setting];
146219
146356
  if (override) {
146220
146357
  output_manager_default.print(
146221
- `${import_chalk50.default.dim(
146222
- `- ${import_chalk50.default.bold(`${settingMap[setting]}:`)} ${override}`
146358
+ `${import_chalk51.default.dim(
146359
+ `- ${import_chalk51.default.bold(`${settingMap[setting]}:`)} ${override}`
146223
146360
  )}
146224
146361
  `
146225
146362
  );
@@ -146245,13 +146382,13 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
146245
146382
  const styledFramework = (frameworkName) => {
146246
146383
  const frameworkStyle = {
146247
146384
  text: frameworkName,
146248
- color: import_chalk50.default.blue
146385
+ color: import_chalk51.default.blue
146249
146386
  };
146250
146387
  if (frameworkName === "Hono") {
146251
146388
  frameworkStyle.text = "\u{1F525} Hono";
146252
- frameworkStyle.color = import_chalk50.default.hex("#FFA500");
146389
+ frameworkStyle.color = import_chalk51.default.hex("#FFA500");
146253
146390
  }
146254
- return import_chalk50.default.bold(frameworkStyle.color(frameworkStyle.text));
146391
+ return import_chalk51.default.bold(frameworkStyle.color(frameworkStyle.text));
146255
146392
  };
146256
146393
  output_manager_default.print(
146257
146394
  !framework.slug ? `No framework detected. Default Project Settings:
@@ -146267,8 +146404,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
146267
146404
  const override = localConfigurationOverrides?.[setting];
146268
146405
  if (!override && defaultSetting) {
146269
146406
  output_manager_default.print(
146270
- `${import_chalk50.default.dim(
146271
- `- ${import_chalk50.default.bold(`${settingMap[setting]}:`)} ${isSettingValue(defaultSetting) ? defaultSetting.value : import_chalk50.default.italic(`${defaultSetting.placeholder}`)}`
146407
+ `${import_chalk51.default.dim(
146408
+ `- ${import_chalk51.default.bold(`${settingMap[setting]}:`)} ${isSettingValue(defaultSetting) ? defaultSetting.value : import_chalk51.default.italic(`${defaultSetting.placeholder}`)}`
146272
146409
  )}
146273
146410
  `
146274
146411
  );
@@ -146293,16 +146430,16 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
146293
146430
  for (const setting of settingFields) {
146294
146431
  const field = settingMap[setting];
146295
146432
  settings[setting] = await client2.input.text({
146296
- message: `What's your ${import_chalk50.default.bold(field)}?`
146433
+ message: `What's your ${import_chalk51.default.bold(field)}?`
146297
146434
  });
146298
146435
  }
146299
146436
  return settings;
146300
146437
  }
146301
- var import_chalk50, import_frameworks3, settingMap, settingKeys;
146438
+ var import_chalk51, import_frameworks3, settingMap, settingKeys;
146302
146439
  var init_edit_project_settings = __esm({
146303
146440
  "src/util/input/edit-project-settings.ts"() {
146304
146441
  "use strict";
146305
- import_chalk50 = __toESM3(require_source());
146442
+ import_chalk51 = __toESM3(require_source());
146306
146443
  import_frameworks3 = __toESM3(require_frameworks());
146307
146444
  init_is_setting_value();
146308
146445
  init_output_manager();
@@ -146344,7 +146481,7 @@ async function vercelAuth(client2, {
146344
146481
  autoConfirm = false
146345
146482
  }) {
146346
146483
  if (autoConfirm || await client2.input.confirm(
146347
- `Want to use the default Deployment Protection settings? ${import_chalk51.default.dim(`(Vercel Authentication: Standard Protection)`)}`,
146484
+ `Want to use the default Deployment Protection settings? ${import_chalk52.default.dim(`(Vercel Authentication: Standard Protection)`)}`,
146348
146485
  true
146349
146486
  )) {
146350
146487
  return DEFAULT_VERCEL_AUTH_SETTING;
@@ -146352,11 +146489,11 @@ async function vercelAuth(client2, {
146352
146489
  const vercelAuth2 = await client2.input.select(OPTIONS);
146353
146490
  return vercelAuth2;
146354
146491
  }
146355
- var import_chalk51, DEFAULT_VERCEL_AUTH_SETTING, OPTIONS;
146492
+ var import_chalk52, DEFAULT_VERCEL_AUTH_SETTING, OPTIONS;
146356
146493
  var init_vercel_auth = __esm({
146357
146494
  "src/util/input/vercel-auth.ts"() {
146358
146495
  "use strict";
146359
- import_chalk51 = __toESM3(require_source());
146496
+ import_chalk52 = __toESM3(require_source());
146360
146497
  DEFAULT_VERCEL_AUTH_SETTING = "standard";
146361
146498
  OPTIONS = {
146362
146499
  message: `What setting do you want to use for Vercel Authentication?`,
@@ -146410,7 +146547,7 @@ async function setupAndLink(client2, path11, {
146410
146547
  return { status: "error", exitCode: 1, reason: "HEADLESS" };
146411
146548
  }
146412
146549
  const shouldStartSetup = autoConfirm || await client2.input.confirm(
146413
- `${setupMsg} ${import_chalk52.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}?`,
146550
+ `${setupMsg} ${import_chalk53.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}?`,
146414
146551
  true
146415
146552
  );
146416
146553
  if (!shouldStartSetup) {
@@ -146576,11 +146713,11 @@ async function connectGitRepository(client2, path11, project, autoConfirm, org)
146576
146713
  output_manager_default.debug(`Failed to connect git repository: ${error3}`);
146577
146714
  }
146578
146715
  }
146579
- var import_chalk52, import_fs_extra17, import_path26, import_frameworks4;
146716
+ var import_chalk53, import_fs_extra17, import_path26, import_frameworks4;
146580
146717
  var init_setup_and_link = __esm({
146581
146718
  "src/util/link/setup-and-link.ts"() {
146582
146719
  "use strict";
146583
- import_chalk52 = __toESM3(require_source());
146720
+ import_chalk53 = __toESM3(require_source());
146584
146721
  import_fs_extra17 = __toESM3(require_lib());
146585
146722
  import_path26 = require("path");
146586
146723
  init_link2();
@@ -146784,20 +146921,20 @@ async function pullCommandLogic(client2, cwd, autoConfirm, environment, flags) {
146784
146921
  const settingsStamp = stamp_default();
146785
146922
  output_manager_default.print(
146786
146923
  `${prependEmoji(
146787
- `Downloaded project settings to ${import_chalk53.default.bold(
146924
+ `Downloaded project settings to ${import_chalk54.default.bold(
146788
146925
  humanizePath((0, import_node_path3.join)(currentDirectory, VERCEL_DIR2, VERCEL_DIR_PROJECT))
146789
- )} ${import_chalk53.default.gray(settingsStamp())}`,
146926
+ )} ${import_chalk54.default.gray(settingsStamp())}`,
146790
146927
  emoji("success")
146791
146928
  )}
146792
146929
  `
146793
146930
  );
146794
146931
  return 0;
146795
146932
  }
146796
- var import_chalk53, import_node_path3;
146933
+ var import_chalk54, import_node_path3;
146797
146934
  var init_pull4 = __esm({
146798
146935
  "src/commands/pull/index.ts"() {
146799
146936
  "use strict";
146800
- import_chalk53 = __toESM3(require_source());
146937
+ import_chalk54 = __toESM3(require_source());
146801
146938
  import_node_path3 = require("path");
146802
146939
  init_emoji();
146803
146940
  init_get_args();
@@ -146855,6 +146992,7 @@ async function main3(client2) {
146855
146992
  telemetryClient.trackCliOptionTarget(parsedArgs.flags["--target"]);
146856
146993
  telemetryClient.trackCliFlagProd(parsedArgs.flags["--prod"]);
146857
146994
  telemetryClient.trackCliFlagYes(parsedArgs.flags["--yes"]);
146995
+ telemetryClient.trackCliFlagStandalone(parsedArgs.flags["--standalone"]);
146858
146996
  } catch (error3) {
146859
146997
  printError(error3);
146860
146998
  return 1;
@@ -146869,7 +147007,15 @@ async function main3(client2) {
146869
147007
  flags: parsedArgs.flags
146870
147008
  }) || "preview";
146871
147009
  const yes = Boolean(parsedArgs.flags["--yes"]);
146872
- const standalone = process.env.VERCEL_EXPERIMENTAL_STANDALONE_BUILD === "1";
147010
+ const hasDeprecatedEnvVar = process.env.VERCEL_EXPERIMENTAL_STANDALONE_BUILD === "1";
147011
+ if (hasDeprecatedEnvVar) {
147012
+ output_manager_default.warn(
147013
+ "The VERCEL_EXPERIMENTAL_STANDALONE_BUILD environment variable is deprecated. Please use the --standalone flag instead."
147014
+ );
147015
+ }
147016
+ const standalone = Boolean(
147017
+ parsedArgs.flags["--standalone"] || hasDeprecatedEnvVar
147018
+ );
146873
147019
  try {
146874
147020
  await (0, import_build_utils13.validateNpmrc)(cwd);
146875
147021
  } catch (err) {
@@ -147365,9 +147511,9 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
147365
147511
  const relOutputDir = (0, import_path27.relative)(cwd, outputDir);
147366
147512
  output_manager_default.print(
147367
147513
  `${prependEmoji(
147368
- `Build Completed in ${import_chalk54.default.bold(
147514
+ `Build Completed in ${import_chalk55.default.bold(
147369
147515
  relOutputDir.startsWith("..") ? outputDir : relOutputDir
147370
- )} ${import_chalk54.default.gray(buildStamp())}`,
147516
+ )} ${import_chalk55.default.gray(buildStamp())}`,
147371
147517
  emoji("success")
147372
147518
  )}
147373
147519
  `
@@ -147500,11 +147646,11 @@ async function getFrameworkRoutes(framework, dirPrefix) {
147500
147646
  }
147501
147647
  return routes2;
147502
147648
  }
147503
- var import_chalk54, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2, import_promises2, InMemoryReporter;
147649
+ var import_chalk55, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2, import_promises2, InMemoryReporter;
147504
147650
  var init_build2 = __esm({
147505
147651
  "src/commands/build/index.ts"() {
147506
147652
  "use strict";
147507
- import_chalk54 = __toESM3(require_source());
147653
+ import_chalk55 = __toESM3(require_source());
147508
147654
  import_dotenv = __toESM3(require_main3());
147509
147655
  import_fs_extra18 = __toESM3(require_lib());
147510
147656
  import_minimatch2 = __toESM3(require_minimatch2());
@@ -148155,7 +148301,7 @@ async function add(client2, argv) {
148155
148301
  `Invalid number of arguments to create a custom certificate entry. Usage:`
148156
148302
  );
148157
148303
  output_manager_default.print(
148158
- ` ${import_chalk55.default.cyan(
148304
+ ` ${import_chalk56.default.cyan(
148159
148305
  `${getCommandName(
148160
148306
  "certs add --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
148161
148307
  )}`
@@ -148167,9 +148313,9 @@ async function add(client2, argv) {
148167
148313
  cert = await createCertFromFile(client2, keyPath, crtPath, caPath);
148168
148314
  } else {
148169
148315
  output_manager_default.warn(
148170
- `${import_chalk55.default.cyan(
148316
+ `${import_chalk56.default.cyan(
148171
148317
  getCommandName("certs add")
148172
- )} will be soon deprecated. Please use ${import_chalk55.default.cyan(
148318
+ )} will be soon deprecated. Please use ${import_chalk56.default.cyan(
148173
148319
  getCommandName("certs issue <cn> <cns>")
148174
148320
  )} instead`
148175
148321
  );
@@ -148178,7 +148324,7 @@ async function add(client2, argv) {
148178
148324
  `Invalid number of arguments to create a custom certificate entry. Usage:`
148179
148325
  );
148180
148326
  output_manager_default.print(
148181
- ` ${import_chalk55.default.cyan(getCommandName("certs add <cn>[, <cn>]"))}
148327
+ ` ${import_chalk56.default.cyan(getCommandName("certs add <cn>[, <cn>]"))}
148182
148328
  `
148183
148329
  );
148184
148330
  return 1;
@@ -148188,7 +148334,7 @@ async function add(client2, argv) {
148188
148334
  []
148189
148335
  );
148190
148336
  output_manager_default.spinner(
148191
- `Generating a certificate for ${import_chalk55.default.bold(cns.join(", "))}`
148337
+ `Generating a certificate for ${import_chalk56.default.bold(cns.join(", "))}`
148192
148338
  );
148193
148339
  const { contextName } = await getScope(client2);
148194
148340
  cert = await createCertForCns(client2, cns, contextName);
@@ -148199,18 +148345,18 @@ async function add(client2, argv) {
148199
148345
  return 1;
148200
148346
  } else {
148201
148347
  output_manager_default.success(
148202
- `Certificate entry for ${import_chalk55.default.bold(
148348
+ `Certificate entry for ${import_chalk56.default.bold(
148203
148349
  cert.cns.join(", ")
148204
148350
  )} created ${addStamp()}`
148205
148351
  );
148206
148352
  }
148207
148353
  return 0;
148208
148354
  }
148209
- var import_chalk55, add_default;
148355
+ var import_chalk56, add_default;
148210
148356
  var init_add2 = __esm({
148211
148357
  "src/commands/certs/add.ts"() {
148212
148358
  "use strict";
148213
- import_chalk55 = __toESM3(require_source());
148359
+ import_chalk56 = __toESM3(require_source());
148214
148360
  init_get_scope();
148215
148361
  init_stamp();
148216
148362
  init_output_manager();
@@ -148228,7 +148374,7 @@ var init_add2 = __esm({
148228
148374
 
148229
148375
  // src/util/certs/finish-cert-order.ts
148230
148376
  async function startCertOrder(client2, cns, context) {
148231
- output_manager_default.spinner(`Issuing a certificate for ${import_chalk56.default.bold(cns.join(", "))}`);
148377
+ output_manager_default.spinner(`Issuing a certificate for ${import_chalk57.default.bold(cns.join(", "))}`);
148232
148378
  try {
148233
148379
  const cert = await client2.fetch("/v3/certs", {
148234
148380
  method: "PATCH",
@@ -148251,11 +148397,11 @@ async function startCertOrder(client2, cns, context) {
148251
148397
  throw err;
148252
148398
  }
148253
148399
  }
148254
- var import_chalk56;
148400
+ var import_chalk57;
148255
148401
  var init_finish_cert_order = __esm({
148256
148402
  "src/util/certs/finish-cert-order.ts"() {
148257
148403
  "use strict";
148258
- import_chalk56 = __toESM3(require_source());
148404
+ import_chalk57 = __toESM3(require_source());
148259
148405
  init_errors_ts();
148260
148406
  init_map_cert_error();
148261
148407
  init_output_manager();
@@ -148275,9 +148421,9 @@ var init_get_cns_from_args = __esm({
148275
148421
  // src/util/certs/start-cert-order.ts
148276
148422
  async function startCertOrder2(client2, cns, contextName) {
148277
148423
  output_manager_default.spinner(
148278
- `Starting certificate issuance for ${import_chalk57.default.bold(
148424
+ `Starting certificate issuance for ${import_chalk58.default.bold(
148279
148425
  cns.join(", ")
148280
- )} under ${import_chalk57.default.bold(contextName)}`
148426
+ )} under ${import_chalk58.default.bold(contextName)}`
148281
148427
  );
148282
148428
  const order = await client2.fetch("/v3/certs", {
148283
148429
  method: "PATCH",
@@ -148288,11 +148434,11 @@ async function startCertOrder2(client2, cns, contextName) {
148288
148434
  });
148289
148435
  return order;
148290
148436
  }
148291
- var import_chalk57;
148437
+ var import_chalk58;
148292
148438
  var init_start_cert_order = __esm({
148293
148439
  "src/util/certs/start-cert-order.ts"() {
148294
148440
  "use strict";
148295
- import_chalk57 = __toESM3(require_source());
148441
+ import_chalk58 = __toESM3(require_source());
148296
148442
  init_output_manager();
148297
148443
  }
148298
148444
  });
@@ -148362,7 +148508,7 @@ async function issue(client2, argv) {
148362
148508
  `Invalid number of arguments to create a custom certificate entry. Usage:`
148363
148509
  );
148364
148510
  output_manager_default.print(
148365
- ` ${import_chalk58.default.cyan(
148511
+ ` ${import_chalk59.default.cyan(
148366
148512
  getCommandName(
148367
148513
  "certs issue --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
148368
148514
  )
@@ -148377,7 +148523,7 @@ async function issue(client2, argv) {
148377
148523
  return 1;
148378
148524
  }
148379
148525
  output_manager_default.success(
148380
- `Certificate entry for ${import_chalk58.default.bold(
148526
+ `Certificate entry for ${import_chalk59.default.bold(
148381
148527
  cert.cns.join(", ")
148382
148528
  )} created ${addStamp()}`
148383
148529
  );
@@ -148388,7 +148534,7 @@ async function issue(client2, argv) {
148388
148534
  `Invalid number of arguments to create a custom certificate entry. Usage:`
148389
148535
  );
148390
148536
  output_manager_default.print(
148391
- ` ${import_chalk58.default.cyan(getCommandName("certs issue <cn>[, <cn>]"))}
148537
+ ` ${import_chalk59.default.cyan(getCommandName("certs issue <cn>[, <cn>]"))}
148392
148538
  `
148393
148539
  );
148394
148540
  return 1;
@@ -148416,14 +148562,14 @@ async function issue(client2, argv) {
148416
148562
  }
148417
148563
  if (handledResult instanceof DomainPermissionDenied) {
148418
148564
  output_manager_default.error(
148419
- `You do not have permissions over domain ${import_chalk58.default.underline(
148565
+ `You do not have permissions over domain ${import_chalk59.default.underline(
148420
148566
  handledResult.meta.domain
148421
- )} under ${import_chalk58.default.bold(handledResult.meta.context)}.`
148567
+ )} under ${import_chalk59.default.bold(handledResult.meta.context)}.`
148422
148568
  );
148423
148569
  return 1;
148424
148570
  }
148425
148571
  output_manager_default.success(
148426
- `Certificate entry for ${import_chalk58.default.bold(
148572
+ `Certificate entry for ${import_chalk59.default.bold(
148427
148573
  handledResult.cns.join(", ")
148428
148574
  )} created ${addStamp()}`
148429
148575
  );
@@ -148445,7 +148591,7 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
148445
148591
  }
148446
148592
  if (pendingChallenges.length === 0) {
148447
148593
  output_manager_default.log(
148448
- `A certificate issuance for ${import_chalk58.default.bold(
148594
+ `A certificate issuance for ${import_chalk59.default.bold(
148449
148595
  cns.join(", ")
148450
148596
  )} has been started ${stamp()}`
148451
148597
  );
@@ -148454,13 +148600,13 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
148454
148600
  `
148455
148601
  );
148456
148602
  output_manager_default.print(
148457
- ` ${import_chalk58.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
148603
+ ` ${import_chalk59.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
148458
148604
  `
148459
148605
  );
148460
148606
  return 0;
148461
148607
  }
148462
148608
  output_manager_default.log(
148463
- `A certificate issuance for ${import_chalk58.default.bold(
148609
+ `A certificate issuance for ${import_chalk59.default.bold(
148464
148610
  cns.join(", ")
148465
148611
  )} has been started ${stamp()}`
148466
148612
  );
@@ -148489,7 +148635,7 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
148489
148635
  `);
148490
148636
  output_manager_default.log(`To issue the certificate once the records are added, run:`);
148491
148637
  output_manager_default.print(
148492
- ` ${import_chalk58.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
148638
+ ` ${import_chalk59.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
148493
148639
  `
148494
148640
  );
148495
148641
  output_manager_default.print(
@@ -148497,11 +148643,11 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
148497
148643
  );
148498
148644
  return 0;
148499
148645
  }
148500
- var import_chalk58, import_tldts4;
148646
+ var import_chalk59, import_tldts4;
148501
148647
  var init_issue2 = __esm({
148502
148648
  "src/commands/certs/issue.ts"() {
148503
148649
  "use strict";
148504
- import_chalk58 = __toESM3(require_source());
148650
+ import_chalk59 = __toESM3(require_source());
148505
148651
  import_tldts4 = __toESM3(require_cjs7());
148506
148652
  init_errors_ts();
148507
148653
  init_create_cert_for_cns();
@@ -148593,7 +148739,7 @@ async function ls2(client2, argv) {
148593
148739
  const lsStamp = stamp_default();
148594
148740
  if (args2.length !== 0) {
148595
148741
  output_manager_default.error(
148596
- `Invalid number of arguments. Usage: ${import_chalk59.default.cyan(
148742
+ `Invalid number of arguments. Usage: ${import_chalk60.default.cyan(
148597
148743
  `${getCommandName("certs ls")}`
148598
148744
  )}`
148599
148745
  );
@@ -148602,7 +148748,7 @@ async function ls2(client2, argv) {
148602
148748
  const { certs, pagination } = await getCerts(client2, ...paginationOptions);
148603
148749
  const { contextName } = await getScope(client2);
148604
148750
  output_manager_default.log(
148605
- `${certs.length > 0 ? "Certificates" : "No certificates"} found under ${import_chalk59.default.bold(contextName)} ${lsStamp()}`
148751
+ `${certs.length > 0 ? "Certificates" : "No certificates"} found under ${import_chalk60.default.bold(contextName)} ${lsStamp()}`
148606
148752
  );
148607
148753
  if (certs.length > 0) {
148608
148754
  client2.stdout.write(formatCertsTable(certs));
@@ -148626,11 +148772,11 @@ function formatCertsTable(certsList) {
148626
148772
  }
148627
148773
  function formatCertsTableHead() {
148628
148774
  return [
148629
- import_chalk59.default.dim("id"),
148630
- import_chalk59.default.dim("cns"),
148631
- import_chalk59.default.dim("expiration"),
148632
- import_chalk59.default.dim("renew"),
148633
- import_chalk59.default.dim("age")
148775
+ import_chalk60.default.dim("id"),
148776
+ import_chalk60.default.dim("cns"),
148777
+ import_chalk60.default.dim("expiration"),
148778
+ import_chalk60.default.dim("renew"),
148779
+ import_chalk60.default.dim("age")
148634
148780
  ];
148635
148781
  }
148636
148782
  function formatCertsTableBody(certsList) {
@@ -148649,7 +148795,7 @@ function formatCertNonFirstCn(cn, multiple) {
148649
148795
  return ["", formatCertCn(cn, multiple), "", "", ""];
148650
148796
  }
148651
148797
  function formatCertCn(cn, multiple) {
148652
- return multiple ? `${import_chalk59.default.gray("-")} ${import_chalk59.default.bold(cn)}` : import_chalk59.default.bold(cn);
148798
+ return multiple ? `${import_chalk60.default.gray("-")} ${import_chalk60.default.bold(cn)}` : import_chalk60.default.bold(cn);
148653
148799
  }
148654
148800
  function formatCertFirstCn(time, cert, cn, multiple) {
148655
148801
  return [
@@ -148657,18 +148803,18 @@ function formatCertFirstCn(time, cert, cn, multiple) {
148657
148803
  formatCertCn(cn, multiple),
148658
148804
  formatExpirationDate(new Date(cert.expiration)),
148659
148805
  cert.autoRenew ? "yes" : "no",
148660
- import_chalk59.default.gray((0, import_ms7.default)(time.getTime() - new Date(cert.created).getTime()))
148806
+ import_chalk60.default.gray((0, import_ms7.default)(time.getTime() - new Date(cert.created).getTime()))
148661
148807
  ];
148662
148808
  }
148663
148809
  function formatExpirationDate(date) {
148664
148810
  const diff = date.getTime() - Date.now();
148665
- return diff < 0 ? import_chalk59.default.gray(`${(0, import_ms7.default)(-diff)} ago`) : import_chalk59.default.gray(`in ${(0, import_ms7.default)(diff)}`);
148811
+ return diff < 0 ? import_chalk60.default.gray(`${(0, import_ms7.default)(-diff)} ago`) : import_chalk60.default.gray(`in ${(0, import_ms7.default)(diff)}`);
148666
148812
  }
148667
- var import_chalk59, import_ms7, ls_default;
148813
+ var import_chalk60, import_ms7, ls_default;
148668
148814
  var init_ls3 = __esm({
148669
148815
  "src/commands/certs/ls.ts"() {
148670
148816
  "use strict";
148671
- import_chalk59 = __toESM3(require_source());
148817
+ import_chalk60 = __toESM3(require_source());
148672
148818
  import_ms7 = __toESM3(require_ms());
148673
148819
  init_table();
148674
148820
  init_get_scope();
@@ -148721,7 +148867,7 @@ var init_get_cert_by_id = __esm({
148721
148867
  async function getCustomCertsForDomain(client2, context, domain) {
148722
148868
  try {
148723
148869
  const { certs } = await client2.fetch(
148724
- `/v5/now/certs?${(0, import_querystring3.stringify)({ domain, custom: true })}`
148870
+ `/v5/now/certs?${(0, import_querystring.stringify)({ domain, custom: true })}`
148725
148871
  );
148726
148872
  return certs;
148727
148873
  } catch (err) {
@@ -148731,11 +148877,11 @@ async function getCustomCertsForDomain(client2, context, domain) {
148731
148877
  throw err;
148732
148878
  }
148733
148879
  }
148734
- var import_querystring3;
148880
+ var import_querystring;
148735
148881
  var init_get_custom_certs_for_domain = __esm({
148736
148882
  "src/util/certs/get-custom-certs-for-domain.ts"() {
148737
148883
  "use strict";
148738
- import_querystring3 = require("querystring");
148884
+ import_querystring = require("querystring");
148739
148885
  init_errors_ts();
148740
148886
  }
148741
148887
  });
@@ -148781,7 +148927,7 @@ async function rm2(client2, argv) {
148781
148927
  telemetry2.trackCliArgumentId(id);
148782
148928
  if (args2.length !== 1) {
148783
148929
  output_manager_default.error(
148784
- `Invalid number of arguments. Usage: ${import_chalk60.default.cyan(
148930
+ `Invalid number of arguments. Usage: ${import_chalk61.default.cyan(
148785
148931
  `${getCommandName("certs rm <id or cn>")}`
148786
148932
  )}`
148787
148933
  );
@@ -148798,13 +148944,13 @@ async function rm2(client2, argv) {
148798
148944
  if (certs.length === 0) {
148799
148945
  if (id.includes(".")) {
148800
148946
  output_manager_default.error(
148801
- `No custom certificates found for "${id}" under ${import_chalk60.default.bold(
148947
+ `No custom certificates found for "${id}" under ${import_chalk61.default.bold(
148802
148948
  contextName
148803
148949
  )}`
148804
148950
  );
148805
148951
  } else {
148806
148952
  output_manager_default.error(
148807
- `No certificates found by id "${id}" under ${import_chalk60.default.bold(contextName)}`
148953
+ `No certificates found by id "${id}" under ${import_chalk61.default.bold(contextName)}`
148808
148954
  );
148809
148955
  }
148810
148956
  return 1;
@@ -148819,7 +148965,7 @@ async function rm2(client2, argv) {
148819
148965
  }
148820
148966
  await Promise.all(certs.map((cert) => deleteCertById(client2, cert.uid)));
148821
148967
  output_manager_default.success(
148822
- `${import_chalk60.default.bold(
148968
+ `${import_chalk61.default.bold(
148823
148969
  (0, import_pluralize7.default)("Certificate", certs.length, true)
148824
148970
  )} removed ${rmStamp()}`
148825
148971
  );
@@ -148847,7 +148993,7 @@ function readConfirmation(client2, msg, certs) {
148847
148993
  `
148848
148994
  );
148849
148995
  output_manager_default.print(
148850
- `${import_chalk60.default.bold.red("> Are you sure?")} ${import_chalk60.default.gray("(y/N) ")}`
148996
+ `${import_chalk61.default.bold.red("> Are you sure?")} ${import_chalk61.default.gray("(y/N) ")}`
148851
148997
  );
148852
148998
  client2.stdin.on("data", (d) => {
148853
148999
  process.stdin.pause();
@@ -148858,15 +149004,15 @@ function readConfirmation(client2, msg, certs) {
148858
149004
  function formatCertRow(cert) {
148859
149005
  return [
148860
149006
  cert.uid,
148861
- import_chalk60.default.bold(cert.cns ? cert.cns.join(", ") : "\u2013"),
148862
- ...cert.created ? [import_chalk60.default.gray(`${(0, import_ms8.default)(Date.now() - new Date(cert.created).getTime())} ago`)] : []
149007
+ import_chalk61.default.bold(cert.cns ? cert.cns.join(", ") : "\u2013"),
149008
+ ...cert.created ? [import_chalk61.default.gray(`${(0, import_ms8.default)(Date.now() - new Date(cert.created).getTime())} ago`)] : []
148863
149009
  ];
148864
149010
  }
148865
- var import_chalk60, import_ms8, import_pluralize7, rm_default;
149011
+ var import_chalk61, import_ms8, import_pluralize7, rm_default;
148866
149012
  var init_rm2 = __esm({
148867
149013
  "src/commands/certs/rm.ts"() {
148868
149014
  "use strict";
148869
- import_chalk60 = __toESM3(require_source());
149015
+ import_chalk61 = __toESM3(require_source());
148870
149016
  import_ms8 = __toESM3(require_ms());
148871
149017
  import_pluralize7 = __toESM3(require_pluralize());
148872
149018
  init_table();
@@ -149112,7 +149258,7 @@ var require_jsonlines = __commonJS2({
149112
149258
  exports2.parse = function parse11(options) {
149113
149259
  return new Parser(options);
149114
149260
  };
149115
- exports2.stringify = function stringify3() {
149261
+ exports2.stringify = function stringify2() {
149116
149262
  return new Stringifier();
149117
149263
  };
149118
149264
  }
@@ -149423,7 +149569,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
149423
149569
  const timeout = setTimeout(() => {
149424
149570
  abortController.abort();
149425
149571
  warn(
149426
- `${import_chalk61.default.bold(
149572
+ `${import_chalk62.default.bold(
149427
149573
  `Command automatically interrupted after ${CommandTimeout}.`
149428
149574
  )}
149429
149575
  `
@@ -149465,7 +149611,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
149465
149611
  stopSpinner();
149466
149612
  if (isRuntimeLimitDelimiter(log3)) {
149467
149613
  abortController.abort();
149468
- warn(`${import_chalk61.default.bold(log3.message)}
149614
+ warn(`${import_chalk62.default.bold(log3.message)}
149469
149615
  `);
149470
149616
  return;
149471
149617
  }
@@ -149502,7 +149648,7 @@ function printBuildLog(log2, print) {
149502
149648
  return;
149503
149649
  const date = new Date(log2.created).toISOString();
149504
149650
  for (const line of colorize(sanitize(log2), log2).split("\n")) {
149505
- print(`${import_chalk61.default.dim(date)} ${line.replace("[now-builder-debug] ", "")}
149651
+ print(`${import_chalk62.default.dim(date)} ${line.replace("[now-builder-debug] ", "")}
149506
149652
  `);
149507
149653
  }
149508
149654
  }
@@ -149527,9 +149673,9 @@ function prettyPrintLogline({
149527
149673
  const date = (0, import_date_fns2.format)(timestampInMs, dateTimeFormat);
149528
149674
  const levelIcon = getLevelIcon(level);
149529
149675
  const sourceIcon = getSourceIcon(source);
149530
- const detailsLine = `${import_chalk61.default.dim(date)} ${levelIcon} ${import_chalk61.default.bold(
149676
+ const detailsLine = `${import_chalk62.default.dim(date)} ${levelIcon} ${import_chalk62.default.bold(
149531
149677
  method
149532
- )} ${import_chalk61.default.grey(status3 <= 0 ? "---" : status3)} ${import_chalk61.default.dim(
149678
+ )} ${import_chalk62.default.grey(status3 <= 0 ? "---" : status3)} ${import_chalk62.default.dim(
149533
149679
  domain
149534
149680
  )} ${sourceIcon} ${path11}`;
149535
149681
  print(
@@ -149570,17 +149716,17 @@ function sanitize(log2) {
149570
149716
  }
149571
149717
  function colorize(text, log2) {
149572
149718
  if (log2.level === "error") {
149573
- return import_chalk61.default.red(text);
149719
+ return import_chalk62.default.red(text);
149574
149720
  } else if (log2.level === "warning") {
149575
- return import_chalk61.default.yellow(text);
149721
+ return import_chalk62.default.yellow(text);
149576
149722
  }
149577
149723
  return text;
149578
149724
  }
149579
- var import_chalk61, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
149725
+ var import_chalk62, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
149580
149726
  var init_logs = __esm({
149581
149727
  "src/util/logs.ts"() {
149582
149728
  "use strict";
149583
- import_chalk61 = __toESM3(require_source());
149729
+ import_chalk62 = __toESM3(require_source());
149584
149730
  import_date_fns2 = __toESM3(require_date_fns());
149585
149731
  import_ms9 = __toESM3(require_ms());
149586
149732
  import_jsonlines2 = __toESM3(require_jsonlines());
@@ -149619,7 +149765,7 @@ function printInspectUrl(inspectorUrl, deployStamp) {
149619
149765
  }
149620
149766
  output_manager_default.print(
149621
149767
  prependEmoji(
149622
- `Inspect: ${import_chalk62.default.bold(inspectorUrl)} ${deployStamp()}`,
149768
+ `Inspect: ${import_chalk63.default.bold(inspectorUrl)} ${deployStamp()}`,
149623
149769
  emoji("inspect")
149624
149770
  ) + `
149625
149771
  `
@@ -149671,7 +149817,7 @@ async function processDeployment({
149671
149817
  agent,
149672
149818
  projectName
149673
149819
  };
149674
- const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk62.default.bold(`${org.slug}/${projectName}`)}`;
149820
+ const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk63.default.bold(`${org.slug}/${projectName}`)}`;
149675
149821
  output_manager_default.spinner(deployingSpinnerVal, 0);
149676
149822
  const indications = [];
149677
149823
  let abortController;
@@ -149708,7 +149854,7 @@ async function processDeployment({
149708
149854
  const percent = uploadedBytes / missingSize;
149709
149855
  if (percent >= nextStep) {
149710
149856
  output_manager_default.spinner(
149711
- `Uploading ${import_chalk62.default.reset(
149857
+ `Uploading ${import_chalk63.default.reset(
149712
149858
  `[${bar}] (${uploadedHuman}/${totalSizeHuman})`
149713
149859
  )}`,
149714
149860
  0
@@ -149736,7 +149882,7 @@ async function processDeployment({
149736
149882
  const previewUrl = `https://${deployment.url}`;
149737
149883
  output_manager_default.print(
149738
149884
  prependEmoji(
149739
- `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk62.default.bold(
149885
+ `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk63.default.bold(
149740
149886
  previewUrl
149741
149887
  )} ${deployStamp()}`,
149742
149888
  emoji("success")
@@ -149833,14 +149979,14 @@ ${archiveSuggestionText}`
149833
149979
  }
149834
149980
  }
149835
149981
  }
149836
- var import_client7, import_error_utils18, import_bytes4, import_chalk62, archiveSuggestionText, UploadErrorMissingArchive;
149982
+ var import_client7, import_error_utils18, import_bytes4, import_chalk63, archiveSuggestionText, UploadErrorMissingArchive;
149837
149983
  var init_process_deployment = __esm({
149838
149984
  "src/util/deploy/process-deployment.ts"() {
149839
149985
  "use strict";
149840
149986
  import_client7 = __toESM3(require_dist7());
149841
149987
  import_error_utils18 = __toESM3(require_dist2());
149842
149988
  import_bytes4 = __toESM3(require_bytes());
149843
- import_chalk62 = __toESM3(require_source());
149989
+ import_chalk63 = __toESM3(require_source());
149844
149990
  init_emoji();
149845
149991
  init_logs();
149846
149992
  init_progress();
@@ -149858,17 +150004,17 @@ var init_process_deployment = __esm({
149858
150004
  });
149859
150005
 
149860
150006
  // src/util/index.ts
149861
- var import_querystring4, import_url12, import_async_retry5, import_ms10, import_node_fetch4, import_bytes5, import_chalk63, Now;
150007
+ var import_querystring2, import_url12, import_async_retry5, import_ms10, import_node_fetch4, import_bytes5, import_chalk64, Now;
149862
150008
  var init_util = __esm({
149863
150009
  "src/util/index.ts"() {
149864
150010
  "use strict";
149865
- import_querystring4 = __toESM3(require("querystring"));
150011
+ import_querystring2 = __toESM3(require("querystring"));
149866
150012
  import_url12 = require("url");
149867
150013
  import_async_retry5 = __toESM3(require_dist5());
149868
150014
  import_ms10 = __toESM3(require_ms());
149869
150015
  import_node_fetch4 = __toESM3(require_lib7());
149870
150016
  import_bytes5 = __toESM3(require_bytes());
149871
- import_chalk63 = __toESM3(require_source());
150017
+ import_chalk64 = __toESM3(require_source());
149872
150018
  init_ua();
149873
150019
  init_process_deployment();
149874
150020
  init_error2();
@@ -149981,7 +150127,7 @@ var init_util = __esm({
149981
150127
  if (sizeExceeded > 0) {
149982
150128
  warn(`${sizeExceeded} of the files exceeded the limit for your plan.`);
149983
150129
  log2(
149984
- `Please upgrade your plan here: ${import_chalk63.default.cyan(
150130
+ `Please upgrade your plan here: ${import_chalk64.default.cyan(
149985
150131
  "https://vercel.com/account/plan"
149986
150132
  )}`
149987
150133
  );
@@ -150081,7 +150227,7 @@ ${err.stack}`);
150081
150227
  const parsedUrl = (0, import_url12.parse)(_url, true);
150082
150228
  const query = parsedUrl.query;
150083
150229
  query.teamId = this.currentTeam;
150084
- _url = `${parsedUrl.pathname}?${import_querystring4.default.stringify(query)}`;
150230
+ _url = `${parsedUrl.pathname}?${import_querystring2.default.stringify(query)}`;
150085
150231
  delete opts.useCurrentTeam;
150086
150232
  }
150087
150233
  opts.headers = new import_node_fetch4.Headers(opts.headers);
@@ -150319,7 +150465,7 @@ var init_is_deploying = __esm({
150319
150465
  // src/util/suggest-next-commands.ts
150320
150466
  function suggestNextCommands(commands2) {
150321
150467
  output_manager_default.print(
150322
- import_chalk64.default.dim(
150468
+ import_chalk65.default.dim(
150323
150469
  [
150324
150470
  `Common next commands:`,
150325
150471
  ...commands2.map((command) => `- ${command}`)
@@ -150328,12 +150474,12 @@ function suggestNextCommands(commands2) {
150328
150474
  );
150329
150475
  output_manager_default.print("\n");
150330
150476
  }
150331
- var import_chalk64;
150477
+ var import_chalk65;
150332
150478
  var init_suggest_next_commands = __esm({
150333
150479
  "src/util/suggest-next-commands.ts"() {
150334
150480
  "use strict";
150335
150481
  init_output_manager();
150336
- import_chalk64 = __toESM3(require_source());
150482
+ import_chalk65 = __toESM3(require_source());
150337
150483
  }
150338
150484
  });
150339
150485
 
@@ -150380,10 +150526,10 @@ async function printDeploymentStatus({
150380
150526
  }
150381
150527
  const newline = "\n";
150382
150528
  for (const indication of indications) {
150383
- const message2 = prependEmoji(import_chalk65.default.dim(indication.payload), emoji(indication.type)) + newline;
150529
+ const message2 = prependEmoji(import_chalk66.default.dim(indication.payload), emoji(indication.type)) + newline;
150384
150530
  let link4 = "";
150385
150531
  if (indication.link)
150386
- link4 = import_chalk65.default.dim(
150532
+ link4 = import_chalk66.default.dim(
150387
150533
  `${indication.action || "Learn More"}: ${link_default(indication.link)}`
150388
150534
  ) + newline;
150389
150535
  output_manager_default.print(message2 + link4);
@@ -150400,11 +150546,11 @@ async function printDeploymentStatus({
150400
150546
  }
150401
150547
  return 0;
150402
150548
  }
150403
- var import_chalk65;
150549
+ var import_chalk66;
150404
150550
  var init_print_deployment_status = __esm({
150405
150551
  "src/util/deploy/print-deployment-status.ts"() {
150406
150552
  "use strict";
150407
- import_chalk65 = __toESM3(require_source());
150553
+ import_chalk66 = __toESM3(require_source());
150408
150554
  init_is_deploying();
150409
150555
  init_link();
150410
150556
  init_emoji();
@@ -150629,7 +150775,7 @@ function handleCreateDeployError(error3, localConfig) {
150629
150775
  }
150630
150776
  if (error3 instanceof DomainVerificationFailed) {
150631
150777
  output_manager_default.error(
150632
- `The domain used as a suffix ${import_chalk66.default.underline(
150778
+ `The domain used as a suffix ${import_chalk67.default.underline(
150633
150779
  error3.meta.domain
150634
150780
  )} is not verified and can't be used as custom suffix.`
150635
150781
  );
@@ -150637,7 +150783,7 @@ function handleCreateDeployError(error3, localConfig) {
150637
150783
  }
150638
150784
  if (error3 instanceof DomainPermissionDenied) {
150639
150785
  output_manager_default.error(
150640
- `You don't have permissions to access the domain used as a suffix ${import_chalk66.default.underline(
150786
+ `You don't have permissions to access the domain used as a suffix ${import_chalk67.default.underline(
150641
150787
  error3.meta.domain
150642
150788
  )}.`
150643
150789
  );
@@ -150663,7 +150809,7 @@ function handleCreateDeployError(error3, localConfig) {
150663
150809
  }
150664
150810
  if (error3 instanceof DomainNotVerified) {
150665
150811
  output_manager_default.error(
150666
- `The domain used as an alias ${import_chalk66.default.underline(
150812
+ `The domain used as an alias ${import_chalk67.default.underline(
150667
150813
  error3.meta.domain
150668
150814
  )} is not verified yet. Please verify it.`
150669
150815
  );
@@ -150682,7 +150828,7 @@ function handleCreateDeployError(error3, localConfig) {
150682
150828
  }
150683
150829
  return error3;
150684
150830
  }
150685
- var import_build_utils14, import_client11, import_error_utils19, import_bytes6, import_chalk66, import_fs_extra20, import_ms11, import_path31, import_detect_agent, deploy_default, addProcessEnv;
150831
+ var import_build_utils14, import_client11, import_error_utils19, import_bytes6, import_chalk67, import_fs_extra20, import_ms11, import_path31, import_detect_agent, deploy_default, addProcessEnv;
150686
150832
  var init_deploy2 = __esm({
150687
150833
  "src/commands/deploy/index.ts"() {
150688
150834
  "use strict";
@@ -150690,7 +150836,7 @@ var init_deploy2 = __esm({
150690
150836
  import_client11 = __toESM3(require_dist7());
150691
150837
  import_error_utils19 = __toESM3(require_dist2());
150692
150838
  import_bytes6 = __toESM3(require_bytes());
150693
- import_chalk66 = __toESM3(require_source());
150839
+ import_chalk67 = __toESM3(require_source());
150694
150840
  import_fs_extra20 = __toESM3(require_lib());
150695
150841
  import_ms11 = __toESM3(require_ms());
150696
150842
  import_path31 = require("path");
@@ -151222,15 +151368,15 @@ ${err.stack}`);
151222
151368
  val = process.env[key];
151223
151369
  if (typeof val === "string") {
151224
151370
  log2(
151225
- `Reading ${import_chalk66.default.bold(
151226
- `"${import_chalk66.default.bold(key)}"`
151371
+ `Reading ${import_chalk67.default.bold(
151372
+ `"${import_chalk67.default.bold(key)}"`
151227
151373
  )} from your env (as no value was specified)`
151228
151374
  );
151229
151375
  env[key] = val.replace(/^@/, "\\@");
151230
151376
  } else {
151231
151377
  throw new Error(
151232
- `No value specified for env variable ${import_chalk66.default.bold(
151233
- `"${import_chalk66.default.bold(key)}"`
151378
+ `No value specified for env variable ${import_chalk67.default.bold(
151379
+ `"${import_chalk67.default.bold(key)}"`
151234
151380
  )} and it was not found in your env. If you meant to specify an environment to deploy to, use ${param("--target")}`
151235
151381
  );
151236
151382
  }
@@ -168986,7 +169132,7 @@ function buildMatchEquals(a, b) {
168986
169132
  return false;
168987
169133
  return true;
168988
169134
  }
168989
- var import_url15, import_http3, import_fs_extra21, import_ms13, import_chalk67, import_node_fetch6, import_pluralize9, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path35, import_once, import_directory, import_get_port, import_is_port_reachable, import_fast_deep_equal, import_npm_package_arg2, import_json_parse_better_errors3, import_client12, import_routing_utils5, import_build_utils17, import_fs_detectors6, import_frameworks6, import_error_utils20, frontendRuntimeSet, DEV_SERVER_PORT_BIND_TIMEOUT, DevServer;
169135
+ var import_url15, import_http3, import_fs_extra21, import_ms13, import_chalk68, import_node_fetch6, import_pluralize9, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path35, import_once, import_directory, import_get_port, import_is_port_reachable, import_fast_deep_equal, import_npm_package_arg2, import_json_parse_better_errors3, import_client12, import_routing_utils5, import_build_utils17, import_fs_detectors6, import_frameworks6, import_error_utils20, frontendRuntimeSet, DEV_SERVER_PORT_BIND_TIMEOUT, DevServer;
168990
169136
  var init_server = __esm({
168991
169137
  "src/util/dev/server.ts"() {
168992
169138
  "use strict";
@@ -168994,7 +169140,7 @@ var init_server = __esm({
168994
169140
  import_http3 = __toESM3(require("http"));
168995
169141
  import_fs_extra21 = __toESM3(require_lib());
168996
169142
  import_ms13 = __toESM3(require_ms());
168997
- import_chalk67 = __toESM3(require_source());
169143
+ import_chalk68 = __toESM3(require_source());
168998
169144
  import_node_fetch6 = __toESM3(require_lib7());
168999
169145
  import_pluralize9 = __toESM3(require_pluralize());
169000
169146
  import_raw_body = __toESM3(require_raw_body());
@@ -169072,7 +169218,7 @@ var init_server = __esm({
169072
169218
  return;
169073
169219
  }
169074
169220
  const method = req.method || "GET";
169075
- output_manager_default.debug(`${import_chalk67.default.bold(method)} ${req.url}`);
169221
+ output_manager_default.debug(`${import_chalk68.default.bold(method)} ${req.url}`);
169076
169222
  try {
169077
169223
  const vercelConfig = await this.getVercelConfig();
169078
169224
  await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
@@ -169274,7 +169420,7 @@ var init_server = __esm({
169274
169420
  }
169275
169421
  } catch (err) {
169276
169422
  if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
169277
- err.message = `Command not found: ${import_chalk67.default.cyan(
169423
+ err.message = `Command not found: ${import_chalk68.default.cyan(
169278
169424
  err.path,
169279
169425
  ...err.spawnargs
169280
169426
  )}
@@ -169531,7 +169677,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
169531
169677
  });
169532
169678
  } catch (err) {
169533
169679
  if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
169534
- err.message = `Command not found: ${import_chalk67.default.cyan(
169680
+ err.message = `Command not found: ${import_chalk68.default.cyan(
169535
169681
  err.path,
169536
169682
  ...err.spawnargs
169537
169683
  )}
@@ -170231,10 +170377,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
170231
170377
  */
170232
170378
  async _start(...listenSpec) {
170233
170379
  if (!import_fs_extra21.default.existsSync(this.cwd)) {
170234
- throw new Error(`${import_chalk67.default.bold(this.cwd)} doesn't exist`);
170380
+ throw new Error(`${import_chalk68.default.bold(this.cwd)} doesn't exist`);
170235
170381
  }
170236
170382
  if (!import_fs_extra21.default.lstatSync(this.cwd).isDirectory()) {
170237
- throw new Error(`${import_chalk67.default.bold(this.cwd)} is not a directory`);
170383
+ throw new Error(`${import_chalk68.default.bold(this.cwd)} is not a directory`);
170238
170384
  }
170239
170385
  const { ig } = await (0, import_client12.getVercelIgnore)(this.cwd);
170240
170386
  this.filter = ig.createFilter();
@@ -170248,14 +170394,14 @@ Please ensure that ${cmd(err.path)} is properly installed`;
170248
170394
  if (err.code === "EADDRINUSE") {
170249
170395
  if (typeof listenSpec[0] === "number") {
170250
170396
  output_manager_default.note(
170251
- `Requested port ${import_chalk67.default.yellow(
170397
+ `Requested port ${import_chalk68.default.yellow(
170252
170398
  String(listenSpec[0])
170253
170399
  )} is already in use`
170254
170400
  );
170255
170401
  listenSpec[0]++;
170256
170402
  } else {
170257
170403
  output_manager_default.error(
170258
- `Requested socket ${import_chalk67.default.cyan(
170404
+ `Requested socket ${import_chalk68.default.cyan(
170259
170405
  listenSpec[0]
170260
170406
  )} is already in use`
170261
170407
  );
@@ -170647,7 +170793,7 @@ ${error_code}
170647
170793
  if (this.devProcess) {
170648
170794
  await treeKill(this.devProcess.pid);
170649
170795
  }
170650
- output_manager_default.log(`Running Dev Command ${import_chalk67.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
170796
+ output_manager_default.log(`Running Dev Command ${import_chalk68.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
170651
170797
  const port = await (0, import_get_port.default)();
170652
170798
  const env = (0, import_build_utils17.cloneEnv)(
170653
170799
  {
@@ -170886,7 +171032,7 @@ async function dev(client2, opts, args2, telemetry2) {
170886
171032
  envValues,
170887
171033
  "vercel-cli:dev"
170888
171034
  )) {
170889
- output_manager_default.debug(`Refreshing ${import_chalk68.default.green(VERCEL_OIDC_TOKEN)}`);
171035
+ output_manager_default.debug(`Refreshing ${import_chalk69.default.green(VERCEL_OIDC_TOKEN)}`);
170890
171036
  envValues[VERCEL_OIDC_TOKEN] = token;
170891
171037
  await devServer.runDevCommand(true);
170892
171038
  telemetry2.trackOidcTokenRefresh(++refreshCount);
@@ -170917,11 +171063,11 @@ async function dev(client2, opts, args2, telemetry2) {
170917
171063
  controller.abort();
170918
171064
  }
170919
171065
  }
170920
- var import_chalk68, import_path36, import_fs_extra22;
171066
+ var import_chalk69, import_path36, import_fs_extra22;
170921
171067
  var init_dev = __esm({
170922
171068
  "src/commands/dev/dev.ts"() {
170923
171069
  "use strict";
170924
- import_chalk68 = __toESM3(require_source());
171070
+ import_chalk69 = __toESM3(require_source());
170925
171071
  import_path36 = require("path");
170926
171072
  import_fs_extra22 = __toESM3(require_lib());
170927
171073
  init_server();
@@ -171094,17 +171240,17 @@ async function main6(client2) {
171094
171240
  function stringifyError(err) {
171095
171241
  if (err instanceof NowError) {
171096
171242
  const errMeta = JSON.stringify(err.meta, null, 2).replace(/\\n/g, "\n");
171097
- return `${import_chalk69.default.red(err.code)} ${err.message}
171243
+ return `${import_chalk70.default.red(err.code)} ${err.message}
171098
171244
  ${errMeta}`;
171099
171245
  }
171100
171246
  return err.stack;
171101
171247
  }
171102
- var import_path37, import_chalk69, import_error_utils21, COMMAND_CONFIG6;
171248
+ var import_path37, import_chalk70, import_error_utils21, COMMAND_CONFIG6;
171103
171249
  var init_dev3 = __esm({
171104
171250
  "src/commands/dev/index.ts"() {
171105
171251
  "use strict";
171106
171252
  import_path37 = __toESM3(require("path"));
171107
- import_chalk69 = __toESM3(require_source());
171253
+ import_chalk70 = __toESM3(require_source());
171108
171254
  init_get_args();
171109
171255
  init_get_subcommand();
171110
171256
  init_now_error();
@@ -171246,9 +171392,9 @@ async function getDNSData(client2, data) {
171246
171392
  const port = await getNumber(client2, `- ${type} port: `);
171247
171393
  const target = await getTrimmedString(client2, `- ${type} target: `);
171248
171394
  output_manager_default.log(
171249
- `${import_chalk70.default.cyan(name)} ${import_chalk70.default.bold(type)} ${import_chalk70.default.cyan(
171395
+ `${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(
171250
171396
  `${priority}`
171251
- )} ${import_chalk70.default.cyan(`${weight}`)} ${import_chalk70.default.cyan(`${port}`)} ${import_chalk70.default.cyan(
171397
+ )} ${import_chalk71.default.cyan(`${weight}`)} ${import_chalk71.default.cyan(`${port}`)} ${import_chalk71.default.cyan(
171252
171398
  target
171253
171399
  )}.`
171254
171400
  );
@@ -171267,9 +171413,9 @@ async function getDNSData(client2, data) {
171267
171413
  const mxPriority = await getNumber(client2, `- ${type} priority: `);
171268
171414
  const value2 = await getTrimmedString(client2, `- ${type} host: `);
171269
171415
  output_manager_default.log(
171270
- `${import_chalk70.default.cyan(name)} ${import_chalk70.default.bold(type)} ${import_chalk70.default.cyan(
171416
+ `${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(
171271
171417
  `${mxPriority}`
171272
- )} ${import_chalk70.default.cyan(value2)}`
171418
+ )} ${import_chalk71.default.cyan(value2)}`
171273
171419
  );
171274
171420
  return await verifyData(client2) ? {
171275
171421
  name,
@@ -171279,7 +171425,7 @@ async function getDNSData(client2, data) {
171279
171425
  } : null;
171280
171426
  }
171281
171427
  const value = await getTrimmedString(client2, `- ${type} value: `);
171282
- output_manager_default.log(`${import_chalk70.default.cyan(name)} ${import_chalk70.default.bold(type)} ${import_chalk70.default.cyan(value)}`);
171428
+ output_manager_default.log(`${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(value)}`);
171283
171429
  return await verifyData(client2) ? {
171284
171430
  name,
171285
171431
  type,
@@ -171313,11 +171459,11 @@ async function getTrimmedString(client2, label) {
171313
171459
  });
171314
171460
  return res.trim();
171315
171461
  }
171316
- var import_chalk70, RECORD_TYPES;
171462
+ var import_chalk71, RECORD_TYPES;
171317
171463
  var init_get_dns_data = __esm({
171318
171464
  "src/util/dns/get-dns-data.ts"() {
171319
171465
  "use strict";
171320
- import_chalk70 = __toESM3(require_source());
171466
+ import_chalk71 = __toESM3(require_source());
171321
171467
  init_output_manager();
171322
171468
  RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
171323
171469
  }
@@ -171390,7 +171536,7 @@ async function add2(client2, argv) {
171390
171536
  const parsedParams = parseAddArgs(args2);
171391
171537
  if (!parsedParams) {
171392
171538
  output_manager_default.error(
171393
- `Invalid number of arguments. See: ${import_chalk71.default.cyan(
171539
+ `Invalid number of arguments. See: ${import_chalk72.default.cyan(
171394
171540
  `${getCommandName("dns --help")}`
171395
171541
  )} for usage.`
171396
171542
  );
@@ -171417,23 +171563,23 @@ async function add2(client2, argv) {
171417
171563
  const record = await addDNSRecord(client2, domain, data);
171418
171564
  if (record instanceof DomainNotFound) {
171419
171565
  output_manager_default.error(
171420
- `The domain ${domain} can't be found under ${import_chalk71.default.bold(
171566
+ `The domain ${domain} can't be found under ${import_chalk72.default.bold(
171421
171567
  contextName
171422
- )} ${import_chalk71.default.gray(addStamp())}`
171568
+ )} ${import_chalk72.default.gray(addStamp())}`
171423
171569
  );
171424
171570
  return 1;
171425
171571
  }
171426
171572
  if (record instanceof DNSPermissionDenied) {
171427
171573
  output_manager_default.error(
171428
- `You don't have permissions to add records to domain ${domain} under ${import_chalk71.default.bold(
171574
+ `You don't have permissions to add records to domain ${domain} under ${import_chalk72.default.bold(
171429
171575
  contextName
171430
- )} ${import_chalk71.default.gray(addStamp())}`
171576
+ )} ${import_chalk72.default.gray(addStamp())}`
171431
171577
  );
171432
171578
  return 1;
171433
171579
  }
171434
171580
  if (record instanceof DNSInvalidPort) {
171435
171581
  output_manager_default.error(
171436
- `Invalid <port> parameter. A number was expected ${import_chalk71.default.gray(
171582
+ `Invalid <port> parameter. A number was expected ${import_chalk72.default.gray(
171437
171583
  addStamp()
171438
171584
  )}`
171439
171585
  );
@@ -171441,7 +171587,7 @@ async function add2(client2, argv) {
171441
171587
  }
171442
171588
  if (record instanceof DNSInvalidType) {
171443
171589
  output_manager_default.error(
171444
- `Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk71.default.gray(
171590
+ `Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk72.default.gray(
171445
171591
  addStamp()
171446
171592
  )}`
171447
171593
  );
@@ -171452,17 +171598,17 @@ async function add2(client2, argv) {
171452
171598
  return 1;
171453
171599
  }
171454
171600
  output_manager_default.success(
171455
- `DNS record for domain ${import_chalk71.default.bold(domain)} ${import_chalk71.default.gray(
171601
+ `DNS record for domain ${import_chalk72.default.bold(domain)} ${import_chalk72.default.gray(
171456
171602
  `(${record.uid})`
171457
- )} created under ${import_chalk71.default.bold(contextName)} ${import_chalk71.default.gray(addStamp())}`
171603
+ )} created under ${import_chalk72.default.bold(contextName)} ${import_chalk72.default.gray(addStamp())}`
171458
171604
  );
171459
171605
  return 0;
171460
171606
  }
171461
- var import_chalk71;
171607
+ var import_chalk72;
171462
171608
  var init_add4 = __esm({
171463
171609
  "src/commands/dns/add.ts"() {
171464
171610
  "use strict";
171465
- import_chalk71 = __toESM3(require_source());
171611
+ import_chalk72 = __toESM3(require_source());
171466
171612
  init_errors_ts();
171467
171613
  init_add_dns_record();
171468
171614
  init_get_scope();
@@ -171482,7 +171628,7 @@ var init_add4 = __esm({
171482
171628
  // src/util/dns/import-zonefile.ts
171483
171629
  async function importZonefile(client2, contextName, domain, zonefilePath) {
171484
171630
  output_manager_default.spinner(
171485
- `Importing Zone file for domain ${domain} under ${import_chalk72.default.bold(contextName)}`
171631
+ `Importing Zone file for domain ${domain} under ${import_chalk73.default.bold(contextName)}`
171486
171632
  );
171487
171633
  const zonefile = (0, import_fs7.readFileSync)((0, import_path38.resolve)(zonefilePath), "utf8");
171488
171634
  try {
@@ -171509,11 +171655,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
171509
171655
  throw err;
171510
171656
  }
171511
171657
  }
171512
- var import_chalk72, import_fs7, import_path38;
171658
+ var import_chalk73, import_fs7, import_path38;
171513
171659
  var init_import_zonefile = __esm({
171514
171660
  "src/util/dns/import-zonefile.ts"() {
171515
171661
  "use strict";
171516
- import_chalk72 = __toESM3(require_source());
171662
+ import_chalk73 = __toESM3(require_source());
171517
171663
  import_fs7 = require("fs");
171518
171664
  import_path38 = require("path");
171519
171665
  init_errors_ts();
@@ -171568,7 +171714,7 @@ async function importZone(client2, argv) {
171568
171714
  });
171569
171715
  if (args2.length !== 2) {
171570
171716
  output_manager_default.error(
171571
- `Invalid number of arguments. Usage: ${import_chalk73.default.cyan(
171717
+ `Invalid number of arguments. Usage: ${import_chalk74.default.cyan(
171572
171718
  `${getCommandName("dns import <domain> <zonefile>")}`
171573
171719
  )}`
171574
171720
  );
@@ -171586,32 +171732,32 @@ async function importZone(client2, argv) {
171586
171732
  );
171587
171733
  if (recordIds instanceof DomainNotFound) {
171588
171734
  output_manager_default.error(
171589
- `The domain ${domain} can't be found under ${import_chalk73.default.bold(
171735
+ `The domain ${domain} can't be found under ${import_chalk74.default.bold(
171590
171736
  contextName
171591
- )} ${import_chalk73.default.gray(addStamp())}`
171737
+ )} ${import_chalk74.default.gray(addStamp())}`
171592
171738
  );
171593
171739
  return 1;
171594
171740
  }
171595
171741
  if (recordIds instanceof InvalidDomain) {
171596
171742
  output_manager_default.error(
171597
- `The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk73.default.gray(
171743
+ `The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk74.default.gray(
171598
171744
  addStamp()
171599
171745
  )}`
171600
171746
  );
171601
171747
  return 1;
171602
171748
  }
171603
171749
  output_manager_default.success(
171604
- `${recordIds.length} DNS records for domain ${import_chalk73.default.bold(
171750
+ `${recordIds.length} DNS records for domain ${import_chalk74.default.bold(
171605
171751
  domain
171606
- )} created under ${import_chalk73.default.bold(contextName)} ${import_chalk73.default.gray(addStamp())}`
171752
+ )} created under ${import_chalk74.default.bold(contextName)} ${import_chalk74.default.gray(addStamp())}`
171607
171753
  );
171608
171754
  return 0;
171609
171755
  }
171610
- var import_chalk73;
171756
+ var import_chalk74;
171611
171757
  var init_import2 = __esm({
171612
171758
  "src/commands/dns/import.ts"() {
171613
171759
  "use strict";
171614
- import_chalk73 = __toESM3(require_source());
171760
+ import_chalk74 = __toESM3(require_source());
171615
171761
  init_get_scope();
171616
171762
  init_errors_ts();
171617
171763
  init_stamp();
@@ -171654,7 +171800,7 @@ function formatTable(header, align, blocks) {
171654
171800
  out += `${block.name}
171655
171801
  `;
171656
171802
  }
171657
- const rows = [header.map((s) => import_chalk74.default.dim(s))].concat(block.rows);
171803
+ const rows = [header.map((s) => import_chalk75.default.dim(s))].concat(block.rows);
171658
171804
  if (rows.length > 0) {
171659
171805
  rows[0][0] = ` ${rows[0][0]}`;
171660
171806
  for (let i = 1; i < rows.length; i++) {
@@ -171674,11 +171820,11 @@ function formatTable(header, align, blocks) {
171674
171820
  }
171675
171821
  return out.slice(0, -1);
171676
171822
  }
171677
- var import_chalk74;
171823
+ var import_chalk75;
171678
171824
  var init_format_table = __esm({
171679
171825
  "src/util/format-table.ts"() {
171680
171826
  "use strict";
171681
- import_chalk74 = __toESM3(require_source());
171827
+ import_chalk75 = __toESM3(require_source());
171682
171828
  init_table();
171683
171829
  init_strlen();
171684
171830
  }
@@ -171762,18 +171908,18 @@ function getAddDomainName(domainNames) {
171762
171908
  ];
171763
171909
  }
171764
171910
  async function getDomainNames(client2, contextName, next) {
171765
- output_manager_default.spinner(`Fetching domains under ${import_chalk75.default.bold(contextName)}`);
171911
+ output_manager_default.spinner(`Fetching domains under ${import_chalk76.default.bold(contextName)}`);
171766
171912
  const { domains: domains2, pagination } = await getDomains(client2, next);
171767
171913
  return { domainNames: domains2.map((domain) => domain.name), pagination };
171768
171914
  }
171769
- var import_chalk75;
171915
+ var import_chalk76;
171770
171916
  var init_get_dns_records = __esm({
171771
171917
  "src/util/dns/get-dns-records.ts"() {
171772
171918
  "use strict";
171773
171919
  init_errors_ts();
171774
171920
  init_get_domain_dns_records();
171775
171921
  init_get_domains();
171776
- import_chalk75 = __toESM3(require_source());
171922
+ import_chalk76 = __toESM3(require_source());
171777
171923
  init_output_manager();
171778
171924
  }
171779
171925
  });
@@ -171838,7 +171984,7 @@ async function ls3(client2, argv) {
171838
171984
  telemetry2.trackCliOptionNext(opts["--next"]);
171839
171985
  if (args2.length > 1) {
171840
171986
  output_manager_default.error(
171841
- `Invalid number of arguments. Usage: ${import_chalk76.default.cyan(
171987
+ `Invalid number of arguments. Usage: ${import_chalk77.default.cyan(
171842
171988
  `${getCommandName("dns ls [domain]")}`
171843
171989
  )}`
171844
171990
  );
@@ -171860,15 +172006,15 @@ async function ls3(client2, argv) {
171860
172006
  );
171861
172007
  if (data instanceof DomainNotFound) {
171862
172008
  output_manager_default.error(
171863
- `The domain ${domainName} can't be found under ${import_chalk76.default.bold(
172009
+ `The domain ${domainName} can't be found under ${import_chalk77.default.bold(
171864
172010
  contextName
171865
- )} ${import_chalk76.default.gray(lsStamp())}`
172011
+ )} ${import_chalk77.default.gray(lsStamp())}`
171866
172012
  );
171867
172013
  return 1;
171868
172014
  }
171869
172015
  const { records, pagination: pagination2 } = data;
171870
172016
  output_manager_default.log(
171871
- `${records.length > 0 ? "Records" : "No records"} found under ${import_chalk76.default.bold(contextName)} ${import_chalk76.default.gray(lsStamp())}`
172017
+ `${records.length > 0 ? "Records" : "No records"} found under ${import_chalk77.default.bold(contextName)} ${import_chalk77.default.gray(lsStamp())}`
171872
172018
  );
171873
172019
  client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
171874
172020
  if (pagination2 && pagination2.count === 20) {
@@ -171888,9 +172034,9 @@ async function ls3(client2, argv) {
171888
172034
  );
171889
172035
  const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
171890
172036
  output_manager_default.log(
171891
- `${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk76.default.bold(
172037
+ `${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk77.default.bold(
171892
172038
  contextName
171893
- )} ${import_chalk76.default.gray(lsStamp())}`
172039
+ )} ${import_chalk77.default.gray(lsStamp())}`
171894
172040
  );
171895
172041
  output_manager_default.log(getDNSRecordsTable(dnsRecords));
171896
172042
  if (pagination && pagination.count === 20) {
@@ -171908,7 +172054,7 @@ function getDNSRecordsTable(dnsRecords) {
171908
172054
  ["", "id", "name", "type", "value", "created"],
171909
172055
  ["l", "r", "l", "l", "l", "l"],
171910
172056
  dnsRecords.map(({ domainName, records }) => ({
171911
- name: import_chalk76.default.bold(domainName),
172057
+ name: import_chalk77.default.bold(domainName),
171912
172058
  rows: records.map(getDNSRecordRow)
171913
172059
  }))
171914
172060
  );
@@ -171925,14 +172071,14 @@ function getDNSRecordRow(record) {
171925
172071
  record.name,
171926
172072
  record.type,
171927
172073
  priority ? `${priority} ${record.value}` : record.value,
171928
- import_chalk76.default.gray(isSystemRecord ? "default" : createdAt)
172074
+ import_chalk77.default.gray(isSystemRecord ? "default" : createdAt)
171929
172075
  ];
171930
172076
  }
171931
- var import_chalk76, import_ms15;
172077
+ var import_chalk77, import_ms15;
171932
172078
  var init_ls5 = __esm({
171933
172079
  "src/commands/dns/ls.ts"() {
171934
172080
  "use strict";
171935
- import_chalk76 = __toESM3(require_source());
172081
+ import_chalk77 = __toESM3(require_source());
171936
172082
  import_ms15 = __toESM3(require_ms());
171937
172083
  init_errors_ts();
171938
172084
  init_format_table();
@@ -172017,7 +172163,7 @@ async function rm3(client2, argv) {
172017
172163
  const [recordId] = args2;
172018
172164
  if (args2.length !== 1) {
172019
172165
  output_manager_default.error(
172020
- `Invalid number of arguments. Usage: ${import_chalk77.default.cyan(
172166
+ `Invalid number of arguments. Usage: ${import_chalk78.default.cyan(
172021
172167
  `${getCommandName("dns rm <id>")}`
172022
172168
  )}`
172023
172169
  );
@@ -172043,7 +172189,7 @@ async function rm3(client2, argv) {
172043
172189
  const rmStamp = stamp_default();
172044
172190
  await deleteDNSRecordById(client2, domainName, record.id);
172045
172191
  output_manager_default.success(
172046
- `Record ${import_chalk77.default.gray(`${record.id}`)} removed ${import_chalk77.default.gray(rmStamp())}`
172192
+ `Record ${import_chalk78.default.gray(`${record.id}`)} removed ${import_chalk78.default.gray(rmStamp())}`
172047
172193
  );
172048
172194
  return 0;
172049
172195
  }
@@ -172058,7 +172204,7 @@ function readConfirmation2(client2, msg, domainName, record) {
172058
172204
  `
172059
172205
  );
172060
172206
  output_manager_default.print(
172061
- `${import_chalk77.default.bold.red("> Are you sure?")} ${import_chalk77.default.gray("(y/N) ")}`
172207
+ `${import_chalk78.default.bold.red("> Are you sure?")} ${import_chalk78.default.gray("(y/N) ")}`
172062
172208
  );
172063
172209
  client2.stdin.on("data", (d) => {
172064
172210
  process.stdin.pause();
@@ -172070,19 +172216,19 @@ function getDeleteTableRow(domainName, record) {
172070
172216
  const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
172071
172217
  return [
172072
172218
  record.id,
172073
- import_chalk77.default.bold(
172219
+ import_chalk78.default.bold(
172074
172220
  `${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
172075
172221
  ),
172076
- import_chalk77.default.gray(
172222
+ import_chalk78.default.gray(
172077
172223
  `${(0, import_ms16.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
172078
172224
  )
172079
172225
  ];
172080
172226
  }
172081
- var import_chalk77, import_ms16;
172227
+ var import_chalk78, import_ms16;
172082
172228
  var init_rm4 = __esm({
172083
172229
  "src/commands/dns/rm.ts"() {
172084
172230
  "use strict";
172085
- import_chalk77 = __toESM3(require_source());
172231
+ import_chalk78 = __toESM3(require_source());
172086
172232
  import_ms16 = __toESM3(require_ms());
172087
172233
  init_table();
172088
172234
  init_delete_dns_record_by_id();
@@ -172256,16 +172402,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
172256
172402
  const rows = [];
172257
172403
  for (let i = 0; i < maxLength; i++) {
172258
172404
  rows.push([
172259
- sortedIntended[i] || import_chalk78.default.gray("-"),
172260
- sortedCurrent[i] || import_chalk78.default.gray("-"),
172261
- sortedIntended[i] === sortedCurrent[i] ? import_chalk78.default.green(chars_default.tick) : import_chalk78.default.red(chars_default.cross)
172405
+ sortedIntended[i] || import_chalk79.default.gray("-"),
172406
+ sortedCurrent[i] || import_chalk79.default.gray("-"),
172407
+ sortedIntended[i] === sortedCurrent[i] ? import_chalk79.default.green(chars_default.tick) : import_chalk79.default.red(chars_default.cross)
172262
172408
  ]);
172263
172409
  }
172264
172410
  return table(
172265
172411
  [
172266
172412
  [
172267
- import_chalk78.default.gray("Intended Nameservers"),
172268
- import_chalk78.default.gray("Current Nameservers"),
172413
+ import_chalk79.default.gray("Intended Nameservers"),
172414
+ import_chalk79.default.gray("Current Nameservers"),
172269
172415
  ""
172270
172416
  ],
172271
172417
  ...rows
@@ -172273,43 +172419,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
172273
172419
  { hsep: 4 }
172274
172420
  ).replace(/^(.*)/gm, `${extraSpace}$1`);
172275
172421
  }
172276
- var import_chalk78;
172422
+ var import_chalk79;
172277
172423
  var init_format_ns_table = __esm({
172278
172424
  "src/util/format-ns-table.ts"() {
172279
172425
  "use strict";
172280
- import_chalk78 = __toESM3(require_source());
172426
+ import_chalk79 = __toESM3(require_source());
172281
172427
  init_table();
172282
172428
  init_chars();
172283
172429
  }
172284
172430
  });
172285
172431
 
172286
- // src/util/domains/get-domain.ts
172287
- async function getDomain(client2, contextName, domainName) {
172288
- output_manager_default.spinner(
172289
- `Fetching domain ${domainName} under ${import_chalk79.default.bold(contextName)}`
172290
- );
172291
- try {
172292
- const { domain } = await client2.fetch(
172293
- `/v5/domains/${domainName}`
172294
- );
172295
- return domain;
172296
- } catch (err) {
172297
- if (isAPIError(err) && err.status < 500) {
172298
- return err;
172299
- }
172300
- throw err;
172301
- }
172302
- }
172303
- var import_chalk79;
172304
- var init_get_domain = __esm({
172305
- "src/util/domains/get-domain.ts"() {
172306
- "use strict";
172307
- import_chalk79 = __toESM3(require_source());
172308
- init_errors_ts();
172309
- init_output_manager();
172310
- }
172311
- });
172312
-
172313
172432
  // src/util/domains/is-public-suffix.ts
172314
172433
  function isPublicSuffix(domainName) {
172315
172434
  return domainName.endsWith(".vercel.app") || domainName.endsWith(".now.sh");
@@ -172643,16 +172762,14 @@ async function buy(client2, argv) {
172643
172762
  return 1;
172644
172763
  }
172645
172764
  const availableStamp = stamp_default();
172646
- const [domainPrice, renewalPrice] = await Promise.all([
172647
- getDomainPrice(client2, domainName),
172648
- getDomainPrice(client2, domainName, "renewal")
172649
- ]);
172765
+ const domainPrice = await getDomainPrice(client2, domainName);
172650
172766
  if (domainPrice instanceof Error) {
172651
172767
  output_manager_default.prettyError(domainPrice);
172652
172768
  return 1;
172653
172769
  }
172654
- if (renewalPrice instanceof Error) {
172655
- output_manager_default.prettyError(renewalPrice);
172770
+ const { years, purchasePrice, renewalPrice } = domainPrice;
172771
+ if (purchasePrice === null || renewalPrice === null) {
172772
+ output_manager_default.error("Domain price not found");
172656
172773
  return 1;
172657
172774
  }
172658
172775
  if (!(await getDomainStatus(client2, domainName)).available) {
@@ -172663,7 +172780,6 @@ async function buy(client2, argv) {
172663
172780
  );
172664
172781
  return 1;
172665
172782
  }
172666
- const { period, price } = domainPrice;
172667
172783
  output_manager_default.log(
172668
172784
  `The domain ${param(domainName)} is ${import_chalk83.default.underline(
172669
172785
  "available"
@@ -172674,14 +172790,14 @@ async function buy(client2, argv) {
172674
172790
  autoRenew = true;
172675
172791
  } else {
172676
172792
  if (!await client2.input.confirm(
172677
- `Buy now for ${import_chalk83.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
172793
+ `Buy now for ${import_chalk83.default.bold(`$${purchasePrice}`)} (${`${years}yr${years > 1 ? "s" : ""}`})?`,
172678
172794
  false
172679
172795
  )) {
172680
172796
  return 0;
172681
172797
  }
172682
172798
  autoRenew = await client2.input.confirm(
172683
- renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk83.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk83.default.bold(
172684
- `$${price}`
172799
+ years === 1 ? `Auto renew yearly for ${import_chalk83.default.bold(`$${renewalPrice}`)}?` : `Auto renew every ${years} years for ${import_chalk83.default.bold(
172800
+ `$${renewalPrice}`
172685
172801
  )}?`,
172686
172802
  true
172687
172803
  );
@@ -172690,7 +172806,13 @@ async function buy(client2, argv) {
172690
172806
  const purchaseStamp = stamp_default();
172691
172807
  output_manager_default.spinner("Purchasing");
172692
172808
  try {
172693
- buyResult = await purchaseDomain(client2, domainName, price, autoRenew);
172809
+ buyResult = await purchaseDomain(
172810
+ client2,
172811
+ domainName,
172812
+ purchasePrice,
172813
+ years,
172814
+ autoRenew
172815
+ );
172694
172816
  } catch (err) {
172695
172817
  output_manager_default.error(
172696
172818
  "An unexpected error occurred while purchasing your domain. Please try again later."
@@ -172699,15 +172821,15 @@ async function buy(client2, argv) {
172699
172821
  return 1;
172700
172822
  }
172701
172823
  output_manager_default.stopSpinner();
172702
- if (buyResult instanceof SourceNotFound) {
172824
+ if (buyResult instanceof UnsupportedTLD) {
172703
172825
  output_manager_default.error(
172704
- `Could not purchase domain. Please add a payment method using the dashboard.`
172826
+ `The TLD for domain name ${buyResult.meta.domain} is not supported.`
172705
172827
  );
172706
172828
  return 1;
172707
172829
  }
172708
- if (buyResult instanceof UnsupportedTLD) {
172830
+ if (buyResult instanceof TLDNotSupportedViaCLI) {
172709
172831
  output_manager_default.error(
172710
- `The TLD for domain name ${buyResult.meta.domain} is not supported.`
172832
+ `Purchased for the TLD for domain name ${buyResult.meta.domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`
172711
172833
  );
172712
172834
  return 1;
172713
172835
  }
@@ -172719,12 +172841,6 @@ async function buy(client2, argv) {
172719
172841
  output_manager_default.error(`The domain ${buyResult.meta.domain} is not available.`);
172720
172842
  return 1;
172721
172843
  }
172722
- if (buyResult instanceof DomainServiceNotAvailable) {
172723
- output_manager_default.error(
172724
- `The domain purchase service is not available. Please try again later.`
172725
- );
172726
- return 1;
172727
- }
172728
172844
  if (buyResult instanceof UnexpectedDomainPurchaseError) {
172729
172845
  output_manager_default.error(`An unexpected error happened while performing the purchase.`);
172730
172846
  return 1;
@@ -172733,35 +172849,12 @@ async function buy(client2, argv) {
172733
172849
  output_manager_default.error(`Your card was declined.`);
172734
172850
  return 1;
172735
172851
  }
172736
- if (buyResult.pending) {
172737
- output_manager_default.success(
172738
- `Domain ${param(domainName)} order was submitted ${purchaseStamp()}`
172739
- );
172740
- output_manager_default.note(
172741
- `Your domain is processing and will be available once the order is completed.`
172742
- );
172743
- output_manager_default.print(
172744
- ` An email will be sent upon completion for you to start using your new domain.
172745
- `
172746
- );
172747
- } else {
172748
- output_manager_default.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`);
172749
- if (!buyResult.verified) {
172750
- output_manager_default.note(
172751
- `Your domain is not fully configured yet so it may appear as not verified.`
172752
- );
172753
- output_manager_default.print(
172754
- ` It might take a few minutes, but you will get an email as soon as it is ready.
172755
- `
172756
- );
172757
- } else {
172758
- output_manager_default.note(
172759
- `You may now use your domain as an alias to your deployments. Run ${getCommandName(
172760
- `alias --help`
172761
- )}`
172762
- );
172763
- }
172764
- }
172852
+ output_manager_default.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`);
172853
+ output_manager_default.note(
172854
+ `You may now use your domain as an alias to your deployments. Run ${getCommandName(
172855
+ `alias --help`
172856
+ )}`
172857
+ );
172765
172858
  return 0;
172766
172859
  }
172767
172860
  var import_chalk83, import_tldts6, import_error_utils22;
@@ -172789,31 +172882,58 @@ var init_buy2 = __esm({
172789
172882
  });
172790
172883
 
172791
172884
  // src/util/domains/transfer-in-domain.ts
172792
- async function transferInDomain(client2, name, authCode, expectedPrice) {
172885
+ async function transferInDomain(client2, name, authCode, expectedPrice, years) {
172886
+ const { team } = await getScope(client2);
172887
+ const teamParam = team ? `?teamId=${team.slug}` : "";
172793
172888
  try {
172794
- return await client2.fetch(`/v4/domains`, {
172795
- body: { method: "transfer-in", name, authCode, expectedPrice },
172796
- method: "POST"
172797
- });
172889
+ const { orderId } = await client2.fetch(
172890
+ `/v1/registrar/domains/${name}/transfer${teamParam}`,
172891
+ {
172892
+ body: {
172893
+ authCode,
172894
+ autoRenew: true,
172895
+ years,
172896
+ expectedPrice,
172897
+ contactInformation: {
172898
+ firstName: "Vercel",
172899
+ lastName: "Whois",
172900
+ email: "domains@registrar.vercel.com",
172901
+ phone: "+14153985463",
172902
+ address1: "100 First Street, Suite 2400",
172903
+ city: "San Fransisco",
172904
+ state: "CA",
172905
+ zip: "94105",
172906
+ country: "US",
172907
+ companyName: "Vercel Inc."
172908
+ }
172909
+ },
172910
+ method: "POST"
172911
+ }
172912
+ );
172913
+ const order = await pollForOrder(client2, orderId);
172914
+ if (order === null) {
172915
+ return new UnexpectedDomainTransferError(name);
172916
+ }
172917
+ if (order.status === "completed") {
172918
+ const domain = order.domains.find((domain2) => domain2.domainName === name);
172919
+ if (domain?.status === "completed") {
172920
+ return { ok: true };
172921
+ }
172922
+ }
172923
+ if (order.error?.code === "payment_failed") {
172924
+ return new DomainPaymentError();
172925
+ }
172926
+ return new UnexpectedDomainTransferError(name);
172798
172927
  } catch (err) {
172799
172928
  if (isAPIError(err)) {
172800
172929
  if (err.code === "invalid_name") {
172801
172930
  return new InvalidDomain(name);
172802
172931
  }
172803
- if (err.code === "domain_already_exists") {
172804
- return new DomainNotAvailable(name);
172805
- }
172806
- if (err.code === "not_transferable") {
172807
- return new DomainNotTransferable(name);
172808
- }
172809
- if (err.code === "invalid_auth_code") {
172810
- return new InvalidTransferAuthCode(name, authCode);
172811
- }
172812
- if (err.code === "source_not_found") {
172813
- return new SourceNotFound();
172932
+ if (err.code === "tld_not_supported") {
172933
+ return new UnsupportedTLD(name);
172814
172934
  }
172815
- if (err.code === "registration_failed") {
172816
- return new DomainRegistrationFailed(name, err.message);
172935
+ if (err.code === "domain_not_available") {
172936
+ return new DomainNotAvailable(name);
172817
172937
  }
172818
172938
  }
172819
172939
  throw err;
@@ -172823,6 +172943,8 @@ var init_transfer_in_domain = __esm({
172823
172943
  "src/util/domains/transfer-in-domain.ts"() {
172824
172944
  "use strict";
172825
172945
  init_errors_ts();
172946
+ init_get_scope();
172947
+ init_get_order();
172826
172948
  }
172827
172949
  });
172828
172950
 
@@ -172845,18 +172967,6 @@ var init_get_auth_code = __esm({
172845
172967
  }
172846
172968
  });
172847
172969
 
172848
- // src/util/domains/check-transfer.ts
172849
- async function checkTransfer(client2, name) {
172850
- return client2.fetch(
172851
- `/v4/domains/${encodeURIComponent(name)}/registry`
172852
- );
172853
- }
172854
- var init_check_transfer = __esm({
172855
- "src/util/domains/check-transfer.ts"() {
172856
- "use strict";
172857
- }
172858
- });
172859
-
172860
172970
  // src/util/is-root-domain.ts
172861
172971
  function isRootDomain(domainName) {
172862
172972
  const parsedDomain = (0, import_tldts7.parse)(domainName);
@@ -172934,19 +173044,16 @@ async function transferIn(client2, argv) {
172934
173044
  return 1;
172935
173045
  }
172936
173046
  const availableStamp = stamp_default();
172937
- const [domainPrice, { transferable, transferPolicy }] = await Promise.all([
172938
- getDomainPrice(client2, domainName, "renewal"),
172939
- checkTransfer(client2, domainName)
172940
- ]);
173047
+ const domainPrice = await getDomainPrice(client2, domainName);
172941
173048
  if (domainPrice instanceof Error) {
172942
173049
  output_manager_default.prettyError(domainPrice);
172943
173050
  return 1;
172944
173051
  }
172945
- if (!transferable) {
173052
+ const { transferPrice, years } = domainPrice;
173053
+ if (transferPrice === null) {
172946
173054
  output_manager_default.error(`The domain ${param(domainName)} is not transferable.`);
172947
173055
  return 1;
172948
173056
  }
172949
- const { price } = domainPrice;
172950
173057
  const { contextName } = await getScope(client2);
172951
173058
  output_manager_default.log(
172952
173059
  `The domain ${param(domainName)} is ${import_chalk84.default.underline(
@@ -172955,7 +173062,7 @@ async function transferIn(client2, argv) {
172955
173062
  );
172956
173063
  const authCode = await getAuthCode(client2, opts["--code"]);
172957
173064
  const shouldTransfer = await client2.input.confirm(
172958
- transferPolicy === "no-change" ? `Transfer now for ${import_chalk84.default.bold(`$${price}`)}?` : `Transfer now with 1yr renewal for ${import_chalk84.default.bold(`$${price}`)}?`,
173065
+ `Transfer now with 1yr renewal for ${import_chalk84.default.bold(`$${transferPrice}`)}?`,
172959
173066
  false
172960
173067
  );
172961
173068
  if (!shouldTransfer) {
@@ -172967,32 +173074,31 @@ async function transferIn(client2, argv) {
172967
173074
  client2,
172968
173075
  domainName,
172969
173076
  authCode,
172970
- price
173077
+ transferPrice,
173078
+ years
172971
173079
  );
172972
173080
  if (transferInResult instanceof InvalidDomain) {
172973
173081
  output_manager_default.error(`The domain ${transferInResult.meta.domain} is not valid.`);
172974
173082
  return 1;
172975
173083
  }
172976
- if (transferInResult instanceof DomainNotAvailable || transferInResult instanceof DomainNotTransferable) {
173084
+ if (transferInResult instanceof DomainNotAvailable) {
172977
173085
  output_manager_default.error(
172978
173086
  `The domain "${transferInResult.meta.domain}" is not transferable.`
172979
173087
  );
172980
173088
  return 1;
172981
173089
  }
172982
- if (transferInResult instanceof InvalidTransferAuthCode) {
173090
+ if (transferInResult instanceof UnsupportedTLD) {
172983
173091
  output_manager_default.error(
172984
- `The provided auth code does not match with the one expected by the current registar`
173092
+ `The TLD for domain name ${transferInResult.meta.domain} is not supported.`
172985
173093
  );
172986
173094
  return 1;
172987
173095
  }
172988
- if (transferInResult instanceof SourceNotFound) {
172989
- output_manager_default.error(
172990
- `Could not purchase domain. Please add a payment method using the dashboard.`
172991
- );
173096
+ if (transferInResult instanceof DomainPaymentError) {
173097
+ output_manager_default.error(`Your card was declined.`);
172992
173098
  return 1;
172993
173099
  }
172994
- if (transferInResult instanceof DomainRegistrationFailed) {
172995
- output_manager_default.error(`Could not transfer domain. ${transferInResult.message}`);
173100
+ if (transferInResult instanceof UnexpectedDomainTransferError) {
173101
+ output_manager_default.error(`An unexpected error happened while initiating the transfer.`);
172996
173102
  return 1;
172997
173103
  }
172998
173104
  output_manager_default.success(
@@ -173035,7 +173141,6 @@ var init_transfer_in2 = __esm({
173035
173141
  init_stamp();
173036
173142
  init_get_auth_code();
173037
173143
  init_get_domain_price();
173038
- init_check_transfer();
173039
173144
  init_is_root_domain();
173040
173145
  init_pkg_name();
173041
173146
  init_transfer_in();
@@ -173269,7 +173374,7 @@ async function fetchInformation({
173269
173374
  }) {
173270
173375
  const [domain, renewalPrice] = await Promise.all([
173271
173376
  getDomainByName(client2, contextName, domainName, { ignoreWait: true }),
173272
- getDomainPrice(client2, domainName, "renewal").then((res) => res instanceof Error ? null : res.price).catch(() => null)
173377
+ getDomainPrice(client2, domainName).then((res) => res instanceof Error ? null : res.renewalPrice).catch(() => null)
173273
173378
  ]);
173274
173379
  if (domain instanceof DomainNotFound) {
173275
173380
  output_manager_default.prettyError(domain);