vercel 42.3.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.
- package/dist/index.js +625 -231
- package/package.json +10 -10
package/dist/index.js
CHANGED
@@ -33725,85 +33725,193 @@ var init_command26 = __esm({
|
|
33725
33725
|
});
|
33726
33726
|
|
33727
33727
|
// src/commands/rolling-release/command.ts
|
33728
|
-
var rollingReleaseCommand;
|
33728
|
+
var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
|
33729
33729
|
var init_command27 = __esm({
|
33730
33730
|
"src/commands/rolling-release/command.ts"() {
|
33731
33731
|
"use strict";
|
33732
|
-
|
33733
|
-
|
33734
|
-
|
33735
|
-
|
33732
|
+
init_arg_common();
|
33733
|
+
init_pkg_name();
|
33734
|
+
configureSubcommand = {
|
33735
|
+
name: "configure",
|
33736
|
+
description: "Configure rolling release settings for a project",
|
33737
|
+
aliases: [],
|
33736
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
|
+
],
|
33737
33745
|
options: [
|
33738
33746
|
{
|
33739
|
-
name: "
|
33740
|
-
shorthand:
|
33747
|
+
name: "cfg",
|
33748
|
+
shorthand: null,
|
33749
|
+
deprecated: false,
|
33741
33750
|
type: String,
|
33742
|
-
|
33743
|
-
|
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`
|
33744
33764
|
},
|
33745
33765
|
{
|
33746
|
-
name: "
|
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",
|
33747
33773
|
shorthand: null,
|
33748
|
-
type: String,
|
33749
33774
|
deprecated: false,
|
33750
|
-
|
33751
|
-
|
33775
|
+
type: String,
|
33776
|
+
description: "The deploymentId or URL to target for the rolling release",
|
33777
|
+
required: true
|
33752
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: [
|
33753
33788
|
{
|
33754
|
-
name: "
|
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",
|
33755
33796
|
shorthand: null,
|
33756
|
-
type: String,
|
33757
33797
|
deprecated: false,
|
33758
|
-
|
33798
|
+
type: String,
|
33799
|
+
description: "The deploymentId of the rolling release"
|
33759
33800
|
},
|
33760
33801
|
{
|
33761
|
-
name: "
|
33802
|
+
name: "currentStageIndex",
|
33762
33803
|
shorthand: null,
|
33763
|
-
type: String,
|
33764
33804
|
deprecated: false,
|
33765
|
-
|
33766
|
-
|
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: [
|
33767
33816
|
{
|
33768
|
-
name: "
|
33817
|
+
name: "Abort an active rolling release",
|
33818
|
+
value: `${packageName} rolling-release abort --dpl=dpl_123`
|
33819
|
+
}
|
33820
|
+
],
|
33821
|
+
options: [
|
33822
|
+
{
|
33823
|
+
name: "dpl",
|
33769
33824
|
shorthand: null,
|
33825
|
+
deprecated: false,
|
33770
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,
|
33771
33846
|
deprecated: false,
|
33772
|
-
|
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`
|
33773
33861
|
}
|
33774
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: [],
|
33775
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
|
+
},
|
33776
33888
|
{
|
33777
33889
|
name: "Configure a new rolling release with an intial stage of 10% that lasts for 5 minutes before automatically advancing to 100%",
|
33778
|
-
value:
|
33890
|
+
value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"automatic", "stages":[{"targetPercentage":10,"duration":5},{"targetPercentage":100}]}'`
|
33779
33891
|
},
|
33780
33892
|
{
|
33781
33893
|
name: "Configure a new rolling release with an intial stage of 10% that requires approval, prior to advancing to 100%",
|
33782
|
-
value:
|
33894
|
+
value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"manual-approval","stages":[{"targetPercentage":10},{"targetPercentage":100}]}'`
|
33783
33895
|
},
|
33784
33896
|
{
|
33785
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%",
|
33786
|
-
value:
|
33898
|
+
value: `${packageName} rolling-release configure --cfg='{"enabled":true, "advancementType":"manual-approval", "stages":[{"targetPercentage":10},{"targetPercentage":50},{"targetPercentage":100}]}'`
|
33787
33899
|
},
|
33788
33900
|
{
|
33789
33901
|
name: "Disable rolling releases",
|
33790
|
-
value:
|
33791
|
-
},
|
33792
|
-
{
|
33793
|
-
name: "Start a rolling release",
|
33794
|
-
value: "vercel rolling-release --action=start --deployId=dpl_123"
|
33902
|
+
value: `${packageName} rolling-release configure --cfg='disable'`
|
33795
33903
|
},
|
33796
33904
|
{
|
33797
33905
|
name: "Approve an active rolling release stage",
|
33798
|
-
value:
|
33906
|
+
value: `${packageName} rolling-release approve --currentStageIndex=0 --dpl=dpl_123`
|
33799
33907
|
},
|
33800
33908
|
{
|
33801
33909
|
name: "Abort an active rolling release.",
|
33802
|
-
value:
|
33910
|
+
value: `${packageName} rolling-release abort --dpl=dpl_123`
|
33803
33911
|
},
|
33804
33912
|
{
|
33805
33913
|
name: "Complete an active rolling release.",
|
33806
|
-
value:
|
33914
|
+
value: `${packageName} rolling-release complete --dpl=dpl_123`
|
33807
33915
|
}
|
33808
33916
|
]
|
33809
33917
|
};
|
@@ -34048,6 +34156,7 @@ var init_commands = __esm({
|
|
34048
34156
|
init_command29();
|
34049
34157
|
init_command30();
|
34050
34158
|
init_command31();
|
34159
|
+
init_output_manager();
|
34051
34160
|
commandsStructs = [
|
34052
34161
|
aliasCommand,
|
34053
34162
|
bisectCommand,
|
@@ -34086,10 +34195,17 @@ var init_commands = __esm({
|
|
34086
34195
|
commands = /* @__PURE__ */ new Map();
|
34087
34196
|
for (const command of commandsStructs) {
|
34088
34197
|
const aliases = getCommandAliases(command);
|
34198
|
+
output_manager_default.debug(
|
34199
|
+
`Registering command ${command.name} with aliases: ${JSON.stringify(aliases)}`
|
34200
|
+
);
|
34089
34201
|
for (const alias2 of aliases) {
|
34202
|
+
output_manager_default.debug(`Setting alias ${alias2} -> ${command.name}`);
|
34090
34203
|
commands.set(alias2, command.name);
|
34091
34204
|
}
|
34092
34205
|
}
|
34206
|
+
output_manager_default.debug(
|
34207
|
+
`All registered commands: ${JSON.stringify(Array.from(commands.entries()))}`
|
34208
|
+
);
|
34093
34209
|
}
|
34094
34210
|
});
|
34095
34211
|
|
@@ -46348,7 +46464,7 @@ var require_package = __commonJS2({
|
|
46348
46464
|
"../client/package.json"(exports2, module2) {
|
46349
46465
|
module2.exports = {
|
46350
46466
|
name: "@vercel/client",
|
46351
|
-
version: "15.3.
|
46467
|
+
version: "15.3.4",
|
46352
46468
|
main: "dist/index.js",
|
46353
46469
|
typings: "dist/index.d.ts",
|
46354
46470
|
homepage: "https://vercel.com",
|
@@ -46387,10 +46503,10 @@ var require_package = __commonJS2({
|
|
46387
46503
|
vitest: "2.0.1"
|
46388
46504
|
},
|
46389
46505
|
dependencies: {
|
46390
|
-
"@vercel/build-utils": "10.6.
|
46506
|
+
"@vercel/build-utils": "10.6.1",
|
46391
46507
|
"@vercel/error-utils": "2.0.3",
|
46392
46508
|
"@vercel/microfrontends": "1.2.2",
|
46393
|
-
"@vercel/routing-utils": "5.0.
|
46509
|
+
"@vercel/routing-utils": "5.0.6",
|
46394
46510
|
"async-retry": "1.2.3",
|
46395
46511
|
"async-sema": "3.0.0",
|
46396
46512
|
"fs-extra": "8.0.1",
|
@@ -110012,7 +110128,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
110012
110128
|
});
|
110013
110129
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
110014
110130
|
var import_semver4 = __toESM4(require_semver2());
|
110015
|
-
var
|
110131
|
+
var import__81 = require_dist20();
|
110016
110132
|
async function detectFileSystemAPI2({
|
110017
110133
|
files,
|
110018
110134
|
projectSettings,
|
@@ -110078,7 +110194,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
110078
110194
|
};
|
110079
110195
|
}
|
110080
110196
|
const invalidBuilder = builders.find(({ use }) => {
|
110081
|
-
const valid = (0,
|
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);
|
110082
110198
|
return !valid;
|
110083
110199
|
});
|
110084
110200
|
if (invalidBuilder) {
|
@@ -110091,7 +110207,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
110091
110207
|
for (const lang of ["go", "python", "ruby"]) {
|
110092
110208
|
for (const { use } of builders) {
|
110093
110209
|
const plugin = "vercel-plugin-" + lang;
|
110094
|
-
if ((0,
|
110210
|
+
if ((0, import__81.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
110095
110211
|
return {
|
110096
110212
|
metadata,
|
110097
110213
|
fsApiBuilder: null,
|
@@ -110148,7 +110264,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
110148
110264
|
}
|
110149
110265
|
}
|
110150
110266
|
const frontendBuilder = builders.find(
|
110151
|
-
({ use }) => (0,
|
110267
|
+
({ use }) => (0, import__81.isOfficialRuntime)("next", use) || (0, import__81.isOfficialRuntime)("static", use) || (0, import__81.isOfficialRuntime)("static-build", use)
|
110152
110268
|
);
|
110153
110269
|
const config2 = frontendBuilder?.config || {};
|
110154
110270
|
const withTag = tag ? `@${tag}` : "";
|
@@ -118049,14 +118165,26 @@ var require_superstatic = __commonJS2({
|
|
118049
118165
|
}
|
118050
118166
|
return hasItems;
|
118051
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
|
+
}
|
118052
118179
|
function collectHasSegments(has) {
|
118053
118180
|
const hasSegments = /* @__PURE__ */ new Set();
|
118054
118181
|
for (const hasItem of has || []) {
|
118055
118182
|
if (!hasItem.value && "key" in hasItem) {
|
118056
118183
|
hasSegments.add(hasItem.key);
|
118057
118184
|
}
|
118058
|
-
|
118059
|
-
|
118185
|
+
const stringValue = getStringValueForRegex(hasItem.value);
|
118186
|
+
if (stringValue) {
|
118187
|
+
for (const match of stringValue.matchAll(namedGroupsRegex)) {
|
118060
118188
|
if (match[1]) {
|
118061
118189
|
hasSegments.add(match[1]);
|
118062
118190
|
}
|
@@ -118404,6 +118532,101 @@ var require_schemas = __commonJS2({
|
|
118404
118532
|
trailingSlashSchema: () => trailingSlashSchema2
|
118405
118533
|
});
|
118406
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
|
+
};
|
118407
118630
|
var hasSchema = {
|
118408
118631
|
description: "An array of requirements that are needed to match",
|
118409
118632
|
type: "array",
|
@@ -118420,11 +118643,7 @@ var require_schemas = __commonJS2({
|
|
118420
118643
|
type: "string",
|
118421
118644
|
enum: ["host"]
|
118422
118645
|
},
|
118423
|
-
value:
|
118424
|
-
description: "A regular expression used to match the value. Named groups can be used in the destination",
|
118425
|
-
type: "string",
|
118426
|
-
maxLength: 4096
|
118427
|
-
}
|
118646
|
+
value: matchableValueSchema
|
118428
118647
|
}
|
118429
118648
|
},
|
118430
118649
|
{
|
@@ -118442,11 +118661,7 @@ var require_schemas = __commonJS2({
|
|
118442
118661
|
type: "string",
|
118443
118662
|
maxLength: 4096
|
118444
118663
|
},
|
118445
|
-
value:
|
118446
|
-
description: "A regular expression used to match the value. Named groups can be used in the destination",
|
118447
|
-
type: "string",
|
118448
|
-
maxLength: 4096
|
118449
|
-
}
|
118664
|
+
value: matchableValueSchema
|
118450
118665
|
}
|
118451
118666
|
}
|
118452
118667
|
]
|
@@ -118563,7 +118778,8 @@ var require_schemas = __commonJS2({
|
|
118563
118778
|
}
|
118564
118779
|
},
|
118565
118780
|
has: hasSchema,
|
118566
|
-
missing: hasSchema
|
118781
|
+
missing: hasSchema,
|
118782
|
+
mitigate: mitigateSchema
|
118567
118783
|
}
|
118568
118784
|
},
|
118569
118785
|
{
|
@@ -176264,7 +176480,7 @@ async function logout(client2) {
|
|
176264
176480
|
const { authConfig } = client2;
|
176265
176481
|
if (!authConfig.token) {
|
176266
176482
|
output_manager_default.note(
|
176267
|
-
`Not currently logged in, so ${getCommandName("logout
|
176483
|
+
`Not currently logged in, so ${getCommandName("logout")} did nothing`
|
176268
176484
|
);
|
176269
176485
|
return 0;
|
176270
176486
|
}
|
@@ -176328,15 +176544,14 @@ async function logout2(client2) {
|
|
176328
176544
|
printError(error3);
|
176329
176545
|
return 1;
|
176330
176546
|
}
|
176331
|
-
if (parsedArgs.flags["--future"]) {
|
176332
|
-
telemetry2.trackCliFlagFuture("logout");
|
176333
|
-
return await logout(client2);
|
176334
|
-
}
|
176335
176547
|
if (parsedArgs.flags["--help"]) {
|
176336
176548
|
telemetry2.trackCliFlagHelp("logout");
|
176337
176549
|
output_manager_default.print(help2(logoutCommand, { columns: client2.stderr.columns }));
|
176338
176550
|
return 2;
|
176339
176551
|
}
|
176552
|
+
if (authConfig.type === "oauth") {
|
176553
|
+
return await logout(client2);
|
176554
|
+
}
|
176340
176555
|
if (!authConfig.token) {
|
176341
176556
|
output_manager_default.note(
|
176342
176557
|
`Not currently logged in, so ${getCommandName("logout")} did nothing`
|
@@ -177135,10 +177350,10 @@ async function requestRollingRelease({
|
|
177135
177350
|
projectId,
|
177136
177351
|
teamId
|
177137
177352
|
}) {
|
177138
|
-
const { rollingRelease } = await client2.fetch(
|
177353
|
+
const { rollingRelease: rollingRelease2 } = await client2.fetch(
|
177139
177354
|
`/v1/projects/${projectId}/rolling-release?teamId=${teamId}`
|
177140
177355
|
);
|
177141
|
-
return
|
177356
|
+
return rollingRelease2;
|
177142
177357
|
}
|
177143
177358
|
var init_request_rolling_release = __esm({
|
177144
177359
|
"src/commands/rolling-release/request-rolling-release.ts"() {
|
@@ -178596,12 +178811,51 @@ var init_rollback2 = __esm({
|
|
178596
178811
|
// src/commands/rolling-release/start-rolling-release.ts
|
178597
178812
|
async function startRollingRelease({
|
178598
178813
|
client: client2,
|
178599
|
-
|
178814
|
+
dpl,
|
178600
178815
|
projectId,
|
178601
|
-
teamId
|
178816
|
+
teamId,
|
178817
|
+
yes
|
178602
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
|
+
}
|
178603
178857
|
await client2.fetch(
|
178604
|
-
`/v10/projects/${projectId}/promote/${
|
178858
|
+
`/v10/projects/${projectId}/promote/${deployment.id}?teamId=${teamId}`,
|
178605
178859
|
{
|
178606
178860
|
body: {},
|
178607
178861
|
// required
|
@@ -178616,6 +178870,7 @@ var init_start_rolling_release = __esm({
|
|
178616
178870
|
"src/commands/rolling-release/start-rolling-release.ts"() {
|
178617
178871
|
"use strict";
|
178618
178872
|
init_output_manager();
|
178873
|
+
init_get_project_by_deployment();
|
178619
178874
|
}
|
178620
178875
|
});
|
178621
178876
|
|
@@ -178654,8 +178909,12 @@ async function approveRollingRelease({
|
|
178654
178909
|
projectId,
|
178655
178910
|
teamId,
|
178656
178911
|
activeStageIndex,
|
178657
|
-
|
178912
|
+
dpl
|
178658
178913
|
}) {
|
178914
|
+
const { deployment } = await getProjectByDeployment({
|
178915
|
+
client: client2,
|
178916
|
+
deployId: dpl
|
178917
|
+
});
|
178659
178918
|
await client2.fetch(
|
178660
178919
|
`/v1/projects/${projectId}/rolling-release/approve-stage?teamId=${teamId}`,
|
178661
178920
|
{
|
@@ -178664,7 +178923,7 @@ async function approveRollingRelease({
|
|
178664
178923
|
body: {
|
178665
178924
|
activeStageIndex,
|
178666
178925
|
nextStageIndex: activeStageIndex + 1,
|
178667
|
-
canaryDeploymentId:
|
178926
|
+
canaryDeploymentId: deployment.id
|
178668
178927
|
}
|
178669
178928
|
}
|
178670
178929
|
);
|
@@ -178677,6 +178936,7 @@ var init_approve_rolling_release = __esm({
|
|
178677
178936
|
"src/commands/rolling-release/approve-rolling-release.ts"() {
|
178678
178937
|
"use strict";
|
178679
178938
|
init_output_manager();
|
178939
|
+
init_get_project_by_deployment();
|
178680
178940
|
}
|
178681
178941
|
});
|
178682
178942
|
|
@@ -178684,11 +178944,15 @@ var init_approve_rolling_release = __esm({
|
|
178684
178944
|
async function abortRollingRelease({
|
178685
178945
|
client: client2,
|
178686
178946
|
projectId,
|
178687
|
-
|
178947
|
+
dpl,
|
178688
178948
|
teamId
|
178689
178949
|
}) {
|
178950
|
+
const { deployment } = await getProjectByDeployment({
|
178951
|
+
client: client2,
|
178952
|
+
deployId: dpl
|
178953
|
+
});
|
178690
178954
|
await client2.fetch(
|
178691
|
-
`/v9/projects/${projectId}/rollback/${
|
178955
|
+
`/v9/projects/${projectId}/rollback/${deployment.id}?teamId=${teamId}`,
|
178692
178956
|
{
|
178693
178957
|
body: {},
|
178694
178958
|
// required
|
@@ -178702,6 +178966,7 @@ var init_abort_rolling_release = __esm({
|
|
178702
178966
|
"src/commands/rolling-release/abort-rolling-release.ts"() {
|
178703
178967
|
"use strict";
|
178704
178968
|
init_output_manager();
|
178969
|
+
init_get_project_by_deployment();
|
178705
178970
|
}
|
178706
178971
|
});
|
178707
178972
|
|
@@ -178710,12 +178975,16 @@ async function completeRollingRelease({
|
|
178710
178975
|
client: client2,
|
178711
178976
|
projectId,
|
178712
178977
|
teamId,
|
178713
|
-
|
178978
|
+
dpl
|
178714
178979
|
}) {
|
178980
|
+
const { deployment } = await getProjectByDeployment({
|
178981
|
+
client: client2,
|
178982
|
+
deployId: dpl
|
178983
|
+
});
|
178715
178984
|
await client2.fetch(
|
178716
178985
|
`/v1/projects/${projectId}/rolling-release/complete?teamId=${teamId}`,
|
178717
178986
|
{
|
178718
|
-
body: { canaryDeploymentId:
|
178987
|
+
body: { canaryDeploymentId: deployment.id },
|
178719
178988
|
// required
|
178720
178989
|
json: true,
|
178721
178990
|
method: "POST"
|
@@ -178730,6 +178999,7 @@ var init_complete_rolling_release = __esm({
|
|
178730
178999
|
"src/commands/rolling-release/complete-rolling-release.ts"() {
|
178731
179000
|
"use strict";
|
178732
179001
|
init_output_manager();
|
179002
|
+
init_get_project_by_deployment();
|
178733
179003
|
}
|
178734
179004
|
});
|
178735
179005
|
|
@@ -178760,9 +179030,9 @@ var init_rolling_release = __esm({
|
|
178760
179030
|
value: value ?? ""
|
178761
179031
|
});
|
178762
179032
|
}
|
178763
|
-
|
179033
|
+
trackCliOptionDpl(value) {
|
178764
179034
|
this.trackCliOption({
|
178765
|
-
option: "
|
179035
|
+
option: "dpl",
|
178766
179036
|
value: value ?? ""
|
178767
179037
|
});
|
178768
179038
|
}
|
@@ -178772,6 +179042,42 @@ var init_rolling_release = __esm({
|
|
178772
179042
|
value: value ?? ""
|
178773
179043
|
});
|
178774
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
|
+
}
|
178775
179081
|
};
|
178776
179082
|
}
|
178777
179083
|
});
|
@@ -178779,9 +179085,221 @@ var init_rolling_release = __esm({
|
|
178779
179085
|
// src/commands/rolling-release/index.ts
|
178780
179086
|
var rolling_release_exports = {};
|
178781
179087
|
__export3(rolling_release_exports, {
|
178782
|
-
default: () =>
|
179088
|
+
default: () => rollingRelease
|
178783
179089
|
});
|
178784
|
-
|
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;
|
178785
179303
|
var init_rolling_release2 = __esm({
|
178786
179304
|
"src/commands/rolling-release/index.ts"() {
|
178787
179305
|
"use strict";
|
@@ -178797,149 +179315,18 @@ var init_rolling_release2 = __esm({
|
|
178797
179315
|
init_complete_rolling_release();
|
178798
179316
|
init_error2();
|
178799
179317
|
init_output_manager();
|
178800
|
-
init_get_project_by_cwd_or_link();
|
178801
179318
|
init_rolling_release();
|
178802
|
-
|
178803
|
-
|
178804
|
-
|
178805
|
-
|
178806
|
-
|
178807
|
-
|
178808
|
-
|
178809
|
-
|
178810
|
-
|
178811
|
-
)
|
178812
|
-
|
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;
|
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)
|
178943
179330
|
};
|
178944
179331
|
}
|
178945
179332
|
});
|
@@ -179131,12 +179518,12 @@ async function main12(client2) {
|
|
179131
179518
|
telemetry2.trackCliSubcommandList(subcommand);
|
179132
179519
|
return await list5(client2, args2);
|
179133
179520
|
default:
|
179134
|
-
output_manager_default.error(getInvalidSubcommand(
|
179521
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG13));
|
179135
179522
|
output_manager_default.print(help2(targetCommand, { columns: client2.stderr.columns }));
|
179136
179523
|
return 2;
|
179137
179524
|
}
|
179138
179525
|
}
|
179139
|
-
var
|
179526
|
+
var COMMAND_CONFIG13;
|
179140
179527
|
var init_target2 = __esm({
|
179141
179528
|
"src/commands/target/index.ts"() {
|
179142
179529
|
"use strict";
|
@@ -179150,7 +179537,7 @@ var init_target2 = __esm({
|
|
179150
179537
|
init_output_manager();
|
179151
179538
|
init_target();
|
179152
179539
|
init_commands();
|
179153
|
-
|
179540
|
+
COMMAND_CONFIG13 = {
|
179154
179541
|
ls: getCommandAliases(listSubcommand8)
|
179155
179542
|
};
|
179156
179543
|
}
|
@@ -179875,7 +180262,7 @@ async function teams(client2) {
|
|
179875
180262
|
}
|
179876
180263
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
179877
180264
|
parsedArgs.args.slice(1),
|
179878
|
-
|
180265
|
+
COMMAND_CONFIG14
|
179879
180266
|
);
|
179880
180267
|
const needHelp = parsedArgs.flags["--help"];
|
179881
180268
|
if (!subcommand && needHelp) {
|
@@ -179934,7 +180321,7 @@ async function teams(client2) {
|
|
179934
180321
|
}
|
179935
180322
|
}
|
179936
180323
|
}
|
179937
|
-
var
|
180324
|
+
var COMMAND_CONFIG14;
|
179938
180325
|
var init_teams2 = __esm({
|
179939
180326
|
"src/commands/teams/index.ts"() {
|
179940
180327
|
"use strict";
|
@@ -179950,7 +180337,7 @@ var init_teams2 = __esm({
|
|
179950
180337
|
init_teams();
|
179951
180338
|
init_output_manager();
|
179952
180339
|
init_get_subcommand();
|
179953
|
-
|
180340
|
+
COMMAND_CONFIG14 = {
|
179954
180341
|
list: ["ls", "list"],
|
179955
180342
|
switch: ["switch", "change"],
|
179956
180343
|
add: ["create", "add"],
|
@@ -180119,7 +180506,7 @@ async function telemetry(client2) {
|
|
180119
180506
|
}
|
180120
180507
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
180121
180508
|
parsedArguments.args.slice(1),
|
180122
|
-
|
180509
|
+
COMMAND_CONFIG15
|
180123
180510
|
);
|
180124
180511
|
const needHelp = parsedArguments.flags["--help"];
|
180125
180512
|
function printHelp(command) {
|
@@ -180172,7 +180559,7 @@ async function telemetry(client2) {
|
|
180172
180559
|
}
|
180173
180560
|
}
|
180174
180561
|
}
|
180175
|
-
var import_chalk122,
|
180562
|
+
var import_chalk122, COMMAND_CONFIG15;
|
180176
180563
|
var init_telemetry3 = __esm({
|
180177
180564
|
"src/commands/telemetry/index.ts"() {
|
180178
180565
|
"use strict";
|
@@ -180190,7 +180577,7 @@ var init_telemetry3 = __esm({
|
|
180190
180577
|
import_chalk122 = __toESM3(require_source());
|
180191
180578
|
init_output_manager();
|
180192
180579
|
init_commands();
|
180193
|
-
|
180580
|
+
COMMAND_CONFIG15 = {
|
180194
180581
|
status: getCommandAliases(statusSubcommand3),
|
180195
180582
|
enable: getCommandAliases(enableSubcommand),
|
180196
180583
|
disable: getCommandAliases(disableSubcommand),
|
@@ -181315,14 +181702,19 @@ var main13 = async () => {
|
|
181315
181702
|
if ((!authConfig || !authConfig.token) && !client.argv.includes("-h") && !client.argv.includes("--help") && !parsedArgs.flags["--token"] && subcommand && !subcommandsWithoutToken.includes(subcommand)) {
|
181316
181703
|
if (isTTY2) {
|
181317
181704
|
output_manager_default.log(`No existing credentials found. Please log in:`);
|
181318
|
-
|
181319
|
-
|
181320
|
-
|
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;
|
181321
181717
|
}
|
181322
|
-
client.authConfig.token = result.token;
|
181323
|
-
await updateCurrentTeamAfterLogin(client, result.teamId);
|
181324
|
-
writeToAuthConfigFile(client.authConfig);
|
181325
|
-
writeToConfigFile(client.config);
|
181326
181718
|
output_manager_default.debug(`Saved credentials in "${humanizePath(VERCEL_DIR3)}"`);
|
181327
181719
|
} else {
|
181328
181720
|
output_manager_default.prettyError({
|
@@ -181559,6 +181951,8 @@ var main13 = async () => {
|
|
181559
181951
|
telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
|
181560
181952
|
func = (init_rollback2(), __toCommonJS3(rollback_exports)).default;
|
181561
181953
|
break;
|
181954
|
+
case "rr":
|
181955
|
+
case "release":
|
181562
181956
|
case "rolling-release":
|
181563
181957
|
telemetry2.trackCliCommandRollingRelease(userSuppliedSubCommand);
|
181564
181958
|
func = (init_rolling_release2(), __toCommonJS3(rolling_release_exports)).default;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vercel",
|
3
|
-
"version": "
|
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.
|
24
|
+
"@vercel/build-utils": "10.6.1",
|
25
25
|
"@vercel/fun": "1.1.6",
|
26
26
|
"@vercel/go": "3.2.1",
|
27
27
|
"@vercel/hydrogen": "1.2.2",
|
28
|
-
"@vercel/next": "4.
|
29
|
-
"@vercel/node": "5.2.
|
28
|
+
"@vercel/next": "4.9.0",
|
29
|
+
"@vercel/node": "5.2.2",
|
30
30
|
"@vercel/python": "4.7.2",
|
31
31
|
"@vercel/redwood": "2.3.3",
|
32
32
|
"@vercel/remix-builder": "5.4.9",
|
33
33
|
"@vercel/ruby": "2.2.0",
|
34
|
-
"@vercel/static-build": "2.7.
|
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.
|
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.
|
84
|
-
"@vercel/routing-utils": "5.0.
|
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",
|