vercel 56.1.0 → 56.2.1
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/chunks/{add-CAG6USJE.js → add-YIAPBLSF.js} +4 -4
- package/dist/chunks/{add-323XURMF.js → add-ZAQLTF5W.js} +5 -5
- package/dist/chunks/{chunk-SVSO76UB.js → chunk-2I34TRQZ.js} +1 -1
- package/dist/chunks/{chunk-2RVK3DDN.js → chunk-52QYYTM5.js} +4 -0
- package/dist/chunks/{chunk-ZDKEZNOJ.js → chunk-52V5NDUN.js} +1 -1
- package/dist/chunks/{chunk-2LVETUK7.js → chunk-5HNYJHOB.js} +1 -1
- package/dist/chunks/{chunk-HAZVRYHI.js → chunk-6ZVIC6FL.js} +4 -4
- package/dist/chunks/{chunk-6HNQJHQP.js → chunk-75PKWYOS.js} +1 -1
- package/dist/chunks/{chunk-DZGBBY3A.js → chunk-7OJJKCSW.js} +2 -2
- package/dist/chunks/{chunk-Q42RNOJZ.js → chunk-7TJLLZPN.js} +2 -2
- package/dist/chunks/{chunk-X73W5HTJ.js → chunk-DD6D5J7E.js} +7 -8
- package/dist/chunks/{chunk-TLHKETA6.js → chunk-DDEPCAGE.js} +175 -3072
- package/dist/chunks/{chunk-CQEYCOBR.js → chunk-DWU7JOO6.js} +1 -1
- package/dist/chunks/{chunk-GW66OTWH.js → chunk-EPBUWIAO.js} +144 -7
- package/dist/chunks/{chunk-7PZWVZN6.js → chunk-G75NFPIT.js} +1 -1
- package/dist/chunks/{chunk-CWSK7WS2.js → chunk-GPVU6JRS.js} +4 -4
- package/dist/chunks/{chunk-6NECZQWO.js → chunk-HIO4M75R.js} +20 -10
- package/dist/chunks/chunk-IMUF5MGV.js +81 -0
- package/dist/chunks/{chunk-O7ZMPY6L.js → chunk-JF7LPEBD.js} +1 -1
- package/dist/chunks/{chunk-3XCDGACN.js → chunk-KXVQEPTA.js} +1 -1
- package/dist/chunks/{chunk-CZLKIVVT.js → chunk-MYD7N6MH.js} +4 -2
- package/dist/chunks/{chunk-PJ3UJGFX.js → chunk-NULWLKT7.js} +3 -4
- package/dist/chunks/{chunk-4YWIGTZR.js → chunk-PASZMRTZ.js} +5 -65
- package/dist/chunks/{chunk-24FCBXI4.js → chunk-R6IGDGX3.js} +1 -1
- package/dist/chunks/{chunk-VBLL2YSE.js → chunk-UESEGACQ.js} +1 -1
- package/dist/chunks/{chunk-W346YNDN.js → chunk-VOBBH2SB.js} +49 -0
- package/dist/chunks/{chunk-U5MCEDDN.js → chunk-YKJA5TVC.js} +1 -1
- package/dist/chunks/{compile-vercel-config-TIO3FAYI.js → compile-vercel-config-4NKPN3EG.js} +2 -2
- package/dist/chunks/{delete-6TCLBG25.js → delete-NCMDC3IU.js} +3 -3
- package/dist/chunks/{disable-7SOBOP2H.js → disable-Z7DXY4AY.js} +3 -3
- package/dist/chunks/{discard-YGXO5GP5.js → discard-4ILK3ULP.js} +3 -3
- package/dist/chunks/{edit-KL2O6AGH.js → edit-ROJQCTWR.js} +4 -4
- package/dist/chunks/{enable-BJG2XLCD.js → enable-TAVCLAEC.js} +3 -3
- package/dist/chunks/{exec-G4AUF3KG.js → exec-CNBOV577.js} +3 -3
- package/dist/chunks/{export-32T5VGVA.js → export-YTSIGJFX.js} +3 -3
- package/dist/chunks/{image-PXN76ZCH.js → image-LORSHERP.js} +3 -3
- package/dist/chunks/{inspect-EIQBBWPM.js → inspect-5C4UHSCT.js} +4 -4
- package/dist/chunks/{inspect-N2UQFFNL.js → inspect-A2X7RTP4.js} +4 -4
- package/dist/chunks/{inspect-IMS5XUMF.js → inspect-L4UIWOXO.js} +4 -4
- package/dist/chunks/{inspect-TSK2LYUI.js → inspect-OHDU2SVS.js} +4 -4
- package/dist/chunks/{list-OHXBNQJW.js → list-FGVDMSFN.js} +3 -3
- package/dist/chunks/{list-RELZVTWN.js → list-P2B5MHON.js} +4 -4
- package/dist/chunks/{login-JEAMS6RC.js → login-4BK3VGII.js} +6 -6
- package/dist/chunks/{ls-VLBSSAUI.js → ls-NU4D6TLG.js} +4 -4
- package/dist/chunks/{ls-3RMT2VAX.js → ls-RAC5LMTR.js} +5 -5
- package/dist/chunks/{ls-6LX7JBT4.js → ls-WDRFGE2J.js} +4 -4
- package/dist/chunks/{ls-IOR6RY2E.js → ls-YXKRRYTL.js} +4 -4
- package/dist/chunks/{publish-RP7M4QTZ.js → publish-DGF2TQCQ.js} +3 -3
- package/dist/chunks/{query-CZVPJ4DQ.js → query-NWW6RDHK.js} +5 -5
- package/dist/chunks/{reorder-M25MRPFN.js → reorder-TTZBKCEB.js} +3 -3
- package/dist/chunks/{restore-NC5F6U4W.js → restore-DG3LZMHQ.js} +3 -3
- package/dist/chunks/{rm-NFJ4Z7OV.js → rm-2VBE4C2V.js} +5 -5
- package/dist/chunks/{rm-NE33ZYNW.js → rm-7WXXLTXF.js} +4 -4
- package/dist/chunks/{rm-54DKY5WE.js → rm-U2DFRDKE.js} +4 -4
- package/dist/chunks/{rule-inspect-JAULGGMI.js → rule-inspect-4NL3GGDB.js} +5 -5
- package/dist/chunks/{rules-KFLYMN6N.js → rules-DABNOUNG.js} +6 -6
- package/dist/chunks/{schema-D2ECKUMA.js → schema-4RRRUUOO.js} +4 -4
- package/dist/chunks/{tags-22H3MYVI.js → tags-MLX3AHHK.js} +2 -2
- package/dist/chunks/{update-7CBX7VDA.js → update-YXH7WWTN.js} +5 -5
- package/dist/commands/build/index.js +61 -36
- package/dist/commands/deploy/index.js +12 -11
- package/dist/commands/dev/index.js +27 -18
- package/dist/commands/env/index.js +171 -33
- package/dist/commands/link/index.js +13 -12
- package/dist/commands/list/index.js +7 -7
- package/dist/commands-bulk.js +2754 -1540
- package/dist/index.js +17 -18
- package/dist/vc.js +3 -3
- package/dist/version.mjs +1 -1
- package/package.json +20 -21
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
ellipsis,
|
|
10
10
|
getCustomEnvironments,
|
|
11
11
|
readStandardInput,
|
|
12
|
-
require_dist as require_dist3
|
|
13
|
-
|
|
12
|
+
require_dist as require_dist3,
|
|
13
|
+
resolveProjectContext
|
|
14
|
+
} from "../../chunks/chunk-VOBBH2SB.js";
|
|
14
15
|
import {
|
|
15
16
|
getInvalidSubcommand
|
|
16
17
|
} from "../../chunks/chunk-VGIMO3ZK.js";
|
|
@@ -23,7 +24,7 @@ import {
|
|
|
23
24
|
import {
|
|
24
25
|
formatEnvironment,
|
|
25
26
|
validateLsArgs
|
|
26
|
-
} from "../../chunks/chunk-
|
|
27
|
+
} from "../../chunks/chunk-2I34TRQZ.js";
|
|
27
28
|
import {
|
|
28
29
|
validateJsonOutput
|
|
29
30
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -32,7 +33,7 @@ import {
|
|
|
32
33
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
33
34
|
import {
|
|
34
35
|
getCommandAliases
|
|
35
|
-
} from "../../chunks/chunk-
|
|
36
|
+
} from "../../chunks/chunk-EPBUWIAO.js";
|
|
36
37
|
import "../../chunks/chunk-5OT26JZN.js";
|
|
37
38
|
import "../../chunks/chunk-7C7MMT4J.js";
|
|
38
39
|
import "../../chunks/chunk-RLJA2KI7.js";
|
|
@@ -45,7 +46,7 @@ import "../../chunks/chunk-IDMKFYEA.js";
|
|
|
45
46
|
import "../../chunks/chunk-HA7C7SDO.js";
|
|
46
47
|
import {
|
|
47
48
|
require_execa
|
|
48
|
-
} from "../../chunks/chunk-
|
|
49
|
+
} from "../../chunks/chunk-R6IGDGX3.js";
|
|
49
50
|
import {
|
|
50
51
|
autoInstallVercelPlugin
|
|
51
52
|
} from "../../chunks/chunk-NJUPUGOE.js";
|
|
@@ -53,11 +54,14 @@ import {
|
|
|
53
54
|
stamp_default
|
|
54
55
|
} from "../../chunks/chunk-64IF634X.js";
|
|
55
56
|
import "../../chunks/chunk-VXYGCOKL.js";
|
|
56
|
-
import "../../chunks/chunk-
|
|
57
|
+
import "../../chunks/chunk-IMUF5MGV.js";
|
|
58
|
+
import "../../chunks/chunk-IC4YEIGW.js";
|
|
59
|
+
import "../../chunks/chunk-YKJA5TVC.js";
|
|
57
60
|
import {
|
|
58
61
|
help
|
|
59
62
|
} from "../../chunks/chunk-QY63UKTP.js";
|
|
60
63
|
import "../../chunks/chunk-QEEGXNFK.js";
|
|
64
|
+
import "../../chunks/chunk-DWU7JOO6.js";
|
|
61
65
|
import {
|
|
62
66
|
STANDARD_ENVIRONMENTS,
|
|
63
67
|
addSubcommand,
|
|
@@ -68,8 +72,10 @@ import {
|
|
|
68
72
|
getEnvTargetPlaceholder,
|
|
69
73
|
getLinkedProject,
|
|
70
74
|
getTeamById,
|
|
75
|
+
isValidEnvTarget,
|
|
71
76
|
listSubcommand,
|
|
72
77
|
param,
|
|
78
|
+
parseEnvTargetArg,
|
|
73
79
|
parseTarget,
|
|
74
80
|
printAlignedLabel,
|
|
75
81
|
pull,
|
|
@@ -79,7 +85,7 @@ import {
|
|
|
79
85
|
require_frameworks,
|
|
80
86
|
runSubcommand,
|
|
81
87
|
updateSubcommand
|
|
82
|
-
} from "../../chunks/chunk-
|
|
88
|
+
} from "../../chunks/chunk-DDEPCAGE.js";
|
|
83
89
|
import {
|
|
84
90
|
buildCommandWithYes,
|
|
85
91
|
buildEnvAddCommandWithPreservedArgs,
|
|
@@ -107,7 +113,7 @@ import {
|
|
|
107
113
|
require_lib
|
|
108
114
|
} from "../../chunks/chunk-P6AK7SVK.js";
|
|
109
115
|
import "../../chunks/chunk-P4QNYOFB.js";
|
|
110
|
-
import "../../chunks/chunk-
|
|
116
|
+
import "../../chunks/chunk-52QYYTM5.js";
|
|
111
117
|
import {
|
|
112
118
|
emoji,
|
|
113
119
|
output_manager_default,
|
|
@@ -379,11 +385,10 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
|
|
|
379
385
|
}
|
|
380
386
|
trackCliArgumentEnvironment(environment) {
|
|
381
387
|
if (environment) {
|
|
388
|
+
const allStandard = environment.split(",").map((t) => t.trim()).every((t) => STANDARD_ENVIRONMENTS.includes(t));
|
|
382
389
|
this.trackCliArgument({
|
|
383
390
|
arg: "environment",
|
|
384
|
-
value:
|
|
385
|
-
environment
|
|
386
|
-
) ? environment : this.redactedValue
|
|
391
|
+
value: allStandard ? environment : this.redactedValue
|
|
387
392
|
});
|
|
388
393
|
}
|
|
389
394
|
}
|
|
@@ -449,9 +454,9 @@ function getTargetCompatibilityError(envTargets, isSensitive, policyOn) {
|
|
|
449
454
|
const hasDevelopment = envTargets.includes("development");
|
|
450
455
|
const hasSensitiveCapable = envTargets.some((t) => t !== "development");
|
|
451
456
|
if (isSensitive && hasDevelopment) {
|
|
452
|
-
return `Sensitive Environment Variables are not supported on the Development Environment.
|
|
457
|
+
return `Sensitive Environment Variables are not supported on the Development Environment. Add --no-sensitive to store a non-sensitive value for all selected Environments, or run ${getCommandName(
|
|
453
458
|
"env add"
|
|
454
|
-
)} separately for Development
|
|
459
|
+
)} separately for Development.`;
|
|
455
460
|
}
|
|
456
461
|
if (!isSensitive && policyOn && hasSensitiveCapable) {
|
|
457
462
|
return `Your team requires sensitive Environment Variables for Production and Preview. To add a non-sensitive value, target the Development Environment only. Run ${getCommandName(
|
|
@@ -490,6 +495,16 @@ function redactEnvValueArgs(argv) {
|
|
|
490
495
|
}
|
|
491
496
|
return redacted;
|
|
492
497
|
}
|
|
498
|
+
function multiTargetSuggestion(argv, envName, targets, addNoSensitive) {
|
|
499
|
+
const flag = addNoSensitive ? " --no-sensitive" : "";
|
|
500
|
+
return {
|
|
501
|
+
command: buildEnvAddCommandWithPreservedArgs(
|
|
502
|
+
argv,
|
|
503
|
+
`env add ${envName} ${targets.join(",")} --value "<value>"${flag} --yes`
|
|
504
|
+
),
|
|
505
|
+
when: addNoSensitive ? "Add one non-sensitive variable to all listed environments" : "Add one variable to multiple environments"
|
|
506
|
+
};
|
|
507
|
+
}
|
|
493
508
|
function projectLabel(link) {
|
|
494
509
|
return `${link.org.slug}/${link.project.name}`;
|
|
495
510
|
}
|
|
@@ -590,10 +605,7 @@ async function add(client, argv) {
|
|
|
590
605
|
);
|
|
591
606
|
return 1;
|
|
592
607
|
}
|
|
593
|
-
let envTargets = [];
|
|
594
|
-
if (envTargetArg) {
|
|
595
|
-
envTargets.push(envTargetArg);
|
|
596
|
-
}
|
|
608
|
+
let envTargets = envTargetArg ? parseEnvTargetArg(envTargetArg) : [];
|
|
597
609
|
if (client.nonInteractive) {
|
|
598
610
|
const link2 = await getLinkedProject(client);
|
|
599
611
|
if (link2.status === "error") {
|
|
@@ -702,7 +714,7 @@ async function add(client, argv) {
|
|
|
702
714
|
if (m === "missing_value")
|
|
703
715
|
return "--value or stdin";
|
|
704
716
|
if (m === "missing_environment")
|
|
705
|
-
return "environment (production, preview, or
|
|
717
|
+
return "environment (production, preview, development, or a comma-separated list)";
|
|
706
718
|
if (m === "git_branch_required")
|
|
707
719
|
return "third argument <gitbranch> for Preview, or omit for all Preview branches";
|
|
708
720
|
return m;
|
|
@@ -749,6 +761,20 @@ async function add(client, argv) {
|
|
|
749
761
|
}
|
|
750
762
|
);
|
|
751
763
|
}
|
|
764
|
+
if (missing.includes("missing_environment")) {
|
|
765
|
+
const standardAvailable = choices2.map((c) => c.value).filter((v) => isValidEnvTarget(v));
|
|
766
|
+
const multiTargets = opts["--sensitive"] ? standardAvailable.filter((t) => t !== "development") : standardAvailable;
|
|
767
|
+
if (multiTargets.length > 1) {
|
|
768
|
+
next.push(
|
|
769
|
+
multiTargetSuggestion(
|
|
770
|
+
client.argv,
|
|
771
|
+
envName || "<name>",
|
|
772
|
+
multiTargets,
|
|
773
|
+
multiTargets.includes("development") && !opts["--no-sensitive"]
|
|
774
|
+
)
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
752
778
|
outputActionRequired(
|
|
753
779
|
client,
|
|
754
780
|
{
|
|
@@ -910,6 +936,57 @@ async function add(client, argv) {
|
|
|
910
936
|
getEnvRecords(client, project.id, "vercel-cli:env:add"),
|
|
911
937
|
getCustomEnvironments(client, project.id)
|
|
912
938
|
]);
|
|
939
|
+
if (envTargets.length > 0) {
|
|
940
|
+
const resolved = [];
|
|
941
|
+
const invalid = [];
|
|
942
|
+
for (const target of envTargets) {
|
|
943
|
+
if (isValidEnvTarget(target)) {
|
|
944
|
+
resolved.push(target);
|
|
945
|
+
continue;
|
|
946
|
+
}
|
|
947
|
+
const custom = customEnvironments.find(
|
|
948
|
+
(c) => c.id === target || c.slug === target
|
|
949
|
+
);
|
|
950
|
+
if (custom) {
|
|
951
|
+
resolved.push(custom.id);
|
|
952
|
+
} else {
|
|
953
|
+
invalid.push(target);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
if (invalid.length > 0) {
|
|
957
|
+
const valid = [
|
|
958
|
+
...envTargetChoices.map((c) => c.value),
|
|
959
|
+
...customEnvironments.map((c) => c.slug)
|
|
960
|
+
];
|
|
961
|
+
const message = `Invalid environment: ${invalid.join(
|
|
962
|
+
", "
|
|
963
|
+
)}. Valid environments: ${valid.join(
|
|
964
|
+
", "
|
|
965
|
+
)}. Separate multiple environments with commas.`;
|
|
966
|
+
if (client.nonInteractive) {
|
|
967
|
+
outputAgentError(
|
|
968
|
+
client,
|
|
969
|
+
{ status: "error", reason: "invalid_environment", message },
|
|
970
|
+
1
|
|
971
|
+
);
|
|
972
|
+
}
|
|
973
|
+
output_manager_default.error(message);
|
|
974
|
+
return 1;
|
|
975
|
+
}
|
|
976
|
+
envTargets = resolved;
|
|
977
|
+
}
|
|
978
|
+
if (envGitBranch && envTargets.length > 1) {
|
|
979
|
+
const message = "A Git branch can only be set when Preview is the only selected environment.";
|
|
980
|
+
if (client.nonInteractive) {
|
|
981
|
+
outputAgentError(
|
|
982
|
+
client,
|
|
983
|
+
{ status: "error", reason: "branch_requires_preview_only", message },
|
|
984
|
+
1
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
output_manager_default.error(message);
|
|
988
|
+
return 1;
|
|
989
|
+
}
|
|
913
990
|
const matchingEnvs = envs.filter((r) => r.key === envName);
|
|
914
991
|
const existingTargets = /* @__PURE__ */ new Set();
|
|
915
992
|
const existingCustomEnvs = /* @__PURE__ */ new Set();
|
|
@@ -991,12 +1068,24 @@ async function add(client, argv) {
|
|
|
991
1068
|
if (forceSensitive && envTargets.includes("development")) {
|
|
992
1069
|
const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
|
|
993
1070
|
if (client.nonInteractive) {
|
|
1071
|
+
const nonDev = envTargets.filter((t) => t !== "development");
|
|
994
1072
|
outputAgentError(
|
|
995
1073
|
client,
|
|
996
1074
|
{
|
|
997
1075
|
status: "error",
|
|
998
1076
|
reason: "sensitive_not_allowed_on_development",
|
|
999
|
-
message: msg
|
|
1077
|
+
message: msg,
|
|
1078
|
+
...nonDev.length > 0 ? {
|
|
1079
|
+
next: [
|
|
1080
|
+
{
|
|
1081
|
+
command: buildEnvAddCommandWithPreservedArgs(
|
|
1082
|
+
client.argv,
|
|
1083
|
+
`env add ${envName} ${nonDev.join(",")} --value "<value>" --yes`
|
|
1084
|
+
),
|
|
1085
|
+
when: "Keep sensitive and skip Development"
|
|
1086
|
+
}
|
|
1087
|
+
]
|
|
1088
|
+
} : {}
|
|
1000
1089
|
},
|
|
1001
1090
|
1
|
|
1002
1091
|
);
|
|
@@ -1012,12 +1101,39 @@ async function add(client, argv) {
|
|
|
1012
1101
|
);
|
|
1013
1102
|
if (compatibilityError) {
|
|
1014
1103
|
if (client.nonInteractive) {
|
|
1104
|
+
const next = [];
|
|
1105
|
+
if (isSensitive) {
|
|
1106
|
+
if (!policyOn) {
|
|
1107
|
+
next.push(
|
|
1108
|
+
multiTargetSuggestion(client.argv, envName, envTargets, true)
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
const nonDev = envTargets.filter((t) => t !== "development");
|
|
1112
|
+
if (nonDev.length > 0) {
|
|
1113
|
+
next.push({
|
|
1114
|
+
command: buildEnvAddCommandWithPreservedArgs(
|
|
1115
|
+
client.argv,
|
|
1116
|
+
`env add ${envName} ${nonDev.join(",")} --value "<value>" --yes`
|
|
1117
|
+
),
|
|
1118
|
+
when: "Keep sensitive and skip Development"
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
} else {
|
|
1122
|
+
next.push({
|
|
1123
|
+
command: buildEnvAddCommandWithPreservedArgs(
|
|
1124
|
+
client.argv,
|
|
1125
|
+
`env add ${envName} development --value "<value>" --yes`
|
|
1126
|
+
),
|
|
1127
|
+
when: "Add as non-sensitive to Development only"
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1015
1130
|
outputAgentError(
|
|
1016
1131
|
client,
|
|
1017
1132
|
{
|
|
1018
1133
|
status: "error",
|
|
1019
1134
|
reason: isSensitive ? "sensitive_not_allowed_on_development" : "non_sensitive_not_allowed_on_production_preview",
|
|
1020
|
-
message: compatibilityError
|
|
1135
|
+
message: compatibilityError,
|
|
1136
|
+
...next.length > 0 ? { next } : {}
|
|
1021
1137
|
},
|
|
1022
1138
|
1
|
|
1023
1139
|
);
|
|
@@ -1083,23 +1199,39 @@ async function add(client, argv) {
|
|
|
1083
1199
|
});
|
|
1084
1200
|
while (envTargets.length === 0) {
|
|
1085
1201
|
if (client.nonInteractive && envChoices.length > 0) {
|
|
1202
|
+
const standardAvailable = choices.map((c) => c.value).filter((v) => isValidEnvTarget(v));
|
|
1203
|
+
const multiTargets = policyOn || forceSensitive ? standardAvailable.filter((t) => t !== "development") : standardAvailable;
|
|
1204
|
+
const next = [];
|
|
1205
|
+
if (multiTargets.length > 1) {
|
|
1206
|
+
next.push(
|
|
1207
|
+
multiTargetSuggestion(
|
|
1208
|
+
client.argv,
|
|
1209
|
+
envName,
|
|
1210
|
+
multiTargets,
|
|
1211
|
+
multiTargets.includes("development") && !forceEncrypted
|
|
1212
|
+
)
|
|
1213
|
+
);
|
|
1214
|
+
}
|
|
1215
|
+
next.push(
|
|
1216
|
+
...envChoices.slice(0, 5).map((c) => ({
|
|
1217
|
+
command: buildEnvAddCommandWithPreservedArgs(
|
|
1218
|
+
client.argv,
|
|
1219
|
+
`env add ${envName} ${c.value} --value "<value>" --yes`
|
|
1220
|
+
)
|
|
1221
|
+
}))
|
|
1222
|
+
);
|
|
1086
1223
|
outputActionRequired(client, {
|
|
1087
1224
|
status: "action_required",
|
|
1088
1225
|
reason: "missing_environment",
|
|
1089
|
-
message: `Specify
|
|
1226
|
+
message: `Specify one or more environments (comma-separated). Add as argument or use: ${buildEnvAddCommandWithPreservedArgs(
|
|
1090
1227
|
client.argv,
|
|
1091
|
-
`env add ${envName} <environment> --value "<value>" --yes`
|
|
1228
|
+
`env add ${envName} <environment>[,<environment>] --value "<value>" --yes`
|
|
1092
1229
|
)}`,
|
|
1093
1230
|
choices: envChoices.map((c) => ({
|
|
1094
1231
|
id: c.value,
|
|
1095
1232
|
name: typeof c.name === "string" ? c.name : c.value
|
|
1096
1233
|
})),
|
|
1097
|
-
next
|
|
1098
|
-
command: buildEnvAddCommandWithPreservedArgs(
|
|
1099
|
-
client.argv,
|
|
1100
|
-
`env add ${envName} ${c.value} --value "<value>" --yes`
|
|
1101
|
-
)
|
|
1102
|
-
}))
|
|
1234
|
+
next
|
|
1103
1235
|
});
|
|
1104
1236
|
}
|
|
1105
1237
|
envTargets = await client.input.checkbox({
|
|
@@ -1305,12 +1437,18 @@ async function ls(client, argv) {
|
|
|
1305
1437
|
telemetryClient.trackCliArgumentGitBranch(envGitBranch);
|
|
1306
1438
|
telemetryClient.trackCliFlagGuidance(flags["--guidance"]);
|
|
1307
1439
|
telemetryClient.trackCliOptionFormat(flags["--format"]);
|
|
1308
|
-
const
|
|
1440
|
+
const projectName = flags["--project"];
|
|
1441
|
+
telemetryClient.trackCliOptionProject(projectName);
|
|
1442
|
+
const link = await resolveProjectContext({
|
|
1443
|
+
client,
|
|
1444
|
+
projectNameOrId: projectName,
|
|
1445
|
+
commandName: "env ls"
|
|
1446
|
+
});
|
|
1309
1447
|
if (link.status === "error") {
|
|
1310
1448
|
return link.exitCode;
|
|
1311
1449
|
} else if (link.status === "not_linked") {
|
|
1312
1450
|
output_manager_default.error(
|
|
1313
|
-
`Your codebase isn\u2019t linked to a project on Vercel. ${client.nonInteractive ? `
|
|
1451
|
+
`Your codebase isn\u2019t linked to a project on Vercel. Pass --project <name>, or ${client.nonInteractive ? `run ${getCommandName("link --yes --team <team-id> --project <project-id>")} to link non-interactively.` : `run ${getCommandName("link")} to begin.`}`
|
|
1314
1452
|
);
|
|
1315
1453
|
return 1;
|
|
1316
1454
|
}
|
|
@@ -1356,11 +1494,11 @@ async function ls(client, argv) {
|
|
|
1356
1494
|
if (!asJson) {
|
|
1357
1495
|
const { isAgent } = await determineAgent2();
|
|
1358
1496
|
const guidanceMode = parsedArgs.flags["--guidance"] ?? isAgent;
|
|
1359
|
-
if (guidanceMode) {
|
|
1497
|
+
if (guidanceMode && !projectName) {
|
|
1360
1498
|
suggestNextCommands([
|
|
1361
|
-
getCommandName(
|
|
1499
|
+
getCommandName("env add"),
|
|
1362
1500
|
getCommandName("env rm"),
|
|
1363
|
-
getCommandName(
|
|
1501
|
+
getCommandName("env pull")
|
|
1364
1502
|
]);
|
|
1365
1503
|
}
|
|
1366
1504
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
addSubcommand7 as addSubcommand,
|
|
12
12
|
getCommandAliases,
|
|
13
13
|
linkCommand
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-EPBUWIAO.js";
|
|
15
15
|
import "../../chunks/chunk-5OT26JZN.js";
|
|
16
16
|
import "../../chunks/chunk-7C7MMT4J.js";
|
|
17
17
|
import "../../chunks/chunk-RLJA2KI7.js";
|
|
@@ -24,27 +24,28 @@ import "../../chunks/chunk-IDMKFYEA.js";
|
|
|
24
24
|
import "../../chunks/chunk-HA7C7SDO.js";
|
|
25
25
|
import {
|
|
26
26
|
ensureLink
|
|
27
|
-
} from "../../chunks/chunk-
|
|
28
|
-
import "../../chunks/chunk-
|
|
29
|
-
import "../../chunks/chunk-IC4YEIGW.js";
|
|
27
|
+
} from "../../chunks/chunk-HIO4M75R.js";
|
|
28
|
+
import "../../chunks/chunk-PASZMRTZ.js";
|
|
30
29
|
import {
|
|
31
30
|
isPromptCanceledError
|
|
32
|
-
} from "../../chunks/chunk-
|
|
33
|
-
import "../../chunks/chunk-
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
getScope
|
|
37
|
-
} from "../../chunks/chunk-CQEYCOBR.js";
|
|
31
|
+
} from "../../chunks/chunk-UESEGACQ.js";
|
|
32
|
+
import "../../chunks/chunk-IMUF5MGV.js";
|
|
33
|
+
import "../../chunks/chunk-IC4YEIGW.js";
|
|
34
|
+
import "../../chunks/chunk-YKJA5TVC.js";
|
|
38
35
|
import {
|
|
39
36
|
help
|
|
40
37
|
} from "../../chunks/chunk-QY63UKTP.js";
|
|
41
38
|
import "../../chunks/chunk-QEEGXNFK.js";
|
|
39
|
+
import {
|
|
40
|
+
detectExplicitScope,
|
|
41
|
+
getScope
|
|
42
|
+
} from "../../chunks/chunk-DWU7JOO6.js";
|
|
42
43
|
import {
|
|
43
44
|
addRepoLink,
|
|
44
45
|
ensureRepoLink,
|
|
45
46
|
pull,
|
|
46
47
|
resolveProjectCwd
|
|
47
|
-
} from "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-DDEPCAGE.js";
|
|
48
49
|
import "../../chunks/chunk-CB3I3QIT.js";
|
|
49
50
|
import {
|
|
50
51
|
TelemetryClient
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
cmd
|
|
59
60
|
} from "../../chunks/chunk-P6AK7SVK.js";
|
|
60
61
|
import "../../chunks/chunk-P4QNYOFB.js";
|
|
61
|
-
import "../../chunks/chunk-
|
|
62
|
+
import "../../chunks/chunk-52QYYTM5.js";
|
|
62
63
|
import {
|
|
63
64
|
output_manager_default
|
|
64
65
|
} from "../../chunks/chunk-OX7KI3LF.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
formatEnvironment,
|
|
23
23
|
validateLsArgs
|
|
24
|
-
} from "../../chunks/chunk-
|
|
24
|
+
} from "../../chunks/chunk-2I34TRQZ.js";
|
|
25
25
|
import {
|
|
26
26
|
validateJsonOutput
|
|
27
27
|
} from "../../chunks/chunk-XPKWKPWA.js";
|
|
@@ -31,21 +31,21 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
elapsed
|
|
33
33
|
} from "../../chunks/chunk-VXYGCOKL.js";
|
|
34
|
-
import {
|
|
35
|
-
getScope
|
|
36
|
-
} from "../../chunks/chunk-CQEYCOBR.js";
|
|
37
34
|
import {
|
|
38
35
|
help
|
|
39
36
|
} from "../../chunks/chunk-QY63UKTP.js";
|
|
40
37
|
import {
|
|
41
38
|
table
|
|
42
39
|
} from "../../chunks/chunk-QEEGXNFK.js";
|
|
40
|
+
import {
|
|
41
|
+
getScope
|
|
42
|
+
} from "../../chunks/chunk-DWU7JOO6.js";
|
|
43
43
|
import {
|
|
44
44
|
formatProject,
|
|
45
45
|
getLinkedProject,
|
|
46
46
|
getProjectByNameOrId,
|
|
47
47
|
parseTarget
|
|
48
|
-
} from "../../chunks/chunk-
|
|
48
|
+
} from "../../chunks/chunk-DDEPCAGE.js";
|
|
49
49
|
import {
|
|
50
50
|
exitWithNonInteractiveError
|
|
51
51
|
} from "../../chunks/chunk-CB3I3QIT.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
require_lib
|
|
64
64
|
} from "../../chunks/chunk-P6AK7SVK.js";
|
|
65
65
|
import "../../chunks/chunk-P4QNYOFB.js";
|
|
66
|
-
import "../../chunks/chunk-
|
|
66
|
+
import "../../chunks/chunk-52QYYTM5.js";
|
|
67
67
|
import {
|
|
68
68
|
output_manager_default,
|
|
69
69
|
require_dist
|
|
@@ -330,7 +330,7 @@ async function list(client) {
|
|
|
330
330
|
} else if (allFlag) {
|
|
331
331
|
showAllProjects = true;
|
|
332
332
|
} else {
|
|
333
|
-
const link = await getLinkedProject(client, client.cwd);
|
|
333
|
+
const link = await getLinkedProject(client, { cwd: client.cwd });
|
|
334
334
|
if (link.status === "error") {
|
|
335
335
|
return link.exitCode;
|
|
336
336
|
}
|