vercel 58.4.4 → 58.7.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 (92) hide show
  1. package/dist/chunks/{add-245XOFJO.js → add-I7X6NXYD.js} +4 -4
  2. package/dist/chunks/{add-P7WBQMBW.js → add-KMRFKOPJ.js} +44 -9
  3. package/dist/chunks/{add-XH24V5VU.js → add-USFLACJX.js} +4 -4
  4. package/dist/chunks/{build-M7NJYJPE.js → build-GNX3QE6Q.js} +4 -4
  5. package/dist/chunks/{chunk-WR7JTCGL.js → chunk-3BU2UCGV.js} +1 -1
  6. package/dist/chunks/{chunk-MAHXF73X.js → chunk-3L2YLLHC.js} +1 -1
  7. package/dist/chunks/{chunk-ZGBBPJ6B.js → chunk-4XKF7JOF.js} +92 -1377
  8. package/dist/chunks/{chunk-2LBVX2H3.js → chunk-5SZ6VX2H.js} +2 -2
  9. package/dist/chunks/{chunk-2MAPZXVV.js → chunk-62SBYAED.js} +5 -5
  10. package/dist/chunks/{chunk-UE3JUVUZ.js → chunk-74XVGG52.js} +2 -2
  11. package/dist/chunks/{chunk-2FMPLU44.js → chunk-7KUQ7BHI.js} +2 -2
  12. package/dist/chunks/{chunk-YDUINEII.js → chunk-7SXWLTXT.js} +6 -4
  13. package/dist/chunks/{chunk-M5NOLAJ4.js → chunk-BIGFTNW6.js} +1 -1
  14. package/dist/chunks/{chunk-YCPUAG77.js → chunk-CDYBV7YA.js} +1 -1
  15. package/dist/chunks/{chunk-4BUPRO5B.js → chunk-D6SC2UJH.js} +1 -1
  16. package/dist/chunks/{chunk-62MH5KPX.js → chunk-DHTB5D3E.js} +5 -5
  17. package/dist/chunks/{chunk-NJ6QXKQD.js → chunk-H3KETQAA.js} +1 -1
  18. package/dist/chunks/{chunk-NJUPUGOE.js → chunk-HT2XWSAJ.js} +1 -1
  19. package/dist/chunks/chunk-I2XE3GMB.js +21 -0
  20. package/dist/chunks/chunk-LC5BYUUP.js +1337 -0
  21. package/dist/chunks/{chunk-SJYAUEZR.js → chunk-MNZUPMZZ.js} +3 -15
  22. package/dist/chunks/chunk-MXLA3VQS.js +20 -0
  23. package/dist/chunks/{chunk-XE5VSQ25.js → chunk-NI4DNP3D.js} +1 -1
  24. package/dist/chunks/{chunk-Y5GTPWXB.js → chunk-NOMQUVGM.js} +2 -2
  25. package/dist/chunks/{chunk-AQDWMAPM.js → chunk-NYKWLQQM.js} +10 -8
  26. package/dist/chunks/{chunk-4CCY5OPH.js → chunk-NZ6GDMPB.js} +306 -217
  27. package/dist/chunks/chunk-TE5MIANG.js +96 -0
  28. package/dist/chunks/{chunk-EBLH23AQ.js → chunk-TEQKKTJQ.js} +4 -7
  29. package/dist/chunks/{chunk-2WILSD7J.js → chunk-TNTJXJSE.js} +1 -1
  30. package/dist/chunks/{chunk-IEDUCUDV.js → chunk-UAVZOOOL.js} +10 -8
  31. package/dist/chunks/{chunk-4UYKSYKQ.js → chunk-UMA66MKW.js} +66 -2
  32. package/dist/chunks/{chunk-CPFNFVCL.js → chunk-UME4MVFU.js} +1 -1
  33. package/dist/chunks/{chunk-HSYF5SI3.js → chunk-YR6M7ZIU.js} +1 -1
  34. package/dist/chunks/{chunk-3QAUXPIR.js → chunk-ZZZEJXHD.js} +172 -51
  35. package/dist/chunks/{clear-HWIKQ4NC.js → clear-ERVHWAHX.js} +4 -4
  36. package/dist/chunks/{compile-vercel-config-U5NRIMZ2.js → compile-vercel-config-PM5ID4CV.js} +2 -2
  37. package/dist/chunks/{constants-3FSSR6E7.js → constants-T6BULVX6.js} +1 -1
  38. package/dist/chunks/{delete-NVMGVD5Z.js → delete-GMVIUCQV.js} +3 -3
  39. package/dist/chunks/{delete-FZCOUFGN.js → delete-XB24AZGV.js} +4 -4
  40. package/dist/chunks/{disable-ERM2BWEQ.js → disable-JJZZQ4IZ.js} +3 -3
  41. package/dist/chunks/{discard-KM5OLEN4.js → discard-CGAS2MSK.js} +3 -3
  42. package/dist/chunks/{edit-HT3UTATZ.js → edit-RKUUUBQF.js} +4 -4
  43. package/dist/chunks/{edit-TOSB2EMI.js → edit-TFZDCJTL.js} +5 -5
  44. package/dist/chunks/{enable-BQL6AOQV.js → enable-UXRVQO6C.js} +3 -3
  45. package/dist/chunks/{export-UOWQHOG3.js → export-WQE3UU4V.js} +3 -3
  46. package/dist/chunks/{image-F5SC6Q7Y.js → image-HV7N6RTK.js} +3 -3
  47. package/dist/chunks/import-builders-IEVZ7KYP.js +28 -0
  48. package/dist/chunks/{inspect-PZJM2CWT.js → inspect-4BXZOMC2.js} +7 -7
  49. package/dist/chunks/{inspect-35FU5R62.js → inspect-DT2PX6LB.js} +4 -4
  50. package/dist/chunks/{inspect-5J5GSTOB.js → inspect-E3YSH5BV.js} +4 -4
  51. package/dist/chunks/{inspect-GKJ6T5H4.js → inspect-NADJYMSZ.js} +4 -4
  52. package/dist/chunks/{inspect-LGKOLH2O.js → inspect-VDQEM3E6.js} +5 -5
  53. package/dist/chunks/{list-KZETH3ZE.js → list-5PLKF2GL.js} +3 -3
  54. package/dist/chunks/{list-ITFJYYQ2.js → list-ARM4RM22.js} +9 -9
  55. package/dist/chunks/{list-2IIE7CAP.js → list-RVE2NAC5.js} +5 -5
  56. package/dist/chunks/{login-BQPJCJEZ.js → login-VHGNOKBB.js} +4 -4
  57. package/dist/chunks/{ls-7GHDK4MD.js → ls-4QRIPSBC.js} +13 -13
  58. package/dist/chunks/{ls-DL2LA35C.js → ls-IVVP4H24.js} +4 -4
  59. package/dist/chunks/{ls-UXUEP54B.js → ls-OTCUUI4L.js} +4 -4
  60. package/dist/chunks/{ls-YSFWSM6J.js → ls-QBKFZC52.js} +4 -4
  61. package/dist/chunks/{ls-ZZFLH7PK.js → ls-YME2AL47.js} +4 -4
  62. package/dist/chunks/{open-ADNJQN5E.js → open-KYVW2GTM.js} +4 -4
  63. package/dist/chunks/{permissions-72SZCBIY.js → permissions-BLHKOJDO.js} +4 -4
  64. package/dist/chunks/{publish-OOAGSEBM.js → publish-4BKTL25X.js} +3 -3
  65. package/dist/chunks/{push-B6TZDXNF.js → push-IJFWOWD7.js} +4 -4
  66. package/dist/chunks/{query-LZWS5TDH.js → query-VIV66DLZ.js} +3 -3
  67. package/dist/chunks/{reorder-MRHFKPMK.js → reorder-C44IJZNE.js} +3 -3
  68. package/dist/chunks/{reply-BKTJXO3B.js → reply-M6WBMKBN.js} +5 -5
  69. package/dist/chunks/{resolve-BKVGSGPN.js → resolve-44ICWDRT.js} +4 -4
  70. package/dist/chunks/{restore-USR7SKWV.js → restore-ACDVNSTC.js} +3 -3
  71. package/dist/chunks/{rm-2UO6BT3A.js → rm-K2FDC5CL.js} +6 -6
  72. package/dist/chunks/{rm-37MKKV3I.js → rm-P2ILGP4I.js} +4 -4
  73. package/dist/chunks/{rm-VY3OHKFH.js → rm-Q7VXI345.js} +4 -4
  74. package/dist/chunks/{rm-KUWPNZIS.js → rm-RO3R3MZT.js} +4 -4
  75. package/dist/chunks/{rule-inspect-JVDOOTWK.js → rule-inspect-JGKJXOUD.js} +13 -20
  76. package/dist/chunks/{rules-NTBFZBIF.js → rules-BRTF5HJP.js} +9 -6
  77. package/dist/chunks/schema-T7RNRNKT.js +426 -0
  78. package/dist/chunks/{schema-6EZ72OVH.js → schema-Z3L5ZOEE.js} +2 -2
  79. package/dist/chunks/{tags-HNPC63QA.js → tags-BPHVFK53.js} +2 -2
  80. package/dist/chunks/{update-LUYWNZP3.js → update-5KQU4HCK.js} +38 -6
  81. package/dist/commands/build/index.js +65 -24
  82. package/dist/commands/deploy/index.js +24 -17
  83. package/dist/commands/dev/index.js +41 -18
  84. package/dist/commands/env/index.js +89 -150
  85. package/dist/commands/link/index.js +9 -9
  86. package/dist/commands/list/index.js +5 -5
  87. package/dist/commands-bulk.js +3183 -2199
  88. package/dist/index.js +12 -11
  89. package/dist/vc.js +11 -14
  90. package/dist/version.mjs +1 -1
  91. package/package.json +54 -48
  92. package/dist/chunks/{chunk-BUZRVER7.js → chunk-P65EEFTR.js} +3 -3
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  formatEnvironment,
26
26
  validateLsArgs
