vercel 59.4.0 → 59.6.2

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 (137) hide show
  1. package/dist/chunks/{add-FQMB3XPM.js → add-4GQZ22ZN.js} +20 -16
  2. package/dist/chunks/{add-73X2SKBH.js → add-HJSEM4YJ.js} +17 -13
  3. package/dist/chunks/{add-QJ3WT4FW.js → add-SIGUSM3Y.js} +21 -17
  4. package/dist/chunks/{build-YUYCLCXD.js → build-XOMJDX4M.js} +18 -15
  5. package/dist/chunks/{chunk-F7OXZLY2.js → chunk-26XDDLXM.js} +2 -2
  6. package/dist/chunks/{chunk-VCE6QKFE.js → chunk-2O5J3KMT.js} +4 -4
  7. package/dist/chunks/{chunk-XI6NJLI4.js → chunk-2YRAWYGE.js} +3 -3
  8. package/dist/chunks/{chunk-X6O6XJEA.js → chunk-37V5P4VO.js} +16 -14
  9. package/dist/chunks/{chunk-EB7NJKPL.js → chunk-3F5EGINT.js} +3 -3
  10. package/dist/chunks/{chunk-RIB4S2IB.js → chunk-3HZLXCVL.js} +1 -1
  11. package/dist/chunks/{chunk-KQRVZWJU.js → chunk-3T7WSWZH.js} +1 -1
  12. package/dist/chunks/{chunk-3KNPVXJ3.js → chunk-4KD5BYHB.js} +1 -1
  13. package/dist/chunks/{chunk-XLKFJPMT.js → chunk-57RHXXXG.js} +1 -1
  14. package/dist/chunks/chunk-5GGUB4EO.js +31 -0
  15. package/dist/chunks/{chunk-R6IGDGX3.js → chunk-5XECIWME.js} +1 -1
  16. package/dist/chunks/{chunk-KAYSW4CJ.js → chunk-6JPVTPTU.js} +3 -3
  17. package/dist/chunks/{chunk-ZFWNMVNR.js → chunk-6M2KZUED.js} +19 -8
  18. package/dist/chunks/{chunk-HT2XWSAJ.js → chunk-7AEEQOD4.js} +2 -29
  19. package/dist/chunks/{chunk-HURL5EBN.js → chunk-7HE63HCR.js} +124 -161
  20. package/dist/chunks/chunk-7Q45OKWR.js +149 -0
  21. package/dist/chunks/{chunk-RI7KKKII.js → chunk-7R6M3BHM.js} +4 -18
  22. package/dist/chunks/{chunk-XBN2O34P.js → chunk-7ST552E3.js} +17 -4
  23. package/dist/chunks/{chunk-JKQWQA2T.js → chunk-AINIBIP4.js} +1 -1
  24. package/dist/chunks/{chunk-CV4S27SS.js → chunk-ASBP32T6.js} +1 -1
  25. package/dist/chunks/chunk-AYLY3ZVL.js +104 -0
  26. package/dist/chunks/{chunk-SOFC4MLS.js → chunk-BMKU5KEL.js} +9 -569
  27. package/dist/chunks/{chunk-KDYRLN6H.js → chunk-C5HKWXRR.js} +1 -1
  28. package/dist/chunks/{chunk-2MF3ZAVW.js → chunk-CJV7J7B5.js} +6 -6
  29. package/dist/chunks/{chunk-HJVTLJHO.js → chunk-DE7MBNHQ.js} +6 -6
  30. package/dist/chunks/{chunk-3L2YLLHC.js → chunk-DWIC7MRV.js} +2 -2
  31. package/dist/chunks/{chunk-GFCTRJI5.js → chunk-EZKW5YJ2.js} +1 -1
  32. package/dist/chunks/{chunk-MWYQ24FO.js → chunk-FRAXI2WT.js} +3 -3
  33. package/dist/chunks/{chunk-DDIZGOCK.js → chunk-FRZULOVH.js} +8 -6
  34. package/dist/chunks/{chunk-Y3J4VU2H.js → chunk-FWKSJYDV.js} +2 -2
  35. package/dist/chunks/chunk-FXD67VN5.js +467 -0
  36. package/dist/chunks/{chunk-EB5NBVTV.js → chunk-GISTGGBO.js} +8 -8
  37. package/dist/chunks/chunk-GY5I4AYD.js +122 -0
  38. package/dist/chunks/{chunk-PD4DYNSB.js → chunk-GZQQNLF5.js} +5 -5
  39. package/dist/chunks/{chunk-PIMIKY4X.js → chunk-IJ4X426J.js} +1 -1
  40. package/dist/chunks/{chunk-KSZ4MNHO.js → chunk-JH4WQRIU.js} +2 -2
  41. package/dist/chunks/{chunk-TVXCXIRO.js → chunk-L3UXB2CW.js} +1 -1
  42. package/dist/chunks/{chunk-O5DLWLT7.js → chunk-LXZVOR6F.js} +9 -9
  43. package/dist/chunks/{chunk-EG5BSAXD.js → chunk-MTWHQEXI.js} +1 -1
  44. package/dist/chunks/{chunk-WC7IINFV.js → chunk-NFU4XJIR.js} +1 -1
  45. package/dist/chunks/{chunk-TH2XUVDP.js → chunk-NGGLYKNU.js} +30 -6
  46. package/dist/chunks/{chunk-2PX6N4FE.js → chunk-NGNN6WF2.js} +10 -10
  47. package/dist/chunks/{chunk-GGPE5377.js → chunk-O26N2UPI.js} +1 -1
  48. package/dist/chunks/chunk-O75LSD3C.js +34 -0
  49. package/dist/chunks/{chunk-BBSS3XIW.js → chunk-OQ3C5VXZ.js} +1 -1
  50. package/dist/chunks/{chunk-M22O6CYY.js → chunk-POOO7W47.js} +1 -1
  51. package/dist/chunks/{chunk-LKTQR5JE.js → chunk-PRH6KRUT.js} +2 -2
  52. package/dist/chunks/chunk-Q2DGFCO7.js +579 -0
  53. package/dist/chunks/{chunk-OX7KI3LF.js → chunk-QFAS4OVW.js} +18 -0
  54. package/dist/chunks/{chunk-CHEZBD7H.js → chunk-R5PULMHT.js} +3 -3
  55. package/dist/chunks/{chunk-VAFU7DXZ.js → chunk-RKDCNQ4S.js} +1 -91
  56. package/dist/chunks/{chunk-BLYBHFIE.js → chunk-SF3AYAIF.js} +61 -24
  57. package/dist/chunks/{chunk-GMWRTZVZ.js → chunk-SLPSPYVR.js} +1 -1
  58. package/dist/chunks/{chunk-J5Y2QGGU.js → chunk-SWI6F4X3.js} +2 -2
  59. package/dist/chunks/chunk-V3MDDR2X.js +249 -0
  60. package/dist/chunks/{chunk-HMJVUXE6.js → chunk-VJ5NAOWB.js} +867 -625
  61. package/dist/chunks/{chunk-O5GNPPTU.js → chunk-VP5Y3SZG.js} +1 -1
  62. package/dist/chunks/{chunk-G75NFPIT.js → chunk-WNAKOXGK.js} +1 -1
  63. package/dist/chunks/{chunk-NP6BQPCN.js → chunk-WZ2S3A2A.js} +8 -6
  64. package/dist/chunks/{chunk-7QVJTI5H.js → chunk-XDGOOW3K.js} +1 -1
  65. package/dist/chunks/{chunk-UMA66MKW.js → chunk-XM3LOQIX.js} +1 -1
  66. package/dist/chunks/{chunk-CYNB6LL4.js → chunk-XNFHNTS2.js} +1 -1
  67. package/dist/chunks/{chunk-VDJN4WKH.js → chunk-XRWOTCDO.js} +1 -1
  68. package/dist/chunks/{chunk-UV2ZMFVG.js → chunk-YJKZQEHS.js} +2 -2
  69. package/dist/chunks/{chunk-STPH4Y62.js → chunk-YJUO3EKH.js} +1 -1
  70. package/dist/chunks/{chunk-Y42SPI2H.js → chunk-ZNMTDLYH.js} +6 -6
  71. package/dist/chunks/{chunk-VLPLCJZC.js → chunk-ZSFEACZU.js} +1 -1
  72. package/dist/chunks/{clear-USQM5VW5.js → clear-BWT2FJY4.js} +17 -13
  73. package/dist/chunks/{compile-vercel-config-2JNYMI6W.js → compile-vercel-config-DGM4NISW.js} +10 -7
  74. package/dist/chunks/{config-VTRIDLY4.js → config-NJAN3RMU.js} +20 -16
  75. package/dist/chunks/config-RSE6Z4LB.js +122 -0
  76. package/dist/chunks/{constants-YMCRE6IG.js → constants-WEQVJSYS.js} +1 -1
  77. package/dist/chunks/{delete-ILLSBCVQ.js → delete-LROBRBAH.js} +15 -11
  78. package/dist/chunks/{delete-VTPHK3EB.js → delete-SSL2PK2F.js} +12 -9
  79. package/dist/chunks/{disable-VTOMO64V.js → disable-ASG5JDZR.js} +12 -9
  80. package/dist/chunks/{discard-ZIOZ34ZI.js → discard-PV47B6IL.js} +12 -9
  81. package/dist/chunks/{edit-E3AMR4KM.js → edit-5ATYIOLX.js} +14 -11
  82. package/dist/chunks/{edit-JMZ5XWVW.js → edit-REI7HXGG.js} +16 -12
  83. package/dist/chunks/{enable-A4PMZ7QZ.js → enable-LZXL7XAG.js} +12 -9
  84. package/dist/chunks/{exec-CNBOV577.js → exec-XH4K34JM.js} +3 -3
  85. package/dist/chunks/{export-Y6AJ3WRZ.js → export-ZAZFQU2E.js} +12 -9
  86. package/dist/chunks/{image-26BKPAUB.js → image-QPHN5V7L.js} +7 -6
  87. package/dist/chunks/{import-builders-3H7J2SEK.js → import-builders-W3YE2V6A.js} +12 -9
  88. package/dist/chunks/{inspect-7DGKYHKW.js → inspect-BFGK72WY.js} +18 -14
  89. package/dist/chunks/{inspect-OEY4DJRI.js → inspect-FRXJRM6T.js} +18 -14
  90. package/dist/chunks/{inspect-ZW5N6O5P.js → inspect-RDMC2Z3Q.js} +17 -13
  91. package/dist/chunks/{inspect-GJFVAZIJ.js → inspect-SJEZVGPK.js} +20 -16
  92. package/dist/chunks/{inspect-N3E2PO6K.js → inspect-SSOM3FXS.js} +17 -13
  93. package/dist/chunks/{list-MIQ5D6PM.js → list-2HTR7Q3J.js} +18 -14
  94. package/dist/chunks/{list-2VTCNQEB.js → list-PHDUZVMR.js} +15 -11
  95. package/dist/chunks/{list-DTJBW7OQ.js → list-W33GXKDA.js} +18 -14
  96. package/dist/chunks/{login-L34UHAU5.js → login-JWAFHVDG.js} +30 -17
  97. package/dist/chunks/{ls-OBUDC4SB.js → ls-3AN2DZHN.js} +20 -15
  98. package/dist/chunks/{ls-SXJFBLUT.js → ls-3MH2OCP3.js} +20 -15
  99. package/dist/chunks/ls-D2POUHI7.js +176 -0
  100. package/dist/chunks/{ls-VDYUFSSC.js → ls-KDFU224B.js} +20 -15
  101. package/dist/chunks/{ls-OKO4IHWB.js → ls-KX2VBOGV.js} +18 -14
  102. package/dist/chunks/{ls-NCPQY4FV.js → ls-RWKNJQNT.js} +23 -18
  103. package/dist/chunks/{open-V5JDGXUP.js → open-IEYRB6RL.js} +15 -11
  104. package/dist/chunks/{permissions-6CPRPPBY.js → permissions-ZWZUMEHR.js} +10 -9
  105. package/dist/chunks/{publish-R27DPHFO.js → publish-UWZYBDHK.js} +12 -9
  106. package/dist/chunks/{push-VLVTBS42.js → push-IAEQ3FBF.js} +18 -15
  107. package/dist/chunks/{query-IVVRYMJN.js → query-NNOZYSED.js} +18 -14
  108. package/dist/chunks/{reorder-LJ2RBZM2.js → reorder-TKBM244W.js} +12 -9
  109. package/dist/chunks/{reply-USAISZYC.js → reply-FLBSBMTW.js} +16 -12
  110. package/dist/chunks/{resolve-CRCJYVS5.js → resolve-GJYPMWUE.js} +15 -11
  111. package/dist/chunks/{restore-6PBPEAMU.js → restore-PNI3TM3U.js} +12 -9
  112. package/dist/chunks/{rm-HHELZB7R.js → rm-76CSSSSV.js} +17 -13
  113. package/dist/chunks/{rm-TWU3JR6Z.js → rm-FN7LTIIL.js} +17 -13
  114. package/dist/chunks/{rm-KGOEOWVK.js → rm-FTE33UHE.js} +16 -12
  115. package/dist/chunks/rm-FXA5DLXQ.js +315 -0
  116. package/dist/chunks/{rm-EOD7RDSO.js → rm-PGJ4KR6U.js} +20 -16
  117. package/dist/chunks/{routes-SZI2G4SE.js → routes-2OLIBRYX.js} +3 -3
  118. package/dist/chunks/{rule-inspect-WFTVRK6B.js → rule-inspect-LJIGPTWS.js} +18 -14
  119. package/dist/chunks/{rules-AQYTFJI6.js → rules-6BMNO6M5.js} +11 -10
  120. package/dist/chunks/{schema-LUVFYPWN.js → schema-45SJNY5L.js} +9 -7
  121. package/dist/chunks/{schema-ZCDCJC7E.js → schema-HATXEQDP.js} +14 -11
  122. package/dist/chunks/set-C3UQUQ42.js +243 -0
  123. package/dist/chunks/{tags-RCNRFX7U.js → tags-BTVDROFG.js} +6 -5
  124. package/dist/chunks/{types-AJHILHO5.js → types-JGANJ5EQ.js} +12 -8
  125. package/dist/chunks/{update-I7QGAOYF.js → update-B6PSOHUW.js} +19 -15
  126. package/dist/commands/build/builder-worker.cjs +281 -0
  127. package/dist/commands/build/index.js +695 -236
  128. package/dist/commands/deploy/index.js +131 -50
  129. package/dist/commands/dev/index.js +677 -144
  130. package/dist/commands/env/index.js +1199 -565
  131. package/dist/commands/link/index.js +27 -22
  132. package/dist/commands/list/index.js +21 -14
  133. package/dist/commands-bulk.js +2051 -1019
  134. package/dist/help.js +1 -1
  135. package/dist/index.js +39 -33
  136. package/dist/version.mjs +1 -1
  137. package/package.json +48 -48
