vercel 50.32.3 → 50.32.4

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.
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-DGG3YKA2.js";
24
24
  import {
25
25
  CommandTimeout
26
- } from "./chunk-YWFGPAMJ.js";
26
+ } from "./chunk-JJPR65ND.js";
27
27
  import {
28
28
  require_dist as require_dist3
29
29
  } from "./chunk-IUO3OCIL.js";
@@ -4021,6 +4021,10 @@ var startSubcommand = {
4021
4021
  {
4022
4022
  name: "Start a rolling release using URL",
4023
4023
  value: `${packageName} rr start --dpl=https://example.vercel.app`
4024
+ },
4025
+ {
4026
+ name: "Non-interactive (e.g. preview deployment): use --yes to promote",
4027
+ value: `${packageName} rr start --dpl=dpl_123 --yes`
4024
4028
  }
4025
4029
  ],
4026
4030
  options: [
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-UA5FZ6JU.js";
13
13
  import {
14
14
  loginCommand
15
- } from "./chunk-YWFGPAMJ.js";
15
+ } from "./chunk-JJPR65ND.js";
16
16
  import {
17
17
  help
18
18
  } from "./chunk-DOBFJJLK.js";
@@ -32,9 +32,7 @@ import {
32
32
  import "./chunk-XB2KZC2B.js";
33
33
  import "./chunk-SOTR4CXR.js";
34
34
  import "./chunk-7EHTK7LP.js";
35
- import {
36
- require_ms
37
- } from "./chunk-GGP5R3FU.js";
35
+ import "./chunk-GGP5R3FU.js";
38
36
  import {
39
37
  ProjectNotFound,
40
38
  getCommandName,
@@ -55,7 +53,6 @@ import {
55
53
  } from "./chunk-TZ2YI2VH.js";
56
54
 
57
55
  // src/commands/activity/list.ts
58
- var import_ms = __toESM(require_ms(), 1);
59
56
  var import_chalk = __toESM(require_source(), 1);
60
57
  function validateNext(next) {
61
58
  if (next === void 0) {
@@ -116,12 +113,15 @@ function formatActor(event) {
116
113
  }
117
114
  return event.principalId || "-";
118
115
  }
119
- function formatAge(createdAt) {
116
+ function formatTimestamp(createdAt) {
120
117
  if (!Number.isFinite(createdAt) || createdAt <= 0) {
121
118
  return "-";
122
119
  }
123
- const age = Math.max(0, Date.now() - createdAt);
124
- return (0, import_ms.default)(age);
120
+ const date = new Date(createdAt);
121
+ if (Number.isNaN(date.getTime())) {
122
+ return "-";
123
+ }
124
+ return date.toISOString();
125
125
  }
126
126
  function formatEventText(text) {
127
127
  return text.replace(/\s+/g, " ").trim();
@@ -132,7 +132,9 @@ function printExpandedEvents(events) {
132
132
  lines.push(import_chalk.default.bold(formatEventText(event.text)));
133
133
  lines.push(` ${import_chalk.default.cyan("Type:")} ${event.type ?? "-"}`);
134
134
  lines.push(` ${import_chalk.default.cyan("Actor:")} ${formatActor(event)}`);
135
- lines.push(` ${import_chalk.default.cyan("Age:")} ${formatAge(event.createdAt)}`);
135
+ lines.push(
136
+ ` ${import_chalk.default.cyan("Timestamp:")} ${formatTimestamp(event.createdAt)}`
137
+ );
136
138
  lines.push(` ${import_chalk.default.cyan("ID:")} ${event.id}`);
137
139
  lines.push("");
138
140
  });
@@ -13,7 +13,7 @@ import {
13
13
  purchaseDomainIfAvailable,
14
14
  require_cjs,
15
15
  setupDomain
16
- } from "../../chunks/chunk-P5QFJHJZ.js";
16
+ } from "../../chunks/chunk-726BBT6X.js";
17
17
  import {
18
18
  readLocalConfig
19
19
  } from "../../chunks/chunk-UA5FZ6JU.js";
@@ -41,7 +41,7 @@ import {
41
41
  deprecatedArchiveSplitTgz,
42
42
  getCommandAliases,
43
43
  initSubcommand
44
- } from "../../chunks/chunk-YWFGPAMJ.js";
44
+ } from "../../chunks/chunk-JJPR65ND.js";
45
45
  import "../../chunks/chunk-U6XOC6E4.js";
46
46
  import "../../chunks/chunk-O7I4ZOCC.js";
47
47
  import "../../chunks/chunk-LW5ZNGW7.js";
@@ -28,7 +28,7 @@ import {
28
28
  } from "../../chunks/chunk-YPQSDAEW.js";
29
29
  import {
30
30
  getCommandAliases
31
- } from "../../chunks/chunk-YWFGPAMJ.js";
31
+ } from "../../chunks/chunk-JJPR65ND.js";
32
32
  import "../../chunks/chunk-U6XOC6E4.js";
33
33
  import "../../chunks/chunk-O7I4ZOCC.js";
34
34
  import "../../chunks/chunk-LW5ZNGW7.js";
@@ -11,7 +11,7 @@ import {
11
11
  addSubcommand6 as addSubcommand,
12
12
  getCommandAliases,
13
13
  linkCommand
14
- } from "../../chunks/chunk-YWFGPAMJ.js";
14
+ } from "../../chunks/chunk-JJPR65ND.js";
15
15
  import "../../chunks/chunk-U6XOC6E4.js";
