vercel 58.10.0 → 59.0.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 (85) hide show
  1. package/dist/chunks/{add-5KFK4EFH.js → add-3LO3UMYC.js} +6 -6
  2. package/dist/chunks/{add-W4XR5GYX.js → add-QZUQNL2C.js} +2 -2
  3. package/dist/chunks/{add-NMYLVDBN.js → add-SQ6ERCFZ.js} +2 -2
  4. package/dist/chunks/{build-BCMSG7TU.js → build-WMUKZEFH.js} +2 -2
  5. package/dist/chunks/{chunk-IBIZT5M4.js → chunk-3R5JGMHV.js} +62 -20
  6. package/dist/chunks/{chunk-CLUCO4RD.js → chunk-5KI3SUJI.js} +81 -18
  7. package/dist/chunks/{chunk-MGCBTAA7.js → chunk-BGILSKZ5.js} +1 -1
  8. package/dist/chunks/{chunk-BZGIBXY6.js → chunk-CMR5KQVR.js} +1 -1
  9. package/dist/chunks/{chunk-AZCZV4XI.js → chunk-DMLU5KQE.js} +1 -1
  10. package/dist/chunks/chunk-DQDJVHA5.js +559 -0
  11. package/dist/chunks/{chunk-UDHYVIJL.js → chunk-L6NIIAB7.js} +4 -4
  12. package/dist/chunks/{chunk-2J7BL7IF.js → chunk-LT5UQNTC.js} +2 -2
  13. package/dist/chunks/{chunk-MAZ2BUBX.js → chunk-MZ3L3SGZ.js} +2 -2
  14. package/dist/chunks/{chunk-5MERQE7H.js → chunk-N5DK7EMY.js} +1 -1
  15. package/dist/chunks/{chunk-KUZCVMVA.js → chunk-PBECT5BN.js} +4 -3
  16. package/dist/chunks/{chunk-N5YCPDWG.js → chunk-PSZQNYEV.js} +1 -1
  17. package/dist/chunks/{chunk-6SXIT6Q3.js → chunk-PVCJIMVY.js} +2 -2
  18. package/dist/chunks/{chunk-H25BISPQ.js → chunk-QGQX7BYN.js} +10 -518
  19. package/dist/chunks/{chunk-PTZ6X4P4.js → chunk-RWRSUGXY.js} +1 -1
  20. package/dist/chunks/{chunk-TNKTZDOL.js → chunk-S3H7ITUR.js} +1 -1
  21. package/dist/chunks/{chunk-U4LWFSR4.js → chunk-SD2QZHZA.js} +1 -1
  22. package/dist/chunks/{chunk-2SEBBSKD.js → chunk-SHR6DYA5.js} +1 -1
  23. package/dist/chunks/{chunk-DQDAQYQI.js → chunk-SQAQED4U.js} +1 -1
  24. package/dist/chunks/{chunk-NDOZRKTB.js → chunk-UQVOFOP2.js} +1 -1
  25. package/dist/chunks/{chunk-L6BFCLXF.js → chunk-V42UVZDX.js} +80 -38
  26. package/dist/chunks/chunk-W34XLJ44.js +61 -0
  27. package/dist/chunks/{chunk-6WWATEWK.js → chunk-WE3TFESA.js} +1 -1
  28. package/dist/chunks/{chunk-ELJ56NBY.js → chunk-ZFTRB6AB.js} +173 -173
  29. package/dist/chunks/{chunk-7RUZPHW7.js → chunk-ZRWSSPW5.js} +1 -1
  30. package/dist/chunks/{clear-54WX3NA2.js → clear-W2B4CHTP.js} +2 -2
  31. package/dist/chunks/{compile-vercel-config-LSW4TWGX.js → compile-vercel-config-HTWOS7DZ.js} +1 -1
  32. package/dist/chunks/{config-WXQTPQW7.js → config-EGJY4UUE.js} +2 -2
  33. package/dist/chunks/{delete-OGP3RVWM.js → delete-6I7V5AGV.js} +2 -2
  34. package/dist/chunks/{delete-HQMI44SG.js → delete-BVMID4W2.js} +2 -2
  35. package/dist/chunks/{disable-HC266OB7.js → disable-I54JNXJE.js} +2 -2
  36. package/dist/chunks/{discard-3RFIPLXY.js → discard-6TSJJCUQ.js} +2 -2
  37. package/dist/chunks/{edit-TZOCRGG6.js → edit-KCWYQ2YT.js} +2 -2
  38. package/dist/chunks/{edit-NXPQFWM6.js → edit-YS2SWHFJ.js} +3 -3
  39. package/dist/chunks/{enable-OGFRN4CG.js → enable-RYXRIGQN.js} +2 -2
  40. package/dist/chunks/{export-AEESZFZX.js → export-G3NYOADE.js} +2 -2
  41. package/dist/chunks/{image-EIAO7LVN.js → image-RJBLSUES.js} +3 -3
  42. package/dist/chunks/{import-builders-KCQLA2YR.js → import-builders-M6F3F4DH.js} +2 -2
  43. package/dist/chunks/{inspect-RUGPLO7A.js → inspect-7XUEVBDM.js} +2 -2
  44. package/dist/chunks/{inspect-MGIECVLH.js → inspect-AE4YIJYS.js} +2 -2
  45. package/dist/chunks/{inspect-TTHC6L7Q.js → inspect-E7TBGK7D.js} +2 -2
  46. package/dist/chunks/{inspect-HHSDXTII.js → inspect-YTCVTZHY.js} +2 -2
  47. package/dist/chunks/{inspect-EM34BOTE.js → inspect-Z74NZZ2A.js} +3 -3
  48. package/dist/chunks/{list-A74MGEOB.js → list-KJNC3NOE.js} +2 -2
  49. package/dist/chunks/{list-GQDUIRBU.js → list-SGPLL4KJ.js} +3 -3
  50. package/dist/chunks/{list-EOG3TYBE.js → list-WXS2AFQD.js} +1 -1
  51. package/dist/chunks/{login-L4EWZOGH.js → login-XD3CFPBF.js} +2 -2
  52. package/dist/chunks/{ls-F6WCPVB7.js → ls-5A4327XJ.js} +2 -2
  53. package/dist/chunks/{ls-OWHNAGNT.js → ls-5DSOTTYX.js} +2 -2
  54. package/dist/chunks/{ls-OJGSWVWO.js → ls-KE5I7BZO.js} +2 -2
  55. package/dist/chunks/{ls-D5ESYWG5.js → ls-NBKSDTWX.js} +2 -2
  56. package/dist/chunks/{ls-VBFBWSWD.js → ls-SVSO3677.js} +3 -3
  57. package/dist/chunks/{open-FHER5QV2.js → open-M2MOAE2K.js} +2 -2
  58. package/dist/chunks/{permissions-JSXC7BRD.js → permissions-ADPY554K.js} +4 -4
  59. package/dist/chunks/{publish-CM6ZGWIE.js → publish-OBIOOL7T.js} +2 -2
  60. package/dist/chunks/{push-5NYG7HIR.js → push-5237XBTO.js} +2 -2
  61. package/dist/chunks/{query-5GQLF2BR.js → query-ILL74HIA.js} +1 -1
  62. package/dist/chunks/{reorder-5GCNY75W.js → reorder-GAUAO4LW.js} +2 -2
  63. package/dist/chunks/{reply-B2XCK5XR.js → reply-IZJHEULD.js} +2 -2
  64. package/dist/chunks/{resolve-YQP5C2QY.js → resolve-HTIT7CGL.js} +2 -2
  65. package/dist/chunks/{restore-VHX4JV5J.js → restore-IKL74HSE.js} +2 -2
  66. package/dist/chunks/{rm-VDFSX3LH.js → rm-5Y6BL47T.js} +2 -2
  67. package/dist/chunks/{rm-AUUT2YIT.js → rm-C37ZORQV.js} +2 -2
  68. package/dist/chunks/{rm-QVVQDCDX.js → rm-QAVNP5KX.js} +3 -3
  69. package/dist/chunks/{rm-OILUGCTW.js → rm-XJU5SBGH.js} +2 -2
  70. package/dist/chunks/{rule-inspect-LKTUPW4B.js → rule-inspect-DYHWWROS.js} +3 -3
  71. package/dist/chunks/{rules-J5JM5VFQ.js → rules-M6EJ2Y6S.js} +6 -6
  72. package/dist/chunks/{schema-OIKSCLDU.js → schema-LLBDZNIC.js} +1 -1
  73. package/dist/chunks/{tags-AMTMNRLQ.js → tags-HR5RVQFA.js} +2 -2
  74. package/dist/chunks/{update-AFL3GHKB.js → update-6A5V6HBH.js} +6 -6
  75. package/dist/commands/build/index.js +15 -11
  76. package/dist/commands/deploy/index.js +347 -49
  77. package/dist/commands/dev/index.js +8 -8
  78. package/dist/commands/env/index.js +4 -4
  79. package/dist/commands/link/index.js +6 -6
  80. package/dist/commands/list/index.js +2 -2
  81. package/dist/commands-bulk.js +2111 -1619
  82. package/dist/index.js +32 -42
  83. package/dist/version.mjs +1 -1
  84. package/package.json +35 -35
  85. package/dist/chunks/chunk-I2XE3GMB.js +0 -21