27
- } from "../../chunks/chunk-XE5VSQ25.js";
27
+ } from "../../chunks/chunk-NI4DNP3D.js";
28
28
  import {
29
29
  validateJsonOutput
30
30
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -33,7 +33,7 @@ import {
33
33
  } from "../../chunks/chunk-YPQSDAEW.js";
34
34
  import {
35
35
  getCommandAliases
36
- } from "../../chunks/chunk-3QAUXPIR.js";
36
+ } from "../../chunks/chunk-ZZZEJXHD.js";
37
37
  import "../../chunks/chunk-AW5YINX6.js";
38
38
  import "../../chunks/chunk-A5KP5HAI.js";
39
39
  import "../../chunks/chunk-J6LK45HT.js";
@@ -42,8 +42,8 @@ import "../../chunks/chunk-CSJBZKC5.js";
42
42
  import "../../chunks/chunk-M22O6CYY.js";
43
43
  import "../../chunks/chunk-4LDQIDRM.js";
44
44
  import "../../chunks/chunk-3KNPVXJ3.js";
45
- import "../../chunks/chunk-MAHXF73X.js";
46
- import "../../chunks/chunk-4UYKSYKQ.js";
45
+ import "../../chunks/chunk-3L2YLLHC.js";
46
+ import "../../chunks/chunk-UMA66MKW.js";
47
47
  import "../../chunks/chunk-7QVJTI5H.js";