@@ -10,7 +10,7 @@ import {
10
10
  packageName,
11
11
  projectOption,
12
12
  yesOption
13
- } from "./chunk-SOFC4MLS.js";
13
+ } from "./chunk-Q2DGFCO7.js";
14
14
 
15
15
  // src/commands/vcr/permissions/command.ts
16
16
  var PERMISSIONS_ACTIONS = {
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getResolvedOrderMetadata,
9
9
  getRollupColumnName
10
- } from "./chunk-CV4S27SS.js";
10
+ } from "./chunk-ASBP32T6.js";
11
11
  import {
12
12
  formatGranularity
13
13
  } from "./chunk-5AJPMLDV.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-A3NYPUKZ.js";
17
17
  import {
18
18
  ellipsizeMiddle
19
- } from "./chunk-VDJN4WKH.js";
19
+ } from "./chunk-XRWOTCDO.js";
20
20
  import {
21
21
  elapsed
22
22
  } from "./chunk-VXYGCOKL.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-GGP5R3FU.js";
26
26
  import {
27
27
  table
28
- } from "./chunk-VAFU7DXZ.js";
28
+ } from "./chunk-RKDCNQ4S.js";
29
29
  import {
30
30
  require_source
31
31
  } from "./chunk-S7KYDPEM.js";
