vercel 56.0.0 → 56.2.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 (64) hide show
  1. package/dist/chunks/{add-YN76XNHI.js → add-T6ZTAEU2.js} +4 -4
  2. package/dist/chunks/{add-MD247HM7.js → add-YQRDKWJH.js} +3 -3
  3. package/dist/chunks/{chunk-DO3V6PZD.js → chunk-AEENIITE.js} +4 -4
  4. package/dist/chunks/{chunk-NZ73KKYG.js → chunk-AVLGVZJ5.js} +2 -2
  5. package/dist/chunks/{chunk-36OUS2KE.js → chunk-B6SCQUDV.js} +1 -1
  6. package/dist/chunks/{chunk-KSJ4FNUG.js → chunk-E3Y4SDXF.js} +1 -1
  7. package/dist/chunks/{chunk-C6E2RJS7.js → chunk-EI555LUJ.js} +1 -1
  8. package/dist/chunks/{chunk-2BZVY6SF.js → chunk-EKIKD7RS.js} +4 -4
  9. package/dist/chunks/{chunk-JHZG2MPW.js → chunk-HMMPJ3VD.js} +2 -2
  10. package/dist/chunks/{chunk-75HDPY6N.js → chunk-HR6VI6UV.js} +2 -2
  11. package/dist/chunks/{chunk-3JOLICSO.js → chunk-K2THP63Z.js} +1 -1
  12. package/dist/chunks/{chunk-VPDJOK2C.js → chunk-LSPZHWWP.js} +1 -1
  13. package/dist/chunks/{chunk-VSD5BID5.js → chunk-LXF3AXHM.js} +1 -1
  14. package/dist/chunks/{chunk-ORKY33ZK.js → chunk-NQEAHRBI.js} +4 -4
  15. package/dist/chunks/{chunk-MBH4DFF7.js → chunk-PN2GJKM5.js} +1 -1
  16. package/dist/chunks/{chunk-T7EIXPC5.js → chunk-PQK4YU22.js} +1 -1
  17. package/dist/chunks/{chunk-TNDFVAZV.js → chunk-RLXBXRU2.js} +2 -2
  18. package/dist/chunks/{chunk-FN36GZDS.js → chunk-SHT5IY3Q.js} +3 -1
  19. package/dist/chunks/{chunk-N4VWB5RV.js → chunk-SRJTYE5U.js} +1 -1
  20. package/dist/chunks/{chunk-ZHDXN5V3.js → chunk-WOA4Z45Z.js} +2 -2
  21. package/dist/chunks/{chunk-KODCUW77.js → chunk-XFMTSTYT.js} +7 -4
  22. package/dist/chunks/{chunk-THMFJODG.js → chunk-YGSTSVXS.js} +24 -2
  23. package/dist/chunks/{compile-vercel-config-65QWHKPO.js → compile-vercel-config-3AG4VKHZ.js} +1 -1
  24. package/dist/chunks/{delete-NPEJGNTV.js → delete-JLJ753B4.js} +2 -2
  25. package/dist/chunks/{disable-RH3MH7PH.js → disable-AXFGDOYN.js} +2 -2
  26. package/dist/chunks/{discard-IJBFO24S.js → discard-557SDKVO.js} +2 -2
  27. package/dist/chunks/{edit-GMLOKGHO.js → edit-ITGNF7S5.js} +3 -3
  28. package/dist/chunks/{enable-QCTL7ISO.js → enable-6RMJPNW5.js} +2 -2
  29. package/dist/chunks/{export-6ERWU54A.js → export-3NC3DPRR.js} +2 -2
  30. package/dist/chunks/{image-XUMTOUQS.js → image-FGP5UVA5.js} +3 -3
  31. package/dist/chunks/{inspect-OKOUOOWW.js → inspect-56OMR6RC.js} +3 -3
  32. package/dist/chunks/{inspect-7UPFOAJO.js → inspect-AF5J3QDV.js} +3 -3
  33. package/dist/chunks/{inspect-ZS4U24NA.js → inspect-FDF5WZMM.js} +3 -3
  34. package/dist/chunks/{inspect-F6LEST4Y.js → inspect-N5DHCKLZ.js} +3 -3
  35. package/dist/chunks/{list-BTMO3CXU.js → list-F2AW7L3D.js} +3 -3
  36. package/dist/chunks/{list-ZK7Q3UHB.js → list-PLG2ZHBA.js} +2 -2
  37. package/dist/chunks/{login-POFRYQZ6.js → login-LQRR64K7.js} +3 -3
  38. package/dist/chunks/{ls-D5Z4IWMU.js → ls-E7FYH3DW.js} +4 -4
  39. package/dist/chunks/{ls-JGNNPYUA.js → ls-EKNQN3V4.js} +3 -3
  40. package/dist/chunks/{ls-EXRMNZUT.js → ls-FWPYY7GH.js} +3 -3
  41. package/dist/chunks/{ls-Z2TCQW5W.js → ls-HZDBJLMG.js} +3 -3
  42. package/dist/chunks/{publish-ED2XVYSE.js → publish-PDGTM3M7.js} +2 -2
  43. package/dist/chunks/{query-6XMBJTPX.js → query-MUQKKYXI.js} +2 -2
  44. package/dist/chunks/{reorder-7B6HZCOZ.js → reorder-B76HXU6D.js} +2 -2
  45. package/dist/chunks/{restore-47ZDRYQT.js → restore-2PYXS4NP.js} +2 -2
  46. package/dist/chunks/{rm-4IY6QGHF.js → rm-GZW2IDWX.js} +3 -3
  47. package/dist/chunks/{rm-AA7WYBZ5.js → rm-SD3EJRXY.js} +3 -3
  48. package/dist/chunks/{rm-NGTPTPZK.js → rm-SFC67P5U.js} +4 -4
  49. package/dist/chunks/{rule-inspect-FNX6P4LZ.js → rule-inspect-MSPP3V4O.js} +4 -4
  50. package/dist/chunks/{rules-MMCCBGQJ.js → rules-AN32QRP7.js} +6 -6
  51. package/dist/chunks/{schema-JSK7S7HL.js → schema-2GYFHMCN.js} +2 -2
  52. package/dist/chunks/{tags-KNCSBTIH.js → tags-ULDC3YLP.js} +2 -2
  53. package/dist/chunks/{update-JEFLJ3TH.js → update-NE62WKTZ.js} +4 -4
  54. package/dist/commands/build/index.js +41 -26
  55. package/dist/commands/deploy/index.js +10 -10
  56. package/dist/commands/dev/index.js +8 -8
  57. package/dist/commands/env/index.js +152 -24
  58. package/dist/commands/link/index.js +7 -7
  59. package/dist/commands/list/index.js +3 -3
  60. package/dist/commands-bulk.js +415 -43
  61. package/dist/index.js +8 -8
  62. package/dist/vc.js +51 -0
  63. package/dist/version.mjs +1 -1
  64. package/package.json +15 -15
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  formatEnvironment,
25
25
  validateLsArgs
