@depup/vercel 58.4.4-depup.0 → 59.1.3-depup.0

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.
Files changed (119) hide show
  1. package/README.md +8 -9
  2. package/changes.json +7 -11
  3. package/dist/chunks/{add-245XOFJO.js → add-CUGPQYFW.js} +11 -11
  4. package/dist/chunks/{add-XH24V5VU.js → add-PP3PJPJV.js} +8 -8
  5. package/dist/chunks/{add-P7WBQMBW.js → add-PRG4KKYH.js} +45 -12
  6. package/dist/chunks/{build-M7NJYJPE.js → build-T22GMLY6.js} +11 -11
  7. package/dist/chunks/{chunk-AW5YINX6.js → chunk-2MF3ZAVW.js} +48 -6
  8. package/dist/chunks/{chunk-WR7JTCGL.js → chunk-3BU2UCGV.js} +1 -1
  9. package/dist/chunks/{chunk-MAHXF73X.js → chunk-3L2YLLHC.js} +1 -1
  10. package/dist/chunks/{chunk-ZGBBPJ6B.js → chunk-43DD2KNM.js} +254 -1539
  11. package/dist/chunks/{chunk-M5NOLAJ4.js → chunk-4HI7G6KG.js} +1 -1
  12. package/dist/chunks/chunk-4JKZ7SRX.js +559 -0
  13. package/dist/chunks/{chunk-Y5GTPWXB.js → chunk-57G6HBJ4.js} +3 -3
  14. package/dist/chunks/{chunk-2LBVX2H3.js → chunk-5DVMXOFT.js} +3 -3
  15. package/dist/chunks/{chunk-YCPUAG77.js → chunk-7NQLRE5V.js} +1 -1
  16. package/dist/chunks/{chunk-JLWQWYKO.js → chunk-BBSS3XIW.js} +2 -4
  17. package/dist/chunks/{chunk-IEDUCUDV.js → chunk-BCZFZETZ.js} +92 -46
  18. package/dist/chunks/{chunk-SJYAUEZR.js → chunk-DAWJOQF6.js} +52 -79
  19. package/dist/chunks/chunk-DEB45ND4.js +61 -0
  20. package/dist/chunks/{chunk-AQDWMAPM.js → chunk-DOMLWKKZ.js} +795 -516
  21. package/dist/chunks/{chunk-EBLH23AQ.js → chunk-F7OXZLY2.js} +6 -9
  22. package/dist/chunks/{chunk-J6LK45HT.js → chunk-GFCTRJI5.js} +16 -2
  23. package/dist/chunks/{chunk-V5P25P7F.js → chunk-GGPE5377.js} +5 -12
  24. package/dist/chunks/{chunk-4LDQIDRM.js → chunk-GMWRTZVZ.js} +9 -1
  25. package/dist/chunks/{chunk-NJUPUGOE.js → chunk-HT2XWSAJ.js} +1 -1
  26. package/dist/chunks/chunk-IKKUCZE7.js +96 -0
  27. package/dist/chunks/chunk-JKQWQA2T.js +39 -0
  28. package/dist/chunks/{chunk-XIG4GH62.js → chunk-JYEO6OJS.js} +188 -102
  29. package/dist/chunks/{chunk-HSYF5SI3.js → chunk-KTLFN5FV.js} +1 -1
  30. package/dist/chunks/{chunk-XPKWKPWA.js → chunk-KXDWXXJH.js} +27 -1
  31. package/dist/chunks/chunk-LNVZ3T7X.js +2908 -0
  32. package/dist/chunks/{chunk-NJ6QXKQD.js → chunk-M34ZRNDQ.js} +1 -1
  33. package/dist/chunks/chunk-MXLA3VQS.js +20 -0
  34. package/dist/chunks/{chunk-2SFMOCWR.js → chunk-PD7ZUXE7.js} +1 -1
  35. package/dist/chunks/chunk-QCVKGY2A.js +151 -0
  36. package/dist/chunks/{chunk-XE5VSQ25.js → chunk-QD5NX7RG.js} +1 -1
  37. package/dist/chunks/{chunk-4N7XLXM2.js → chunk-QQ6PH4RY.js} +1 -0
  38. package/dist/chunks/{chunk-A5KP5HAI.js → chunk-RIB4S2IB.js} +10 -1
  39. package/dist/chunks/{chunk-ZX2FSPWV.js → chunk-SJQEGGH7.js} +4 -4
  40. package/dist/chunks/{chunk-3QAUXPIR.js → chunk-SOKQBFF7.js} +1128 -162
  41. package/dist/chunks/chunk-SQGMTRZD.js +1385 -0
  42. package/dist/chunks/{chunk-TJJ562C5.js → chunk-TJLBCLEX.js} +15 -0
  43. package/dist/chunks/{chunk-62MH5KPX.js → chunk-TM3F7PLR.js} +7 -7
  44. package/dist/chunks/{chunk-2WILSD7J.js → chunk-TNKRSTMB.js} +1 -1
  45. package/dist/chunks/{chunk-4UYKSYKQ.js → chunk-UMA66MKW.js} +66 -2
  46. package/dist/chunks/{chunk-KT4XXKJK.js → chunk-VAFU7DXZ.js} +195 -3
  47. package/dist/chunks/{chunk-RQ7H43CJ.js → chunk-VDJN4WKH.js} +1 -1
  48. package/dist/chunks/{chunk-4CCY5OPH.js → chunk-VE545BR3.js} +5039 -3119
  49. package/dist/chunks/{chunk-B3JTF4CF.js → chunk-WC7IINFV.js} +10 -1
  50. package/dist/chunks/{chunk-YDUINEII.js → chunk-XZLI27ES.js} +7 -5
  51. package/dist/chunks/{chunk-4BUPRO5B.js → chunk-ZUVJISHS.js} +3 -3
  52. package/dist/chunks/{clear-HWIKQ4NC.js → clear-Z4IKUIN7.js} +8 -8
  53. package/dist/chunks/{compile-vercel-config-U5NRIMZ2.js → compile-vercel-config-PSVXFAZW.js} +4 -4
  54. package/dist/chunks/config-M5GMZ2X5.js +159 -0
  55. package/dist/chunks/{constants-3FSSR6E7.js → constants-YMCRE6IG.js} +5 -3
  56. package/dist/chunks/{delete-NVMGVD5Z.js → delete-5GRRDJSF.js} +5 -5
  57. package/dist/chunks/{delete-FZCOUFGN.js → delete-P4XIBY7T.js} +8 -8
  58. package/dist/chunks/{disable-ERM2BWEQ.js → disable-NT5NYVO7.js} +5 -5
  59. package/dist/chunks/{discard-KM5OLEN4.js → discard-TBNIEAJZ.js} +5 -5
  60. package/dist/chunks/{edit-HT3UTATZ.js → edit-DJ6MT6HA.js} +6 -6
  61. package/dist/chunks/{edit-TOSB2EMI.js → edit-UF3D2CCH.js} +9 -9
  62. package/dist/chunks/{enable-BQL6AOQV.js → enable-JTQBQMBO.js} +5 -5
  63. package/dist/chunks/{export-UOWQHOG3.js → export-OKMRGRVM.js} +5 -5
  64. package/dist/chunks/{image-F5SC6Q7Y.js → image-ARUJH4H5.js} +4 -4
  65. package/dist/chunks/import-builders-3NTMZM64.js +30 -0
  66. package/dist/chunks/{inspect-PZJM2CWT.js → inspect-5NETOGAI.js} +11 -12
  67. package/dist/chunks/{inspect-GKJ6T5H4.js → inspect-CHFKZKKP.js} +8 -8
  68. package/dist/chunks/{inspect-LGKOLH2O.js → inspect-FXZTQY62.js} +9 -9
  69. package/dist/chunks/{inspect-35FU5R62.js → inspect-PTXIBSYW.js} +11 -11
  70. package/dist/chunks/{inspect-5J5GSTOB.js → inspect-UXP2HDES.js} +8 -8
  71. package/dist/chunks/{list-2IIE7CAP.js → list-2WMIVJ2R.js} +31 -15
  72. package/dist/chunks/{list-ITFJYYQ2.js → list-ADI55WKW.js} +13 -14
  73. package/dist/chunks/{list-KZETH3ZE.js → list-DYCZA2VX.js} +6 -6
  74. package/dist/chunks/{login-BQPJCJEZ.js → login-YCSIQG6B.js} +11 -11
  75. package/dist/chunks/{ls-UXUEP54B.js → ls-2TKUIUK4.js} +14 -15
  76. package/dist/chunks/{ls-YSFWSM6J.js → ls-EOMIQLRH.js} +14 -15
  77. package/dist/chunks/{ls-7GHDK4MD.js → ls-PQFDGOJL.js} +17 -18
  78. package/dist/chunks/{ls-DL2LA35C.js → ls-RZVTIP5U.js} +14 -15
  79. package/dist/chunks/{ls-ZZFLH7PK.js → ls-VIOMDUGW.js} +17 -18
  80. package/dist/chunks/{open-ADNJQN5E.js → open-JYPWOXQD.js} +7 -7
  81. package/dist/chunks/{permissions-72SZCBIY.js → permissions-SGJWGEVD.js} +6 -6
  82. package/dist/chunks/{publish-OOAGSEBM.js → publish-ZUQHJAXL.js} +5 -5
  83. package/dist/chunks/{push-B6TZDXNF.js → push-XMVKG5A5.js} +11 -11
  84. package/dist/chunks/{query-LZWS5TDH.js → query-ZLJZEGZB.js} +240 -52
  85. package/dist/chunks/{reorder-MRHFKPMK.js → reorder-NVHDWMRU.js} +5 -5
  86. package/dist/chunks/{reply-BKTJXO3B.js → reply-PUUPUQ3V.js} +9 -9
  87. package/dist/chunks/{resolve-BKVGSGPN.js → resolve-5U2LJVE6.js} +8 -8
  88. package/dist/chunks/{restore-USR7SKWV.js → restore-OXIUY2UI.js} +5 -5
  89. package/dist/chunks/{rm-2UO6BT3A.js → rm-3IOCBNPE.js} +9 -9
  90. package/dist/chunks/{rm-37MKKV3I.js → rm-BZNKJRXU.js} +8 -8
  91. package/dist/chunks/{rm-VY3OHKFH.js → rm-OUI4ZB5R.js} +8 -8
  92. package/dist/chunks/{rm-KUWPNZIS.js → rm-Z2KYJ7XT.js} +11 -11
  93. package/dist/chunks/{rule-inspect-JVDOOTWK.js → rule-inspect-ZBJJCDQV.js} +17 -25
  94. package/dist/chunks/{rules-NTBFZBIF.js → rules-HEGAXXUN.js} +10 -7
  95. package/dist/chunks/{schema-6EZ72OVH.js → schema-7GVL3BNP.js} +65 -33
  96. package/dist/chunks/schema-ZYIJYA2E.js +425 -0
  97. package/dist/chunks/{tags-HNPC63QA.js → tags-3SCWCMNQ.js} +3 -3
  98. package/dist/chunks/{types-QTOA2BTQ.js → types-AJHILHO5.js} +3 -5
  99. package/dist/chunks/{update-LUYWNZP3.js → update-YR2GCCJN.js} +40 -9
  100. package/dist/commands/build/index.js +282 -2932
  101. package/dist/commands/deploy/index.js +397 -84
  102. package/dist/commands/dev/index.js +339 -194
  103. package/dist/commands/env/index.js +101 -163
  104. package/dist/commands/link/index.js +17 -23
  105. package/dist/commands/list/index.js +11 -13
  106. package/dist/commands-bulk.js +10189 -4062
  107. package/dist/help.js +1 -1
  108. package/dist/index.js +141 -114
  109. package/dist/vc.js +18 -17
  110. package/dist/version.mjs +2 -1
  111. package/package.json +80 -77
  112. package/dist/chunks/chunk-2FMPLU44.js +0 -106
  113. package/dist/chunks/chunk-2MAPZXVV.js +0 -206
  114. package/dist/chunks/chunk-CPFNFVCL.js +0 -85
  115. package/dist/chunks/chunk-GFG6QDIE.js +0 -101
  116. package/dist/chunks/chunk-KBEX5MYS.js +0 -208
  117. package/dist/chunks/chunk-UE3JUVUZ.js +0 -1474
  118. package/dist/chunks/{chunk-BUZRVER7.js → chunk-P65EEFTR.js} +3 -3
  119. /package/dist/{commands/dev/next-dev-websocket-shim-preload.cjs → runtime-assets/node-preloads/next-dev-websocket.cjs} +0 -0