16
16
  import "../../chunks/chunk-O7I4ZOCC.js";
17
17
  import "../../chunks/chunk-LW5ZNGW7.js";
@@ -56,7 +56,7 @@ import {
56
56
  did_you_mean_default,
57
57
  executeUpgrade,
58
58
  login
59
- } from "./chunks/chunk-YFK6VPTB.js";
59
+ } from "./chunks/chunk-V4JMKCAH.js";
60
60
  import {
61
61
  getUpdateCommand,
62
62
  isGlobal
@@ -82,7 +82,7 @@ import {
82
82
  require_format,
83
83
  require_jsonlines,
84
84
  setupDomain
85
- } from "./chunks/chunk-P5QFJHJZ.js";
85
+ } from "./chunks/chunk-726BBT6X.js";
86
86
  import {
87
87
  processRevocationResponse,
88
88
  readLocalConfig,
@@ -283,7 +283,7 @@ import {
283
283
  v0Subcommand,
284
284
  webhooksCommand,
285
285
  whoamiCommand
286
- } from "./chunks/chunk-YWFGPAMJ.js";
286
+ } from "./chunks/chunk-JJPR65ND.js";
287
287
  import {
288
288
  addSubcommand as addSubcommand8,
289
289
  deleteSubcommand,
@@ -739,7 +739,7 @@ async function activity(client) {
739
739
  return 0;
740
740
  }
741
741
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
742
- const listFn = (await import("./chunks/list-CE4MIT66.js")).default;
742
+ const listFn = (await import("./chunks/list-FO2Q2HUT.js")).default;
743
743
  return listFn(client, telemetry2);
744
744
  }
745
745
  }