26
- } from "../../chunks/chunk-36OUS2KE.js";
26
+ } from "../../chunks/chunk-B6SCQUDV.js";
27
27
  import {
28
28
  validateJsonOutput
29
29
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "../../chunks/chunk-YPQSDAEW.js";
33
33
  import {
34
34
  getCommandAliases
35
- } from "../../chunks/chunk-NZ73KKYG.js";
35
+ } from "../../chunks/chunk-AVLGVZJ5.js";
36
36
  import "../../chunks/chunk-5OT26JZN.js";
37
37
  import "../../chunks/chunk-7C7MMT4J.js";
38
38
  import "../../chunks/chunk-RLJA2KI7.js";
@@ -53,7 +53,7 @@ import {
53
53
  stamp_default
54
54
  } from "../../chunks/chunk-64IF634X.js";
55
55
  import "../../chunks/chunk-VXYGCOKL.js";
56
- import "../../chunks/chunk-3JOLICSO.js";
56
+ import "../../chunks/chunk-K2THP63Z.js";
57
57
  import {
58
58
  help
59
59
  } from "../../chunks/chunk-QY63UKTP.js";
@@ -68,8 +68,10 @@ import {
68
68
  getEnvTargetPlaceholder,
69
69
  getLinkedProject,
70
70
  getTeamById,
71
+ isValidEnvTarget,
71
72
  listSubcommand,
72
73
  param,
74
+ parseEnvTargetArg,
73
75
  parseTarget,
74
76
  printAlignedLabel,
75
77
  pull,
@@ -79,7 +81,7 @@ import {
79
81
  require_frameworks,
80
82
  runSubcommand,
81
83
  updateSubcommand
82
- } from "../../chunks/chunk-THMFJODG.js";
84
+ } from "../../chunks/chunk-YGSTSVXS.js";
83
85
  import {
84
86
  buildCommandWithYes,
85
87
  buildEnvAddCommandWithPreservedArgs,
@@ -379,11 +381,10 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
379
381
  }