@@ -7,23 +7,25 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  outputError,
9
9
  writeJsonError
10
- } from "./chunk-KQRVZWJU.js";
10
+ } from "./chunk-3T7WSWZH.js";
11
11
  import {
12
12
  detectExplicitScope,
13
13
  getLinkedProject,
14
14
  getScope,
15
15
  resolveProjectContext
16
- } from "./chunk-HMJVUXE6.js";
16
+ } from "./chunk-VJ5NAOWB.js";
17
17
  import {
18
18
  printError
19
- } from "./chunk-VAFU7DXZ.js";
19
+ } from "./chunk-AYLY3ZVL.js";
20
20
  import {
21
- getCommandName,
22
21
  isAPIError
23
- } from "./chunk-SOFC4MLS.js";
22
+ } from "./chunk-BMKU5KEL.js";
23
+ import {
24
+ getCommandName
25
+ } from "./chunk-Q2DGFCO7.js";
24
26
  import {
25
27
  output_manager_default
26
- } from "./chunk-OX7KI3LF.js";
28
+ } from "./chunk-QFAS4OVW.js";
27
29
 
28
30
  // src/commands/comments/errors.ts
29
31
  function handleCommentsParseError(err, subcommandName) {
@@ -6,12 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getEnvTargetPlaceholder
9
- } from "./chunk-HMJVUXE6.js";
9
+ } from "./chunk-FXD67VN5.js";
10
10
  import {
11
11
  packageName,
12
12
  projectOption,
13
13
  yesOption
14
- } from "./chunk-SOFC4MLS.js";
14
+ } from "./chunk-Q2DGFCO7.js";
15
15
 
