vercel 54.21.1 → 55.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 (70) hide show
  1. package/dist/chunks/{add-UMB55BRR.js → add-BQGGX36J.js} +4 -4
  2. package/dist/chunks/{add-NKDLTZ3B.js → add-YRFK663I.js} +4 -4
  3. package/dist/chunks/{chunk-GAJ2ESDD.js → chunk-2XTV2FM7.js} +100 -36
  4. package/dist/chunks/{chunk-3EMRC44D.js → chunk-5OT26JZN.js} +32 -0
  5. package/dist/chunks/{chunk-MV65GD4L.js → chunk-6CRRXESK.js} +1 -1
  6. package/dist/chunks/chunk-7PZWVZN6.js +105 -0
  7. package/dist/chunks/{chunk-MLY3KGVY.js → chunk-A5QK4X3Z.js} +4 -4
  8. package/dist/chunks/{chunk-DKE73NGN.js → chunk-AA3E7OLF.js} +29 -2
  9. package/dist/chunks/{chunk-H3KWN2KA.js → chunk-AW6V5LOC.js} +2 -2
  10. package/dist/chunks/{chunk-I3HGCZ4E.js → chunk-CMJMYVQM.js} +1 -0
  11. package/dist/chunks/{chunk-AUYY7RD3.js → chunk-D43MOSMZ.js} +388 -11
  12. package/dist/chunks/{chunk-XCL7I6W5.js → chunk-EJV2KFOF.js} +2 -2
  13. package/dist/chunks/{chunk-TRQJQXKD.js → chunk-EUARKVCA.js} +82 -19
  14. package/dist/chunks/{chunk-TLKTTWDA.js → chunk-GVZKC6PS.js} +1 -1
  15. package/dist/chunks/{chunk-4UZF3U4N.js → chunk-HA7C7SDO.js} +2 -0
  16. package/dist/chunks/{chunk-ADTCIFMD.js → chunk-HOYOJUQZ.js} +69 -16
  17. package/dist/chunks/{chunk-43I5EAPY.js → chunk-IIUE7CDZ.js} +1 -1
  18. package/dist/chunks/{chunk-RO5JIUOI.js → chunk-LHY5EFII.js} +1 -1
  19. package/dist/chunks/{chunk-2ZXLLEEZ.js → chunk-MGUQN3V3.js} +2 -2
  20. package/dist/chunks/{chunk-HMFUXSD7.js → chunk-OCEM4YAQ.js} +1 -1
  21. package/dist/chunks/{chunk-QMZO4CEP.js → chunk-OKWMOW2F.js} +351 -401
  22. package/dist/chunks/{chunk-XMJAKLQQ.js → chunk-SENGDDFO.js} +1 -1
  23. package/dist/chunks/{chunk-OVE2GAHC.js → chunk-VTA3KZUX.js} +1 -1
  24. package/dist/chunks/chunk-WGGABYO5.js +31 -0
  25. package/dist/chunks/{chunk-KNSDQCVQ.js → chunk-X36ADWA5.js} +51 -9
  26. package/dist/chunks/{chunk-I4NRKN2Z.js → chunk-XHC5YRFY.js} +448 -271
  27. package/dist/chunks/{chunk-IMTOXXTF.js → chunk-ZQEZYHPJ.js} +6 -4
  28. package/dist/chunks/{compile-vercel-config-OKONVGZI.js → compile-vercel-config-3RYUGKGU.js} +1 -1
  29. package/dist/chunks/{delete-L7TN5GNZ.js → delete-UQKVMHVV.js} +2 -2
  30. package/dist/chunks/{disable-7NVU4H2N.js → disable-GUK4VHQY.js} +2 -2
  31. package/dist/chunks/{discard-SJ2TDPS2.js → discard-DTI36R2T.js} +2 -2
  32. package/dist/chunks/{edit-SW4MF4Q3.js → edit-ED4LM54G.js} +3 -3
  33. package/dist/chunks/{enable-FOKEO6J2.js → enable-RAWDG7GZ.js} +2 -2
  34. package/dist/chunks/{exec-UKMIYIF6.js → exec-G4AUF3KG.js} +4 -90
  35. package/dist/chunks/{export-3DSHT2FD.js → export-U6OBSYVP.js} +2 -2
  36. package/dist/chunks/{image-T6I7BZSC.js → image-LIJI6QJY.js} +3 -3
  37. package/dist/chunks/{inspect-2MY25CMN.js → inspect-25D5G5FX.js} +8 -8
  38. package/dist/chunks/{inspect-EP24WN4I.js → inspect-3SEYQNWT.js} +8 -8
  39. package/dist/chunks/{inspect-RV444SBC.js → inspect-7LGTAPH3.js} +3 -3
  40. package/dist/chunks/{inspect-DJ7OGHBK.js → inspect-IQD2ULLP.js} +7 -7
  41. package/dist/chunks/{list-CCG2NVLL.js → list-2IJHE2AC.js} +3 -3
  42. package/dist/chunks/{list-OMJ7EDKA.js → list-I25HBKWF.js} +2 -2
  43. package/dist/chunks/login-N4DIZZWE.js +247 -0
  44. package/dist/chunks/{ls-5KN5FKAQ.js → ls-2VXZPNMR.js} +7 -7
  45. package/dist/chunks/{ls-VXZGEJJD.js → ls-HN3SUOPA.js} +4 -4
  46. package/dist/chunks/{ls-VCTHIVI7.js → ls-S7YPR3OS.js} +7 -7
  47. package/dist/chunks/{ls-33Z3R2KY.js → ls-TFOKQKY3.js} +7 -7
  48. package/dist/chunks/{publish-RZ2DIYRU.js → publish-ZTGB4XE2.js} +2 -2
  49. package/dist/chunks/{query-2MIBB7C5.js → query-2UK5BV4B.js} +2 -2
  50. package/dist/chunks/{reorder-FEZIPHNW.js → reorder-FM755TJK.js} +2 -2
  51. package/dist/chunks/{restore-JHH6CW2S.js → restore-NXQJMPMT.js} +2 -2
  52. package/dist/chunks/{rm-EKPVQYGH.js → rm-III6VASE.js} +4 -4
  53. package/dist/chunks/{rm-ULQHII4K.js → rm-MPC5DPOS.js} +4 -4
  54. package/dist/chunks/{rm-3KAXICHP.js → rm-XJMPAJNP.js} +3 -3
  55. package/dist/chunks/{rule-inspect-FOZOCOUO.js → rule-inspect-BJGXMAO5.js} +4 -4
  56. package/dist/chunks/{rules-RJD4S7JA.js → rules-FSNWMWJH.js} +8 -8
  57. package/dist/chunks/{schema-CDXFJU72.js → schema-NR6DGYCB.js} +2 -2
  58. package/dist/chunks/{tags-BLBAPEWV.js → tags-RVHMONZN.js} +2 -2
  59. package/dist/chunks/{update-2NW6NKG6.js → update-55OM2454.js} +4 -4
  60. package/dist/commands/build/index.js +25 -9
  61. package/dist/commands/deploy/index.js +21 -43
  62. package/dist/commands/dev/index.js +200 -57
  63. package/dist/commands/env/index.js +6 -6
  64. package/dist/commands/link/index.js +30 -13
  65. package/dist/commands/list/index.js +25 -10
  66. package/dist/commands-bulk.js +3883 -2129
  67. package/dist/index.js +12 -12
  68. package/dist/version.mjs +1 -1
  69. package/package.json +23 -23
  70. package/dist/chunks/chunk-Y4JJYHUG.js +0 -16