380
382
  trackCliArgumentEnvironment(environment) {
381
383
  if (environment) {
384
+ const allStandard = environment.split(",").map((t) => t.trim()).every((t) => STANDARD_ENVIRONMENTS.includes(t));
382
385
  this.trackCliArgument({
383
386
  arg: "environment",
384
- value: STANDARD_ENVIRONMENTS.includes(
385
- environment
386
- ) ? environment : this.redactedValue
387
+ value: allStandard ? environment : this.redactedValue
387
388
  });
388
389
  }
389
390
  }
@@ -449,9 +450,9 @@ function getTargetCompatibilityError(envTargets, isSensitive, policyOn) {
449
450
  const hasDevelopment = envTargets.includes("development");
450
451
  const hasSensitiveCapable = envTargets.some((t) => t !== "development");
451
452
  if (isSensitive && hasDevelopment) {
452
- return `Sensitive Environment Variables are not supported on the Development Environment. Run ${getCommandName(
453
+ 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
454
  "env add"
454
- )} separately for Development with a non-sensitive value.`;
455
+ )} separately for Development.`;
455
456
  }
456
457
  if (!isSensitive && policyOn && hasSensitiveCapable) {
457
458
  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 +491,16 @@ function redactEnvValueArgs(argv) {
490
491
  }
491
492
  return redacted;
492
493
  }
494
+ function multiTargetSuggestion(argv, envName, targets, addNoSensitive) {
495
+ const flag = addNoSensitive ? " --no-sensitive" : "";
496
+ return {
497
+ command: buildEnvAddCommandWithPreservedArgs(
498
+ argv,
499
+ `env add ${envName} ${targets.join(",")} --value "<value>"${flag} --yes`
500
+ ),
501
+ when: addNoSensitive ? "Add one non-sensitive variable to all listed environments" : "Add one variable to multiple environments"
502
+ };
503
+ }
493
504
  function projectLabel(link) {
494
505
  return `${link.org.slug}/${link.project.name}`;
495
506
  }
@@ -590,10 +601,7 @@ async function add(client, argv) {
590
601
  );
591
602
  return 1;
592
603
  }
593
- let envTargets = [];
594
- if (envTargetArg) {
595
- envTargets.push(envTargetArg);
596
- }
604
+ let envTargets = envTargetArg ? parseEnvTargetArg(envTargetArg) : [];
597
605
  if (client.nonInteractive) {
598
606
  const link2 = await getLinkedProject(client);
599
607
  if (link2.status === "error") {
@@ -702,7 +710,7 @@ async function add(client, argv) {
702
710
  if (m === "missing_value")
703
711
  return "--value or stdin";
704
712
  if (m === "missing_environment")
705
- return "environment (production, preview, or development)";
713
+ return "environment (production, preview, development, or a comma-separated list)";
706
714
  if (m === "git_branch_required")
707
715
  return "third argument <gitbranch> for Preview, or omit for all Preview branches";
708
716
  return m;
@@ -749,6 +757,20 @@ async function add(client, argv) {
749
757
  }
750
758
  );
751
759
  }
760
+ if (missing.includes("missing_environment")) {
761
+ const standardAvailable = choices2.map((c) => c.value).filter((v) => isValidEnvTarget(v));
762
+ const multiTargets = opts["--sensitive"] ? standardAvailable.filter((t) => t !== "development") : standardAvailable;
763
+ if (multiTargets.length > 1) {
764
+ next.push(
765
+ multiTargetSuggestion(
766
+ client.argv,
767
+ envName || "<name>",
768
+ multiTargets,
769
+ multiTargets.includes("development") && !opts["--no-sensitive"]
770
+ )
771
+ );
772
+ }
773
+ }
752
774
  outputActionRequired(
753
775
  client,
754
776
  {
@@ -910,6 +932,57 @@ async function add(client, argv) {
910
932
  getEnvRecords(client, project.id, "vercel-cli:env:add"),
911
933
  getCustomEnvironments(client, project.id)
912
934
  ]);
935
+ if (envTargets.length > 0) {
936
+ const resolved = [];
937
+ const invalid = [];
938
+ for (const target of envTargets) {
939
+ if (isValidEnvTarget(target)) {
940
+ resolved.push(target);
941
+ continue;
942
+ }
943
+ const custom = customEnvironments.find(
944
+ (c) => c.id === target || c.slug === target
945
+ );
946
+ if (custom) {
947
+ resolved.push(custom.id);
948
+ } else {
949
+ invalid.push(target);
950
+ }
951
+ }
952
+ if (invalid.length > 0) {
953
+ const valid = [
954
+ ...envTargetChoices.map((c) => c.value),
955
+ ...customEnvironments.map((c) => c.slug)
956
+ ];
957
+ const message = `Invalid environment: ${invalid.join(
958
+ ", "
959
+ )}. Valid environments: ${valid.join(
960
+ ", "
961
+ )}. Separate multiple environments with commas.`;
962
+ if (client.nonInteractive) {
963
+ outputAgentError(
964
+ client,
965
+ { status: "error", reason: "invalid_environment", message },
966
+ 1
967
+ );
968
+ }
969
+ output_manager_default.error(message);
970
+ return 1;
971
+ }
972
+ envTargets = resolved;
973
+ }
974
+ if (envGitBranch && envTargets.length > 1) {
975
+ const message = "A Git branch can only be set when Preview is the only selected environment.";
976
+ if (client.nonInteractive) {
977
+ outputAgentError(
978
+ client,
979
+ { status: "error", reason: "branch_requires_preview_only", message },
980
+ 1
981
+ );
982
+ }
983
+ output_manager_default.error(message);
984
+ return 1;
985
+ }
913
986
  const matchingEnvs = envs.filter((r) => r.key === envName);
914
987
  const existingTargets = /* @__PURE__ */ new Set();
915
988
  const existingCustomEnvs = /* @__PURE__ */ new Set();
@@ -991,12 +1064,24 @@ async function add(client, argv) {
991
1064
  if (forceSensitive && envTargets.includes("development")) {
992
1065
  const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
993
1066
  if (client.nonInteractive) {
1067
+ const nonDev = envTargets.filter((t) => t !== "development");
994
1068
  outputAgentError(
995
1069
  client,
996
1070
  {
997
1071
  status: "error",
998
1072
  reason: "sensitive_not_allowed_on_development",
999
- message: msg
1073
+ message: msg,
1074
+ ...nonDev.length > 0 ? {
1075
+ next: [
1076
+ {
1077
+ command: buildEnvAddCommandWithPreservedArgs(
1078
+ client.argv,
1079
+ `env add ${envName} ${nonDev.join(",")} --value "<value>" --yes`
1080
+ ),
1081
+ when: "Keep sensitive and skip Development"
1082
+ }
1083
+ ]
1084
+ } : {}
1000
1085
  },
1001
1086
  1
1002
1087
  );
@@ -1012,12 +1097,39 @@ async function add(client, argv) {
1012
1097
  );
1013
1098
  if (compatibilityError) {
1014
1099
  if (client.nonInteractive) {
1100
+ const next = [];
1101
+ if (isSensitive) {
1102
+ if (!policyOn) {
1103
+ next.push(
1104
+ multiTargetSuggestion(client.argv, envName, envTargets, true)
1105
+ );
1106
+ }
1107
+ const nonDev = envTargets.filter((t) => t !== "development");
1108
+ if (nonDev.length > 0) {
1109
+ next.push({
1110
+ command: buildEnvAddCommandWithPreservedArgs(
1111
+ client.argv,
1112
+ `env add ${envName} ${nonDev.join(",")} --value "<value>" --yes`
1113
+ ),
1114
+ when: "Keep sensitive and skip Development"
1115
+ });
1116
+ }
1117
+ } else {
1118
+ next.push({
1119
+ command: buildEnvAddCommandWithPreservedArgs(
1120
+ client.argv,
1121
+ `env add ${envName} development --value "<value>" --yes`
1122
+ ),
1123
+ when: "Add as non-sensitive to Development only"
1124
+ });
1125
+ }
1015
1126
  outputAgentError(
1016
1127
  client,
1017
1128
  {
1018
1129
  status: "error",
1019
1130
  reason: isSensitive ? "sensitive_not_allowed_on_development" : "non_sensitive_not_allowed_on_production_preview",
1020
- message: compatibilityError
1131
+ message: compatibilityError,
1132
+ ...next.length > 0 ? { next } : {}
1021
1133
  },
1022
1134
  1
1023
1135
  );
@@ -1083,23 +1195,39 @@ async function add(client, argv) {
1083
1195
  });
1084
1196
  while (envTargets.length === 0) {
1085
1197
  if (client.nonInteractive && envChoices.length > 0) {
1198
+ const standardAvailable = choices.map((c) => c.value).filter((v) => isValidEnvTarget(v));
1199
+ const multiTargets = policyOn || forceSensitive ? standardAvailable.filter((t) => t !== "development") : standardAvailable;
1200
+ const next = [];
1201
+ if (multiTargets.length > 1) {
1202
+ next.push(
1203
+ multiTargetSuggestion(
1204
+ client.argv,
1205
+ envName,
1206
+ multiTargets,
1207
+ multiTargets.includes("development") && !forceEncrypted
1208
+ )
1209
+ );
1210
+ }
1211
+ next.push(
1212
+ ...envChoices.slice(0, 5).map((c) => ({
1213
+ command: buildEnvAddCommandWithPreservedArgs(
1214
+ client.argv,
1215
+ `env add ${envName} ${c.value} --value "<value>" --yes`
1216
+ )
1217
+ }))
1218
+ );
1086
1219
  outputActionRequired(client, {
1087
1220
  status: "action_required",
1088
1221
  reason: "missing_environment",
1089
- message: `Specify at least one environment. Add as argument or use: ${buildEnvAddCommandWithPreservedArgs(
1222
+ message: `Specify one or more environments (comma-separated). Add as argument or use: ${buildEnvAddCommandWithPreservedArgs(
1090
1223
  client.argv,
1091
- `env add ${envName} <environment> --value "<value>" --yes`
1224
+ `env add ${envName} <environment>[,<environment>] --value "<value>" --yes`
1092
1225
  )}`,
1093
1226
  choices: envChoices.map((c) => ({
1094
1227
  id: c.value,
1095
1228
  name: typeof c.name === "string" ? c.name : c.value
1096
1229
  })),
1097
- next: envChoices.slice(0, 5).map((c) => ({
1098
- command: buildEnvAddCommandWithPreservedArgs(
1099
- client.argv,
1100
- `env add ${envName} ${c.value} --value "<value>" --yes`
1101
- )
1102
- }))
1230
+ next
1103
1231
  });
