vercel 42.2.0 → 43.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 (2) hide show
  1. package/dist/index.js +948 -59
  2. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -33724,9 +33724,203 @@ var init_command26 = __esm({
33724
33724
  }
33725
33725
  });
33726
33726
 
33727
+ // src/commands/rolling-release/command.ts
33728
+ var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
33729
+ var init_command27 = __esm({
33730
+ "src/commands/rolling-release/command.ts"() {
33731
+ "use strict";
33732
+ init_arg_common();
33733
+ init_pkg_name();
33734
+ configureSubcommand = {
33735
+ name: "configure",
33736
+ description: "Configure rolling release settings for a project",
33737
+ aliases: [],
33738
+ arguments: [],
33739
+ examples: [
33740
+ {
33741
+ name: "Configure a new rolling release with an intial stage of 10% that lasts for 5 minutes before automatically advancing to 100%",
33742
+ value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"automatic", "stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":100}]}'`
33743
+ }
33744
+ ],
33745
+ options: [
33746
+ {
33747
+ name: "cfg",
33748
+ shorthand: null,
33749
+ deprecated: false,
33750
+ type: String,
33751
+ description: "The project's rolling release configuration"
33752
+ }
33753
+ ]
33754
+ };
33755
+ startSubcommand = {
33756
+ name: "start",
33757
+ description: "Start a rolling release",
33758
+ aliases: [],
33759
+ arguments: [],
33760
+ examples: [
33761
+ {
33762
+ name: "Start a rolling release",
33763
+ value: `${packageName} rr start --dpl=dpl_123`
33764
+ },
33765
+ {
33766
+ name: "Start a rolling release using URL",
33767
+ value: `${packageName} rr start --dpl=https://example.vercel.app`
33768
+ }
33769
+ ],
33770
+ options: [
33771
+ {
33772
+ name: "dpl",
33773
+ shorthand: null,
33774
+ deprecated: false,
33775
+ type: String,
33776
+ description: "The deploymentId or URL to target for the rolling release",
33777
+ required: true
33778
+ },
33779
+ yesOption
33780
+ ]
33781
+ };
33782
+ approveSubcommand = {
33783
+ name: "approve",
33784
+ description: "Approve the current stage of an active rolling release",
33785
+ aliases: [],
33786
+ arguments: [],
33787
+ examples: [
33788
+ {
33789
+ name: "Approve the current stage of an active rolling release",
33790
+ value: `${packageName} rolling-release approve --currentStageIndex=0 --dpl=dpl_123`
33791
+ }
33792
+ ],
33793
+ options: [
33794
+ {
33795
+ name: "dpl",
33796
+ shorthand: null,
33797
+ deprecated: false,
33798
+ type: String,
33799
+ description: "The deploymentId of the rolling release"
33800
+ },
33801
+ {
33802
+ name: "currentStageIndex",
33803
+ shorthand: null,
33804
+ deprecated: false,
33805
+ type: String,
33806
+ description: "The current stage of a rolling release to approve"
33807
+ }
33808
+ ]
33809
+ };
33810
+ abortSubcommand = {
33811
+ name: "abort",
33812
+ description: "Abort an active rolling release",
33813
+ aliases: [],
33814
+ arguments: [],
33815
+ examples: [
33816
+ {
33817
+ name: "Abort an active rolling release",
33818
+ value: `${packageName} rolling-release abort --dpl=dpl_123`
33819
+ }
33820
+ ],
33821
+ options: [
33822
+ {
33823
+ name: "dpl",
33824
+ shorthand: null,
33825
+ deprecated: false,
33826
+ type: String,
33827
+ description: "The deploymentId of the rolling release to abort"
33828
+ }
33829
+ ]
33830
+ };
33831
+ completeSubcommand = {
33832
+ name: "complete",
33833
+ description: "Complete an active rolling release",
33834
+ aliases: [],
33835
+ arguments: [],
33836
+ examples: [
33837
+ {
33838
+ name: "Complete an active rolling release",
33839
+ value: `${packageName} rolling-release complete --dpl=dpl_123`
33840
+ }
33841
+ ],
33842
+ options: [
33843
+ {
33844
+ name: "dpl",
33845
+ shorthand: null,
33846
+ deprecated: false,
33847
+ type: String,
33848
+ description: "The deploymentId of the rolling release to complete"
33849
+ }
33850
+ ]
33851
+ };
33852
+ fetchSubcommand = {
33853
+ name: "fetch",
33854
+ description: "Fetch details about a rolling release",
33855
+ aliases: [],
33856
+ arguments: [],
33857
+ examples: [
33858
+ {
33859
+ name: "Fetch details about a rolling release",
33860
+ value: `${packageName} rolling-release fetch`
33861
+ }
33862
+ ],
33863
+ options: []
33864
+ };
33865
+ rollingReleaseCommand = {
33866
+ name: "rolling-release",
33867
+ aliases: ["rr"],
33868
+ description: "Manage your project's rolling release.",
33869
+ arguments: [],
33870
+ subcommands: [
33871
+ configureSubcommand,
33872
+ startSubcommand,
33873
+ approveSubcommand,
33874
+ abortSubcommand,
33875
+ completeSubcommand,
33876
+ fetchSubcommand
33877
+ ],
33878
+ options: [],
33879
+ examples: [
33880
+ {
33881
+ name: "Start a rolling release",
33882
+ value: `${packageName} rr start --dpl=dpl_123`
33883
+ },
33884
+ {
33885
+ name: "Start a rolling release using URL",
33886
+ value: `${packageName} rr start --dpl=https://example.vercel.app`
33887
+ },
33888
+ {
33889
+ name: "Configure a new rolling release with an intial stage of 10% that lasts for 5 minutes before automatically advancing to 100%",
33890
+ value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"automatic", "stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":100}]}'`
33891
+ },
33892
+ {
33893
+ name: "Configure a new rolling release with an intial stage of 10% that requires approval, prior to advancing to 100%",
33894
+ value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"manual-approval","stages":[{"targetPercentage":10},{"targetPercentage":100}]}'`
33895
+ },
33896
+ {
33897
+ 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%",
33898
+ value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"manual-approval", "stages":[{"targetPercentage":10},{"targetPercentage":50},{"targetPercentage":100}]}'`
33899
+ },
33900
+ {
33901
+ name: "Disable rolling releases",
33902
+ value: `${packageName} rolling-release configure --cfg='disable'`
33903
+ },
33904
+ {
33905
+ name: "Approve an active rolling release stage",
33906
+ value: `${packageName} rolling-release approve --currentStageIndex=0 --dpl=dpl_123`
33907
+ },
33908
+ {
33909
+ name: "Abort an active rolling release.",
33910
+ value: `${packageName} rolling-release abort --dpl=dpl_123`
33911
+ },
33912
+ {
33913
+ name: "Complete an active rolling release.",
33914
+ value: `${packageName} rolling-release complete --dpl=dpl_123`
33915
+ }
33916
+ ]
33917
+ };
33918
+ }
33919
+ });
33920
+
33727
33921
  // src/commands/target/command.ts