@@ -10,7 +10,7 @@ import {
10
10
  progress,
11
11
  require_dist as require_dist2,
12
12
  sleep
13
- } from "./chunk-TRQJQXKD.js";
13
+ } from "./chunk-EUARKVCA.js";
14
14
  import {
15
15
  suggestNextCommands
16
16
  } from "./chunk-XBN2O34P.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-SGL3NMOP.js";
21
21
  import {
22
22
  CommandTimeout
23
- } from "./chunk-AUYY7RD3.js";
23
+ } from "./chunk-D43MOSMZ.js";
24
24
  import {
25
25
  showPluginTipIfNeeded
26
26
  } from "./chunk-NJUPUGOE.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-64IF634X.js";
30
30
  import {
31
31
  getScope
32
- } from "./chunk-HMFUXSD7.js";
32
+ } from "./chunk-OCEM4YAQ.js";
33
33
  import {
34
34
  getProjectByNameOrId,
35
35
  param,
@@ -37,7 +37,7 @@ import {
37
37
  require_dist as require_dist3,
38
38
  require_pluralize,
39
39
  ua_default
40
- } from "./chunk-I4NRKN2Z.js";
40
+ } from "./chunk-XHC5YRFY.js";
41
41
  import {
42
42
  require_strip_ansi,
43
43
  responseError
@@ -1585,7 +1585,7 @@ var import_async_retry = __toESM(require_dist2(), 1);
1585
1585
  var import_jsonlines = __toESM(require_jsonlines(), 1);
1586
1586
  var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
1587
1587
  import { URLSearchParams } from "url";
1588
- async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, findOpts }, abortController) {
1588
+ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, onAliasAssigned, quiet, findOpts }, abortController) {
1589
1589
  const { log, debug } = output_manager_default;
1590
1590
  const scope = mode === "deploy" ? await getScope(client) : null;
1591
1591
  let o = 0;
@@ -1652,6 +1652,12 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
1652
1652
  }