@@ -9,19 +9,19 @@ import {
9
9
  } from "./chunk-PRWJUY5U.js";
10
10
  import {
11
11
  progress
12
- } from "./chunk-I2XE3GMB.js";
12
+ } from "./chunk-DQDJVHA5.js";
13
13
  import {
14
14
  isJSONObject,
15
15
  printIndications,
16
16
  require_dist as require_dist2,
17
17
  sleep
18
- } from "./chunk-MAZ2BUBX.js";
18
+ } from "./chunk-MZ3L3SGZ.js";
19
19
  import {
20
20
  suggestNextCommands
21
21
  } from "./chunk-XBN2O34P.js";
22
22
  import {
23
23
  CommandTimeout
24
- } from "./chunk-CLUCO4RD.js";
24
+ } from "./chunk-5KI3SUJI.js";
25
25
  import {
26
26
  showPluginTipIfNeeded
27
27
  } from "./chunk-HT2XWSAJ.js";
@@ -38,7 +38,7 @@ import {
38
38
  require_dist as require_dist3,
39
39
  require_pluralize,
40
40
  ua_default
41
- } from "./chunk-IBIZT5M4.js";
41
+ } from "./chunk-3R5JGMHV.js";
42
42
  import {
43
43
  require_ms
44
44
  } from "./chunk-GGP5R3FU.js";