@@ -7,22 +7,24 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_format
9
9
  } from "./chunk-PRWJUY5U.js";
10
+ import {
11
+ progress
12
+ } from "./chunk-4JKZ7SRX.js";
10
13
  import {
11
14
  isJSONObject,
12
15
  printIndications,
13
- progress,
14
16
  require_dist as require_dist2,
15
17
  sleep
16
- } from "./chunk-SJYAUEZR.js";
18
+ } from "./chunk-DAWJOQF6.js";
17
19
  import {
18
20
  suggestNextCommands
19
21
  } from "./chunk-XBN2O34P.js";
20
22
  import {
21
23
  CommandTimeout
22
- } from "./chunk-3QAUXPIR.js";
24
+ } from "./chunk-SOKQBFF7.js";
23
25
  import {
24
26
  showPluginTipIfNeeded
25
- } from "./chunk-NJUPUGOE.js";
27
+ } from "./chunk-HT2XWSAJ.js";
26
28
  import {
27
29
  stamp_default
28
30
  } from "./chunk-64IF634X.js";
@@ -36,11 +38,14 @@ import {
36
38
  require_dist as require_dist3,
37
39
  require_pluralize,
38
40
  ua_default
39
- } from "./chunk-4CCY5OPH.js";
41
+ } from "./chunk-VE545BR3.js";
42
+ import {
43
+ require_ms
44
+ } from "./chunk-GGP5R3FU.js";
40
45
  import {
41
46
  require_strip_ansi,
42
47
  responseError
43
- } from "./chunk-KBEX5MYS.js";
48
+ } from "./chunk-VAFU7DXZ.js";
44
49
  import {
45
50
  APIError,
46
51
  BuildError,
@@ -74,9 +79,6 @@ import {
74
79
  require_ansi_escapes,
75
80
  require_dist
76
81
  } from "./chunk-OX7KI3LF.js";
77
- import {
78
- require_ms
79
- } from "./chunk-GGP5R3FU.js";
80
82
  import {
81
83
  require_source
82
84
  } from "./chunk-S7KYDPEM.js";
@@ -1166,9 +1168,11 @@ async function processDeployment({
1166
1168
  skipAutoDetectionConfirmation,
1167
1169
  noWait,
1168
1170
  withFullLogs,
1171
+ anonymous,
1169
1172
  manual,
1170
1173
  jsonOutput,
1171
1174
  linkedProject,
1175
+ linkedProjectIsPartial,
1172
1176
  ...args
1173
1177
  }) {
1174
1178
  const {
@@ -1214,7 +1218,9 @@ async function processDeployment({
1214
1218
  manual,
1215
1219
  aliasAssignedSignal: aliasAssignedController.signal
1216
1220
  };
1217
- const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk2.default.bold(`${org.slug}/${projectName}`)}`;
1221
+ const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk2.default.bold(
1222
+ org.slug ? `${org.slug}/${projectName}` : projectName
1223
+ )}`;
1218
1224
  output_manager_default.spinner(deployingSpinnerVal, 0);
1219
1225
  const indications = [];
1220
1226
  let abortController;
@@ -1222,9 +1228,27 @@ async function processDeployment({
1222
1228
  abortController?.abort();
1223
1229
  output_manager_default.stopSpinner();
1224
1230
  }
1231
+ const linkedProjectLookup = linkedProjectIsPartial && linkedProject && !noWait ? getProjectByNameOrId(
1232
+ client,
1233
+ linkedProject.id,
1234
+ linkedProject.accountId
1235
+ ).then(
1236
+ (project2) => ({ project: project2 }),
1237
+ (error) => ({ error })
1238
+ ) : void 0;
1225
1239
  let rollingRelease = linkedProject?.rollingRelease;
1226
- let project = linkedProject;
1240
+ let project = linkedProjectLookup ? void 0 : linkedProject;
1227
1241
  let latestLogMessage = "";
1242
+ async function resolveProject() {
1243
+ if (!linkedProjectLookup) {
1244
+ return getProjectByNameOrId(client, projectName);
1245
+ }
1246
+ const result = await linkedProjectLookup;
1247
+ if ("error" in result) {
1248
+ throw result.error;
1249
+ }
1250
+ return result.project;
1251
+ }
1228
1252
  try {
1229
1253
  for await (const event of (0, import_client.createDeployment)(clientOptions, requestBody)) {
1230
1254
  if (["tip", "notice", "warning"].includes(event.type)) {
@@ -1279,30 +1303,32 @@ async function processDeployment({
1279
1303
  const deployment = event.payload;
1280
1304
  now.url = deployment.url;
1281
1305
  stopSpinner();
1282
- printInspectUrl(deployment.inspectorUrl);
1283
- const isProdDeployment = deployment.target === "production";
1284
- const previewUrl = `https://${deployment.url}`;
1285
- if (isProdDeployment && !requestBody.target) {
1286
- indications.push({
1287
- type: "notice",
1288
- payload: "This is your project\u2019s first deployment, so it was assigned to production. Future deployments will be preview deployments unless you use --prod.",
1289
- link: "https://vercel.com/docs/deployments/environments"
1290
- });
1291
- }
1292
- printAlignedLabel(
1293
- isProdDeployment ? "Production" : "Preview",
1294
- import_chalk2.default.cyan(previewUrl),
1295
- isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1296
- );
1297
- if (!jsonOutput && (quiet || process.env.FORCE_TTY === "1")) {
1298
- process.stdout.write(`https://${event.payload.url}`);
1306
+ if (!anonymous) {
1307
+ printInspectUrl(deployment.inspectorUrl);
1308
+ const isProdDeployment = deployment.target === "production";
1309
+ const previewUrl = `https://${deployment.url}`;
1310
+ if (isProdDeployment && !requestBody.target) {
1311
+ indications.push({
1312
+ type: "notice",
1313
+ payload: "This is your project\u2019s first deployment, so it was assigned to production. Future deployments will be preview deployments unless you use --prod.",
1314
+ link: "https://vercel.com/docs/deployments/environments"
1315
+ });
1316
+ }
1317
+ printAlignedLabel(
1318
+ isProdDeployment ? "Production" : "Preview",
1319
+ import_chalk2.default.cyan(previewUrl),
1320
+ isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1321
+ );
1322
+ if (!jsonOutput && (quiet || process.env.FORCE_TTY === "1")) {
1323
+ process.stdout.write(`https://${event.payload.url}`);
1324
+ }
1299
1325
  }
1300
1326
  if (noWait) {
1301
1327
  deployment.indications = indications;
1302
1328
  return deployment;
1303
1329
  }
1304
1330
  latestLogMessage = deployment.readyState === "QUEUED" ? "Queued\u2026" : "Building\u2026";
1305
- if (withFullLogs) {
1331
+ if (withFullLogs && !anonymous) {
1306
1332
  let promise;
1307
1333
  ({ abortController, promise } = displayBuildLogs(
1308
1334
  client,
@@ -1313,7 +1339,7 @@ async function processDeployment({
1313
1339
  promise.catch(
1314
1340
  (error) => output_manager_default.warn(`Failed to read build logs: ${error}`)
1315
1341
  );
1316
- } else {
1342
+ } else if (!anonymous) {
1317
1343
  abortController = new AbortController();
1318
1344
  const promise = events_default(
1319
1345
  client,
@@ -1349,8 +1375,8 @@ async function processDeployment({
1349
1375
  stopSpinner();
1350
1376
  return event.payload;
1351
1377
  }
1352
- if (project === void 0) {
1353
- project = await getProjectByNameOrId(client, projectName);
1378
+ if (project === void 0 && (!linkedProjectLookup || event.type === "ready")) {
1379
+ project = await resolveProject();
1354
1380
  rollingRelease = project?.rollingRelease;
1355
1381
  }
1356
1382
  if (event.type === "ready" && rollingRelease) {
@@ -1363,14 +1389,16 @@ async function processDeployment({
1363
1389
  const v1ChecksPending = event.payload.checksState && event.payload.checksState !== "completed";
1364
1390
  const v2ChecksPending = event.payload.checks?.["deployment-alias"]?.state === "pending";
1365
1391
  output_manager_default.stopSpinner();
1366
- process.stderr.write(eraseLines(2));
1367
- const isProdDeployment = event.payload.target === "production";
1368
- const previewUrl = `https://${event.payload.url}`;
1369
- printAlignedLabel(
1370
- isProdDeployment ? "Production" : "Preview",
1371
- import_chalk2.default.cyan(previewUrl),
1372
- isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1373
- );
1392
+ if (!anonymous) {
1393
+ process.stderr.write(eraseLines(2));
1394
+ const isProdDeployment = event.payload.target === "production";
1395
+ const previewUrl = `https://${event.payload.url}`;
1396
+ printAlignedLabel(
1397
+ isProdDeployment ? "Production" : "Preview",
1398
+ import_chalk2.default.cyan(previewUrl),
1399
+ isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1400
+ );
1401
+ }
1374
1402
  if (v1ChecksPending || v2ChecksPending) {
1375
1403
  output_manager_default.spinner("Running Checks\u2026", 0);
1376
1404
  } else {
@@ -1412,7 +1440,19 @@ async function processDeployment({
1412
1440
  if (event.payload.target === "production" && event.payload.alias && event.payload.alias.length > 0) {
1413
1441
  const primaryDomain = event.payload.alias[0];
1414
1442
  const prodUrl = `https://${primaryDomain}`;
1415
- printAlignedLabel("Aliased", import_chalk2.default.cyan(prodUrl), { gutter: "\u25B2" });
1443
+ if (anonymous) {
1444
+ output_manager_default.print("\n");
1445
+ }
1446
+ printAlignedLabel(
1447
+ anonymous ? "Temporary" : "Aliased",
1448
+ import_chalk2.default.cyan(prodUrl),
1449
+ {
1450
+ gutter: "\u25B2"
1451
+ }
1452
+ );
1453
+ if (anonymous && !jsonOutput && (quiet || process.env.FORCE_TTY === "1")) {
1454
+ process.stdout.write(prodUrl);
1455
+ }
1416
1456
  }
1417
1457
  event.payload.indications = indications;
1418
1458
  return event.payload;
@@ -1481,6 +1521,7 @@ var Now = class {
1481
1521
  name,
1482
1522
  project,
1483
1523
  prebuilt = false,
1524
+ anonymous = false,
1484
1525
  vercelOutputDir,
1485
1526
  rootDirectory,
1486
1527
  meta,
@@ -1500,7 +1541,8 @@ var Now = class {
1500
1541
  agentName,
1501
1542
  manual,
1502
1543
  jsonOutput = false,
1503
- linkedProject
1544
+ linkedProject,
1545
+ linkedProjectIsPartial
1504
1546
  }, org, isSettingUpProject, archive) {
1505
1547
  const requestBody = {
1506
1548
  ...nowConfig,
@@ -1533,6 +1575,7 @@ var Now = class {
1533
1575
  archive,
1534
1576
  skipAutoDetectionConfirmation,
1535
1577
  prebuilt,
1578
+ anonymous,
1536
1579
  vercelOutputDir,
1537
1580
  rootDirectory,
1538
1581
  noWait,
@@ -1540,7 +1583,8 @@ var Now = class {
1540
1583
  bulkRedirectsPath: nowConfig.bulkRedirectsPath,
1541
1584
  manual,
1542
1585
  jsonOutput,
1543
- linkedProject
1586
+ linkedProject,
1587
+ linkedProjectIsPartial
1544
1588
  });
1545
1589
  if (deployment && deployment.warnings) {
1546
1590
  let sizeExceeded = 0;
@@ -2156,8 +2200,10 @@ async function performAddRequest(client, domainName) {
2156
2200
  return (0, import_async_retry4.default)(
2157
2201
  async () => {
2158
2202
  try {
2159
- const { domain } = await client.fetch("/v4/domains", {
2160
- body: { name: domainName },
2203
+ const { domain } = await client.fetch("/v7/domains", {
2204
+ // `zone` must be sent explicitly: the API only defaults it to `true`
2205
+ // on v4 and below, so omitting it here would stop creating DNS zones.
2206
+ body: { name: domainName, zone: true },
2161
2207
  method: "POST"
2162
2208
  });
2163
2209
  return domain;
@@ -2187,7 +2233,7 @@ async function getDomainByName(client, contextName, domainName, options = {}) {
2187
2233
  }
2188
2234
  try {
2189
2235
  const { domain } = await client.fetch(
2190
- `/v4/domains/${encodeURIComponent(domainName)}`,
2236
+ `/v5/domains/${encodeURIComponent(domainName)}`,
2191
2237
  { bailOn429: options.bailOn429 }
2192
2238
  );
2193
2239
  return domain;
@@ -5,21 +5,20 @@ const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
+ getGlobalPathConfig,
8
9
  highlight
9
- } from "./chunk-V5P25P7F.js";
10
+ } from "./chunk-JKQWQA2T.js";
10
11
  import {
12
+ DEFAULT_VERCEL_CONFIG_FILENAME,
11
13
  PromptBackError,
12
14
  PromptCanceledError,
13
- getLocalPathConfig
14
- } from "./chunk-CPFNFVCL.js";
15
- import {
16
- DEFAULT_VERCEL_CONFIG_FILENAME,
17
15
  VERCEL_CONFIG_EXTENSIONS,
18
16
  VERCEL_DIR,
19
17
  createPrompt,
20
18
  esm_default,
21
19
  esm_default2,
22
20
  esm_default3,
21
+ getLocalPathConfig,
23
22
  humanizePath,
24
23
  isBackspaceKey,
25
24
  isEnterKey,
@@ -38,13 +37,13 @@ import {
38
37
  useKeypress,
39
38
  usePrefix,
40
39
  useState
41
- } from "./chunk-4CCY5OPH.js";
40
+ } from "./chunk-VE545BR3.js";
42
41
  import {
43
42
  require_load_json_file
44
43
  } from "./chunk-ECCWJHC6.js";
45
44
  import {
46
45
  require_strip_ansi
47
- } from "./chunk-KBEX5MYS.js";
46
+ } from "./chunk-VAFU7DXZ.js";
48
47
  import {
49
48
  parseArguments
50
49
  } from "./chunk-XLKFJPMT.js";
@@ -399,39 +398,26 @@ var require_dist3 = __commonJS({
399
398
  }
400
399
  });
401
400
 
402
- // src/util/config/global-path.ts
403
- import path from "path";
404
- import * as config from "@vercel/cli-config";
405
- function getGlobalPathConfig2(argvSlice = process.argv.slice(2), cwd = process.cwd()) {
406
- const args = parseArguments(argvSlice, {}, { permissive: true });
407
- const confFlag = args.flags["--global-config"];
408
- if (confFlag) {
409
- return path.resolve(cwd, confFlag);
410
- } else {
411
- return config.getGlobalPathConfig();
412
- }
413
- }
414
-
415
401
  // src/util/config/files.ts
416
402
  var import_load_json_file = __toESM(require_load_json_file(), 1);
417
403
  var import_error_utils = __toESM(require_dist(), 1);
418
404
  var import_client = __toESM(require_dist2(), 1);
419
405
  import { join, basename, dirname } from "path";
420
406
  import { accessSync, constants } from "fs";
421
- import * as config2 from "@vercel/cli-config";
407
+ import * as config from "@vercel/cli-config";
422
408
  import {
423
409
  persistCliAuthConfig,
424
410
  readCliAuthConfig
425
411
  } from "@vercel/cli-auth/credentials-store.js";
426
- var VERCEL_DIR2 = getGlobalPathConfig2();
427
- var CONFIG_FILE_PATH = config2.getConfigFilePath(VERCEL_DIR2);
428
- var AUTH_CONFIG_FILE_PATH = config2.getAuthConfigFilePath(VERCEL_DIR2);
412
+ var VERCEL_DIR2 = getGlobalPathConfig();
413
+ var CONFIG_FILE_PATH = config.getConfigFilePath(VERCEL_DIR2);
414
+ var AUTH_CONFIG_FILE_PATH = config.getAuthConfigFilePath(VERCEL_DIR2);
429
415
  var readConfigFile = () => {
430
- return config2.readGlobalConfigFile(CONFIG_FILE_PATH);
416
+ return config.readGlobalConfigFile(CONFIG_FILE_PATH);
431
417
  };
432
418
  var writeToConfigFile = (stuff) => {
433
419
  try {
434
- config2.writeGlobalConfigFile(CONFIG_FILE_PATH, stuff);
420
+ config.writeGlobalConfigFile(CONFIG_FILE_PATH, stuff);
435
421
  } catch (err) {
436
422
  if ((0, import_error_utils.isErrnoException)(err)) {
437
423
  if ((0, import_error_utils.isErrnoException)(err) && err.code === "EPERM") {
@@ -455,7 +441,7 @@ var writeToConfigFile = (stuff) => {
455
441
  };
456
442
  var readAuthConfigFile = (_globalConfig) => {
457
443
  return {
458
- ...config2.getDefaultAuthConfig(),
444
+ ...config.getDefaultAuthConfig(),
459
445
  ...readCliAuthConfig(VERCEL_DIR2)
460
446
  };
461
447
  };
@@ -479,7 +465,7 @@ function getAuthConfigFilePath2() {
479
465
  return AUTH_CONFIG_FILE_PATH;
480
466
  }
481
467
  function readLocalConfig(prefix = process.cwd()) {
482
- let config3 = void 0;
468
+ let config2 = void 0;
483
469
  let target = "";
484
470
  try {
485
471
  target = getLocalPathConfig(prefix);
@@ -496,7 +482,7 @@ function readLocalConfig(prefix = process.cwd()) {
496
482
  }
497
483
  try {
498
484
  accessSync(target, constants.F_OK);
499
- config3 = import_load_json_file.default.sync(target);
485
+ config2 = import_load_json_file.default.sync(target);
500
486
  } catch (err) {
501
487
  if ((0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT") {
502
488
  } else if ((0, import_error_utils.isError)(err) && err.name === "JSONError") {
@@ -511,7 +497,7 @@ function readLocalConfig(prefix = process.cwd()) {
511
497
  process.exit(1);
512
498
  }
513
499
  }
514
- if (!config3) {
500
+ if (!config2) {
515
501
  return;
516
502
  }
517
503
  const isCompiledConfig = basename(target) === "vercel.json" && basename(dirname(target)) === VERCEL_DIR;
@@ -535,26 +521,26 @@ function readLocalConfig(prefix = process.cwd()) {
535
521
  } catch {
536
522
  }
537
523
  }
538
- config3[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
524
+ config2[import_client.fileNameSymbol] = sourceFile || DEFAULT_VERCEL_CONFIG_FILENAME;
539
525
  } else {
540
- config3[import_client.fileNameSymbol] = basename(target);
526
+ config2[import_client.fileNameSymbol] = basename(target);
541
527
  }
542
- return config3;
528
+ return config2;
543
529
  }
544
530
 
545
531
  // src/util/client.ts
546
532
  var import_chalk4 = __toESM(require_source(), 1);
547
533
 
548
534
  // ../../node_modules/.pnpm/@inquirer+confirm@3.1.2/node_modules/@inquirer/confirm/dist/esm/index.mjs
549
- var esm_default4 = createPrompt((config3, done) => {
550
- const { transformer = (answer) => answer ? "yes" : "no" } = config3;
535
+ var esm_default4 = createPrompt((config2, done) => {
536
+ const { transformer = (answer) => answer ? "yes" : "no" } = config2;
551
537
  const [status, setStatus] = useState("pending");
552
538
  const [value, setValue] = useState("");
553
- const theme = makeTheme(config3.theme);
539
+ const theme = makeTheme(config2.theme);
554
540
  const prefix = usePrefix({ theme });
555
541
  useKeypress((key, rl) => {
556
542
  if (isEnterKey(key)) {
557
- let answer = config3.default !== false;
543
+ let answer = config2.default !== false;
558
544
  if (/^(y|yes)/i.test(value))
559
545
  answer = true;
560
546
  else if (/^(n|no)/i.test(value))
@@ -571,9 +557,9 @@ var esm_default4 = createPrompt((config3, done) => {
571
557
  if (status === "done") {
572
558
  formattedValue = theme.style.answer(value);
573
559
  } else {
574
- defaultValue = ` ${theme.style.defaultAnswer(config3.default === false ? "y/N" : "Y/n")}`;
560
+ defaultValue = ` ${theme.style.defaultAnswer(config2.default === false ? "y/N" : "Y/n")}`;
575
561
  }
576
- const message = theme.style.message(config3.message);
562
+ const message = theme.style.message(config2.message);
577
563
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
578
564
  });
579
565
 
@@ -594,13 +580,13 @@ function getChoiceKey(choice, key) {
594
580
  return choice.value;
595
581
  return choice.name;
596
582
  }
597
- var esm_default5 = createPrompt((config3, done) => {
598
- const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config3;
583
+ var esm_default5 = createPrompt((config2, done) => {
584
+ const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config2;
599
585
  const [status, setStatus] = useState("pending");
600
586
  const [value, setValue] = useState("");
601
587
  const [expanded, setExpanded] = useState(defaultExpandState);
602
588
  const [errorMsg, setError] = useState(void 0);
603
- const theme = makeTheme(config3.theme);
589
+ const theme = makeTheme(config2.theme);
604
590
  const prefix = usePrefix({ theme });
605
591
  useKeypress((event, rl) => {
606
592
  if (isEnterKey(event)) {
@@ -625,7 +611,7 @@ var esm_default5 = createPrompt((config3, done) => {
625
611
  setError(void 0);
626
612
  }
627
613
  });
628
- const message = theme.style.message(config3.message);
614
+ const message = theme.style.message(config2.message);
629
615
  if (status === "done") {
630
616
  return `${prefix} ${message} ${theme.style.answer(value)}`;
631
617
  }
@@ -664,11 +650,11 @@ var esm_default5 = createPrompt((config3, done) => {
664
650
  });
665
651
 
666
652
  // ../../node_modules/.pnpm/@inquirer+input@2.1.2/node_modules/@inquirer/input/dist/esm/index.mjs
667
- var esm_default6 = createPrompt((config3, done) => {
668
- const { validate = () => true } = config3;
669
- const theme = makeTheme(config3.theme);
653
+ var esm_default6 = createPrompt((config2, done) => {
654
+ const { validate = () => true } = config2;
655
+ const theme = makeTheme(config2.theme);
670
656
  const [status, setStatus] = useState("pending");
671
- const [defaultValue = "", setDefaultValue] = useState(config3.default);
657
+ const [defaultValue = "", setDefaultValue] = useState(config2.default);
672
658
  const [errorMsg, setError] = useState(void 0);
673
659
  const [value, setValue] = useState("");
674
660
  const isLoading = status === "loading";
@@ -702,10 +688,10 @@ var esm_default6 = createPrompt((config3, done) => {
702
688
  setError(void 0);
703
689
  }
704
690
  });
705
- const message = theme.style.message(config3.message);
691
+ const message = theme.style.message(config2.message);
706
692
  let formattedValue = value;
707
- if (typeof config3.transformer === "function") {
708
- formattedValue = config3.transformer(value, { isFinal: status === "done" });
693
+ if (typeof config2.transformer === "function") {
694
+ formattedValue = config2.transformer(value, { isFinal: status === "done" });
709
695
  } else if (status === "done") {
710
696
  formattedValue = theme.style.answer(value);
711
697
  }
@@ -725,9 +711,9 @@ var esm_default6 = createPrompt((config3, done) => {
725
711
 
726
712
  // ../../node_modules/.pnpm/@inquirer+password@2.1.2/node_modules/@inquirer/password/dist/esm/index.mjs
727
713
  var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
728
- var esm_default7 = createPrompt((config3, done) => {
729
- const { validate = () => true } = config3;
730
- const theme = makeTheme(config3.theme);
714
+ var esm_default7 = createPrompt((config2, done) => {
715
+ const { validate = () => true } = config2;
716
+ const theme = makeTheme(config2.theme);
731
717
  const [status, setStatus] = useState("pending");
732
718
  const [errorMsg, setError] = useState(void 0);
733
719
  const [value, setValue] = useState("");
@@ -755,11 +741,11 @@ var esm_default7 = createPrompt((config3, done) => {
755
741
  setError(void 0);
756
742
  }
757
743
  });
758
- const message = theme.style.message(config3.message);
744
+ const message = theme.style.message(config2.message);
759
745
  let formattedValue = "";
760
746
  let helpTip;
761
- if (config3.mask) {
762
- const maskChar = typeof config3.mask === "string" ? config3.mask : "*";
747
+ if (config2.mask) {
748
+ const maskChar = typeof config2.mask === "string" ? config2.mask : "*";
763
749
  formattedValue = maskChar.repeat(value.length);
764
750
  } else if (status !== "done") {
765
751
  helpTip = `${theme.style.help("[input is masked]")}${import_ansi_escapes.default.cursorHide}`;
@@ -1256,7 +1242,7 @@ var PromisePolyfill = class extends Promise {
1256
1242
 
1257
1243
  // ../../node_modules/.pnpm/@inquirer+core@9.2.1/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs
1258
1244
  function createPrompt2(view) {
1259
- const prompt = (config3, context = {}) => {
1245
+ const prompt = (config2, context = {}) => {
1260
1246
  const { input = process.stdin, signal } = context;
1261
1247
  const cleanups = /* @__PURE__ */ new Set();
1262
1248
  const output = new import_mute_stream.default();
@@ -1290,7 +1276,7 @@ function createPrompt2(view) {
1290
1276
  cleanups.add(() => rl.removeListener("close", hooksCleanup));
1291
1277
  cycle(() => {
1292
1278
  try {
1293
- const nextView = view(config3, (value) => {
1279
+ const nextView = view(config2, (value) => {
1294
1280
  setImmediate(() => resolve2(value));
1295
1281
  });
1296
1282
  const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
@@ -1367,9 +1353,9 @@ function normalizeChoices(choices) {
1367
1353
  };
1368
1354
  });
1369
1355
  }
1370
- var esm_default8 = createPrompt2((config3, done) => {
1371
- const { pageSize = 7, validate = () => true } = config3;
1372
- const theme = makeTheme2(searchTheme, config3.theme);
1356
+ var esm_default8 = createPrompt2((config2, done) => {
1357
+ const { pageSize = 7, validate = () => true } = config2;
1358
+ const theme = makeTheme2(searchTheme, config2.theme);
1373
1359
  const firstRender = useRef(true);
1374
1360
  const [status, setStatus] = useState2("loading");
1375
1361
  const [searchTerm, setSearchTerm] = useState2("");
@@ -1388,7 +1374,7 @@ var esm_default8 = createPrompt2((config3, done) => {
1388
1374
  setSearchError(void 0);
1389
1375
  const fetchResults = async () => {
1390
1376
  try {
1391
- const results = await config3.source(searchTerm || void 0, {
1377
+ const results = await config2.source(searchTerm || void 0, {
1392
1378
  signal: controller.signal
1393
1379
  });
1394
1380
  if (!controller.signal.aborted) {
@@ -1445,7 +1431,7 @@ var esm_default8 = createPrompt2((config3, done) => {
1445
1431
  setSearchTerm(rl.line);
1446
1432
  }
1447
1433
  });
1448
- const message = theme.style.message(config3.message, status);
1434
+ const message = theme.style.message(config2.message, status);
1449
1435
  if (active > 0) {
1450
1436
  firstRender.current = false;
1451
1437
  }
@@ -1878,8 +1864,8 @@ ${error.stack}`);
1878
1864
  const filePath = join2(this.getGlobalPathConfig(), fileName);
1879
1865
  writeSharedConfigFile(filePath, schema, value);
1880
1866
  }
1881
- updateConfig(config3) {
1882
- this.config = { ...this.config, ...config3 };
1867
+ updateConfig(config2) {
1868
+ this.config = { ...this.config, ...config2 };
1883
1869
  }
1884
1870
  writeToConfigFile() {
1885
1871
  writeToConfigFile(this.config);
@@ -2083,19 +2069,7 @@ Are you sure you want to proceed?`;
2083
2069
  }
2084
2070
  };
2085
2071
 
2086
- // src/util/output/progress.ts
2087
- function progress(current, total, opts = {}) {
2088
- const { width = 20, complete = "=", incomplete = "-" } = opts;
2089
- if (total <= 0 || current < 0 || current > total) {
2090
- return null;
2091
- }
2092
- const unit = total / width;
2093
- const pos = Math.floor(current / unit);
2094
- return `${complete.repeat(pos)}${incomplete.repeat(width - pos)}`;
2095
- }
2096
-
2097
2072
  export {
2098
- getGlobalPathConfig2 as getGlobalPathConfig,
2099
2073
  require_dist3 as require_dist,
2100
2074
  printIndications,
2101
2075
  readConfigFile,
@@ -2107,6 +2081,5 @@ export {
2107
2081
  readLocalConfig,
2108
2082
  sleep,
2109
2083
  isJSONObject,
2110
- Client,
2111
- progress
2084
+ Client
2112
2085
  };
@@ -0,0 +1,61 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ login,
9
+ require_ci_info
10
+ } from "./chunk-4JKZ7SRX.js";
11
+ import {
12
+ getGlobalPathConfig
13
+ } from "./chunk-JKQWQA2T.js";
14
+ import {
15
+ humanizePath,
16
+ param
17
+ } from "./chunk-VE545BR3.js";
18
+ import {
19
+ printError
20
+ } from "./chunk-VAFU7DXZ.js";
21
+ import {
22
+ getCommandName
23
+ } from "./chunk-SOFC4MLS.js";
24
+ import {
25
+ output_manager_default
26
+ } from "./chunk-OX7KI3LF.js";
27
+ import {
28
+ __toESM
29
+ } from "./chunk-TZ2YI2VH.js";
30
+
31
+ // src/util/login/prompt-missing-credentials.ts
32
+ var import_ci_info = __toESM(require_ci_info(), 1);
33
+ async function promptMissingCredentials(client, onLoginError) {
34
+ const isTTY = process.stdout.isTTY;
35
+ if (!import_ci_info.default.isCI && (isTTY || client.isAgent)) {
36
+ output_manager_default.log(
37
+ isTTY ? "No existing credentials found. Please log in:" : "No existing credentials found. Starting login flow..."
38
+ );
39
+ try {
40
+ const result = await login(client, { shouldParseArgs: false });
41
+ if (result !== 0) {
42
+ return result;
43
+ }
44
+ } catch (error) {
45
+ printError(error);
46
+ onLoginError?.(error);
47
+ return 1;
48
+ }
49
+ output_manager_default.debug(`Saved credentials in "${humanizePath(getGlobalPathConfig())}"`);
50
+ return 0;
51
+ }
52
+ output_manager_default.prettyError({
53
+ message: `No existing credentials found. Please run ${getCommandName("login")} or pass ${param("--token")}`,
54
+ link: "https://err.sh/vercel/no-credentials-found"
55
+ });
56
+ return 1;
57
+ }
58
+
59
+ export {
60
+ promptMissingCredentials
61
+ };