33728
33922
  var listSubcommand8, targetCommand;
33729
- var init_command27 = __esm({
33923
+ var init_command28 = __esm({
33730
33924
  "src/commands/target/command.ts"() {
33731
33925
  "use strict";
33732
33926
  init_pkg_name();
@@ -33757,7 +33951,7 @@ var init_command27 = __esm({
33757
33951
 
33758
33952
  // src/commands/teams/command.ts
33759
33953
  var addSubcommand7, listSubcommand9, switchSubcommand, inviteSubcommand, teamsCommand;
33760
- var init_command28 = __esm({
33954
+ var init_command29 = __esm({
33761
33955
  "src/commands/teams/command.ts"() {
33762
33956
  "use strict";
33763
33957
  init_pkg_name();
@@ -33848,7 +34042,7 @@ var init_command28 = __esm({
33848
34042
 
33849
34043
  // src/commands/telemetry/command.ts
33850
34044
  var statusSubcommand3, enableSubcommand, flushSubcommand, disableSubcommand, telemetryCommand;
33851
- var init_command29 = __esm({
34045
+ var init_command30 = __esm({
33852
34046
  "src/commands/telemetry/command.ts"() {
33853
34047
  "use strict";
33854
34048
  statusSubcommand3 = {
@@ -33903,7 +34097,7 @@ var init_command29 = __esm({
33903
34097
 
33904
34098
  // src/commands/whoami/command.ts
33905
34099
  var whoamiCommand;
33906
- var init_command30 = __esm({
34100
+ var init_command31 = __esm({
33907
34101
  "src/commands/whoami/command.ts"() {
33908
34102
  "use strict";
33909
34103
  init_pkg_name();
@@ -33961,6 +34155,8 @@ var init_commands = __esm({
33961
34155
  init_command28();
33962
34156
  init_command29();
33963
34157
  init_command30();
34158
+ init_command31();
34159
+ init_output_manager();
33964
34160
  commandsStructs = [
33965
34161
  aliasCommand,
33966
34162
  bisectCommand,
@@ -33988,6 +34184,7 @@ var init_commands = __esm({
33988
34184
  redeployCommand,
33989
34185
  removeCommand,
33990
34186
  rollbackCommand,
34187
+ rollingReleaseCommand,
33991
34188
  targetCommand,
33992
34189
  teamsCommand,
33993
34190
  telemetryCommand,
@@ -33998,10 +34195,17 @@ var init_commands = __esm({
33998
34195
  commands = /* @__PURE__ */ new Map();
33999
34196
  for (const command of commandsStructs) {
34000
34197
  const aliases = getCommandAliases(command);
34198
+ output_manager_default.debug(
34199
+ `Registering command ${command.name} with aliases: ${JSON.stringify(aliases)}`
34200
+ );
34001
34201
  for (const alias2 of aliases) {
34202
+ output_manager_default.debug(`Setting alias ${alias2} -> ${command.name}`);
34002
34203
  commands.set(alias2, command.name);
34003
34204
  }
34004
34205
  }
34206
+ output_manager_default.debug(
34207
+ `All registered commands: ${JSON.stringify(Array.from(commands.entries()))}`
34208
+ );
34005
34209
  }
34006
34210
  });
34007
34211
 
@@ -46260,7 +46464,7 @@ var require_package = __commonJS2({
46260
46464
  "../client/package.json"(exports2, module2) {
46261
46465
  module2.exports = {
46262
46466
  name: "@vercel/client",
46263
- version: "15.3.2",
46467
+ version: "15.3.4",
46264
46468
  main: "dist/index.js",
46265
46469
  typings: "dist/index.d.ts",
46266
46470
  homepage: "https://vercel.com",
@@ -46299,10 +46503,10 @@ var require_package = __commonJS2({
46299
46503
  vitest: "2.0.1"
46300
46504
  },
46301
46505
  dependencies: {
46302
- "@vercel/build-utils": "10.6.0",
46506
+ "@vercel/build-utils": "10.6.1",
46303
46507
  "@vercel/error-utils": "2.0.3",
46304
46508
  "@vercel/microfrontends": "1.2.2",
46305
- "@vercel/routing-utils": "5.0.4",
46509
+ "@vercel/routing-utils": "5.0.6",
46306
46510
  "async-retry": "1.2.3",
46307
46511
  "async-sema": "3.0.0",
46308
46512
  "fs-extra": "8.0.1",
@@ -109924,7 +110128,7 @@ var require_detect_file_system_api = __commonJS2({
109924
110128
  });
109925
110129
  module2.exports = __toCommonJS4(detect_file_system_api_exports);
109926
110130
  var import_semver4 = __toESM4(require_semver2());
109927
- var import__79 = require_dist20();
110131
+ var import__81 = require_dist20();
109928
110132
  async function detectFileSystemAPI2({
109929
110133
  files,
109930
110134
  projectSettings,
@@ -109990,7 +110194,7 @@ var require_detect_file_system_api = __commonJS2({
109990
110194
  };
109991
110195
  }
109992
110196
  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);
110197
+ const valid = (0, import__81.isOfficialRuntime)("go", use) || (0, import__81.isOfficialRuntime)("python", use) || (0, import__81.isOfficialRuntime)("ruby", use) || (0, import__81.isOfficialRuntime)("node", use) || (0, import__81.isOfficialRuntime)("next", use) || (0, import__81.isOfficialRuntime)("static", use) || (0, import__81.isOfficialRuntime)("static-build", use);
109994
110198
  return !valid;
109995
110199
  });
109996
110200
  if (invalidBuilder) {
@@ -110003,7 +110207,7 @@ var require_detect_file_system_api = __commonJS2({
110003
110207
  for (const lang of ["go", "python", "ruby"]) {
110004
110208
  for (const { use } of builders) {
110005
110209
  const plugin = "vercel-plugin-" + lang;
110006
- if ((0, import__79.isOfficialRuntime)(lang, use) && !deps[plugin]) {
110210
+ if ((0, import__81.isOfficialRuntime)(lang, use) && !deps[plugin]) {
110007
110211
  return {
110008
110212
  metadata,
110009
110213
  fsApiBuilder: null,
@@ -110060,7 +110264,7 @@ var require_detect_file_system_api = __commonJS2({
110060
110264
  }
110061
110265
  }
110062
110266
  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)
110267
+ ({ use }) => (0, import__81.isOfficialRuntime)("next", use) || (0, import__81.isOfficialRuntime)("static", use) || (0, import__81.isOfficialRuntime)("static-build", use)
110064
110268
  );
110065
110269
  const config2 = frontendBuilder?.config || {};
110066
110270
  const withTag = tag ? `@${tag}` : "";
@@ -116436,6 +116640,9 @@ var require_monorepo_managers = __commonJS2({
116436
116640
  {
116437
116641
  path: "turbo.json"
116438
116642
  },
116643
+ {
116644
+ path: "turbo.jsonc"
116645
+ },
116439
116646
  {
116440
116647
  path: "package.json",
116441
116648
  matchContent: '"turbo":\\s*{[^}]*.+[^}]*}'
@@ -117958,14 +118165,26 @@ var require_superstatic = __commonJS2({
117958
118165
  }
117959
118166
  return hasItems;
117960
118167
  };
118168
+ function getStringValueForRegex(value) {
118169
+ if (typeof value === "string") {
118170
+ return value;
118171
+ }
118172
+ if (value && typeof value === "object" && value !== null) {
118173
+ if ("re" in value && typeof value.re === "string") {
118174
+ return value.re;
118175
+ }
118176
+ }
118177
+ return null;
118178
+ }
117961
118179
  function collectHasSegments(has) {
117962
118180
  const hasSegments = /* @__PURE__ */ new Set();
117963
118181
  for (const hasItem of has || []) {
117964
118182
  if (!hasItem.value && "key" in hasItem) {
117965
118183
  hasSegments.add(hasItem.key);
117966
118184
  }
117967
- if (hasItem.value) {
117968
- for (const match of hasItem.value.matchAll(namedGroupsRegex)) {
118185
+ const stringValue = getStringValueForRegex(hasItem.value);
118186
+ if (stringValue) {
118187
+ for (const match of stringValue.matchAll(namedGroupsRegex)) {
117969
118188
  if (match[1]) {
117970
118189
  hasSegments.add(match[1]);
117971
118190
  }
@@ -118313,6 +118532,101 @@ var require_schemas = __commonJS2({
118313
118532
  trailingSlashSchema: () => trailingSlashSchema2
118314
118533
  });
118315
118534
  module2.exports = __toCommonJS4(schemas_exports);
118535
+ var mitigateSchema = {
118536
+ description: "Mitigation action to take on a route",
118537
+ type: "object",
118538
+ additionalProperties: false,
118539
+ required: ["action"],
118540
+ properties: {
118541
+ action: {
118542
+ description: "The mitigation action to take",
118543
+ type: "string",
118544
+ enum: ["challenge", "deny"]
118545
+ }
118546
+ }
118547
+ };
118548
+ var matchableValueSchema = {
118549
+ description: "A value to match against. Can be a string (regex) or a condition operation object",
118550
+ anyOf: [
118551
+ {
118552
+ description: "A regular expression used to match thev value. Named groups can be used in the destination.",
118553
+ type: "string",
118554
+ maxLength: 4096
118555
+ },
118556
+ {
118557
+ description: "A condition operation object",
118558
+ type: "object",
118559
+ additionalProperties: false,
118560
+ minProperties: 1,
118561
+ properties: {
118562
+ eq: {
118563
+ description: "Equal to",
118564
+ anyOf: [
118565
+ {
118566
+ type: "string",
118567
+ maxLength: 4096
118568
+ },
118569
+ {
118570
+ type: "number"
118571
+ }
118572
+ ]
118573
+ },
118574
+ neq: {
118575
+ description: "Not equal",
118576
+ type: "string",
118577
+ maxLength: 4096
118578
+ },
118579
+ inc: {
118580
+ description: "In array",
118581
+ type: "array",
118582
+ items: {
118583
+ type: "string",
118584
+ maxLength: 4096
118585
+ }
118586
+ },
118587
+ ninc: {
118588
+ description: "Not in array",
118589
+ type: "array",
118590
+ items: {
118591
+ type: "string",
118592
+ maxLength: 4096
118593
+ }
118594
+ },
118595
+ pre: {
118596
+ description: "Starts with",
118597
+ type: "string",
118598
+ maxLength: 4096
118599
+ },
118600
+ suf: {
118601
+ description: "Ends with",
118602
+ type: "string",
118603
+ maxLength: 4096
118604
+ },
118605
+ re: {
118606
+ description: "Regex",
118607
+ type: "string",
118608
+ maxLength: 4096
118609
+ },
118610
+ gt: {
118611
+ description: "Greater than",
118612
+ type: "number"
118613
+ },
118614
+ gte: {
118615
+ description: "Greater than or equal to",
118616
+ type: "number"
118617
+ },
118618
+ lt: {
118619
+ description: "Less than",
118620
+ type: "number"
118621
+ },
118622
+ lte: {
118623
+ description: "Less than or equal to",
118624
+ type: "number"
118625
+ }
118626
+ }
118627
+ }
118628
+ ]
118629
+ };
118316
118630
  var hasSchema = {
118317
118631
  description: "An array of requirements that are needed to match",
118318
118632
  type: "array",
@@ -118329,11 +118643,7 @@ var require_schemas = __commonJS2({
118329
118643
  type: "string",
118330
118644
  enum: ["host"]
118331
118645
  },
118332
- value: {
118333
- description: "A regular expression used to match the value. Named groups can be used in the destination",
118334
- type: "string",
118335
- maxLength: 4096
118336
- }
118646
+ value: matchableValueSchema
118337
118647
  }
118338
118648
  },
118339
118649
  {
@@ -118351,11 +118661,7 @@ var require_schemas = __commonJS2({
118351
118661
  type: "string",
118352
118662
  maxLength: 4096
118353
118663
  },
118354
- value: {
118355
- description: "A regular expression used to match the value. Named groups can be used in the destination",
118356
- type: "string",
118357
- maxLength: 4096
118358
- }
118664
+ value: matchableValueSchema
118359
118665
  }
118360
118666
  }
118361
118667
  ]
@@ -118472,7 +118778,8 @@ var require_schemas = __commonJS2({
118472
118778
  }
118473
118779
  },
118474
118780
  has: hasSchema,
118475
- missing: hasSchema
118781
+ missing: hasSchema,
118782
+ mitigate: mitigateSchema
118476
118783
  }
118477
118784
  },
118478
118785
  {
@@ -176173,7 +176480,7 @@ async function logout(client2) {
176173
176480
  const { authConfig } = client2;
176174
176481
  if (!authConfig.token) {
176175
176482
  output_manager_default.note(
176176
- `Not currently logged in, so ${getCommandName("logout --future")} did nothing`
176483
+ `Not currently logged in, so ${getCommandName("logout")} did nothing`
176177
176484
  );
176178
176485
  return 0;
176179
176486
  }
@@ -176237,15 +176544,14 @@ async function logout2(client2) {
176237
176544
  printError(error3);
176238
176545
  return 1;
176239
176546
  }
176240
- if (parsedArgs.flags["--future"]) {
176241
- telemetry2.trackCliFlagFuture("logout");
176242
- return await logout(client2);
176243
- }
176244
176547
  if (parsedArgs.flags["--help"]) {
176245
176548
  telemetry2.trackCliFlagHelp("logout");
176246
176549
  output_manager_default.print(help2(logoutCommand, { columns: client2.stderr.columns }));
176247
176550
  return 2;
176248
176551
  }
176552
+ if (authConfig.type === "oauth") {
176553
+ return await logout(client2);
176554
+ }
176249
176555
  if (!authConfig.token) {
176250
176556
  output_manager_default.note(
176251
176557
  `Not currently logged in, so ${getCommandName("logout")} did nothing`
@@ -177038,6 +177344,23 @@ var init_render_alias_status = __esm({
177038
177344
  }
177039
177345
  });
177040
177346
 
177347
+ // src/commands/rolling-release/request-rolling-release.ts
177348
+ async function requestRollingRelease({
177349
+ client: client2,
177350
+ projectId,
177351
+ teamId
177352
+ }) {
177353
+ const { rollingRelease: rollingRelease2 } = await client2.fetch(
177354
+ `/v1/projects/${projectId}/rolling-release?teamId=${teamId}`
177355
+ );
177356
+ return rollingRelease2;
177357
+ }
177358
+ var init_request_rolling_release = __esm({
177359
+ "src/commands/rolling-release/request-rolling-release.ts"() {
177360
+ "use strict";
177361
+ }
177362
+ });
177363
+
177041
177364
  // src/commands/promote/status.ts
177042
177365
  async function promoteStatus({
177043
177366
  client: client2,
@@ -177065,6 +177388,22 @@ async function promoteStatus({
177065
177388
  if (projectCheck instanceof ProjectNotFound) {
177066
177389
  throw projectCheck;
177067
177390
  }
177391
+ if (projectCheck.rollingRelease) {
177392
+ output_manager_default.log(`Rolling Releases enabled \u2026`);
177393
+ const rr = await requestRollingRelease({
177394
+ client: client2,
177395
+ projectId: project.id,
177396
+ teamId: project.accountId
177397
+ });
177398
+ if (rr.activeStage) {
177399
+ output_manager_default.stopSpinner();
177400
+ output_manager_default.log(
177401
+ `Rolling Release serving traffic at initial percentage ${rr.activeStage.targetPercentage}`
177402
+ );
177403
+ return 0;
177404
+ }
177405
+ continue;
177406
+ }
177068
177407
  const {
177069
177408
  jobStatus,
177070
177409
  requestedAt,
@@ -177203,6 +177542,7 @@ var init_status = __esm({
177203
177542
  init_render_alias_status();
177204
177543
  init_sleep();
177205
177544
  init_output_manager();
177545
+ init_request_rolling_release();
177206
177546
  }
177207
177547
  });
177208
177548
 
@@ -177251,12 +177591,21 @@ async function requestPromote({
177251
177591
  );
177252
177592
  return 0;
177253
177593
  }
177254
- await client2.fetch(`/v10/projects/${project.id}/promote/${deployment.id}`, {
177255
- body: {},
177256
- // required
177257
- json: false,
177258
- method: "POST"
177259
- });
177594
+ const res = await client2.fetch(
177595
+ `/v10/projects/${project.id}/promote/${deployment.id}`,
177596
+ {
177597
+ body: {},
177598
+ // required
177599
+ json: false,
177600
+ method: "POST"
177601
+ }
177602
+ );
177603
+ if (res.status === 202) {
177604
+ output_manager_default.log(
177605
+ "Promotion has been queued and will begin when the active rolling release completes successfully."
177606
+ );
177607
+ return 0;
177608
+ }
177260
177609
  if (timeout !== void 0 && (0, import_ms25.default)(timeout) === 0) {
177261
177610
  output_manager_default.log(
177262
177611
  `Successfully requested promote of ${import_chalk110.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
@@ -178459,6 +178808,529 @@ var init_rollback2 = __esm({
178459
178808
  }
178460
178809
  });
178461
178810
 
178811
+ // src/commands/rolling-release/start-rolling-release.ts
178812
+ async function startRollingRelease({
178813
+ client: client2,
178814
+ dpl,
178815
+ projectId,
178816
+ teamId,
178817
+ yes
178818
+ }) {
178819
+ const { deployment } = await getProjectByDeployment({
178820
+ client: client2,
178821
+ deployId: dpl
178822
+ });
178823
+ let promoteByCreation = false;
178824
+ if (deployment.target !== "production") {
178825
+ if (yes) {
178826
+ promoteByCreation = true;
178827
+ } else {
178828
+ 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?";
178829
+ promoteByCreation = await client2.input.confirm(question, false);
178830
+ if (!promoteByCreation) {
178831
+ output_manager_default.error("Canceled");
178832
+ return 0;
178833
+ }
178834
+ }
178835
+ }
178836
+ if (promoteByCreation) {
178837
+ const newDeployment = await client2.fetch(
178838
+ `/v13/deployments?teamId=${deployment.ownerId}`,
178839
+ {
178840
+ body: {
178841
+ deploymentId: deployment.id,
178842
+ name: projectId,
178843
+ target: "production",
178844
+ meta: {
178845
+ action: "promote"
178846
+ }
178847
+ },
178848
+ accountId: deployment.ownerId,
178849
+ method: "POST"
178850
+ }
178851
+ );
178852
+ output_manager_default.log(
178853
+ `Successfully created new deployment at ${newDeployment.inspectorUrl}`
178854
+ );
178855
+ return 0;
178856
+ }
178857
+ await client2.fetch(
178858
+ `/v10/projects/${projectId}/promote/${deployment.id}?teamId=${teamId}`,
178859
+ {
178860
+ body: {},
178861
+ // required
178862
+ json: false,
178863
+ method: "POST"
178864
+ }
178865
+ );
178866
+ output_manager_default.log("Successfully started rolling release");
178867
+ return 0;
178868
+ }
178869
+ var init_start_rolling_release = __esm({
178870
+ "src/commands/rolling-release/start-rolling-release.ts"() {
178871
+ "use strict";
178872
+ init_output_manager();
178873
+ init_get_project_by_deployment();
178874
+ }
178875
+ });
178876
+
178877
+ // src/commands/rolling-release/configure-rolling-release.ts
178878
+ async function configureRollingRelease({
178879
+ client: client2,
178880
+ projectId,
178881
+ teamId,
178882
+ rollingReleaseConfig
178883
+ }) {
178884
+ const body = {
178885
+ ...rollingReleaseConfig,
178886
+ enabled: Boolean(rollingReleaseConfig)
178887
+ };
178888
+ await client2.fetch(
178889
+ `/v1/projects/${projectId}/rolling-release/config?teamId=${teamId}`,
178890
+ {
178891
+ body,
178892
+ json: true,
178893
+ method: "PATCH"
178894
+ }
178895
+ );
178896
+ output_manager_default.log("Successfully configured rolling releases.");
178897
+ return 0;
178898
+ }
178899
+ var init_configure_rolling_release = __esm({
178900
+ "src/commands/rolling-release/configure-rolling-release.ts"() {
178901
+ "use strict";
178902
+ init_output_manager();
178903
+ }
178904
+ });
178905
+
178906
+ // src/commands/rolling-release/approve-rolling-release.ts
178907
+ async function approveRollingRelease({
178908
+ client: client2,
178909
+ projectId,
178910
+ teamId,
178911
+ activeStageIndex,
178912
+ dpl
178913
+ }) {
178914
+ const { deployment } = await getProjectByDeployment({
178915
+ client: client2,
178916
+ deployId: dpl
178917
+ });
178918
+ await client2.fetch(
178919
+ `/v1/projects/${projectId}/rolling-release/approve-stage?teamId=${teamId}`,
178920
+ {
178921
+ method: "POST",
178922
+ json: true,
178923
+ body: {
178924
+ activeStageIndex,
178925
+ nextStageIndex: activeStageIndex + 1,
178926
+ canaryDeploymentId: deployment.id
178927
+ }
178928
+ }
178929
+ );
178930
+ output_manager_default.log(
178931
+ "Successfully requested approval of rolling release to next stage."
178932
+ );
178933
+ return 0;
178934
+ }
178935
+ var init_approve_rolling_release = __esm({
178936
+ "src/commands/rolling-release/approve-rolling-release.ts"() {
178937
+ "use strict";
178938
+ init_output_manager();
178939
+ init_get_project_by_deployment();
178940
+ }
178941
+ });
178942
+
178943
+ // src/commands/rolling-release/abort-rolling-release.ts
178944
+ async function abortRollingRelease({
178945
+ client: client2,
178946
+ projectId,
178947
+ dpl,
178948
+ teamId
178949
+ }) {
178950
+ const { deployment } = await getProjectByDeployment({
178951
+ client: client2,
178952
+ deployId: dpl
178953
+ });
178954
+ await client2.fetch(
178955
+ `/v9/projects/${projectId}/rollback/${deployment.id}?teamId=${teamId}`,
178956
+ {
178957
+ body: {},
178958
+ // required
178959
+ method: "POST"
178960
+ }
178961
+ );
178962
+ output_manager_default.log("Successfully aborted the active rolling release.");
178963
+ return 0;
178964
+ }
178965
+ var init_abort_rolling_release = __esm({
178966
+ "src/commands/rolling-release/abort-rolling-release.ts"() {
178967
+ "use strict";
178968
+ init_output_manager();
178969
+ init_get_project_by_deployment();
178970
+ }
178971
+ });
178972
+
178973
+ // src/commands/rolling-release/complete-rolling-release.ts
178974
+ async function completeRollingRelease({
178975
+ client: client2,
178976
+ projectId,
178977
+ teamId,
178978
+ dpl
178979
+ }) {
178980
+ const { deployment } = await getProjectByDeployment({
178981
+ client: client2,
178982
+ deployId: dpl
178983
+ });
178984
+ await client2.fetch(
178985
+ `/v1/projects/${projectId}/rolling-release/complete?teamId=${teamId}`,
178986
+ {
178987
+ body: { canaryDeploymentId: deployment.id },
178988
+ // required
178989
+ json: true,
178990
+ method: "POST"
178991
+ }
178992
+ );
178993
+ output_manager_default.log(
178994
+ "Successfully requested completion of the active rolling release."
178995
+ );
178996
+ return 0;
178997
+ }
178998
+ var init_complete_rolling_release = __esm({
178999
+ "src/commands/rolling-release/complete-rolling-release.ts"() {
179000
+ "use strict";
179001
+ init_output_manager();
179002
+ init_get_project_by_deployment();
179003
+ }
179004
+ });
179005
+
179006
+ // src/util/telemetry/commands/rolling-release/index.ts
179007
+ var RollingReleaseTelemetryClient;
179008
+ var init_rolling_release = __esm({
179009
+ "src/util/telemetry/commands/rolling-release/index.ts"() {
179010
+ "use strict";
179011
+ init_telemetry();
179012
+ RollingReleaseTelemetryClient = class extends TelemetryClient {
179013
+ trackCliOptionAction(value) {
179014
+ this.trackCliOption({
179015
+ option: "action",
179016
+ value: value ?? ""
179017
+ });
179018
+ }
179019
+ trackCliOptionName(name) {
179020
+ if (name) {
179021
+ this.trackCliOption({
179022
+ option: "name",
179023
+ value: this.redactedValue
179024
+ });
179025
+ }
179026
+ }
179027
+ trackCliOptionCfg(value) {
179028
+ this.trackCliOption({
179029
+ option: "cfg",
179030
+ value: value ?? ""
179031
+ });
179032
+ }
179033
+ trackCliOptionDpl(value) {
179034
+ this.trackCliOption({
179035
+ option: "dpl",
179036
+ value: value ?? ""
179037
+ });
179038
+ }
179039
+ trackCliOptionCurrentStageIndex(value) {
179040
+ this.trackCliOption({
179041
+ option: "currentStageIndex",
179042
+ value: value ?? ""
179043
+ });
179044
+ }
179045
+ trackCliSubcommandConfigure(actual) {
179046
+ this.trackCliSubcommand({
179047
+ subcommand: "configure",
179048
+ value: actual
179049
+ });
179050
+ }
179051
+ trackCliSubcommandStart(actual) {
179052
+ this.trackCliSubcommand({
179053
+ subcommand: "start",
179054
+ value: actual
179055
+ });
179056
+ }
179057
+ trackCliSubcommandApprove(actual) {
179058
+ this.trackCliSubcommand({
179059
+ subcommand: "approve",
179060
+ value: actual
179061
+ });
179062
+ }
179063
+ trackCliSubcommandAbort(actual) {
179064
+ this.trackCliSubcommand({
179065
+ subcommand: "abort",
179066
+ value: actual
179067
+ });
179068
+ }
179069
+ trackCliSubcommandComplete(actual) {
179070
+ this.trackCliSubcommand({
179071
+ subcommand: "complete",
179072
+ value: actual
179073
+ });
179074
+ }
179075
+ trackCliSubcommandFetch(actual) {
179076
+ this.trackCliSubcommand({
179077
+ subcommand: "fetch",
179078
+ value: actual
179079
+ });
179080
+ }
179081
+ };
179082
+ }
179083
+ });
179084
+
179085
+ // src/commands/rolling-release/index.ts
179086
+ var rolling_release_exports = {};
179087
+ __export3(rolling_release_exports, {
179088
+ default: () => rollingRelease
179089
+ });
179090
+ async function rollingRelease(client2) {
179091
+ const telemetry2 = new RollingReleaseTelemetryClient({
179092
+ opts: {
179093
+ store: client2.telemetryEventStore
179094
+ }
179095
+ });
179096
+ const {
179097
+ subcommand,
179098
+ args: subcommandArgs,
179099
+ subcommandOriginal
179100
+ } = getSubcommand(client2.argv.slice(3), COMMAND_CONFIG12);
179101
+ const needHelp = client2.argv.includes("--help") || client2.argv.includes("-h");
179102
+ if (!subcommand && needHelp) {
179103
+ telemetry2.trackCliFlagHelp("rolling-release");
179104
+ output_manager_default.print(
179105
+ help2(rollingReleaseCommand, { columns: client2.stderr.columns })
179106
+ );
179107
+ return 2;
179108
+ }
179109
+ function printHelp(command) {
179110
+ output_manager_default.print(
179111
+ help2(command, {
179112
+ parent: rollingReleaseCommand,
179113
+ columns: client2.stderr.columns
179114
+ })
179115
+ );
179116
+ }
179117
+ try {
179118
+ const link4 = await getLinkedProject(client2);
179119
+ if (link4.status === "error") {
179120
+ return link4.exitCode;
179121
+ }
179122
+ if (link4.status === "not_linked") {
179123
+ output_manager_default.error(
179124
+ "No project found. Please run `vc link` to link your project first."
179125
+ );
179126
+ return 1;
179127
+ }
179128
+ const { project, org } = link4;
179129
+ client2.config.currentTeam = org.type === "team" ? org.id : void 0;
179130
+ let subcommandFlags;
179131
+ switch (subcommand) {
179132
+ case "configure": {
179133
+ if (needHelp) {
179134
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179135
+ printHelp(configureSubcommand);
179136
+ return 2;
179137
+ }
179138
+ subcommandFlags = parseArguments(
179139
+ subcommandArgs,
179140
+ getFlagsSpecification(configureSubcommand.options),
179141
+ { permissive: true }
179142
+ );
179143
+ const cfgString = subcommandFlags.flags["--cfg"];
179144
+ if (!cfgString) {
179145
+ output_manager_default.error("Missing required flag --cfg");
179146
+ return 1;
179147
+ }
179148
+ let cfg = void 0;
179149
+ if (cfgString !== "disable") {
179150
+ try {
179151
+ cfg = JSON.parse(cfgString);
179152
+ } catch (error3) {
179153
+ output_manager_default.error("Invalid JSON provided for --cfg option.");
179154
+ return 1;
179155
+ }
179156
+ }
179157
+ await configureRollingRelease({
179158
+ client: client2,
179159
+ projectId: project.id,
179160
+ teamId: org.id,
179161
+ rollingReleaseConfig: cfg
179162
+ });
179163
+ break;
179164
+ }
179165
+ case "start": {
179166
+ if (needHelp) {
179167
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179168
+ printHelp(startSubcommand);
179169
+ return 2;
179170
+ }
179171
+ subcommandFlags = parseArguments(
179172
+ subcommandArgs,
179173
+ getFlagsSpecification(startSubcommand.options),
179174
+ { permissive: true }
179175
+ );
179176
+ const dpl = subcommandFlags.flags["--dpl"];
179177
+ if (dpl === void 0) {
179178
+ output_manager_default.error("starting a rolling release requires --dpl option.");
179179
+ break;
179180
+ }
179181
+ await startRollingRelease({
179182
+ client: client2,
179183
+ dpl,
179184
+ projectId: project.id,
179185
+ teamId: project.accountId,
179186
+ yes: subcommandFlags.flags["--yes"] ?? false
179187
+ });
179188
+ break;
179189
+ }
179190
+ case "approve": {
179191
+ if (needHelp) {
179192
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179193
+ printHelp(approveSubcommand);
179194
+ return 2;
179195
+ }
179196
+ subcommandFlags = parseArguments(
179197
+ subcommandArgs,
179198
+ getFlagsSpecification(approveSubcommand.options),
179199
+ { permissive: true }
179200
+ );
179201
+ const dpl = subcommandFlags.flags["--dpl"];
179202
+ const currentStageIndex = subcommandFlags.flags["--currentStageIndex"];
179203
+ const activeStageIndex = parseInt(currentStageIndex ?? "");
179204
+ if (!dpl) {
179205
+ output_manager_default.error("Missing required flag --dpl");
179206
+ return 1;
179207
+ }
179208
+ if (currentStageIndex === void 0) {
179209
+ output_manager_default.error("Missing required flag --currentStageIndex");
179210
+ return 1;
179211
+ }
179212
+ if (isNaN(activeStageIndex)) {
179213
+ output_manager_default.error("--currentStageIndex must be a valid number.");
179214
+ return 1;
179215
+ }
179216
+ await approveRollingRelease({
179217
+ client: client2,
179218
+ projectId: project.id,
179219
+ teamId: org.id,
179220
+ activeStageIndex,
179221
+ dpl
179222
+ });
179223
+ break;
179224
+ }
179225
+ case "abort": {
179226
+ if (needHelp) {
179227
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179228
+ printHelp(abortSubcommand);
179229
+ return 2;
179230
+ }
179231
+ subcommandFlags = parseArguments(
179232
+ subcommandArgs,
179233
+ getFlagsSpecification(abortSubcommand.options),
179234
+ { permissive: true }
179235
+ );
179236
+ const dpl = subcommandFlags.flags["--dpl"];
179237
+ if (!dpl) {
179238
+ output_manager_default.error("Missing required flag --dpl");
179239
+ return 1;
179240
+ }
179241
+ await abortRollingRelease({
179242
+ client: client2,
179243
+ projectId: project.id,
179244
+ teamId: org.id,
179245
+ dpl
179246
+ });
179247
+ break;
179248
+ }
179249
+ case "complete": {
179250
+ if (needHelp) {
179251
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179252
+ printHelp(completeSubcommand);
179253
+ return 2;
179254
+ }
179255
+ subcommandFlags = parseArguments(
179256
+ subcommandArgs,
179257
+ getFlagsSpecification(completeSubcommand.options),
179258
+ { permissive: true }
179259
+ );
179260
+ const dpl = subcommandFlags.flags["--dpl"];
179261
+ if (!dpl) {
179262
+ output_manager_default.error("Missing required flag --dpl");
179263
+ return 1;
179264
+ }
179265
+ await completeRollingRelease({
179266
+ client: client2,
179267
+ projectId: project.id,
179268
+ teamId: org.id,
179269
+ dpl
179270
+ });
179271
+ break;
179272
+ }
179273
+ case "fetch": {
179274
+ if (needHelp) {
179275
+ telemetry2.trackCliFlagHelp("rolling-release", subcommandOriginal);
179276
+ printHelp(fetchSubcommand);
179277
+ return 2;
179278
+ }
179279
+ const result = await requestRollingRelease({
179280
+ client: client2,
179281
+ projectId: project.id,
179282
+ teamId: org.id
179283
+ });
179284
+ output_manager_default.log(JSON.stringify(result, null, 2));
179285
+ break;
179286
+ }
179287
+ default: {
179288
+ output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
179289
+ output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG12));
179290
+ output_manager_default.print(
179291
+ help2(rollingReleaseCommand, { columns: client2.stderr.columns })
179292
+ );
179293
+ return 2;
179294
+ }
179295
+ }
179296
+ return 0;
179297
+ } catch (err) {
179298
+ printError(err);
179299
+ return 1;
179300
+ }
179301
+ }
179302
+ var COMMAND_CONFIG12;
179303
+ var init_rolling_release2 = __esm({
179304
+ "src/commands/rolling-release/index.ts"() {
179305
+ "use strict";
179306
+ init_get_args();
179307
+ init_get_flags_specification();
179308
+ init_help();
179309
+ init_command27();
179310
+ init_request_rolling_release();
179311
+ init_start_rolling_release();
179312
+ init_configure_rolling_release();
179313
+ init_approve_rolling_release();
179314
+ init_abort_rolling_release();
179315
+ init_complete_rolling_release();
179316
+ init_error2();
179317
+ init_output_manager();
179318
+ init_rolling_release();
179319
+ init_link2();
179320
+ init_get_subcommand();
179321
+ init_commands();
179322
+ init_get_invalid_subcommand();
179323
+ COMMAND_CONFIG12 = {
179324
+ configure: getCommandAliases(configureSubcommand),
179325
+ start: getCommandAliases(startSubcommand),
179326
+ approve: getCommandAliases(approveSubcommand),
179327
+ abort: getCommandAliases(abortSubcommand),
179328
+ complete: getCommandAliases(completeSubcommand),
179329
+ fetch: getCommandAliases(fetchSubcommand)
179330
+ };
179331
+ }
179332
+ });
179333
+
178462
179334
  // src/commands/target/list.ts
178463
179335
  function formatBranchMatcher(branchMatcher) {
178464
179336
  if (branchMatcher?.type === "equals") {
@@ -178566,7 +179438,7 @@ var init_list9 = __esm({
178566
179438
  import_chalk116 = __toESM3(require_source());
178567
179439
  init_table();
178568
179440
  init_output_manager();
178569
- init_command27();
179441
+ init_command28();
178570
179442
  init_pkg_name();
178571
179443
  init_ensure_link();
178572
179444
  init_format_project();
@@ -178646,12 +179518,12 @@ async function main12(client2) {
178646
179518
  telemetry2.trackCliSubcommandList(subcommand);
178647
179519
  return await list5(client2, args2);
178648
179520
  default:
178649
- output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG12));
179521
+ output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG13));
178650
179522
  output_manager_default.print(help2(targetCommand, { columns: client2.stderr.columns }));
178651
179523
  return 2;
178652
179524
  }
178653
179525
  }
178654
- var COMMAND_CONFIG12;
179526
+ var COMMAND_CONFIG13;
178655
179527
  var init_target2 = __esm({
178656
179528
  "src/commands/target/index.ts"() {
178657
179529
  "use strict";
@@ -178659,13 +179531,13 @@ var init_target2 = __esm({
178659
179531
  init_get_invalid_subcommand();
178660
179532
  init_help();
178661
179533
  init_list9();
178662
- init_command27();
179534
+ init_command28();
178663
179535
  init_get_flags_specification();
178664
179536
  init_error2();
178665
179537
  init_output_manager();
178666
179538
  init_target();
178667
179539
  init_commands();
178668
- COMMAND_CONFIG12 = {
179540
+ COMMAND_CONFIG13 = {
178669
179541
  ls: getCommandAliases(listSubcommand8)
178670
179542
  };
178671
179543
  }
@@ -178806,7 +179678,7 @@ var init_list11 = __esm({
178806
179678
  init_get_args();
178807
179679
  init_error2();
178808
179680
  init_get_flags_specification();
178809
- init_command28();
179681
+ init_command29();
178810
179682
  init_output_manager();
178811
179683
  init_list10();
178812
179684
  }
@@ -179005,7 +179877,7 @@ var init_invite2 = __esm({
179005
179877
  init_get_args();
179006
179878
  init_get_flags_specification();
179007
179879
  init_error2();
179008
- init_command28();
179880
+ init_command29();
179009
179881
  validateEmail2 = (data) => email.test(data.trim()) || data.length === 0;
179010
179882
  domains = Array.from(
179011
179883
  /* @__PURE__ */ new Set([
@@ -179306,7 +180178,7 @@ var init_switch2 = __esm({
179306
180178
  init_files();
179307
180179
  init_output_manager();
179308
180180
  init_switch();
179309
- init_command28();
180181
+ init_command29();
179310
180182
  init_get_args();
179311
180183
  init_get_flags_specification();
179312
180184
  init_error2();
@@ -179390,7 +180262,7 @@ async function teams(client2) {
179390
180262
  }
179391
180263
  const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
179392
180264
  parsedArgs.args.slice(1),
179393
- COMMAND_CONFIG13
180265
+ COMMAND_CONFIG14
179394
180266
  );
179395
180267
  const needHelp = parsedArgs.flags["--help"];
179396
180268
  if (!subcommand && needHelp) {
@@ -179449,7 +180321,7 @@ async function teams(client2) {
179449
180321
  }
179450
180322
  }
179451
180323
  }
179452
- var COMMAND_CONFIG13;
180324
+ var COMMAND_CONFIG14;
179453
180325
  var init_teams2 = __esm({
179454
180326
  "src/commands/teams/index.ts"() {
179455
180327
  "use strict";
@@ -179458,14 +180330,14 @@ var init_teams2 = __esm({
179458
180330
  init_switch2();
179459
180331
  init_invite2();
179460
180332
  init_get_args();
179461
- init_command28();
180333
+ init_command29();
179462
180334
  init_help();
179463
180335
  init_get_flags_specification();
179464
180336
  init_error2();
179465
180337
  init_teams();
179466
180338
  init_output_manager();
179467
180339
  init_get_subcommand();
179468
- COMMAND_CONFIG13 = {
180340
+ COMMAND_CONFIG14 = {
179469
180341
  list: ["ls", "list"],
179470
180342
  switch: ["switch", "change"],
179471
180343
  add: ["create", "add"],
@@ -179634,7 +180506,7 @@ async function telemetry(client2) {
179634
180506
  }
179635
180507
  const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
179636
180508
  parsedArguments.args.slice(1),
179637
- COMMAND_CONFIG14
180509
+ COMMAND_CONFIG15
179638
180510
  );
179639
180511
  const needHelp = parsedArguments.flags["--help"];
179640
180512
  function printHelp(command) {
@@ -179687,7 +180559,7 @@ async function telemetry(client2) {
179687
180559
  }
179688
180560
  }
179689
180561
  }
179690
- var import_chalk122, COMMAND_CONFIG14;
180562
+ var import_chalk122, COMMAND_CONFIG15;
179691
180563
  var init_telemetry3 = __esm({
179692
180564
  "src/commands/telemetry/index.ts"() {
179693
180565
  "use strict";
@@ -179699,13 +180571,13 @@ var init_telemetry3 = __esm({
179699
180571
  init_enable();
179700
180572
  init_disable();
179701
180573
  init_flush();
179702
- init_command29();
180574
+ init_command30();
179703
180575
  init_get_flags_specification();
179704
180576
  init_telemetry2();
179705
180577
  import_chalk122 = __toESM3(require_source());
179706
180578
  init_output_manager();
179707
180579
  init_commands();
179708
- COMMAND_CONFIG14 = {
180580
+ COMMAND_CONFIG15 = {
179709
180581
  status: getCommandAliases(statusSubcommand3),
179710
180582
  enable: getCommandAliases(enableSubcommand),
179711
180583
  disable: getCommandAliases(disableSubcommand),
@@ -179762,7 +180634,7 @@ var init_whoami2 = __esm({
179762
180634
  "src/commands/whoami/index.ts"() {
179763
180635
  "use strict";
179764
180636
  init_help();
179765
- init_command30();
180637
+ init_command31();
179766
180638
  init_get_scope();
179767
180639
  init_get_args();
179768
180640
  init_get_flags_specification();
@@ -180329,6 +181201,12 @@ var RootTelemetryClient = class extends TelemetryClient {
180329
181201
  value: actual
180330
181202
  });
180331
181203
  }
181204
+ trackCliCommandRollingRelease(actual) {
181205
+ this.trackCliCommand({
181206
+ command: "rolling-release",
181207
+ value: actual
181208
+ });
181209
+ }
180332
181210
  trackCliCommandRedeploy(actual) {
180333
181211
  this.trackCliCommand({
180334
181212
  command: "redeploy",
@@ -180824,14 +181702,19 @@ var main13 = async () => {
180824
181702
  if ((!authConfig || !authConfig.token) && !client.argv.includes("-h") && !client.argv.includes("--help") && !parsedArgs.flags["--token"] && subcommand && !subcommandsWithoutToken.includes(subcommand)) {
180825
181703
  if (isTTY2) {
180826
181704
  output_manager_default.log(`No existing credentials found. Please log in:`);
180827
- const result = await prompt(client);
180828
- if (typeof result === "number") {
180829
- return result;
181705
+ try {
181706
+ const result = await prompt(client);
181707
+ if (typeof result === "number") {
181708
+ return result;
181709
+ }
181710
+ client.authConfig.token = result.token;
181711
+ await updateCurrentTeamAfterLogin(client, result.teamId);
181712
+ writeToAuthConfigFile(client.authConfig);
181713
+ writeToConfigFile(client.config);
181714
+ } catch (error3) {
181715
+ printError(error3);
181716
+ return 1;
180830
181717
  }
180831
- client.authConfig.token = result.token;
180832
- await updateCurrentTeamAfterLogin(client, result.teamId);
180833
- writeToAuthConfigFile(client.authConfig);
180834
- writeToConfigFile(client.config);
180835
181718
  output_manager_default.debug(`Saved credentials in "${humanizePath(VERCEL_DIR3)}"`);
180836
181719
  } else {
180837
181720
  output_manager_default.prettyError({
@@ -181068,6 +181951,12 @@ var main13 = async () => {
181068
181951
  telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
181069
181952
  func = (init_rollback2(), __toCommonJS3(rollback_exports)).default;
181070
181953
  break;
181954
+ case "rr":
181955
+ case "release":
181956
+ case "rolling-release":
181957
+ telemetry2.trackCliCommandRollingRelease(userSuppliedSubCommand);
181958
+ func = (init_rolling_release2(), __toCommonJS3(rolling_release_exports)).default;
181959
+ break;
181071
181960
  case "target":
181072
181961
  telemetry2.trackCliCommandTarget(userSuppliedSubCommand);
181073
181962
  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": "43.0.0",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -21,17 +21,17 @@
21
21
  "node": ">= 18"
22
22
  },
23
23
  "dependencies": {
24
- "@vercel/build-utils": "10.6.0",
24
+ "@vercel/build-utils": "10.6.1",
25
25
  "@vercel/fun": "1.1.6",
26
26
  "@vercel/go": "3.2.1",
27
- "@vercel/hydrogen": "1.2.1",
28
- "@vercel/next": "4.8.0",
29
- "@vercel/node": "5.2.0",
27
+ "@vercel/hydrogen": "1.2.2",
28
+ "@vercel/next": "4.9.0",
29
+ "@vercel/node": "5.2.2",
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.10",
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.4",
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.3",
84
+ "@vercel/routing-utils": "5.0.6",
85
85
  "@vitest/expect": "2.1.3",
86
86
  "ajv": "6.12.3",
87
87
  "alpha-sort": "2.0.1",
@@ -159,9 +159,9 @@
159
159
  "write-json-file": "2.2.0",
160
160
  "xdg-app-paths": "5.1.0",
161
161
  "yauzl-promise": "2.1.3",
162
- "@vercel-internals/constants": "1.0.4",
163
162
  "@vercel-internals/get-package-json": "1.0.0",
164
- "@vercel-internals/types": "3.0.6"
163
+ "@vercel-internals/types": "3.0.6",
164
+ "@vercel-internals/constants": "1.0.4"
165
165
  },
166
166
  "scripts": {
167
167
  "test": "jest --reporters=default --reporters=jest-junit --env node --verbose --bail",