1104
1232
  }
1105
1233
  envTargets = await client.input.checkbox({
@@ -11,7 +11,7 @@ import {
11
11
  addSubcommand7 as addSubcommand,
12
12
  getCommandAliases,
13
13
  linkCommand
14
- } from "../../chunks/chunk-NZ73KKYG.js";
14
+ } from "../../chunks/chunk-AVLGVZJ5.js";
15
15
  import "../../chunks/chunk-5OT26JZN.js";
16
16
  import "../../chunks/chunk-7C7MMT4J.js";
17
17
  import "../../chunks/chunk-RLJA2KI7.js";
@@ -24,17 +24,17 @@ import "../../chunks/chunk-IDMKFYEA.js";
24
24
  import "../../chunks/chunk-HA7C7SDO.js";
25
25
  import {
26
26
  ensureLink
27
- } from "../../chunks/chunk-ZHDXN5V3.js";
28
- import "../../chunks/chunk-KODCUW77.js";
27
+ } from "../../chunks/chunk-WOA4Z45Z.js";
28
+ import "../../chunks/chunk-XFMTSTYT.js";
29
29
  import "../../chunks/chunk-IC4YEIGW.js";
30
30
  import {
31
31
  isPromptCanceledError
32
- } from "../../chunks/chunk-C6E2RJS7.js";
33
- import "../../chunks/chunk-3JOLICSO.js";
32
+ } from "../../chunks/chunk-EI555LUJ.js";
33
+ import "../../chunks/chunk-K2THP63Z.js";
34
34
  import {
35
35
  detectExplicitScope,
36
36
  getScope
37
- } from "../../chunks/chunk-VSD5BID5.js";
37
+ } from "../../chunks/chunk-LXF3AXHM.js";
38
38
  import {
39
39
  help
40
40
  } from "../../chunks/chunk-QY63UKTP.js";
