vercel 42.2.0 → 42.3.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 (2) hide show
  1. package/dist/index.js +519 -24
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -33724,9 +33724,95 @@ var init_command26 = __esm({
33724
33724
  }
33725
33725
  });
33726
33726
 
33727
+ // src/commands/rolling-release/command.ts
33728
+ var rollingReleaseCommand;
33729
+ var init_command27 = __esm({
33730
+ "src/commands/rolling-release/command.ts"() {
33731
+ "use strict";
33732
+ rollingReleaseCommand = {
33733
+ name: "rolling-release",
33734
+ aliases: ["rr"],
33735
+ description: "Manage your project's rolling release.",
33736
+ arguments: [],
33737
+ options: [
33738
+ {
33739
+ name: "name",
33740
+ shorthand: "n",
33741
+ type: String,
33742
+ deprecated: true,
33743
+ description: "Provide a Vercel Project name"
33744
+ },
33745
+ {
33746
+ name: "action",
33747
+ shorthand: null,
33748
+ type: String,
33749
+ deprecated: false,
33750
+ description: "Action to perfom on a project's rolling release.",
33751
+ enum: ["configure", "start", "approve", "abort", "complete", "fetch"]
33752
+ },
33753
+ {
33754
+ name: "cfg",
33755
+ shorthand: null,
33756
+ type: String,
33757
+ deprecated: false,
33758
+ description: "The project's rolling release configuration"
33759
+ },
33760
+ {
33761
+ name: "deployId",
33762
+ shorthand: null,
33763
+ type: String,
33764
+ deprecated: false,
33765
+ description: "The deploymentId to target during a promote/rollback."
33766
+ },
33767
+ {
33768
+ name: "currentStageIndex",
33769
+ shorthand: null,
33770
+ type: String,
33771
+ deprecated: false,
33772
+ description: "The current stage of a rolling release to approve."
33773
+ }
33774
+ ],
33775
+ examples: [
33776
+ {
33777
+ name: "Configure a new rolling release with an intial stage of 10% that lasts for 5 minutes before automatically advancing to 100%",
33778
+ value: `vercel rolling-release --action=configure --cfg='{"enabled":true, "advancementType":"automatic", "stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":100}]}'`
33779
+ },
33780
+ {
33781
+ name: "Configure a new rolling release with an intial stage of 10% that requires approval, prior to advancing to 100%",
33782
+ value: `vercel rolling-release --action=configure --cfg='{"enabled":true, "advancementType":"manual-approval","stages":[{"targetPercentage":10},{"targetPercentage":100}]}'`
33783
+ },
33784
+ {
33785
+ name: "Configure a new rolling release with an intial stage of 10% that requires approval, prior to advancing to 50%, and then again to 100%",
33786
+ value: `vercel rolling-release --action=configure --cfg='{"enabled":true, "advancementType":"manual-approval", "stages":[{"targetPercentage":10},{"targetPercentage":50},{"targetPercentage":100}]}'`
33787
+ },
33788
+ {
33789
+ name: "Disable rolling releases",
33790
+ value: "vercel rolling-release --action=configure --cfg='disable'"
33791
+ },
33792
+ {
33793
+ name: "Start a rolling release",
33794
+ value: "vercel rolling-release --action=start --deployId=dpl_123"
33795
+ },
33796
+ {
33797
+ name: "Approve an active rolling release stage",
33798
+ value: "vercel rolling-release --action=approve --currentStageIndex=0 --deployId=dpl_123"
33799
+ },
33800
+ {
33801
+ name: "Abort an active rolling release.",
33802
+ value: "vercel rolling-release --action=abort --deployId=dpl_123"
33803
+ },
33804
+ {
33805
+ name: "Complete an active rolling release.",
33806
+ value: "vercel rolling-release --action=complete --deployId=dpl_123"
33807
+ }
33808
+ ]
33809
+ };
33810
+ }
33811
+ });
33812
+
33727
33813
  // src/commands/target/command.ts
33728
33814
  var listSubcommand8, targetCommand;