1653
1653
  let latestLogDate = 0;
1654
1654
  const onData = (data) => {
1655
+ if (data.type === "alias-assigned") {
1656
+ if (data.deploymentId === urlOrDeploymentId) {
1657
+ onAliasAssigned?.(data);
1658
+ }
1659
+ return;
1660
+ }
1655
1661
  const { event, payload, date } = data;
1656
1662
  if (event === "state" && payload.value === "READY") {
1657
1663
  if (mode === "deploy") {
@@ -1685,16 +1691,30 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
1685
1691
  ...findOpts,
1686
1692
  since: latestLogDate
1687
1693
  };
1688
- setTimeout(() => {
1694
+ const retryTimeout = setTimeout(() => {
1695
+ abortController?.signal.removeEventListener("abort", onAbort);
1689
1696
  if (abortController?.signal.aborted)
1690
1697
  return;
1691
- printEvents(client, urlOrDeploymentId, {
1692
- mode,
1693
- onEvent,
1694
- quiet,
1695
- findOpts: retryFindOpts
1696
- }).then(resolve, reject);
1698
+ printEvents(
1699
+ client,
1700
+ urlOrDeploymentId,
1701
+ {
1702
+ mode,
1703
+ onEvent,
1704
+ onAliasAssigned,
1705
+ quiet,
1706
+ findOpts: retryFindOpts
1707
+ },
1708
+ abortController
1709
+ ).then(resolve, reject);
1697
1710
  }, 2e3);
1711
+ const onAbort = () => {
1712
+ clearTimeout(retryTimeout);
1713
+ finish();
1714
+ };
1715
+ abortController?.signal.addEventListener("abort", onAbort, {
1716
+ once: true
1717
+ });
1698
1718
  };
1699
1719
  stream.on("end", finish);
1700
1720
  stream.on("data", onData);
@@ -1717,6 +1737,10 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
1717
1737
  },
1718
1738
  {
1719
1739
  retries: 4,
1740
+ // Don't let deploy stream retry timers keep the CLI alive after polling
1741
+ // wins. Standalone log consumers await these retries, so their timers
1742
+ // must remain referenced.
1743
+ unref: Boolean(onAliasAssigned),
1720
1744
  onRetry: (err) => {
1721
1745
  if (!quiet && o) {
1722
1746
  process.stdout.write((0, import_ansi_escapes.eraseLines)(o + 1));
@@ -1731,7 +1755,7 @@ var events_default = printEvents;
1731
1755
 
1732
1756
  // src/util/logs.ts
1733
1757
  var import_strip_ansi = __toESM(require_strip_ansi(), 1);
1734
- function displayBuildLogs(client, deployment, follow = true) {
1758
+ function displayBuildLogs(client, deployment, follow = true, onAliasAssigned) {
1735
1759
  const abortController = new AbortController();
1736
1760
  const promise = events_default(
1737
1761
  client,
@@ -1739,6 +1763,7 @@ function displayBuildLogs(client, deployment, follow = true) {
1739
1763
  {
1740
1764
  mode: "logs",
1741
1765
  onEvent: (event) => printBuildLog(event, output_manager_default.print),
1766
+ onAliasAssigned,
1742
1767
  quiet: false,
1743
1768
  findOpts: { direction: "forward", follow }
1744
1769
  },
@@ -1746,6 +1771,26 @@ function displayBuildLogs(client, deployment, follow = true) {
1746
1771
  );
1747
1772
  return { promise, abortController };
1748
1773
  }
1774
+ function collectBuildLogs(client, deployment, follow = true) {
1775
+ const logs = [];
1776
+ const abortController = new AbortController();
1777
+ const promise = events_default(
1778
+ client,
1779
+ deployment.id,
1780
+ {
1781
+ mode: "logs",
1782
+ onEvent: (event) => {
1783
+ if (event.created) {
1784
+ logs.push(event);
1785
+ }
1786
+ },
1787
+ quiet: true,
1788
+ findOpts: { direction: "forward", follow }
1789
+ },
1790
+ abortController
1791
+ ).then(() => logs);
1792
+ return { promise, abortController };
1793
+ }
1749
1794
  async function displayBuildLogsUntilFinalError(client, deployment, error) {
1750
1795
  const abortController = new AbortController();
1751
1796
  return events_default(
@@ -1981,6 +2026,10 @@ async function processDeployment({
1981
2026
  if (!token) {
1982
2027
  throw new Error("Missing authentication token");
1983
2028
  }
2029
+ const aliasAssignedController = new AbortController();
2030
+ const onAliasAssigned = (event) => {
2031
+ aliasAssignedController.abort(event);
2032
+ };
1984
2033
  const clientOptions = {
1985
2034
  teamId: org.type === "team" ? org.id : void 0,
1986
2035
  apiUrl: now._apiUrl,
@@ -1998,7 +2047,8 @@ async function processDeployment({
1998
2047
  agent,
1999
2048
  projectName,
2000
2049
  bulkRedirectsPath,
2001
- manual
2050
+ manual,
2051
+ aliasAssignedSignal: aliasAssignedController.signal
2002
2052
  };
2003
2053
  const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk2.default.bold(`${org.slug}/${projectName}`)}`;
2004
2054
  output_manager_default.spinner(deployingSpinnerVal, 0);
@@ -2085,7 +2135,8 @@ async function processDeployment({
2085
2135
  ({ abortController, promise } = displayBuildLogs(
2086
2136
  client,
2087
2137
  deployment,
2088
- true
2138
+ true,
2139
+ onAliasAssigned
2089
2140
  ));
2090
2141
  promise.catch(
2091
2142
  (error) => output_manager_default.warn(`Failed to read build logs: ${error}`)
@@ -2097,6 +2148,7 @@ async function processDeployment({
2097
2148
  deployment.id,
2098
2149
  {
2099
2150
  mode: "logs",
2151
+ onAliasAssigned,
2100
2152
  onEvent: (event2) => {
2101
2153
  if (!event2.created)
2102
2154
  return;
@@ -2137,7 +2189,7 @@ async function processDeployment({
2137
2189
  if (event.type === "ready" && !withFullLogs) {
2138
2190
  const v1ChecksPending = event.payload.checksState && event.payload.checksState !== "completed";
2139
2191
  const v2ChecksPending = event.payload.checks?.["deployment-alias"]?.state === "pending";
2140
- stopSpinner();
2192
+ output_manager_default.stopSpinner();
2141
2193
  process.stderr.write(eraseLines(2));
2142
2194
  const isProdDeployment = event.payload.target === "production";
2143
2195
  const previewUrl = `https://${event.payload.url}`;
@@ -3061,6 +3113,7 @@ export {
3061
3113
  require_format,
3062
3114
  require_jsonlines,
3063
3115
  displayBuildLogs,
3116
+ collectBuildLogs,
3064
3117
  displayBuildLogsUntilFinalError,
3065
3118
  displayRuntimeLogs,
3066
3119
  UploadErrorMissingArchive,
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getEnvTargetPlaceholder
9
- } from "./chunk-I4NRKN2Z.js";
9
+ } from "./chunk-XHC5YRFY.js";
10
10
  import {
11
11
  projectOption,
12
12
  yesOption
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveAlertsScope
9
- } from "./chunk-H3KWN2KA.js";
9
+ } from "./chunk-AW6V5LOC.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
@@ -15,11 +15,11 @@ import {
15
15
  } from "./chunk-QH7WYDEP.js";
16
16
  import {
17
17
  getScope
18
- } from "./chunk-HMFUXSD7.js";
18
+ } from "./chunk-OCEM4YAQ.js";
19
19
  import {
20
20
  getLinkedProject,
21
21
  getProjectByNameOrId
22
- } from "./chunk-I4NRKN2Z.js";
22
+ } from "./chunk-XHC5YRFY.js";
23
23
  import {
24
24
  buildCommandWithGlobalFlags,
25
25
  outputAgentError
@@ -11,7 +11,7 @@ import {
11
11
  getTeamById,
12
12
  getUser,
13
13
  getVercelDirectory
14
- } from "./chunk-I4NRKN2Z.js";
14
+ } from "./chunk-XHC5YRFY.js";
15
15
  import {
16
16
  TeamDeleted
17
17
  } from "./chunk-P6AK7SVK.js";