@@ -44,7 +44,7 @@ import {
44
44
  ensureRepoLink,
45
45
  pull,
46
46
  resolveProjectCwd
47
- } from "../../chunks/chunk-THMFJODG.js";
47
+ } from "../../chunks/chunk-YGSTSVXS.js";
48
48
  import "../../chunks/chunk-CB3I3QIT.js";
49
49
  import {
50
50
  TelemetryClient
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  formatEnvironment,
23
23
  validateLsArgs
24
- } from "../../chunks/chunk-36OUS2KE.js";
24
+ } from "../../chunks/chunk-B6SCQUDV.js";
25
25
  import {
26
26
  validateJsonOutput
27
27
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -33,7 +33,7 @@ import {
33
33
  } from "../../chunks/chunk-VXYGCOKL.js";
34
34
  import {
35
35
  getScope
36
- } from "../../chunks/chunk-VSD5BID5.js";
36
+ } from "../../chunks/chunk-LXF3AXHM.js";
37
37
  import {
38
38
  help
39
39
  } from "../../chunks/chunk-QY63UKTP.js";
@@ -45,7 +45,7 @@ import {
45
45
  getLinkedProject,
46
46
  getProjectByNameOrId,
47
47
  parseTarget
48
- } from "../../chunks/chunk-THMFJODG.js";
48
+ } from "../../chunks/chunk-YGSTSVXS.js";
49
49
  import {
50
50
  exitWithNonInteractiveError
51
51
  } from "../../chunks/chunk-CB3I3QIT.js";