48
48
  import "../../chunks/chunk-O5GNPPTU.js";
49
49
  import {
@@ -51,12 +51,12 @@ import {
51
51
  } from "../../chunks/chunk-R6IGDGX3.js";
52
52
  import {
53
53
  autoInstallVercelPlugin
54
- } from "../../chunks/chunk-NJUPUGOE.js";
54
+ } from "../../chunks/chunk-HT2XWSAJ.js";
55
55
  import {
56
56
  stamp_default
57
57
  } from "../../chunks/chunk-64IF634X.js";
58
58
  import "../../chunks/chunk-VXYGCOKL.js";
59
- import "../../chunks/chunk-YCPUAG77.js";
59
+ import "../../chunks/chunk-CDYBV7YA.js";
60
60
  import {
61
61
  help
62
62
  } from "../../chunks/chunk-ZX2FSPWV.js";
@@ -84,7 +84,7 @@ import {
84
84
  resolveProjectContext,
85
85
  runSubcommand,
86
86
  updateSubcommand
87
- } from "../../chunks/chunk-4CCY5OPH.js";
87
+ } from "../../chunks/chunk-NZ6GDMPB.js";
88
88
  import {
89
89
  TelemetryClient,
90
90
  require_dist as require_dist2
@@ -100,6 +100,9 @@ import {
100
100
  outputActionRequired,
101
101
  outputAgentError
102
102
  } from "../../chunks/chunk-TJJ562C5.js";
103
+ import {
104
+ require_ms
105
+ } from "../../chunks/chunk-GGP5R3FU.js";
103
106
  import {
104
107
  printError
105
108
  } from "../../chunks/chunk-KBEX5MYS.js";
@@ -122,9 +125,6 @@ import {
122
125
  prependEmoji,
123
126
  require_dist
124
127
  } from "../../chunks/chunk-OX7KI3LF.js";
125
- import {
126
- require_ms
127
- } from "../../chunks/chunk-GGP5R3FU.js";
128
128
  import {
129
129
  require_source
130
130
  } from "../../chunks/chunk-S7KYDPEM.js";
@@ -403,6 +403,14 @@ var EnvAddTelemetryClient = class extends TelemetryClient {
403
403
  });
404
404
  }
405
405
  }