16
16
  // src/commands/build/command.ts
17
17
  var buildCommand = {
@@ -0,0 +1,467 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ require_dist
9
+ } from "./chunk-XNFHNTS2.js";
10
+ import {
11
+ forceOption,
12
+ formatOption,
13
+ jsonOption,
14
+ packageName,
15
+ projectOption,
16
+ require_lib,
17
+ yesOption
18
+ } from "./chunk-Q2DGFCO7.js";
19
+ import {
20
+ __toESM
21
+ } from "./chunk-TZ2YI2VH.js";
22
+
23
+ // src/util/env/env-target.ts
24
+ var import_constants = __toESM(require_dist(), 1);
25
+ var import_title = __toESM(require_lib(), 1);
26
+ var envTargetChoices = import_constants.PROJECT_ENV_TARGET.map((t) => ({
27
+ name: (0, import_title.default)(t),
28
+ value: t
29
+ }));
30
+ function isValidEnvTarget(target) {
31
+ return typeof target === "undefined" || envTargetChoices.map((c) => c.value).includes(target);
32
+ }
33
+ function getEnvTargetPlaceholder() {
34
+ return `<${envTargetChoices.map((c) => c.value).join(" | ")}>`;
35
+ }
36
+ function parseEnvTargetArg(arg) {
37
+ return Array.from(
38
+ new Set(
39
+ arg.split(",").map((t) => t.trim()).filter(Boolean)
40
+ )
41
+ );
42
+ }
43
+
44
+ // src/commands/env/command.ts
45
+ var targetPlaceholder = getEnvTargetPlaceholder();
46
+ var listSubcommand = {
47
+ name: "list",
48
+ aliases: ["ls"],
49
+ description: "List all Environment Variables for a Project",
50
+ arguments: [
51
+ {
52
+ name: "environment",
53
+ required: false
54
+ },
55
+ {
56
+ name: "git-branch",
57
+ required: false
58
+ }
59
+ ],
60
+ options: [
61
+ formatOption,
62
+ jsonOption,
63
+ projectOption,
64
+ {
65
+ name: "guidance",
66
+ description: "Receive command suggestions once command is complete",
67
+ shorthand: null,
68
+ type: Boolean,
69
+ deprecated: false
70
+ }
71
+ ],
72
+ examples: []
73
+ };
74
+ var addSubcommand = {
75
+ name: "add",
76
+ aliases: [],
77
+ description: "Add an Environment Variable",
78
+ arguments: [
79
+ {
80
+ name: "name",
81
+ required: true
82
+ },
83
+ {
84
+ name: "environment",
85
+ required: false
86
+ }
87
+ ],
88
+ options: [
89
+ projectOption,
90
+ {
91
+ name: "git-branch",
92
+ description: "Set the Git branch for a Preview Environment Variable",
93
+ shorthand: null,
94
+ type: String,
95
+ argument: "NAME",
96
+ deprecated: false
97
+ },
98
+ {
99
+ name: "sensitive",
100
+ description: "Store the value as a Secret",
101
+ shorthand: null,
102
+ type: Boolean,
103
+ deprecated: false
104
+ },
105
+ {
106
+ name: "no-sensitive",
107
+ description: "Store the value as Config",
108
+ shorthand: null,
109
+ type: Boolean,
110
+ deprecated: false
111
+ },
112
+ {
113
+ name: "type",
114
+ description: "Set the Environment Variable type (`config` or `secret`)",
115
+ shorthand: null,
116
+ type: String,
117
+ argument: "TYPE",
118
+ deprecated: false
119
+ },
120
+ {
121
+ name: "visibility",
122
+ description: "Deprecated alias for `--type`",
123
+ shorthand: null,
124
+ type: String,
125
+ argument: "VISIBILITY",
126
+ deprecated: true
127
+ },
128
+ {
129
+ ...forceOption,
130
+ description: "Overwrite an existing variable for the same target",
131
+ shorthand: null
132
+ },
133
+ {
134
+ ...yesOption,
135
+ description: "Accept default choices when adding an Environment Variable"
136
+ },
137
+ {
138
+ name: "guidance",
139
+ description: "Show command suggestions after completion",
140
+ shorthand: null,
141
+ type: Boolean,
142
+ deprecated: false
143
+ },
144
+ {
145
+ name: "value",
146
+ description: "Set the variable value for non-interactive use; otherwise use stdin or the prompt",
147
+ shorthand: null,
148
+ type: String,
149
+ argument: "VALUE",
150
+ deprecated: false
151
+ }
152
+ ],
153
+ examples: [
154
+ {
155
+ name: "Add a new variable (prompts for value and Environments)",
156
+ value: [
157
+ `${packageName} env add <name>`,
158
+ `${packageName} env add API_TOKEN`
159
+ ]
160
+ },
161
+ {
162
+ name: "Add a new Environment Variable to a specific Environment",
163
+ value: [
164
+ `${packageName} env add <name> ${targetPlaceholder}`,
165
+ `${packageName} env add DB_PASS production`
166
+ ]
167
+ },
168
+ {
169
+ name: "Add one variable to multiple Environments (comma-separated)",
170
+ value: [
171
+ `${packageName} env add <name> <environment>[,<environment>]`,
172
+ `${packageName} env add API_URL production,preview,development`
173
+ ]
174
+ },
175
+ {
176
+ name: "Override an existing Environment Variable of same target (production, preview, deployment)",
177
+ value: `${packageName} env add API_TOKEN --force`
178
+ },
179
+ {
180
+ name: "Add a Config Environment Variable that remains readable later",
181
+ value: `${packageName} env add API_TOKEN --no-sensitive`
182
+ },
183
+ {
184
+ name: "Add a new Environment Variable for a specific Environment and Git Branch",
185
+ value: [
186
+ `${packageName} env add <name> ${targetPlaceholder} --git-branch <name>`,
187
+ `${packageName} env add DB_PASS preview --git-branch feat1`
188
+ ]
189
+ },
190
+ {
191
+ name: "Add a new Environment Variable from stdin",
192
+ value: [
193
+ `cat <file> | ${packageName} env add <name> ${targetPlaceholder}`,
194
+ `cat ~/.npmrc | ${packageName} env add NPM_RC preview`,
195
+ `${packageName} env add API_URL production < url.txt`
196
+ ]
197
+ },
198
+ {
199
+ name: "Add with --value for non-interactive use",
200
+ value: `${packageName} env add API_TOKEN production --value "<value>" --yes`
201
+ }
202
+ ]
203
+ };
204
+ var removeSubcommand = {
205
+ name: "remove",
206
+ aliases: ["rm"],
207
+ description: "Remove an Environment Variable (see examples below)",
208
+ arguments: [
209
+ {
210
+ name: "name",
211
+ required: true
212
+ },
213
+ {
214
+ name: "environment",
215
+ required: false
216
+ }
217
+ ],
218
+ options: [
219
+ projectOption,
220
+ {
221
+ ...yesOption,
222
+ description: "Skip the confirmation prompt when removing an Environment Variable"
223
+ }
224
+ ],
225
+ examples: [
226
+ {
227
+ name: "Remove a variable from multiple Environments",
228
+ value: [
229
+ `${packageName} env rm <name>`,
230
+ `${packageName} env rm API_TOKEN`
231
+ ]
232
+ },
233
+ {
234
+ name: "Remove a variable from a specific Environment",
235
+ value: [
236
+ `${packageName} env rm <name> ${targetPlaceholder}`,
237
+ `${packageName} env rm NPM_RC preview`
238
+ ]
239
+ },
240
+ {
241
+ name: "Remove a variable from a specific Environment and Git Branch",
242
+ value: [
243
+ `${packageName} env rm <name> ${targetPlaceholder} <gitbranch>`,
244
+ `${packageName} env rm NPM_RC preview feat1`
245
+ ]
246
+ }
247
+ ]
248
+ };
249
+ var pullSubcommand = {
250
+ name: "pull",
251
+ aliases: [],
252
+ description: "Pull all Development Environment Variables from the cloud and write to a file [.env.local]",
253
+ arguments: [
254
+ {
255
+ name: "filename",
256
+ required: false
257
+ }
258
+ ],
259
+ options: [
260
+ projectOption,
261
+ {
262
+ name: "environment",
263
+ description: "Set the Environment when pulling Environment Variables",
264
+ shorthand: null,
265
+ type: String,
266
+ argument: "TARGET",
267
+ deprecated: false
268
+ },
269
+ {
270
+ name: "git-branch",
271
+ description: "Specify the Git branch to pull specific Environment Variables for",
272
+ shorthand: null,
273
+ type: String,
274
+ argument: "NAME",
275
+ deprecated: false
276
+ },
277
+ {
278
+ name: "id",
279
+ description: "Pull environment variables for a specific deployment (e.g. dpl_xxx)",
280
+ shorthand: null,
281
+ type: String,
282
+ argument: "ID",
283
+ deprecated: false
284
+ },
285
+ {
286
+ ...yesOption,
287
+ description: "Skip the confirmation prompt when removing an environment variable"
288
+ }
289
+ ],
290
+ examples: [
291
+ {
292
+ name: "Pull all Development Environment Variables down from the cloud",
293
+ value: [
294
+ `${packageName} env pull <file>`,
295
+ `${packageName} env pull .env.development.local`
296
+ ]
297
+ },
298
+ {
299
+ name: "Pull environment variables for a specific deployment",
300
+ value: `${packageName} env pull --id dpl_xxx`
301
+ }
302
+ ]
303
+ };
304
+ var runSubcommand = {
305
+ name: "run",
306
+ aliases: [],
307
+ description: "Run a command with environment variables from the linked Vercel project",
308
+ arguments: [
309
+ {
310
+ name: "command",
311
+ required: true,
312
+ multiple: true
313
+ }
314
+ ],
315
+ options: [
316
+ projectOption,
317
+ {
318
+ name: "environment",
319
+ description: "Specify the environment to pull variables from (default: development)",
320
+ shorthand: "e",
321
+ type: String,
322
+ argument: "TARGET",
323
+ deprecated: false
324
+ },
325
+ {
326
+ name: "git-branch",
327
+ description: "Specify the Git branch to pull specific Environment Variables for",
328
+ shorthand: null,
329
+ type: String,
330
+ argument: "NAME",
331
+ deprecated: false
332
+ }
333
+ ],
334
+ examples: [
335
+ {
336
+ name: "Run Next.js dev server with development environment variables",
337
+ value: `${packageName} env run -- next dev`
338
+ },
339
+ {
340
+ name: "Run tests with preview environment variables for a specific branch",
341
+ value: `${packageName} env run -e preview --git-branch feature-x -- npm test`
342
+ }
343
+ ]
344
+ };
345
+ var updateSubcommand = {
346
+ name: "update",
347
+ aliases: [],
348
+ description: "Update the value of an existing Environment Variable (see examples below)",
349
+ arguments: [
350
+ {
351
+ name: "name",
352
+ required: true
353
+ },
354
+ {
355
+ name: "environment",
356
+ required: false
357
+ }
358
+ ],
359
+ options: [
360
+ projectOption,
361
+ {
362
+ name: "sensitive",
363
+ description: "Store the updated value as a Secret",
364
+ shorthand: null,
365
+ type: Boolean,
366
+ deprecated: false
367
+ },
368
+ {
369
+ name: "type",
370
+ description: "Set the Environment Variable type (`config` or `secret`)",
371
+ shorthand: null,
372
+ type: String,
373
+ argument: "TYPE",
374
+ deprecated: false
375
+ },
376
+ {
377
+ name: "visibility",
378
+ description: "Deprecated alias for `--type`",
379
+ shorthand: null,
380
+ type: String,
381
+ argument: "VISIBILITY",
382
+ deprecated: true
383
+ },
384
+ {
385
+ ...yesOption,
386
+ description: "Skip the confirmation prompt when updating an Environment Variable"
387
+ },
388
+ {
389
+ name: "value",
390
+ description: "New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",
391
+ shorthand: null,
392
+ type: String,
393
+ argument: "VALUE",
394
+ deprecated: false
395
+ }
396
+ ],
397
+ examples: [
398
+ {
399
+ name: "Update a variable in all Environments",
400
+ value: [
401
+ `${packageName} env update <name>`,
402
+ `${packageName} env update API_TOKEN`
403
+ ]
404
+ },
405
+ {
406
+ name: "Update a variable in a specific Environment",
407
+ value: [
408
+ `${packageName} env update <name> ${targetPlaceholder}`,
409
+ `${packageName} env update DB_PASS production`
410
+ ]
411
+ },
412
+ {
413
+ name: "Update a variable for a specific Environment and Git Branch",
414
+ value: [
415
+ `${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,
416
+ `${packageName} env update NPM_RC preview feat1`
417
+ ]
418
+ },
419
+ {
420
+ name: "Update a variable from stdin",
421
+ value: [
422
+ `cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,
423
+ `cat ~/.npmrc | ${packageName} env update NPM_RC preview`,
424
+ `${packageName} env update API_URL production < url.txt`
425
+ ]
426
+ }
427
+ ]
428
+ };
429
+ var envCommand = {
430
+ name: "env",
431
+ aliases: [],
432
+ description: "Interact with Environment Variables for a Project",
433
+ arguments: [],
434
+ subcommands: [
435
+ addSubcommand,
436
+ listSubcommand,
437
+ pullSubcommand,
438
+ removeSubcommand,
439
+ runSubcommand,
440
+ updateSubcommand
441
+ ],
442
+ options: [],
443
+ examples: [
444
+ {
445
+ name: "Run a command with Environment Variables from the linked Project",
446
+ value: `${packageName} env run -- <command>`
447
+ },
448
+ {
449
+ name: "Add one variable to multiple Environments",
450
+ value: `${packageName} env add API_URL production,preview,development`
451
+ }
452
+ ]
453
+ };
454
+
455
+ export {
456
+ envTargetChoices,
457
+ isValidEnvTarget,
458
+ getEnvTargetPlaceholder,
459
+ parseEnvTargetArg,
460
+ listSubcommand,
461
+ addSubcommand,
462
+ removeSubcommand,
463
+ pullSubcommand,
464
+ runSubcommand,
465
+ updateSubcommand,
466
+ envCommand
467
+ };
@@ -6,28 +6,28 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  loginCommand
9
- } from "./chunk-HURL5EBN.js";
9
+ } from "./chunk-7HE63HCR.js";
10
10
  import {
11
11
  help
12
- } from "./chunk-XI6NJLI4.js";
12
+ } from "./chunk-2YRAWYGE.js";
13
13
  import {
14
14
  login
15
- } from "./chunk-HMJVUXE6.js";
15
+ } from "./chunk-VJ5NAOWB.js";
16
16
  import {
17
17
  TelemetryClient
18
- } from "./chunk-CYNB6LL4.js";
18
+ } from "./chunk-XNFHNTS2.js";
19
19
  import {
20
20
  printError
21
- } from "./chunk-VAFU7DXZ.js";
21
+ } from "./chunk-AYLY3ZVL.js";
22
22
  import {
23
23
  parseArguments
24
- } from "./chunk-XLKFJPMT.js";
24
+ } from "./chunk-57RHXXXG.js";
25
25
  import {
26
26
  getFlagsSpecification
27
- } from "./chunk-SOFC4MLS.js";
27
+ } from "./chunk-Q2DGFCO7.js";
28
28
  import {
29
29
  output_manager_default
30
- } from "./chunk-OX7KI3LF.js";
30
+ } from "./chunk-QFAS4OVW.js";
31
31
  import {
32
32
  require_source
33
33
  } from "./chunk-S7KYDPEM.js";