33729
- var init_command27 = __esm({
33815
+ var init_command28 = __esm({
33730
33816
  "src/commands/target/command.ts"() {
33731
33817
  "use strict";
33732
33818
  init_pkg_name();
@@ -33757,7 +33843,7 @@ var init_command27 = __esm({
33757
33843
 
33758
33844
  // src/commands/teams/command.ts
33759
33845
  var addSubcommand7, listSubcommand9, switchSubcommand, inviteSubcommand, teamsCommand;
33760
- var init_command28 = __esm({
33846
+ var init_command29 = __esm({
33761
33847
  "src/commands/teams/command.ts"() {
33762
33848
  "use strict";
33763
33849
  init_pkg_name();
@@ -33848,7 +33934,7 @@ var init_command28 = __esm({
33848
33934
 
33849
33935
  // src/commands/telemetry/command.ts
33850
33936
  var statusSubcommand3, enableSubcommand, flushSubcommand, disableSubcommand, telemetryCommand;
33851
- var init_command29 = __esm({
33937
+ var init_command30 = __esm({
33852
33938
  "src/commands/telemetry/command.ts"() {
33853
33939
  "use strict";
33854
33940
  statusSubcommand3 = {
@@ -33903,7 +33989,7 @@ var init_command29 = __esm({
33903
33989
 
33904
33990
  // src/commands/whoami/command.ts
33905
33991
  var whoamiCommand;
33906
- var init_command30 = __esm({
33992
+ var init_command31 = __esm({
33907
33993
  "src/commands/whoami/command.ts"() {
33908
33994
  "use strict";
33909
33995
  init_pkg_name();
@@ -33961,6 +34047,7 @@ var init_commands = __esm({
33961
34047
  init_command28();
33962
34048
  init_command29();
33963
34049
  init_command30();
34050
+ init_command31();
33964
34051
  commandsStructs = [
33965
34052
  aliasCommand,
33966
34053
  bisectCommand,
@@ -33988,6 +34075,7 @@ var init_commands = __esm({
33988
34075
  redeployCommand,
33989
34076
  removeCommand,
33990
34077
  rollbackCommand,
34078
+ rollingReleaseCommand,
33991
34079
  targetCommand,
33992
34080
  teamsCommand,
33993
34081
  telemetryCommand,
@@ -46260,7 +46348,7 @@ var require_package = __commonJS2({
46260
46348
  "../client/package.json"(exports2, module2) {
46261
46349
  module2.exports = {
46262
46350
  name: "@vercel/client",
46263
- version: "15.3.2",
46351
+ version: "15.3.3",
46264
46352
  main: "dist/index.js",
46265
46353
  typings: "dist/index.d.ts",
46266
46354
  homepage: "https://vercel.com",
@@ -46302,7 +46390,7 @@ var require_package = __commonJS2({
46302
46390
  "@vercel/build-utils": "10.6.0",
46303
46391
  "@vercel/error-utils": "2.0.3",
46304
46392
  "@vercel/microfrontends": "1.2.2",
46305
- "@vercel/routing-utils": "5.0.4",
46393
+ "@vercel/routing-utils": "5.0.5",
46306
46394
  "async-retry": "1.2.3",
46307
46395
  "async-sema": "3.0.0",
46308
46396
  "fs-extra": "8.0.1",
@@ -109924,7 +110012,7 @@ var require_detect_file_system_api = __commonJS2({
109924
110012
  });
109925
110013
  module2.exports = __toCommonJS4(detect_file_system_api_exports);
109926
110014
  var import_semver4 = __toESM4(require_semver2());
109927
- var import__79 = require_dist20();
110015
+ var import__80 = require_dist20();
109928
110016
  async function detectFileSystemAPI2({
109929
110017
  files,
109930
110018
  projectSettings,
@@ -109990,7 +110078,7 @@ var require_detect_file_system_api = __commonJS2({
109990
110078
  };
109991
110079
  }
109992
110080
  const invalidBuilder = builders.find(({ use }) => {
109993
- const valid = (0, import__79.isOfficialRuntime)("go", use) || (0, import__79.isOfficialRuntime)("python", use) || (0, import__79.isOfficialRuntime)("ruby", use) || (0, import__79.isOfficialRuntime)("node", use) || (0, import__79.isOfficialRuntime)("next", use) || (0, import__79.isOfficialRuntime)("static", use) || (0, import__79.isOfficialRuntime)("static-build", use);
110081
+ const valid = (0, import__80.isOfficialRuntime)("go", use) || (0, import__80.isOfficialRuntime)("python", use) || (0, import__80.isOfficialRuntime)("ruby", use) || (0, import__80.isOfficialRuntime)("node", use) || (0, import__80.isOfficialRuntime)("next", use) || (0, import__80.isOfficialRuntime)("static", use) || (0, import__80.isOfficialRuntime)("static-build", use);
109994
110082
  return !valid;
109995
110083
  });
109996
110084
  if (invalidBuilder) {
@@ -110003,7 +110091,7 @@ var require_detect_file_system_api = __commonJS2({
110003
110091
  for (const lang of ["go", "python", "ruby"]) {
110004
110092
  for (const { use } of builders) {
110005
110093
  const plugin = "vercel-plugin-" + lang;
110006
- if ((0, import__79.isOfficialRuntime)(lang, use) && !deps[plugin]) {
110094
+ if ((0, import__80.isOfficialRuntime)(lang, use) && !deps[plugin]) {
110007
110095
  return {
110008
110096
  metadata,
110009
110097
  fsApiBuilder: null,
@@ -110060,7 +110148,7 @@ var require_detect_file_system_api = __commonJS2({
110060
110148
  }
110061
110149
  }
110062
110150
  const frontendBuilder = builders.find(
110063
- ({ use }) => (0, import__79.isOfficialRuntime)("next", use) || (0, import__79.isOfficialRuntime)("static", use) || (0, import__79.isOfficialRuntime)("static-build", use)
110151
+ ({ use }) => (0, import__80.isOfficialRuntime)("next", use) || (0, import__80.isOfficialRuntime)("static", use) || (0, import__80.isOfficialRuntime)("static-build", use)
110064
110152
  );
110065
110153
  const config2 = frontendBuilder?.config || {};
110066
110154
  const withTag = tag ? `@${tag}` : "";
@@ -116436,6 +116524,9 @@ var require_monorepo_managers = __commonJS2({
116436
116524
  {
116437
116525
  path: "turbo.json"
116438
116526
  },
116527
+ {
116528
+ path: "turbo.jsonc"
116529
+ },
116439
116530
  {
116440
116531
  path: "package.json",
116441
116532
  matchContent: '"turbo":\\s*{[^}]*.+[^}]*}'
@@ -177038,6 +177129,23 @@ var init_render_alias_status = __esm({
177038
177129
  }
177039
177130
  });
177040
177131
 
177132
+ // src/commands/rolling-release/request-rolling-release.ts
177133
+ async function requestRollingRelease({
177134
+ client: client2,
177135
+ projectId,
177136
+ teamId
177137
+ }) {
177138
+ const { rollingRelease } = await client2.fetch(
177139
+ `/v1/projects/${projectId}/rolling-release?teamId=${teamId}`
177140
+ );
177141
+ return rollingRelease;
177142
+ }
177143
+ var init_request_rolling_release = __esm({
177144
+ "src/commands/rolling-release/request-rolling-release.ts"() {
177145
+ "use strict";
177146
+ }
177147
+ });
177148
+
177041
177149
  // src/commands/promote/status.ts
177042
177150
  async function promoteStatus({
177043
177151
  client: client2,
@@ -177065,6 +177173,22 @@ async function promoteStatus({
177065
177173
  if (projectCheck instanceof ProjectNotFound) {
177066
177174
  throw projectCheck;
177067
177175
  }
177176
+ if (projectCheck.rollingRelease) {
177177
+ output_manager_default.log(`Rolling Releases enabled \u2026`);
177178
+ const rr = await requestRollingRelease({
177179
+ client: client2,
177180
+ projectId: project.id,
177181
+ teamId: project.accountId
177182
+ });
177183
+ if (rr.activeStage) {
177184
+ output_manager_default.stopSpinner();
177185
+ output_manager_default.log(
177186
+ `Rolling Release serving traffic at initial percentage ${rr.activeStage.targetPercentage}`
177187
+ );
177188
+ return 0;
177189
+ }
177190
+ continue;
177191
+ }
177068
177192
  const {
177069
177193
  jobStatus,
177070
177194
  requestedAt,
@@ -177203,6 +177327,7 @@ var init_status = __esm({
177203
177327
  init_render_alias_status();
177204
177328
  init_sleep();
177205
177329
  init_output_manager();
177330
+ init_request_rolling_release();
177206
177331
  }
177207
177332
  });
177208
177333
 
@@ -177251,12 +177376,21 @@ async function requestPromote({
177251
177376
  );
177252
177377
  return 0;
177253
177378
  }
177254
- await client2.fetch(`/v10/projects/${project.id}/promote/${deployment.id}`, {
177255
- body: {},
177256
- // required
177257
- json: false,
177258
- method: "POST"
177259
- });
177379
+ const res = await client2.fetch(
177380
+ `/v10/projects/${project.id}/promote/${deployment.id}`,
177381
+ {
177382
+ body: {},
177383
+ // required
177384
+ json: false,
177385
+ method: "POST"
177386
+ }
177387
+ );
177388
+ if (res.status === 202) {
177389
+ output_manager_default.log(
177390
+ "Promotion has been queued and will begin when the active rolling release completes successfully."
177391
+ );
177392
+ return 0;
177393
+ }
177260
177394
  if (timeout !== void 0 && (0, import_ms25.default)(timeout) === 0) {
177261
177395
  output_manager_default.log(
177262
177396
  `Successfully requested promote of ${import_chalk110.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
@@ -178459,6 +178593,357 @@ var init_rollback2 = __esm({
178459
178593
  }
178460
178594
  });
178461
178595
 
178596
+ // src/commands/rolling-release/start-rolling-release.ts
178597
+ async function startRollingRelease({
178598
+ client: client2,
178599
+ deployId,
178600
+ projectId,
178601
+ teamId
178602
+ }) {
178603
+ await client2.fetch(
178604
+ `/v10/projects/${projectId}/promote/${deployId}?teamId=${teamId}`,
178605
+ {
178606
+ body: {},
178607
+ // required
178608
+ json: false,
178609
+ method: "POST"
178610
+ }
178611
+ );
178612
+ output_manager_default.log("Successfully started rolling release");
178613
+ return 0;
178614
+ }
178615
+ var init_start_rolling_release = __esm({
178616
+ "src/commands/rolling-release/start-rolling-release.ts"() {
178617
+ "use strict";
178618
+ init_output_manager();
178619
+ }
178620
+ });
178621
+
178622
+ // src/commands/rolling-release/configure-rolling-release.ts
178623
+ async function configureRollingRelease({
178624
+ client: client2,
178625
+ projectId,
178626
+ teamId,
178627
+ rollingReleaseConfig
178628
+ }) {
178629
+ const body = {
178630
+ ...rollingReleaseConfig,
178631
+ enabled: Boolean(rollingReleaseConfig)
178632
+ };
178633
+ await client2.fetch(
178634
+ `/v1/projects/${projectId}/rolling-release/config?teamId=${teamId}`,
178635
+ {
178636
+ body,
178637
+ json: true,
178638
+ method: "PATCH"
178639
+ }
178640
+ );
178641
+ output_manager_default.log("Successfully configured rolling releases.");
178642
+ return 0;
178643
+ }
178644
+ var init_configure_rolling_release = __esm({
178645
+ "src/commands/rolling-release/configure-rolling-release.ts"() {
178646
+ "use strict";
178647
+ init_output_manager();
178648
+ }
178649
+ });
178650
+
178651
+ // src/commands/rolling-release/approve-rolling-release.ts
178652
+ async function approveRollingRelease({
178653
+ client: client2,
178654
+ projectId,
178655
+ teamId,
178656
+ activeStageIndex,
178657
+ deployId
178658
+ }) {
178659
+ await client2.fetch(
178660
+ `/v1/projects/${projectId}/rolling-release/approve-stage?teamId=${teamId}`,
178661
+ {
178662
+ method: "POST",
178663
+ json: true,
178664
+ body: {
178665
+ activeStageIndex,
178666
+ nextStageIndex: activeStageIndex + 1,
178667
+ canaryDeploymentId: deployId
178668
+ }
178669
+ }
178670
+ );
178671
+ output_manager_default.log(
178672
+ "Successfully requested approval of rolling release to next stage."
178673
+ );
178674
+ return 0;
178675
+ }
178676
+ var init_approve_rolling_release = __esm({
178677
+ "src/commands/rolling-release/approve-rolling-release.ts"() {
178678
+ "use strict";
178679
+ init_output_manager();
178680
+ }
178681
+ });
178682
+
178683
+ // src/commands/rolling-release/abort-rolling-release.ts
178684
+ async function abortRollingRelease({
178685
+ client: client2,
178686
+ projectId,
178687
+ deployId,
178688
+ teamId
178689
+ }) {
178690
+ await client2.fetch(
178691
+ `/v9/projects/${projectId}/rollback/${deployId}?teamId=${teamId}`,
178692
+ {
178693
+ body: {},
178694
+ // required
178695
+ method: "POST"
178696
+ }
178697
+ );
178698
+ output_manager_default.log("Successfully aborted the active rolling release.");
178699
+ return 0;
178700
+ }
178701
+ var init_abort_rolling_release = __esm({
178702
+ "src/commands/rolling-release/abort-rolling-release.ts"() {
178703
+ "use strict";
178704
+ init_output_manager();
178705
+ }
178706
+ });
178707
+
178708
+ // src/commands/rolling-release/complete-rolling-release.ts
178709
+ async function completeRollingRelease({
178710
+ client: client2,
178711
+ projectId,
178712
+ teamId,
178713
+ deployId
178714
+ }) {
178715
+ await client2.fetch(
178716
+ `/v1/projects/${projectId}/rolling-release/complete?teamId=${teamId}`,
178717
+ {
178718
+ body: { canaryDeploymentId: deployId },
178719
+ // required
178720
+ json: true,
178721
+ method: "POST"
178722
+ }
178723
+ );
178724
+ output_manager_default.log(
178725
+ "Successfully requested completion of the active rolling release."
178726
+ );
178727
+ return 0;
178728
+ }
178729
+ var init_complete_rolling_release = __esm({
178730
+ "src/commands/rolling-release/complete-rolling-release.ts"() {
178731
+ "use strict";
178732
+ init_output_manager();
178733
+ }
178734
+ });
178735
+
178736
+ // src/util/telemetry/commands/rolling-release/index.ts
178737
+ var RollingReleaseTelemetryClient;
178738
+ var init_rolling_release = __esm({
178739
+ "src/util/telemetry/commands/rolling-release/index.ts"() {
178740
+ "use strict";
178741
+ init_telemetry();
178742
+ RollingReleaseTelemetryClient = class extends TelemetryClient {
178743
+ trackCliOptionAction(value) {
178744
+ this.trackCliOption({
178745
+ option: "action",
178746
+ value: value ?? ""
178747
+ });
178748
+ }
178749
+ trackCliOptionName(name) {
178750
+ if (name) {
178751
+ this.trackCliOption({
178752
+ option: "name",
178753
+ value: this.redactedValue
178754
+ });
178755
+ }
178756
+ }
178757
+ trackCliOptionCfg(value) {
178758
+ this.trackCliOption({
178759
+ option: "cfg",
178760
+ value: value ?? ""
178761
+ });
178762
+ }
178763
+ trackCliOptionDeployId(value) {
178764
+ this.trackCliOption({
178765
+ option: "deployId",
178766
+ value: value ?? ""
178767
+ });
178768
+ }
178769
+ trackCliOptionCurrentStageIndex(value) {
178770
+ this.trackCliOption({
178771
+ option: "currentStageIndex",
178772
+ value: value ?? ""
178773
+ });
178774
+ }
178775
+ };
178776
+ }
178777
+ });
178778
+
178779
+ // src/commands/rolling-release/index.ts
178780
+ var rolling_release_exports = {};
178781
+ __export3(rolling_release_exports, {
178782
+ default: () => rolling_release_default
178783
+ });
178784
+ var rolling_release_default;
178785
+ var init_rolling_release2 = __esm({
178786
+ "src/commands/rolling-release/index.ts"() {
178787
+ "use strict";
178788
+ init_get_args();
178789
+ init_get_flags_specification();
178790
+ init_help();
178791
+ init_command27();
178792
+ init_request_rolling_release();
178793
+ init_start_rolling_release();
178794
+ init_configure_rolling_release();
178795
+ init_approve_rolling_release();
178796
+ init_abort_rolling_release();
178797
+ init_complete_rolling_release();
178798
+ init_error2();
178799
+ init_output_manager();
178800
+ init_get_project_by_cwd_or_link();
178801
+ init_rolling_release();
178802
+ rolling_release_default = async (client2) => {
178803
+ const telemetry2 = new RollingReleaseTelemetryClient({
178804
+ opts: {
178805
+ store: client2.telemetryEventStore
178806
+ }
178807
+ });
178808
+ let parsedArguments = null;
178809
+ const flagsSpecification = getFlagsSpecification(
178810
+ rollingReleaseCommand.options
178811
+ );
178812
+ try {
178813
+ parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
178814
+ } catch (error3) {
178815
+ printError(error3);
178816
+ return 1;
178817
+ }
178818
+ if (parsedArguments.flags["--help"]) {
178819
+ output_manager_default.print(
178820
+ help2(rollingReleaseCommand, { columns: client2.stderr.columns })
178821
+ );
178822
+ return 2;
178823
+ }
178824
+ const projectNameOrId = parsedArguments.flags["--name"];
178825
+ const currentStageIndex = parsedArguments.flags["--currentStageIndex"];
178826
+ const activeStageIndex = parseInt(currentStageIndex ?? "");
178827
+ const deployId = parsedArguments.flags["--deployId"];
178828
+ const cfgString = parsedArguments.flags["--cfg"];
178829
+ let cfg = void 0;
178830
+ telemetry2.trackCliOptionName(projectNameOrId);
178831
+ telemetry2.trackCliOptionAction(parsedArguments.flags["--action"]);
178832
+ telemetry2.trackCliOptionDeployId(deployId);
178833
+ telemetry2.trackCliOptionCfg(cfgString);
178834
+ telemetry2.trackCliOptionCurrentStageIndex(currentStageIndex);
178835
+ const project = await getProjectByCwdOrLink({
178836
+ client: client2,
178837
+ commandName: "rolling-release",
178838
+ projectNameOrId
178839
+ });
178840
+ switch (parsedArguments.flags["--action"]) {
178841
+ case "configure":
178842
+ if (cfgString === void 0) {
178843
+ output_manager_default.error("configuring a rolling release requires --cfg option.");
178844
+ break;
178845
+ }
178846
+ if (cfgString !== "disable") {
178847
+ try {
178848
+ cfg = JSON.parse(cfgString);
178849
+ } catch (e2) {
178850
+ output_manager_default.error(`unable to parse cfg: ${cfg}, err: ${e2}`);
178851
+ break;
178852
+ }
178853
+ }
178854
+ try {
178855
+ await configureRollingRelease({
178856
+ client: client2,
178857
+ projectId: project.id,
178858
+ teamId: project.accountId,
178859
+ rollingReleaseConfig: cfg
178860
+ });
178861
+ } catch (e2) {
178862
+ output_manager_default.error(`unable to set cfg: ${JSON.stringify(cfg)}, err: ${e2}`);
178863
+ }
178864
+ break;
178865
+ case "start":
178866
+ if (deployId === void 0) {
178867
+ output_manager_default.error("starting a rolling release requires --deployId option.");
178868
+ break;
178869
+ }
178870
+ await startRollingRelease({
178871
+ client: client2,
178872
+ deployId,
178873
+ projectId: project.id,
178874
+ teamId: project.accountId
178875
+ });
178876
+ break;
178877
+ case "abort":
178878
+ if (deployId === void 0) {
178879
+ output_manager_default.error("aborting a rolling release requires --deployId option.");
178880
+ break;
178881
+ }
178882
+ await abortRollingRelease({
178883
+ client: client2,
178884
+ projectId: project.id,
178885
+ deployId,
178886
+ teamId: project.accountId
178887
+ });
178888
+ break;
178889
+ case "approve":
178890
+ if (deployId === void 0) {
178891
+ output_manager_default.error("approving a rolling release requires --deployId option.");
178892
+ break;
178893
+ }
178894
+ if (currentStageIndex === void 0) {
178895
+ output_manager_default.error(
178896
+ "approving a rolling release stage requires --currentStageIndex option."
178897
+ );
178898
+ break;
178899
+ }
178900
+ if (isNaN(activeStageIndex)) {
178901
+ output_manager_default.error(
178902
+ "approving a rolling release stage requires --currentStageIndex to be an int."
178903
+ );
178904
+ break;
178905
+ }
178906
+ await approveRollingRelease({
178907
+ client: client2,
178908
+ projectId: project.id,
178909
+ teamId: project.accountId,
178910
+ activeStageIndex,
178911
+ deployId
178912
+ });
178913
+ break;
178914
+ case "complete":
178915
+ if (deployId === void 0) {
178916
+ output_manager_default.error(
178917
+ "completing a rolling release requires --deployId option."
178918
+ );
178919
+ break;
178920
+ }
178921
+ await completeRollingRelease({
178922
+ client: client2,
178923
+ projectId: project.id,
178924
+ teamId: project.accountId,
178925
+ deployId
178926
+ });
178927
+ break;
178928
+ case "fetch":
178929
+ output_manager_default.log(
178930
+ JSON.stringify(
178931
+ await requestRollingRelease({
178932
+ client: client2,
178933
+ projectId: project.id,
178934
+ teamId: project.accountId
178935
+ })
178936
+ )
178937
+ );
178938
+ break;
178939
+ default:
178940
+ output_manager_default.log("Need to supply --action");
178941
+ }
178942
+ return 0;
178943
+ };
178944
+ }
178945
+ });
178946
+
178462
178947
  // src/commands/target/list.ts
178463
178948
  function formatBranchMatcher(branchMatcher) {
178464
178949
  if (branchMatcher?.type === "equals") {
@@ -178566,7 +179051,7 @@ var init_list9 = __esm({
178566
179051
  import_chalk116 = __toESM3(require_source());
178567
179052
  init_table();
178568
179053
  init_output_manager();
178569
- init_command27();
179054
+ init_command28();
178570
179055
  init_pkg_name();
178571
179056
  init_ensure_link();
178572
179057
  init_format_project();
@@ -178659,7 +179144,7 @@ var init_target2 = __esm({
178659
179144
  init_get_invalid_subcommand();
178660
179145
  init_help();
178661
179146
  init_list9();
178662
- init_command27();
179147
+ init_command28();
178663
179148
  init_get_flags_specification();
178664
179149
  init_error2();
178665
179150
  init_output_manager();
@@ -178806,7 +179291,7 @@ var init_list11 = __esm({
178806
179291
  init_get_args();
178807
179292
  init_error2();
178808
179293
  init_get_flags_specification();
178809
- init_command28();
179294
+ init_command29();
178810
179295
  init_output_manager();
178811
179296
  init_list10();
178812
179297
  }
@@ -179005,7 +179490,7 @@ var init_invite2 = __esm({
179005
179490
  init_get_args();
179006
179491
  init_get_flags_specification();
179007
179492
  init_error2();
179008
- init_command28();
179493
+ init_command29();
179009
179494
  validateEmail2 = (data) => email.test(data.trim()) || data.length === 0;
179010
179495
  domains = Array.from(
179011
179496
  /* @__PURE__ */ new Set([
@@ -179306,7 +179791,7 @@ var init_switch2 = __esm({
179306
179791
  init_files();
179307
179792
  init_output_manager();
179308
179793
  init_switch();
179309
- init_command28();
179794
+ init_command29();
179310
179795
  init_get_args();
179311
179796
  init_get_flags_specification();
179312
179797
  init_error2();
@@ -179458,7 +179943,7 @@ var init_teams2 = __esm({
179458
179943
  init_switch2();
179459
179944
  init_invite2();
179460
179945
  init_get_args();
179461
- init_command28();
179946
+ init_command29();
179462
179947
  init_help();
179463
179948
  init_get_flags_specification();
179464
179949
  init_error2();
@@ -179699,7 +180184,7 @@ var init_telemetry3 = __esm({
179699
180184
  init_enable();
179700
180185
  init_disable();
179701
180186
  init_flush();
179702
- init_command29();
180187
+ init_command30();
179703
180188
  init_get_flags_specification();
179704
180189
  init_telemetry2();
179705
180190
  import_chalk122 = __toESM3(require_source());
@@ -179762,7 +180247,7 @@ var init_whoami2 = __esm({
179762
180247
  "src/commands/whoami/index.ts"() {
179763
180248
  "use strict";
179764
180249
  init_help();
179765
- init_command30();
180250
+ init_command31();
179766
180251
  init_get_scope();
179767
180252
  init_get_args();
179768
180253
  init_get_flags_specification();
@@ -180329,6 +180814,12 @@ var RootTelemetryClient = class extends TelemetryClient {
180329
180814
  value: actual
180330
180815
  });
180331
180816
  }
180817
+ trackCliCommandRollingRelease(actual) {
180818
+ this.trackCliCommand({
180819
+ command: "rolling-release",
180820
+ value: actual
180821
+ });
180822
+ }
180332
180823
  trackCliCommandRedeploy(actual) {
180333
180824
  this.trackCliCommand({
180334
180825
  command: "redeploy",
@@ -181068,6 +181559,10 @@ var main13 = async () => {
181068
181559
  telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
181069
181560
  func = (init_rollback2(), __toCommonJS3(rollback_exports)).default;
181070
181561
  break;
181562
+ case "rolling-release":
181563
+ telemetry2.trackCliCommandRollingRelease(userSuppliedSubCommand);
181564
+ func = (init_rolling_release2(), __toCommonJS3(rolling_release_exports)).default;
181565
+ break;
181071
181566
  case "target":
181072
181567
  telemetry2.trackCliCommandTarget(userSuppliedSubCommand);
181073
181568
  func = (init_target2(), __toCommonJS3(target_exports)).default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "42.2.0",
3
+ "version": "42.3.0",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -24,14 +24,14 @@
24
24
  "@vercel/build-utils": "10.6.0",
25
25
  "@vercel/fun": "1.1.6",
26
26
  "@vercel/go": "3.2.1",
27
- "@vercel/hydrogen": "1.2.1",
27
+ "@vercel/hydrogen": "1.2.2",
28
28
  "@vercel/next": "4.8.0",
29
- "@vercel/node": "5.2.0",
29
+ "@vercel/node": "5.2.1",
30
30
  "@vercel/python": "4.7.2",
31
- "@vercel/redwood": "2.3.2",
32
- "@vercel/remix-builder": "5.4.8",
31
+ "@vercel/redwood": "2.3.3",
32
+ "@vercel/remix-builder": "5.4.9",
33
33
  "@vercel/ruby": "2.2.0",
34
- "@vercel/static-build": "2.7.8",
34
+ "@vercel/static-build": "2.7.9",
35
35
  "chokidar": "4.0.0",
36
36
  "jose": "5.9.6"
37
37
  },
@@ -77,11 +77,11 @@
77
77
  "@types/which": "3.0.0",
78
78
  "@types/write-json-file": "2.2.1",
79
79
  "@types/yauzl-promise": "2.1.0",
80
- "@vercel/client": "15.3.2",
80
+ "@vercel/client": "15.3.3",
81
81
  "@vercel/error-utils": "2.0.3",
82
82
  "@vercel/frameworks": "3.6.4",
83
- "@vercel/fs-detectors": "5.4.1",
84
- "@vercel/routing-utils": "5.0.4",
83
+ "@vercel/fs-detectors": "5.4.2",
84
+ "@vercel/routing-utils": "5.0.5",
85
85
  "@vitest/expect": "2.1.3",
86
86
  "ajv": "6.12.3",
87
87
  "alpha-sort": "2.0.1",