@@ -1168,9 +1168,11 @@ async function processDeployment({
1168
1168
  skipAutoDetectionConfirmation,
1169
1169
  noWait,
1170
1170
  withFullLogs,
1171
+ anonymous,
1171
1172
  manual,
1172
1173
  jsonOutput,
1173
1174
  linkedProject,
1175
+ linkedProjectIsPartial,
1174
1176
  ...args
1175
1177
  }) {
1176
1178
  const {
@@ -1216,7 +1218,9 @@ async function processDeployment({
1216
1218
  manual,
1217
1219
  aliasAssignedSignal: aliasAssignedController.signal
1218
1220
  };
1219
- 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
+ )}`;
1220
1224
  output_manager_default.spinner(deployingSpinnerVal, 0);
1221
1225
  const indications = [];
1222
1226
  let abortController;
@@ -1224,9 +1228,27 @@ async function processDeployment({
1224
1228
  abortController?.abort();
1225
1229
  output_manager_default.stopSpinner();
1226
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;
1227
1239
  let rollingRelease = linkedProject?.rollingRelease;
1228
- let project = linkedProject;
1240
+ let project = linkedProjectLookup ? void 0 : linkedProject;
1229
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
+ }
1230
1252
  try {
1231
1253
  for await (const event of (0, import_client.createDeployment)(clientOptions, requestBody)) {
1232
1254
  if (["tip", "notice", "warning"].includes(event.type)) {
@@ -1281,30 +1303,32 @@ async function processDeployment({
1281
1303
  const deployment = event.payload;
1282
1304
  now.url = deployment.url;
1283
1305
  stopSpinner();
1284
- printInspectUrl(deployment.inspectorUrl);
1285
- const isProdDeployment = deployment.target === "production";
1286
- const previewUrl = `https://${deployment.url}`;
1287
- if (isProdDeployment && !requestBody.target) {
1288
- indications.push({
1289
- type: "notice",
1290
- payload: "This is your project\u2019s first deployment, so it was assigned to production. Future deployments will be preview deployments unless you use --prod.",
1291
- link: "https://vercel.com/docs/deployments/environments"
1292
- });
1293
- }
1294
- printAlignedLabel(
1295
- isProdDeployment ? "Production" : "Preview",
1296
- import_chalk2.default.cyan(previewUrl),
1297
- isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1298
- );
1299
- if (!jsonOutput && (quiet || process.env.FORCE_TTY === "1")) {
1300
- 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
+ }
1301
1325
  }
1302
1326
  if (noWait) {
1303
1327
  deployment.indications = indications;
1304
1328
  return deployment;
1305
1329
  }
1306
1330
  latestLogMessage = deployment.readyState === "QUEUED" ? "Queued\u2026" : "Building\u2026";