406
+ trackCliOptionGitBranch(gitBranch) {
407
+ if (gitBranch) {
408
+ this.trackCliOption({
409
+ option: "git-branch",
410
+ value: this.redactedValue
411
+ });
412
+ }
413
+ }
406
414
  trackCliOptionValue(value) {
407
415
  if (value) {
408
416
  this.trackCliOption({
@@ -496,6 +504,9 @@ function getPublicPrefixSecretVisibilityError(key, options) {
496
504
  return `Environment variables with a public framework prefix (${prefixLabel}) cannot use secret visibility. Rename to remove the public prefix or use \`--visibility config\` with \`--no-sensitive\`.`;
497
505
  }
498
506
  function getDevelopmentSecretVisibilityError(envTargets, options) {
507
+ if (options.configSecretUiEnabled) {
508
+ return null;
509
+ }
499
510
  if (!envTargets.includes("development")) {
500
511
  return null;
501
512
  }
@@ -543,7 +554,8 @@ function resolveEnvVarVisibility(options) {
543
554
  options.envTargets,
544
555
  {
545
556
  type: options.type,
546
- visibility: options.explicitVisibility
557
+ visibility: options.explicitVisibility,
558
+ configSecretUiEnabled: options.configSecretUiEnabled
547
559
  }
548
560
  );
549
561
  if (developmentError2) {
@@ -559,7 +571,8 @@ function resolveEnvVarVisibility(options) {
559
571
  options.envTargets,
560
572
  {
561
573
  type: options.type,
562
- visibility: inferred
574
+ visibility: inferred,
575
+ configSecretUiEnabled: options.configSecretUiEnabled
563
576
  }
564
577
  );
565
578
  if (developmentError) {
@@ -589,7 +602,7 @@ var SENSITIVE_SECRET_PROMPT = `Store as sensitive? ${import_chalk.default.dim(
589
602
  SENSITIVE_VALUE_HINT
590
603
  )}`;
591
604
  function filterEnvChoicesForSensitivity(choices, opts) {
592
- if (opts.isSensitive) {
605
+ if (opts.isSensitive && !opts.configSecretUiEnabled) {
593
606
  return choices.filter((c) => c.value !== "development");
594
607
  }
595
608
  if (opts.policyOn) {
@@ -597,10 +610,10 @@ function filterEnvChoicesForSensitivity(choices, opts) {
597
610
  }
598
611
  return choices;
599
612
  }
600
- function getTargetCompatibilityError(envTargets, isSensitive, policyOn) {
613
+ function getTargetCompatibilityError(envTargets, isSensitive, policyOn, configSecretUiEnabled) {
601
614
  const hasDevelopment = envTargets.includes("development");
602
615
  const hasSensitiveCapable = envTargets.some((t) => t !== "development");
603
- if (isSensitive && hasDevelopment) {
616
+ if (isSensitive && hasDevelopment && !configSecretUiEnabled) {
604
617
  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(
605
618
  "env add"
606
619
  )} separately for Development.`;
@@ -614,7 +627,7 @@ function getTargetCompatibilityError(envTargets, isSensitive, policyOn) {
614
627
  }
615
628
  function resolveFinalType(envTargets, isSensitive, opts) {
616
629
  const hasDevelopment = envTargets.includes("development");
617
- if (hasDevelopment) {
630
+ if (hasDevelopment && !(opts.configSecretUiEnabled && isSensitive)) {
618
631
  return "encrypted";
619
632
  }
620
633
  if (opts.forceEncrypted && !opts.policyOn) {
@@ -627,7 +640,7 @@ function resolveFinalType(envTargets, isSensitive, opts) {
627
640
  }
628
641
  function fillEnvAddTemplate(template, opts) {
629
642
  const targetPlaceholder = getEnvTargetPlaceholder();
630
- const out = template.replace(/<name>/g, opts.envName ?? "<name>").split(targetPlaceholder).join(opts.envTargetArg ?? targetPlaceholder).replace(/<gitbranch>/g, opts.envGitBranch ?? "<gitbranch>");
643
+ const out = template.replace(/<name>/g, opts.envName ?? "<name>").split(targetPlaceholder).join(opts.envTargetArg ?? targetPlaceholder);
631
644
  return out.replace(/<value>/g, "<value>");
632
645
  }
633
646
  function redactEnvValueArgs(argv) {
@@ -730,7 +743,10 @@ async function add(client, argv) {
730
743
  const configSecretUiEnabled = isEnvVarConfigSecretUiEnabled();
731
744
  const stdInput = await readStandardInput(client.stdin);
732
745
  const valueFromFlag = typeof opts["--value"] === "string" ? opts["--value"] : void 0;
733
- let [envName, envTargetArg, envGitBranch] = args;
746
+ let [envName, envTargetArg] = args;
747
+ const positionalGitBranch = args[2];
748
+ const optionGitBranch = typeof opts["--git-branch"] === "string" ? opts["--git-branch"] : void 0;
749
+ let envGitBranch = optionGitBranch ?? positionalGitBranch;
734
750
  const telemetryClient = new EnvAddTelemetryClient({
735
751
  opts: {
736
752
  store: client.telemetryEventStore
@@ -738,7 +754,8 @@ async function add(client, argv) {
738
754
  });
739
755
  telemetryClient.trackCliArgumentName(envName);
740
756
  telemetryClient.trackCliArgumentEnvironment(envTargetArg);
741
- telemetryClient.trackCliArgumentGitBranch(envGitBranch);
757
+ telemetryClient.trackCliArgumentGitBranch(positionalGitBranch);
758
+ telemetryClient.trackCliOptionGitBranch(optionGitBranch);
742
759
  telemetryClient.trackCliOptionValue(
743
760
  valueFromFlag === void 0 ? void 0 : "<redacted>"
744
761
  );
@@ -751,10 +768,16 @@ async function add(client, argv) {
751
768
  typeof opts["--visibility"] === "string" ? opts["--visibility"] : void 0
752
769
  );
753
770
  telemetryClient.trackCliOptionProject(opts["--project"]);
771
+ if (positionalGitBranch && optionGitBranch) {
772
+ output_manager_default.error(
773
+ "Git branch was provided twice. Use either `--git-branch <name>` or the legacy third argument."
774
+ );
775
+ return 1;
776
+ }
754
777
  if (args.length > 3) {
755
778
  output_manager_default.error(
756
779
  `Invalid number of arguments. Usage: ${getCommandName(
757
- `env add <name> ${getEnvTargetPlaceholder()} <gitbranch>`
780
+ `env add <name> ${getEnvTargetPlaceholder()} --git-branch <name>`
758
781
  )}`
759
782
  );
760
783
  return 1;
@@ -762,7 +785,7 @@ async function add(client, argv) {
762
785
  if (stdInput && (!envName || !envTargetArg)) {
763
786
  output_manager_default.error(
764
787
  `Invalid number of arguments. Usage: ${getCommandName(
765
- `env add <name> <target> <gitbranch> < <file>`
788
+ `env add <name> <target> --git-branch <name> < <file>`
766
789
  )}`
767
790
  );
768
791
  return 1;
@@ -794,25 +817,7 @@ async function add(client, argv) {
794
817
  "<scope>",
795
818
  ...linkPreserved
796
819
  ];
797
- let envAddRetryArgv = redactEnvValueArgs(client.argv);
798
- if (envTargetArg === "preview" && envGitBranch === void 0) {
799
- const argvArgs = client.argv.slice(2);
800
- const addIdx = argvArgs.indexOf("add");
801
- if (addIdx !== -1) {
802
- let pos = addIdx + 1;
803
- let positionals = 0;
804
- while (pos < argvArgs.length && positionals < 3 && !argvArgs[pos].startsWith("-")) {
805
- positionals++;
806
- pos++;
807
- }
808
- const insertAt = 2 + pos;
809
- envAddRetryArgv = redactEnvValueArgs([
810
- ...client.argv.slice(0, insertAt),
811
- "<gitbranch>",
812
- ...client.argv.slice(insertAt)
813
- ]);
814
- }
815
- }
820
+ const envAddRetryArgv = redactEnvValueArgs(client.argv);
816
821
  outputAgentError(
817
822
  client,
818
823
  {
@@ -869,9 +874,6 @@ async function add(client, argv) {
869
874
  missing.push("missing_value");
870
875
  if (!envTargetArg && choices2.length > 0)
871
876
  missing.push("missing_environment");
872
- if (envTargetArg === "preview" && envGitBranch === void 0 && !(client.nonInteractive && args.length === 2)) {
873
- missing.push("git_branch_required");
874
- }
875
877
  if (missing.length > 0) {
876
878
  const parts = missing.map((m) => {
877
879
  if (m === "missing_name")
@@ -880,52 +882,20 @@ async function add(client, argv) {
880
882
  return "--value or stdin";
881
883
  if (m === "missing_environment")
882
884
  return "environment (production, preview, development, or a comma-separated list)";
883
- if (m === "git_branch_required")
884
- return "third argument <gitbranch> for Preview, or omit for all Preview branches";
885
885
  return m;
886
886
  });
887
- const fullTemplate = `env add <name> ${getEnvTargetPlaceholder()} <gitbranch> --value "<value>" --yes`;
887
+ const fullTemplate = `env add <name> ${getEnvTargetPlaceholder()} --value "<value>" --yes`;
888
888
  const filledTemplate = fillEnvAddTemplate(fullTemplate, {
889
889
  envName,
890
- envTargetArg,
891
- envGitBranch
890
+ envTargetArg
892
891
  });
893
892
  const next = [];
894
- const onlyGitBranchMissing = missing.length === 1 && missing[0] === "git_branch_required";
895
- if (!onlyGitBranchMissing) {
896
- next.push({
897
- command: buildEnvAddCommandWithPreservedArgs(
898
- client.argv,
899
- filledTemplate
900
- )
901
- });
902
- }
903
- if (missing.includes("git_branch_required") && envName && (valueFromFlag !== void 0 || stdInput)) {
904
- const branchSpecific = fillEnvAddTemplate(
905
- 'env add <name> preview <gitbranch> --value "<value>" --yes',
906
- { envName, envTargetArg: "preview" }
907
- );
908
- const branchAll = fillEnvAddTemplate(
909
- 'env add <name> preview --value "<value>" --yes',
910
- { envName, envTargetArg: "preview" }
911
- );
912
- next.push(
913
- {
914
- command: buildEnvAddCommandWithPreservedArgs(
915
- client.argv,
916
- branchSpecific
917
- ),
918
- when: "Add to a specific Git branch"
919
- },
920
- {
921
- command: buildEnvAddCommandWithPreservedArgs(
922
- client.argv,
923
- branchAll
924
- ),
925
- when: "Add to all Preview branches"
926
- }
927
- );
928
- }
893
+ next.push({
894
+ command: buildEnvAddCommandWithPreservedArgs(
895
+ client.argv,
896
+ filledTemplate
897
+ )
898
+ });
929
899
  if (missing.includes("missing_environment")) {
930
900
  const standardAvailable = choices2.map((c) => c.value).filter((v) => isValidEnvTarget(v));
931
901
  const multiTargets = filterSensitiveMultiTargetSuggestionTargets(
@@ -1061,25 +1031,7 @@ async function add(client, argv) {
1061
1031
  ...link.status === "not_linked" ? ["--scope", "<scope>"] : [],
1062
1032
  ...linkPreserved
1063
1033
  ];
1064
- let envAddRetryArgv = redactEnvValueArgs(client.argv);
1065
- if (envTargetArg === "preview" && envGitBranch === void 0) {
1066
- const argvArgs = client.argv.slice(2);
1067
- const addIdx = argvArgs.indexOf("add");
1068
- if (addIdx !== -1) {
1069
- let pos = addIdx + 1;
1070
- let positionals = 0;
1071
- while (pos < argvArgs.length && positionals < 3 && !argvArgs[pos].startsWith("-")) {
1072
- positionals++;
1073
- pos++;
1074
- }
1075
- const insertAt = 2 + pos;
1076
- envAddRetryArgv = redactEnvValueArgs([
1077
- ...client.argv.slice(0, insertAt),
1078
- "<gitbranch>",
1079
- ...client.argv.slice(insertAt)
1080
- ]);
1081
- }
1082
- }
1034
+ const envAddRetryArgv = redactEnvValueArgs(client.argv);
1083
1035
  outputAgentError(
1084
1036
  client,
1085
1037
  {
@@ -1255,7 +1207,7 @@ async function add(client, argv) {
1255
1207
  `
1256
1208
  );
1257
1209
  }
1258
- if (forceSensitive && envTargets.includes("development")) {
1210
+ if (forceSensitive && envTargets.includes("development") && !configSecretUiEnabled) {
1259
1211
  const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
1260
1212
  if (client.nonInteractive) {
1261
1213
  const nonDev = envTargets.filter((t) => t !== "development");
@@ -1287,7 +1239,8 @@ async function add(client, argv) {
1287
1239
  const compatibilityError = getTargetCompatibilityError(
1288
1240
  envTargets,
1289
1241
  isSensitive,
1290
- policyOn
1242
+ policyOn,
1243
+ configSecretUiEnabled
1291
1244
  );
1292
1245
  if (compatibilityError) {
1293
1246
  if (client.nonInteractive) {
@@ -1334,7 +1287,8 @@ async function add(client, argv) {
1334
1287
  }
1335
1288
  const envChoices = filterEnvChoicesForSensitivity(choices, {
1336
1289
  isSensitive,
1337
- policyOn
1290
+ policyOn,
1291
+ configSecretUiEnabled
1338
1292
  });
1339
1293
  if (policyOn && isSensitive) {
1340
1294
  for (const choice of envChoices) {
@@ -1442,54 +1396,28 @@ async function add(client, argv) {
1442
1396
  const postSelectionError = getTargetCompatibilityError(
1443
1397
  envTargets,
1444
1398
  isSensitive,
1445
- policyOn
1399
+ policyOn,
1400
+ configSecretUiEnabled
1446
1401
  );
1447
1402
  if (postSelectionError) {
1448
1403
  output_manager_default.error(postSelectionError);
1449
1404
  return 1;
1450
1405
  }
1451
- if (envGitBranch === void 0 && envTargets.length === 1 && envTargets[0] === "preview" && !(client.nonInteractive && args.length === 2)) {
1452
- if (client.nonInteractive) {
1453
- outputActionRequired(
1454
- client,
1455
- {
1456
- status: "action_required",
1457
- reason: "git_branch_required",
1458
- message: `Add ${envName} to which Git branch for Preview? Pass branch as third argument, or omit for all Preview branches.`,
1459
- next: [
1460
- {
1461
- command: buildEnvAddCommandWithPreservedArgs(
1462
- client.argv,
1463
- `env add ${envName} preview <gitbranch> --value "<value>" --yes`
1464
- ),
1465
- when: "Add to a specific Git branch"
1466
- },
1467
- {
1468
- command: buildEnvAddCommandWithPreservedArgs(
1469
- client.argv,
1470
- `env add ${envName} preview --value "<value>" --yes`
1471
- ),
1472
- when: "Add to all Preview branches"
1473
- }
1474
- ]
1475
- },
1476
- 1
1477
- );
1478
- } else {
1479
- output_manager_default.print(
1480
- ` ${import_chalk.default.dim("Leave empty to apply to all Preview branches.")}
1406
+ if (envGitBranch === void 0 && envTargets.length === 1 && envTargets[0] === "preview" && !client.nonInteractive && !opts["--yes"]) {
1407
+ output_manager_default.print(
1408
+ ` ${import_chalk.default.dim("Leave empty to apply to all Preview branches.")}
1481
1409
  `
1482
- );
1483
- envGitBranch = await client.input.text({
1484
- message: `Git branch?`
1485
- });
1486
- }
1410
+ );
1411
+ envGitBranch = await client.input.text({
1412
+ message: `Git branch?`
1413
+ });
1487
1414
  }
1488
1415
  const hasDevelopment = envTargets.includes("development");
1489
1416
  let finalType = resolveFinalType(envTargets, isSensitive, {
1490
1417
  forceSensitive,
1491
1418
  forceEncrypted,
1492
- policyOn
1419
+ policyOn,
1420
+ configSecretUiEnabled
1493
1421
  });
1494
1422
  if (policyOn && !hasDevelopment) {
1495
1423
  if (forceEncrypted) {
@@ -1699,8 +1627,9 @@ async function ls(client, argv) {
1699
1627
  const jsonOutput = {
1700
1628
  envs: envs.map((env) => ({
1701
1629
  key: env.key,
1702
- value: env.type === "plain" ? env.value : void 0,
1630
+ value: isSensitiveEnvironmentVariable(env) ? void 0 : env.value,
1703
1631
  type: env.type,
1632
+ visibility: env.visibility,
1704
1633
  target: env.target,
1705
1634
  gitBranch: env.gitBranch,
1706
1635
  configurationId: env.configurationId,
@@ -1738,7 +1667,7 @@ async function ls(client, argv) {
1738
1667
  function getTable(link, records, customEnvironments) {
1739
1668
  const label = records.some((env) => env.gitBranch) ? "environments (git branch)" : "environments";
1740
1669
  return formatTable(
1741
- ["name", "value", label, "created"],
1670
+ ["name", "value", "type", label, "created"],
1742
1671
  ["l", "l", "l", "l", "l"],
1743
1672
  [
1744
1673
  {
@@ -1750,22 +1679,32 @@ function getTable(link, records, customEnvironments) {
1750
1679
  }
1751
1680
  function getRow(link, env, customEnvironments) {
1752
1681
  let value;
1753
- if (env.type === "plain") {
1754
- const singleLineValue = env.value.replace(/\s/g, " ");
1755
- value = import_chalk2.default.gray(ellipsis(singleLineValue, 19));
1682
+ if (isSensitiveEnvironmentVariable(env)) {
1683
+ value = import_chalk2.default.gray.italic("Hidden");
1756
1684
  } else if (env.type === "system") {
1757
1685
  value = import_chalk2.default.gray.italic(env.value);
1758
1686
  } else {
1759
- value = import_chalk2.default.gray.italic("Encrypted");
1687
+ const singleLineValue = env.value.replace(/\s/g, " ");
1688
+ value = import_chalk2.default.gray(ellipsis(singleLineValue, 19));
1760
1689
  }
1761
1690
  const now = Date.now();
1762
1691
  return [
1763
1692
  import_chalk2.default.bold(env.key),
1764
1693
  value,
1694
+ getEnvironmentVariableTypeLabel(env),
1765
1695
  formatEnvironments(link, env, customEnvironments),
1766
1696
  env.createdAt ? `${(0, import_ms.default)(now - env.createdAt)} ago` : ""
1767
1697
  ];
1768
1698
  }
1699
+ function isSensitiveEnvironmentVariable(env) {
1700
+ return env.type === "sensitive" || env.visibility === "secret";
1701
+ }
1702
+ function getEnvironmentVariableTypeLabel(env) {
1703
+ if (isSensitiveEnvironmentVariable(env)) {
1704
+ return "Sensitive";
1705
+ }
1706
+ return env.type === "system" ? "System" : "Non-sensitive";
1707
+ }
1769
1708
 
1770
1709
  // src/commands/env/rm.ts
1771
1710
  var import_chalk3 = __toESM(require_source(), 1);
@@ -2561,7 +2500,7 @@ async function update(client, argv) {
2561
2500
  }
2562
2501
  }
2563
2502
  const selectedIsDevelopment = selectedEnvTargetsDevelopment(selectedEnv);
2564
- if (policyOn && selectedIsDevelopment) {
2503
+ if (policyOn && selectedIsDevelopment && !configSecretUiEnabled) {
2565
2504
  const msg = `Your team has enabled the Sensitive Environment Variables Policy and the Development Environment does not support sensitive values. https://vercel.com/docs/environment-variables/sensitive-environment-variables#environment-variables-policy`;
2566
2505
  if (client.nonInteractive) {
2567
2506
  outputAgentError(
@@ -2577,7 +2516,7 @@ async function update(client, argv) {
2577
2516
  output_manager_default.error(msg);
2578
2517
  return 1;
2579
2518
  }
2580
- if (opts["--sensitive"] && selectedIsDevelopment) {
2519
+ if (opts["--sensitive"] && selectedIsDevelopment && !configSecretUiEnabled) {
2581
2520
  const msg = `--sensitive is not allowed with the Development Environment. Sensitive Environment Variables are only supported on Production and Preview.`;
2582
2521
  if (client.nonInteractive) {
2583
2522
  outputAgentError(
@@ -11,7 +11,7 @@ import {
11
11
  addSubcommand7 as addSubcommand,
12
12
  getCommandAliases,
13
13
  linkCommand
14
- } from "../../chunks/chunk-3QAUXPIR.js";
14
+ } from "../../chunks/chunk-ZZZEJXHD.js";
15
15
  import "../../chunks/chunk-AW5YINX6.js";
16
16
  import "../../chunks/chunk-A5KP5HAI.js";
17
17
  import "../../chunks/chunk-J6LK45HT.js";
@@ -20,18 +20,18 @@ import "../../chunks/chunk-CSJBZKC5.js";
20
20
  import "../../chunks/chunk-M22O6CYY.js";
21
21
  import "../../chunks/chunk-4LDQIDRM.js";
22
22
  import "../../chunks/chunk-3KNPVXJ3.js";
23
- import "../../chunks/chunk-MAHXF73X.js";
24
- import "../../chunks/chunk-4UYKSYKQ.js";
23
+ import "../../chunks/chunk-3L2YLLHC.js";
24
+ import "../../chunks/chunk-UMA66MKW.js";
25
25
  import "../../chunks/chunk-7QVJTI5H.js";
26
26
  import "../../chunks/chunk-O5GNPPTU.js";
27
27
  import {
28
28
  ensureLink
29
- } from "../../chunks/chunk-2FMPLU44.js";
30
- import "../../chunks/chunk-UE3JUVUZ.js";
29
+ } from "../../chunks/chunk-7KUQ7BHI.js";
30
+ import "../../chunks/chunk-74XVGG52.js";
31
31
  import {
32
32
  isPromptCanceledError
33
- } from "../../chunks/chunk-CPFNFVCL.js";
34
- import "../../chunks/chunk-YCPUAG77.js";
33
+ } from "../../chunks/chunk-UME4MVFU.js";
34
+ import "../../chunks/chunk-CDYBV7YA.js";
35
35
  import {
36
36
  help
37
37
  } from "../../chunks/chunk-ZX2FSPWV.js";
@@ -43,11 +43,12 @@ import {
43
43
  getScope,
44
44
  pull,
45
45
  resolveProjectCwd
46
- } from "../../chunks/chunk-4CCY5OPH.js";
46
+ } from "../../chunks/chunk-NZ6GDMPB.js";
47
47
  import {
48
48
  TelemetryClient
49
49
  } from "../../chunks/chunk-ECCWJHC6.js";
50
50
  import "../../chunks/chunk-TJJ562C5.js";
51
+ import "../../chunks/chunk-GGP5R3FU.js";
51
52
  import {
52
53
  printError
53
54
  } from "../../chunks/chunk-KBEX5MYS.js";
@@ -63,7 +64,6 @@ import "../../chunks/chunk-52QYYTM5.js";
63
64
  import {
64
65
  output_manager_default
65
66
  } from "../../chunks/chunk-OX7KI3LF.js";
66
- import "../../chunks/chunk-GGP5R3FU.js";
67
67
  import {
68
68
  require_source
69
69
  } from "../../chunks/chunk-S7KYDPEM.js";
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  formatEnvironment,
19
19
  validateLsArgs
20
- } from "../../chunks/chunk-XE5VSQ25.js";
20
+ } from "../../chunks/chunk-NI4DNP3D.js";
21
21
  import {
22
22
  validateJsonOutput
23
23
  } from "../../chunks/chunk-XPKWKPWA.js";
@@ -41,13 +41,16 @@ import {
41
41
  getScope,
42
42
  parseTarget,
43
43
  toHost
44
- } from "../../chunks/chunk-4CCY5OPH.js";
44
+ } from "../../chunks/chunk-NZ6GDMPB.js";
45
45
  import {
46
46
  TelemetryClient
47
47
  } from "../../chunks/chunk-ECCWJHC6.js";
48
48
  import {
49
49
  exitWithNonInteractiveError
50
50
  } from "../../chunks/chunk-TJJ562C5.js";
51
+ import {
52
+ require_ms
53
+ } from "../../chunks/chunk-GGP5R3FU.js";
51
54
  import {
52
55
  printError
53
56
  } from "../../chunks/chunk-KBEX5MYS.js";
@@ -66,9 +69,6 @@ import {
66
69
  output_manager_default,
67
70
  require_dist
68
71
  } from "../../chunks/chunk-OX7KI3LF.js";
69
- import {
70
- require_ms
71
- } from "../../chunks/chunk-GGP5R3FU.js";
72
72
  import {
73
73
  require_source
74
74
  } from "../../chunks/chunk-S7KYDPEM.js";