@@ -24286,6 +24286,11 @@ async function startRollingRelease({
24286
24286
  if (deployment.target !== "production") {
24287
24287
  if (yes) {
24288
24288
  promoteByCreation = true;
24289
+ } else if (client.nonInteractive) {
24290
+ output_manager_default.error(
24291
+ "This deployment is not a production deployment. In non-interactive mode use --yes to create a new production deployment and start the rolling release."
24292
+ );
24293
+ return 1;
24289
24294
  } else {
24290
24295
  const question = "This deployment is not a production deployment and cannot be directly promoted. A new deployment will be built using your production environment. Are you sure you want to continue?";
24291
24296
  promoteByCreation = await client.input.confirm(question, false);
@@ -24537,6 +24542,12 @@ async function buildConfigurePayload({
24537
24542
  );
24538
24543
  return { exitCode: 1 };
24539
24544
  }
24545
+ if (client.nonInteractive) {
24546
+ output_manager_default.error(
24547
+ "In non-interactive mode use --enable or --disable with --advancement-type and --stage as needed. Example: vercel rolling-release configure --enable --advancement-type=automatic --stage=10,5m --stage=50,10m"
24548
+ );
24549
+ return { exitCode: 1 };
24550
+ }
24540
24551
  if (client.stdin.isTTY) {
24541
24552
  return interactiveConfigure(client);
24542
24553
  }
@@ -24757,6 +24768,55 @@ var COMMAND_CONFIG23 = {
24757
24768
  complete: getCommandAliases(completeSubcommand),
24758
24769
  fetch: getCommandAliases(fetchSubcommand)
24759
24770
  };
24771
+ function buildDeploymentSuggestionCommands(client, subcmd) {
24772
+ const args = client.argv.slice(2);
24773
+ const preservedParts = [];
24774
+ let hasNonInteractive = false;
24775
+ for (let i = 2; i < args.length; i++) {
24776
+ const arg = args[i];
24777
+ if (arg === "--non-interactive") {
24778
+ hasNonInteractive = true;
24779
+ continue;
24780
+ }
24781
+ if (arg.startsWith("--cwd=")) {
24782
+ const cwdPath = arg.slice(6);
24783
+ if (cwdPath) {
24784
+ preservedParts.push("--cwd", cwdPath);
24785
+ }
24786
+ continue;
24787
+ }
24788
+ if (arg === "--cwd") {
24789
+ if (i + 1 < args.length) {
24790
+ preservedParts.push("--cwd", args[i + 1]);
24791
+ i++;
24792
+ }
24793
+ continue;
24794
+ }
24795
+ preservedParts.push(arg);
24796
+ }
24797
+ const preservedSuffix = preservedParts.join(" ");
24798
+ const listCommand = preservedSuffix ? `${packageName} ls ${preservedSuffix}` : `${packageName} ls`;
24799
+ const base = preservedSuffix ? `${packageName} rolling-release ${subcmd} ${preservedSuffix}` : `${packageName} rolling-release ${subcmd}`;
24800
+ const defaultSuffix = subcmd === "approve" ? "--dpl dpl_123 --currentStageIndex=0" : "--dpl dpl_123";
24801
+ const subcommandCommand = hasNonInteractive ? `${base} ${defaultSuffix} --non-interactive` : `${base} ${defaultSuffix}`;
24802
+ return { listCommand, subcommandCommand };
24803
+ }
24804
+ function outputRollingReleaseErrorWithDeploymentSuggestions(client, subcmd, reason, message) {
24805
+ const { listCommand, subcommandCommand } = buildDeploymentSuggestionCommands(
24806
+ client,
24807
+ subcmd
24808
+ );
24809
+ outputAgentError(
24810
+ client,
24811
+ {
24812
+ status: "error",
24813
+ reason,
24814
+ message,
24815
+ next: [{ command: listCommand }, { command: subcommandCommand }]
24816
+ },
24817
+ 1
24818
+ );
24819
+ }
24760
24820
  async function rollingRelease(client) {
24761
24821
  const telemetry2 = new RollingReleaseTelemetryClient({
24762
24822
  opts: {
@@ -24790,6 +24850,18 @@ async function rollingRelease(client) {
24790
24850
  return link.exitCode;
24791
24851
  }
24792
24852
  if (link.status === "not_linked") {
24853
+ if (client.nonInteractive) {
24854
+ outputAgentError(
24855
+ client,
24856
+ {
24857
+ status: "error",
24858
+ reason: "not_linked",
24859
+ message: "No project found for rolling releases. Link your project first.",
24860
+ next: [{ command: `${packageName} link` }]
24861
+ },
24862
+ 1
24863
+ );
24864
+ }
24793
24865
  output_manager_default.error(
24794
24866
  "No project found. Please run `vc link` to link your project first."
24795
24867
  );
@@ -24849,16 +24921,37 @@ async function rollingRelease(client) {
24849
24921
  );
24850
24922
  const dpl = subcommandFlags.flags["--dpl"];
24851
24923
  if (dpl === void 0) {
24924
+ if (client.nonInteractive) {
24925
+ outputRollingReleaseErrorWithDeploymentSuggestions(
24926
+ client,
24927
+ "start",
24928
+ "missing_flags",
24929
+ "Starting a rolling release in non-interactive mode requires the --dpl flag."
24930
+ );
24931
+ }
24852
24932
  output_manager_default.error("starting a rolling release requires --dpl option.");
24853
- break;
24933
+ return 1;
24934
+ }
24935
+ try {
24936
+ await startRollingRelease({
24937
+ client,
24938
+ dpl,
24939
+ projectId: project.id,
24940
+ teamId: project.accountId,
24941
+ yes: subcommandFlags.flags["--yes"] ?? false
24942
+ });
24943
+ } catch (err) {
24944
+ if (client.nonInteractive && isAPIError(err)) {
24945
+ outputRollingReleaseErrorWithDeploymentSuggestions(
24946
+ client,
24947
+ "start",
24948
+ "api_error",
24949
+ err.message || "Starting the rolling release failed for this deployment."
24950
+ );
24951
+ return 1;
24952
+ }
24953
+ throw err;
24854
24954
  }
24855
- await startRollingRelease({
24856
- client,
24857
- dpl,
24858
- projectId: project.id,
24859
- teamId: project.accountId,
24860
- yes: subcommandFlags.flags["--yes"] ?? false
24861
- });
24862
24955
  break;
24863
24956
  }
24864
24957
  case "approve": {
@@ -24875,14 +24968,38 @@ async function rollingRelease(client) {
24875
24968
  const currentStageIndex = subcommandFlags.flags["--currentStageIndex"];
24876
24969
  const activeStageIndex = parseInt(currentStageIndex ?? "");
24877
24970
  if (!dpl) {
24971
+ if (client.nonInteractive) {
24972
+ outputRollingReleaseErrorWithDeploymentSuggestions(
24973
+ client,
24974
+ "approve",
24975
+ "missing_flags",
24976
+ "Approving a rolling release in non-interactive mode requires --dpl and --currentStageIndex."
24977
+ );
24978
+ }
24878
24979
  output_manager_default.error("Missing required flag --dpl");
24879
24980
  return 1;
24880
24981
  }
24881
24982
  if (currentStageIndex === void 0) {
24983
+ if (client.nonInteractive) {
24984
+ outputRollingReleaseErrorWithDeploymentSuggestions(
24985
+ client,
24986
+ "approve",
24987
+ "missing_flags",
24988
+ "Approving a rolling release in non-interactive mode requires --currentStageIndex."
24989
+ );
24990
+ }
24882
24991
  output_manager_default.error("Missing required flag --currentStageIndex");
24883
24992
  return 1;
24884
24993
  }
24885
24994
  if (isNaN(activeStageIndex)) {
24995
+ if (client.nonInteractive) {
24996
+ outputRollingReleaseErrorWithDeploymentSuggestions(
24997
+ client,
24998
+ "approve",
24999
+ "invalid_flag",
25000
+ "--currentStageIndex must be a valid number."
25001
+ );
25002
+ }
24886
25003
  output_manager_default.error("--currentStageIndex must be a valid number.");
24887
25004
  return 1;
24888
25005
  }
@@ -24907,15 +25024,36 @@ async function rollingRelease(client) {
24907
25024
  );
24908
25025
  const dpl = subcommandFlags.flags["--dpl"];
24909
25026
  if (!dpl) {
25027
+ if (client.nonInteractive) {
25028
+ outputRollingReleaseErrorWithDeploymentSuggestions(
25029
+ client,
25030
+ "abort",
25031
+ "missing_flags",
25032
+ "Aborting a rolling release in non-interactive mode requires the --dpl flag."
25033
+ );
25034
+ }
24910
25035
  output_manager_default.error("Missing required flag --dpl");
24911
25036
  return 1;
24912
25037
  }
24913
- await abortRollingRelease({
24914
- client,
24915
- projectId: project.id,
24916
- teamId: org.id,
24917
- dpl
24918
- });
25038
+ try {
25039
+ await abortRollingRelease({
25040
+ client,
25041
+ projectId: project.id,
25042
+ teamId: org.id,
25043
+ dpl
25044
+ });
25045
+ } catch (err) {
25046
+ if (client.nonInteractive && isAPIError(err)) {
25047
+ outputRollingReleaseErrorWithDeploymentSuggestions(
25048
+ client,
25049
+ "abort",
25050
+ "api_error",
25051
+ err.message || "Aborting the rolling release failed for this deployment."
25052
+ );
25053
+ return 1;
25054
+ }
25055
+ throw err;
25056
+ }
24919
25057
  break;
24920
25058
  }
24921
25059
  case "complete": {
@@ -24930,6 +25068,14 @@ async function rollingRelease(client) {
24930
25068
  );
24931
25069
  const dpl = subcommandFlags.flags["--dpl"];
24932
25070
  if (!dpl) {
25071
+ if (client.nonInteractive) {
25072
+ outputRollingReleaseErrorWithDeploymentSuggestions(
25073
+ client,
25074
+ "complete",
25075
+ "missing_flags",
25076
+ "Completing a rolling release in non-interactive mode requires the --dpl flag."
25077
+ );
25078
+ }
24933
25079
  output_manager_default.error("Missing required flag --dpl");
24934
25080
  return 1;
24935
25081
  }
@@ -24966,6 +25112,17 @@ async function rollingRelease(client) {
24966
25112
  }
24967
25113
  return 0;
24968
25114
  } catch (err) {
25115
+ if (client.nonInteractive && isAPIError(err)) {
25116
+ outputAgentError(
25117
+ client,
25118
+ {
25119
+ status: "error",
25120
+ reason: "api_error",
25121
+ message: err.message || "Rolling release command failed."
25122
+ },
25123
+ 1
25124
+ );
25125
+ }
24969
25126
  printError(err);
24970
25127
  return 1;
24971
25128
  }
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  did_you_mean_default,
16
16
  executeUpgrade,
17
17
  login
18
- } from "./chunks/chunk-YFK6VPTB.js";
18
+ } from "./chunks/chunk-V4JMKCAH.js";
19
19
  import {
20
20
  getUpdateCommand
21
21
  } from "./chunks/chunk-DLPKFSED.js";
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  commandNames,
39
39
  commands
40
- } from "./chunks/chunk-YWFGPAMJ.js";
40
+ } from "./chunks/chunk-JJPR65ND.js";
41
41
  import "./chunks/chunk-U6XOC6E4.js";
42
42
  import "./chunks/chunk-O7I4ZOCC.js";
43
43
  import "./chunks/chunk-LW5ZNGW7.js";
package/dist/version.mjs CHANGED
@@ -1 +1 @@
1
- export const version = "50.32.3";
1
+ export const version = "50.32.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "50.32.3",
3
+ "version": "50.32.4",
4
4
  "type": "module",
5
5
  "preferGlobal": true,
6
6
  "license": "Apache-2.0",
@@ -31,25 +31,25 @@
31
31
  "luxon": "^3.4.0",
32
32
  "proxy-agent": "6.4.0",
33
33
  "@vercel/detect-agent": "1.2.1",
34
+ "@vercel/backends": "0.0.45",
34
35
  "@vercel/build-utils": "13.8.0",
35
- "@vercel/fastify": "0.1.51",
36
36
  "@vercel/express": "0.1.57",
37
- "@vercel/backends": "0.0.45",
37
+ "@vercel/fastify": "0.1.51",
38
38
  "@vercel/go": "3.4.4",
39
39
  "@vercel/h3": "0.1.57",
40
40
  "@vercel/elysia": "0.1.48",
41
- "@vercel/hono": "0.2.51",
42
- "@vercel/hydrogen": "1.3.6",
43
41
  "@vercel/koa": "0.1.31",
44
42
  "@vercel/nestjs": "0.2.52",
45
- "@vercel/next": "4.16.1",
43
+ "@vercel/hydrogen": "1.3.6",
46
44
  "@vercel/node": "5.6.15",
47
- "@vercel/python": "6.23.0",
48
45
  "@vercel/redwood": "2.4.10",
46
+ "@vercel/next": "4.16.1",
49
47
  "@vercel/remix-builder": "5.7.0",
50
48
  "@vercel/ruby": "2.3.2",
49
+ "@vercel/hono": "0.2.51",
50
+ "@vercel/static-build": "2.9.0",
51
51
  "@vercel/rust": "1.0.5",
52
- "@vercel/static-build": "2.9.0"
52
+ "@vercel/python": "6.23.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@alex_neo/jest-expect-message": "1.0.5",
@@ -177,14 +177,14 @@
177
177
  "write-json-file": "2.2.0",
178
178
  "xdg-app-paths": "5.1.0",
179
179
  "yauzl-promise": "2.1.3",
180
- "@vercel-internals/get-package-json": "1.0.0",
181
180
  "@vercel-internals/constants": "1.0.4",
181
+ "@vercel-internals/types": "3.0.6",
182
+ "@vercel-internals/get-package-json": "1.0.0",
182
183
  "@vercel/client": "17.2.57",
183
184
  "@vercel/error-utils": "2.0.3",
184
- "@vercel-internals/types": "3.0.6",
185
- "@vercel/frameworks": "3.21.1",
186
185
  "@vercel/fs-detectors": "5.10.3",
187
- "@vercel/routing-utils": "6.0.2"
186
+ "@vercel/routing-utils": "6.0.2",
187
+ "@vercel/frameworks": "3.21.1"
188
188
  },
189
189
  "scripts": {
190
190
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",