1307
- if (withFullLogs) {
1331
+ if (withFullLogs && !anonymous) {
1308
1332
  let promise;
1309
1333
  ({ abortController, promise } = displayBuildLogs(
1310
1334
  client,
@@ -1315,7 +1339,7 @@ async function processDeployment({
1315
1339
  promise.catch(
1316
1340
  (error) => output_manager_default.warn(`Failed to read build logs: ${error}`)
1317
1341
  );
1318
- } else {
1342
+ } else if (!anonymous) {
1319
1343
  abortController = new AbortController();
1320
1344
  const promise = events_default(
1321
1345
  client,
@@ -1351,8 +1375,8 @@ async function processDeployment({
1351
1375
  stopSpinner();
1352
1376
  return event.payload;
1353
1377
  }
1354
- if (project === void 0) {
1355
- project = await getProjectByNameOrId(client, projectName);
1378
+ if (project === void 0 && (!linkedProjectLookup || event.type === "ready")) {
1379
+ project = await resolveProject();
1356
1380
  rollingRelease = project?.rollingRelease;
1357
1381
  }
1358
1382
  if (event.type === "ready" && rollingRelease) {
@@ -1365,14 +1389,16 @@ async function processDeployment({
1365
1389
  const v1ChecksPending = event.payload.checksState && event.payload.checksState !== "completed";
1366
1390
  const v2ChecksPending = event.payload.checks?.["deployment-alias"]?.state === "pending";
1367
1391
  output_manager_default.stopSpinner();
1368
- process.stderr.write(eraseLines(2));
1369
- const isProdDeployment = event.payload.target === "production";
1370
- const previewUrl = `https://${event.payload.url}`;
1371
- printAlignedLabel(
1372
- isProdDeployment ? "Production" : "Preview",
1373
- import_chalk2.default.cyan(previewUrl),
1374
- isProdDeployment && !aliasedRowWillPrint ? { gutter: "\u25B2" } : {}
1375
- );
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
+ }
1376
1402
  if (v1ChecksPending || v2ChecksPending) {
1377
1403
  output_manager_default.spinner("Running Checks\u2026", 0);
1378
1404
  } else {
@@ -1414,7 +1440,19 @@ async function processDeployment({
1414
1440
  if (event.payload.target === "production" && event.payload.alias && event.payload.alias.length > 0) {
1415
1441
  const primaryDomain = event.payload.alias[0];
1416
1442
  const prodUrl = `https://${primaryDomain}`;
1417
- 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
+ }
1418
1456
  }
1419
1457
  event.payload.indications = indications;
1420
1458
  return event.payload;
@@ -1483,6 +1521,7 @@ var Now = class {
1483
1521
  name,
1484
1522
  project,
1485
1523
  prebuilt = false,
1524
+ anonymous = false,
1486
1525
  vercelOutputDir,
1487
1526
  rootDirectory,
1488
1527
  meta,
@@ -1502,7 +1541,8 @@ var Now = class {
1502
1541
  agentName,
1503
1542
  manual,
1504
1543
  jsonOutput = false,
1505
- linkedProject
1544
+ linkedProject,
1545
+ linkedProjectIsPartial
1506
1546
  }, org, isSettingUpProject, archive) {
1507
1547
  const requestBody = {
1508
1548
  ...nowConfig,
@@ -1535,6 +1575,7 @@ var Now = class {
1535
1575
  archive,
1536
1576
  skipAutoDetectionConfirmation,
1537
1577
  prebuilt,
1578
+ anonymous,
1538
1579
  vercelOutputDir,
1539
1580
  rootDirectory,
1540
1581
  noWait,
@@ -1542,7 +1583,8 @@ var Now = class {
1542
1583
  bulkRedirectsPath: nowConfig.bulkRedirectsPath,
1543
1584
  manual,
1544
1585
  jsonOutput,
1545
- linkedProject
1586
+ linkedProject,
1587
+ linkedProjectIsPartial
1546
1588
  });
1547
1589
  if (deployment && deployment.warnings) {
1548
1590
  let sizeExceeded = 0;
@@ -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-DQDJVHA5.js";
11
+ import {
12
+ getGlobalPathConfig
13
+ } from "./chunk-JKQWQA2T.js";
14
+ import {
15
+ humanizePath,
16
+ param
17
+ } from "./chunk-3R5JGMHV.js";
18
+ import {
19
+ printError
20
+ } from "./chunk-KBEX5MYS.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
+ };
@@ -20,7 +20,7 @@ import {
20
20
  getLinkedProject,
21
21
  getProjectByNameOrId,
22
22
  getScope
23
- } from "./chunk-IBIZT5M4.js";
23
+ } from "./chunk-3R5JGMHV.js";
24
24
  import {
25
25
  AGENT_REASON,
26
26
  buildCommandWithGlobalFlags,