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
@@ -0,0 +1,579 @@
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
+ pkg_default
9
+ } from "./chunk-P4QNYOFB.js";
10
+ import {
11
+ require_source
12
+ } from "./chunk-S7KYDPEM.js";
13
+ import {
14
+ __commonJS,
15
+ __toESM
16
+ } from "./chunk-TZ2YI2VH.js";
17
+
18
+ // ../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/lower-case.js
19
+ var require_lower_case = __commonJS({
20
+ "../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/lower-case.js"(exports, module) {
21
+ var conjunctions = [
22
+ "for",
23
+ "and",
24
+ "nor",
25
+ "but",
26
+ "or",
27
+ "yet",
28
+ "so"
29
+ ];
30
+ var articles = [
31
+ "a",
32
+ "an",
33
+ "the"
34
+ ];
35
+ var prepositions = [
36
+ "aboard",
37
+ "about",
38
+ "above",
39
+ "across",
40
+ "after",
41
+ "against",
42
+ "along",
43
+ "amid",
44
+ "among",
45
+ "anti",
46
+ "around",
47
+ "as",
48
+ "at",
49
+ "before",
50
+ "behind",
51
+ "below",
52
+ "beneath",
53
+ "beside",
54
+ "besides",
55
+ "between",
56
+ "beyond",
57
+ "but",
58
+ "by",
59
+ "concerning",
60
+ "considering",
61
+ "despite",
62
+ "down",
63
+ "during",
64
+ "except",
65
+ "excepting",
66
+ "excluding",
67
+ "following",
68
+ "for",
69
+ "from",
70
+ "in",
71
+ "inside",
72
+ "into",
73
+ "like",
74
+ "minus",
75
+ "near",
76
+ "of",
77
+ "off",
78
+ "on",
79
+ "onto",
80
+ "opposite",
81
+ "over",
82
+ "past",
83
+ "per",
84
+ "plus",
85
+ "regarding",
86
+ "round",
87
+ "save",
88
+ "since",
89
+ "than",
90
+ "through",
91
+ "to",
92
+ "toward",
93
+ "towards",
94
+ "under",
95
+ "underneath",
96
+ "unlike",
97
+ "until",
98
+ "up",
99
+ "upon",
100
+ "versus",
101
+ "via",
102
+ "with",
103
+ "within",
104
+ "without"
105
+ ];
106
+ module.exports = /* @__PURE__ */ new Set([
107
+ ...conjunctions,
108
+ ...articles,
109
+ ...prepositions
110
+ ]);
111
+ }
112
+ });
113
+
114
+ // ../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/specials.js
115
+ var require_specials = __commonJS({
116
+ "../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/specials.js"(exports, module) {
117
+ var intended = [
118
+ "ZEIT",
119
+ "ZEIT Inc.",
120
+ "CLI",
121
+ "API",
122
+ "HTTP",
123
+ "HTTPS",
124
+ "JSX",
125
+ "DNS",
126
+ "URL",
127
+ "now.sh",
128
+ "now.json",
129
+ "CI",
130
+ "CDN",
131
+ "package.json",
132
+ "GitHub",
133
+ "CSS",
134
+ "JS",
135
+ "HTML",
136
+ "WordPress",
137
+ "JavaScript",
138
+ "Next.js",
139
+ "Node.js"
140
+ ];
141
+ module.exports = intended;
142
+ }
143
+ });
144
+
145
+ // ../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/index.js
146
+ var require_lib = __commonJS({
147
+ "../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/index.js"(exports, module) {
148
+ var lowerCase = require_lower_case();
149
+ var specials = require_specials();
150
+ var regex = /(?:(?:(\s?(?:^|[.\(\)!?;:"-])\s*)(\w))|(\w))(\w*[’']*\w*)/g;
151
+ var convertToRegExp = (specials2) => specials2.map((s) => [new RegExp(`\\b${s}\\b`, "gi"), s]);
152
+ function parseMatch(match) {
153
+ const firstCharacter = match[0];
154
+ if (/\s/.test(firstCharacter)) {
155
+ return match.substr(1);
156
+ }
157
+ if (/[\(\)]/.test(firstCharacter)) {
158
+ return null;
159
+ }
160
+ return match;
161
+ }
162
+ module.exports = (str, options = {}) => {
163
+ str = str.toLowerCase().replace(regex, (m, lead = "", forced, lower, rest) => {
164
+ const parsedMatch = parseMatch(m);
165
+ if (!parsedMatch) {
166
+ return m;
167
+ }
168
+ if (!forced) {
169
+ const fullLower = lower + rest;
170
+ if (lowerCase.has(fullLower)) {
171
+ return parsedMatch;
172
+ }
173
+ }
174
+ return lead + (lower || forced).toUpperCase() + rest;
175
+ });
176
+ const customSpecials = options.special || [];
177
+ const replace = [...specials, ...customSpecials];
178
+ const replaceRegExp = convertToRegExp(replace);
179
+ replaceRegExp.forEach(([pattern, s]) => {
180
+ str = str.replace(pattern, s);
181
+ });
182
+ return str;
183
+ };
184
+ }
185
+ });
186
+
187
+ // src/util/output/cmd.ts
188
+ var import_chalk = __toESM(require_source(), 1);
189
+ function cmd(text) {
190
+ return `${import_chalk.default.gray("`")}${import_chalk.default.cyan(text)}${import_chalk.default.gray("`")}`;
191
+ }
192
+
193
+ // src/util/pkg-name.ts
194
+ var import_title = __toESM(require_lib(), 1);
195
+ var packageName = pkg_default.name;
196
+ function getTitleName() {
197
+ const str = packageName;
198
+ return (0, import_title.default)(str);
199
+ }
200
+ function getCommandName(subcommands) {
201
+ let vercel = packageName;
202
+ if (subcommands) {
203
+ vercel = `${vercel} ${subcommands}`;
204
+ }
205
+ return cmd(vercel);
206
+ }
207
+ function getCommandNamePlain(subcommands) {
208
+ return subcommands ? `${packageName} ${subcommands}` : packageName;
209
+ }
210
+
211
+ // src/util/get-flags-specification.ts
212
+ function getFlagsSpecification(options) {
213
+ const flagsSpecification = {};
214
+ for (const option of options) {
215
+ flagsSpecification[`--${option.name}`] = option.type;
216
+ if (option.shorthand) {
217
+ flagsSpecification[`-${option.shorthand}`] = `--${option.name}`;
218
+ }
219
+ }
220
+ return flagsSpecification;
221
+ }
222
+
223
+ // src/util/redact-args.ts
224
+ var SENSITIVE_AUTH_FLAG_NAMES = /* @__PURE__ */ new Set(["--token", "-t"]);
225
+ function normalizeFlagName(flag) {
226
+ if (flag.includes("=")) {
227
+ return flag.slice(0, flag.indexOf("="));
228
+ }
229
+ return flag;
230
+ }
231
+ function stripSensitiveAuthArgs(args) {
232
+ const out = [];
233
+ for (let i = 0; i < args.length; i++) {
234
+ const arg = args[i];
235
+ const name = normalizeFlagName(arg);
236
+ if (SENSITIVE_AUTH_FLAG_NAMES.has(name)) {
237
+ if (!arg.includes("=") && i + 1 < args.length) {
238
+ i++;
239
+ }
240
+ continue;
241
+ }
242
+ out.push(arg);
243
+ }
244
+ return out;
245
+ }
246
+
247
+ // src/util/arg-common.ts
248
+ var globalCommandOptions = [
249
+ {
250
+ name: "help",
251
+ shorthand: "h",
252
+ type: Boolean,
253
+ description: "Output usage information",
254
+ deprecated: false
255
+ },
256
+ {
257
+ name: "version",
258
+ shorthand: "v",
259
+ type: Boolean,
260
+ description: "Output the version number",
261
+ deprecated: false
262
+ },
263
+ {
264
+ name: "cwd",
265
+ shorthand: null,
266
+ type: String,
267
+ argument: "DIR",
268
+ description: "Sets the current working directory for a single run of a command",
269
+ deprecated: false
270
+ },
271
+ {
272
+ name: "local-config",
273
+ shorthand: "A",
274
+ type: String,
275
+ argument: "FILE",
276
+ description: "Path to the local `vercel.json` file",
277
+ deprecated: false
278
+ },
279
+ {
280
+ name: "global-config",
281
+ shorthand: "Q",
282
+ type: String,
283
+ argument: "DIR",
284
+ description: "Path to the global `.vercel` directory",
285
+ deprecated: false
286
+ },
287
+ {
288
+ name: "debug",
289
+ shorthand: "d",
290
+ type: Boolean,
291
+ description: "Debug mode (default off)",
292
+ deprecated: false
293
+ },
294
+ {
295
+ name: "no-color",
296
+ shorthand: null,
297
+ type: Boolean,
298
+ description: "No color mode (default off)",
299
+ deprecated: false
300
+ },
301
+ {
302
+ name: "non-interactive",
303
+ shorthand: null,
304
+ type: Boolean,
305
+ description: "Run without interactive prompts; when an agent is detected this is the default",
306
+ deprecated: false
307
+ },
308
+ {
309
+ name: "scope",
310
+ shorthand: "S",
311
+ type: String,
312
+ description: "Set a custom scope",
313
+ deprecated: false
314
+ },
315
+ {
316
+ name: "token",
317
+ shorthand: "t",
318
+ type: String,
319
+ argument: "TOKEN",
320
+ description: "Login token",
321
+ deprecated: false
322
+ },
323
+ { name: "team", shorthand: "T", type: String, deprecated: false },
324
+ { name: "api", shorthand: null, type: String, deprecated: false }
325
+ ];
326
+ var GLOBAL_CLI_FLAG_NAMES = (() => {
327
+ const set = /* @__PURE__ */ new Set();
328
+ for (const opt of globalCommandOptions) {
329
+ set.add(`--${opt.name}`);
330
+ if (opt.shorthand) {
331
+ set.add(`-${opt.shorthand}`);
332
+ }
333
+ }
334
+ return set;
335
+ })();
336
+ function globalCliFlagTakesValue(flagName) {
337
+ const normalized = normalizeFlagName(flagName);
338
+ for (const opt of globalCommandOptions) {
339
+ if (`--${opt.name}` === normalized) {
340
+ return opt.type === String;
341
+ }
342
+ if (opt.shorthand && `-${opt.shorthand}` === normalized) {
343
+ return opt.type === String;
344
+ }
345
+ }
346
+ return false;
347
+ }
348
+ var SUGGESTION_FLAGS_TAKING_VALUE = /* @__PURE__ */ new Set([
349
+ "--config",
350
+ "--environment",
351
+ "--git-branch",
352
+ "--id",
353
+ "--value",
354
+ "--status",
355
+ "--name",
356
+ "--slug",
357
+ "--version",
358
+ // redirects list --version
359
+ "--search",
360
+ "--format",
361
+ "--project",
362
+ "--page",
363
+ "--per-page"
364
+ ]);
365
+ function suggestionFlagTakesSeparateValue(flagName) {
366
+ const name = normalizeFlagName(flagName);
367
+ if (globalCliFlagTakesValue(name))
368
+ return true;
369
+ return SUGGESTION_FLAGS_TAKING_VALUE.has(name);
370
+ }
371
+ function getSameSubcommandSuggestionFlags(args) {
372
+ const safeArgs = stripSensitiveAuthArgs(args);
373
+ const out = [];
374
+ for (let i = 0; i < safeArgs.length; i++) {
375
+ const a = safeArgs[i];
376
+ if (!a.startsWith("-"))
377
+ continue;
378
+ out.push(a);
379
+ if (a.includes("="))
380
+ continue;
381
+ const name = a;
382
+ if (suggestionFlagTakesSeparateValue(name) && i + 1 < safeArgs.length && !safeArgs[i + 1].startsWith("-")) {
383
+ out.push(safeArgs[++i]);
384
+ }
385
+ }
386
+ return out;
387
+ }
388
+ var GLOBAL_OPTIONS = getFlagsSpecification(globalCommandOptions);
389
+ var arg_common_default = () => GLOBAL_OPTIONS;
390
+ var yesOption = {
391
+ name: "yes",
392
+ shorthand: "y",
393
+ type: Boolean,
394
+ deprecated: false,
395
+ description: "Accept default value for all prompts"
396
+ };
397
+ var nextOption = {
398
+ name: "next",
399
+ shorthand: "N",
400
+ type: Number,
401
+ deprecated: false,
402
+ description: "Show next page of results",
403
+ argument: "MS"
404
+ };
405
+ var confirmOption = {
406
+ name: "confirm",
407
+ shorthand: "c",
408
+ type: Boolean,
409
+ deprecated: true
410
+ };
411
+ var limitOption = {
412
+ name: "limit",
413
+ shorthand: null,
414
+ type: Number,
415
+ deprecated: false,
416
+ description: "Number of results to return per page (default: 20, max: 100)",
417
+ argument: "NUMBER"
418
+ };
419
+ var forceOption = {
420
+ name: "force",
421
+ shorthand: "f",
422
+ type: Boolean,
423
+ deprecated: false
424
+ };
425
+ var formatOption = {
426
+ name: "format",
427
+ shorthand: "F",
428
+ type: String,
429
+ argument: "FORMAT",
430
+ description: "Specify the output format (json)",
431
+ deprecated: false
432
+ };
433
+ var jsonOption = {
434
+ name: "json",
435
+ shorthand: null,
436
+ type: Boolean,
437
+ deprecated: false,
438
+ description: "Output as JSON"
439
+ };
440
+ var allOption = {
441
+ name: "all",
442
+ shorthand: "a",
443
+ type: Boolean,
444
+ deprecated: false,
445
+ description: "List resources across all projects"
446
+ };
447
+ var projectOption = {
448
+ name: "project",
449
+ shorthand: null,
450
+ type: String,
451
+ argument: "NAME_OR_ID",
452
+ description: "Project name or ID (defaults to the linked project)",
453
+ deprecated: false
454
+ };
455
+ var deploymentOption = {
456
+ name: "deployment",
457
+ shorthand: null,
458
+ type: String,
459
+ deprecated: false,
460
+ description: "The deployment ID or URL to target",
461
+ argument: "ID|URL"
462
+ };
463
+ var protectionBypassOption = {
464
+ name: "protection-bypass",
465
+ shorthand: null,
466
+ type: String,
467
+ deprecated: false,
468
+ description: "Protection bypass secret for accessing protected deployments",
469
+ argument: "SECRET"
470
+ };
471
+ var GLOBAL_LONG_TO_OPT = /* @__PURE__ */ new Map();
472
+ var GLOBAL_SHORT_TO_OPT = /* @__PURE__ */ new Map();
473
+ for (const opt of globalCommandOptions) {
474
+ GLOBAL_LONG_TO_OPT.set(`--${opt.name}`, opt);
475
+ if (opt.shorthand) {
476
+ GLOBAL_SHORT_TO_OPT.set(`-${opt.shorthand}`, opt);
477
+ }
478
+ }
479
+ function getGlobalFlagsFromArgs(args, options) {
480
+ const delimiterIndex = args.indexOf("--");
481
+ const cliArgs = delimiterIndex === -1 ? args : args.slice(0, delimiterIndex);
482
+ const safeArgs = stripSensitiveAuthArgs(cliArgs);
483
+ const out = [];
484
+ for (let i = 0; i < safeArgs.length; i++) {
485
+ const a = safeArgs[i];
486
+ if (options?.preserveYes && (a === "--yes" || a === "-y")) {
487
+ out.push(a);
488
+ continue;
489
+ }
490
+ if (options?.preserveConfig && (a === "--config" || a.startsWith("--config="))) {
491
+ out.push(a);
492
+ if (a === "--config") {
493
+ const next = safeArgs[i + 1];
494
+ if (next && !next.startsWith("-")) {
495
+ out.push(next);
496
+ i++;
497
+ }
498
+ }
499
+ continue;
500
+ }
501
+ let opt;
502
+ if (a.startsWith("--") && a.includes("=")) {
503
+ const name = a.slice(2).split("=")[0];
504
+ opt = GLOBAL_LONG_TO_OPT.get(`--${name}`);
505
+ if (opt)
506
+ out.push(a);
507
+ continue;
508
+ }
509
+ opt = GLOBAL_LONG_TO_OPT.get(a) || GLOBAL_SHORT_TO_OPT.get(a);
510
+ if (!opt)
511
+ continue;
512
+ out.push(a);
513
+ if (opt.type === String && !a.includes("=")) {
514
+ const next = safeArgs[i + 1];
515
+ if (next && !next.startsWith("-")) {
516
+ out.push(next);
517
+ i++;
518
+ }
519
+ }
520
+ }
521
+ if (options?.preserveProject) {
522
+ const projectOption2 = findProjectOption(safeArgs);
523
+ if (projectOption2)
524
+ out.push(...projectOption2.args);
525
+ }
526
+ return out;
527
+ }
528
+ function findProjectOption(args) {
529
+ for (let i = 0; i < args.length; i++) {
530
+ const arg = args[i];
531
+ if (arg === "--")
532
+ return void 0;
533
+ if (arg.startsWith("--project=")) {
534
+ return {
535
+ value: arg.slice("--project=".length),
536
+ args: [arg]
537
+ };
538
+ }
539
+ if (arg === "--project") {
540
+ const value = args[i + 1];
541
+ if (value && !value.startsWith("-")) {
542
+ return { value, args: [arg, value] };
543
+ }
544
+ return void 0;
545
+ }
546
+ }
547
+ return void 0;
548
+ }
549
+ function getProjectOptionFromArgs(args) {
550
+ return findProjectOption(args)?.value;
551
+ }
552
+
553
+ export {
554
+ require_lib,
555
+ cmd,
556
+ packageName,
557
+ getTitleName,
558
+ getCommandName,
559
+ getCommandNamePlain,
560
+ getFlagsSpecification,
561
+ stripSensitiveAuthArgs,
562
+ globalCommandOptions,
563
+ suggestionFlagTakesSeparateValue,
564
+ getSameSubcommandSuggestionFlags,
565
+ arg_common_default,
566
+ yesOption,
567
+ nextOption,
568
+ confirmOption,
569
+ limitOption,
570
+ forceOption,
571
+ formatOption,
572
+ jsonOption,
573
+ allOption,
574
+ projectOption,
575
+ deploymentOption,
576
+ protectionBypassOption,
577
+ getGlobalFlagsFromArgs,
578
+ getProjectOptionFromArgs
579
+ };
@@ -4488,6 +4488,16 @@ function wait(opts, delay = 300) {
4488
4488
  // src/util/output/create-output.ts
4489
4489
  var import_error_utils = __toESM(require_dist(), 1);
4490
4490
  import { inspect } from "util";
4491
+
4492
+ // src/util/output/chars.ts
4493
+ var chars = {
4494
+ tick: process.platform === "win32" ? "\u221A" : "\u2714",
4495
+ cross: process.platform === "win32" ? "\u2613" : "\u2718",
4496
+ fatal: process.platform === "win32" ? "x" : "\u2717"
4497
+ };
4498
+ var chars_default = chars;
4499
+
4500
+ // src/util/output/create-output.ts
4491
4501
  var IS_TEST = process.env.NODE_ENV === "test";
4492
4502
  var defaultChalkColorLevel = 0;
4493
4503
  var Output = class {
@@ -4532,6 +4542,13 @@ ${action}: ${link_default(details)}` : "")
4532
4542
  `);
4533
4543
  }
4534
4544
  };
4545
+ /**
4546
+ * Prints a fatal error. This does not exit; the caller owns the exit code.
4547
+ */
4548
+ this.fatal = (str) => {
4549
+ this.print(`${import_chalk3.default.red(chars_default.fatal)} ${str.replace(/\n/g, "\n ")}
4550
+ `);
4551
+ };
4535
4552
  this.prettyError = (err) => {
4536
4553
  return this.error(
4537
4554
  (0, import_error_utils.errorToString)(err),
@@ -4685,5 +4702,6 @@ export {
4685
4702
  eraseLines,
4686
4703
  emoji,
4687
4704
  prependEmoji,
4705
+ chars_default,
4688
4706
  output_manager_default
4689
4707
  };
@@ -6,17 +6,17 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveAlertsScope
9
- } from "./chunk-VCE6QKFE.js";
9
+ } from "./chunk-2O5J3KMT.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
13
13
  validateAllProjectMutualExclusivity
14
- } from "./chunk-KQRVZWJU.js";
14
+ } from "./chunk-3T7WSWZH.js";
15
15
  import {
16
16
  AGENT_REASON,
17
17
  buildCommandWithGlobalFlags,
18
18
  outputAgentError
19
- } from "./chunk-TH2XUVDP.js";
19
+ } from "./chunk-NGGLYKNU.js";
20
20
 
21
21
  // src/commands/alerts/rules/parse-scope.ts
22
22
  async function parseRulesFlagsAndScope(client, flags, jsonOutput, command = "alerts rules ls") {