@@ -0,0 +1,122 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ formatOption,
9
+ jsonOption,
10
+ packageName,
11
+ projectOption
12
+ } from "./chunk-Q2DGFCO7.js";
13
+
14
+ // src/commands/traces/config/command.ts
15
+ var RULE_ENVIRONMENTS = ["any", "preview", "production"];
16
+ var lsSubcommand = {
17
+ name: "ls",
18
+ aliases: ["list"],
19
+ description: "List the trace sampling rules for a project",
20
+ arguments: [],
21
+ options: [formatOption, jsonOption, projectOption],
22
+ examples: [
23
+ {
24
+ name: "List the sampling rules for the linked project",
25
+ value: `${packageName} traces config ls`
26
+ },
27
+ {
28
+ name: "List the sampling rules as JSON",
29
+ value: `${packageName} traces config ls --json`
30
+ }
31
+ ]
32
+ };
33
+ var setSubcommand = {
34
+ name: "set",
35
+ aliases: [],
36
+ description: "Add or replace one trace sampling rule. The rate is a whole percentage from 1 to 100.",
37
+ arguments: [
38
+ { name: "environment", required: true },
39
+ { name: "rate", required: true },
40
+ { name: "requestPath", required: false }
41
+ ],
42
+ options: [formatOption, jsonOption, projectOption],
43
+ examples: [
44
+ {
45
+ name: "Trace a quarter of production traffic",
46
+ value: `${packageName} traces config set production 25`
47
+ },
48
+ {
49
+ name: "Trace every preview request to one path prefix",
50
+ value: `${packageName} traces config set preview 100 /api`
51
+ },
52
+ {
53
+ name: "Trace one percent of traffic in every environment",
54
+ value: `${packageName} traces config set any 1`
55
+ }
56
+ ]
57
+ };
58
+ var rmSubcommand = {
59
+ name: "rm",
60
+ aliases: ["remove", "delete"],
61
+ description: "Remove trace sampling rules. Without a path prefix, every rule for the environment is removed.",
62
+ arguments: [
63
+ { name: "environment", required: true },
64
+ { name: "requestPath", required: false }
65
+ ],
66
+ options: [
67
+ {
68
+ name: "default",
69
+ shorthand: null,
70
+ type: Boolean,
71
+ deprecated: false,
72
+ description: "Remove only the rule that has no path prefix, keeping the per-path rules"
73
+ },
74
+ formatOption,
75
+ jsonOption,
76
+ projectOption
77
+ ],
78
+ examples: [
79
+ {
80
+ name: "Remove one rule by environment and path prefix",
81
+ value: `${packageName} traces config rm production /api`
82
+ },
83
+ {
84
+ name: "Remove every rule for production",
85
+ value: `${packageName} traces config rm production`
86
+ },
87
+ {
88
+ name: "Remove only the production rule that covers all paths",
89
+ value: `${packageName} traces config rm production --default`
90
+ }
91
+ ]
92
+ };
93
+ var tracesConfigCommand = {
94
+ name: "config",
95
+ aliases: [],
96
+ description: "Manage trace sampling rules for a Vercel project.",
97
+ arguments: [],
98
+ subcommands: [lsSubcommand, setSubcommand, rmSubcommand],
99
+ options: [],
100
+ examples: [
101
+ {
102
+ name: "List the sampling rules for the linked project",
103
+ value: `${packageName} traces config ls`
104
+ },
105
+ {
106
+ name: "Trace a quarter of production traffic",
107
+ value: `${packageName} traces config set production 25`
108
+ },
109
+ {
110
+ name: "Remove every rule for production",
111
+ value: `${packageName} traces config rm production`
112
+ }
113
+ ]
114
+ };
115
+
116
+ export {
117
+ RULE_ENVIRONMENTS,
118
+ lsSubcommand,
119
+ setSubcommand,
120
+ rmSubcommand,
121
+ tracesConfigCommand
122
+ };