vercel 51.2.1 → 51.3.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 (69) hide show
  1. package/dist/chunks/add-3MIOUOZC.js +180 -0
  2. package/dist/chunks/{chunk-W6FW7CCT.js → chunk-2JQVASXJ.js} +13 -8
  3. package/dist/chunks/{chunk-Q6BEDVOU.js → chunk-4PQA6H63.js} +1 -1
  4. package/dist/chunks/{chunk-IS2HEMF4.js → chunk-4RBF6ZDU.js} +4 -2
  5. package/dist/chunks/{chunk-7S7GE4BN.js → chunk-4VP55L4V.js} +208 -500
  6. package/dist/chunks/{chunk-5YQCJTZI.js → chunk-4WRHMYCG.js} +6 -6
  7. package/dist/chunks/chunk-4ZWTYJSP.js +139 -0
  8. package/dist/chunks/{chunk-3FMFPD7F.js → chunk-APGVHLAW.js} +2 -2
  9. package/dist/chunks/{chunk-5WHDQH2U.js → chunk-BAUYQ7AR.js} +1 -1
  10. package/dist/chunks/{chunk-BUBUVE23.js → chunk-BJQTGP42.js} +4 -2
  11. package/dist/chunks/{chunk-G6MVEB4W.js → chunk-BU3JMDDH.js} +3 -3
  12. package/dist/chunks/chunk-CGTXAXZ4.js +484 -0
  13. package/dist/chunks/{chunk-BQUQ5F7R.js → chunk-CRZM5WM2.js} +4 -2
  14. package/dist/chunks/{chunk-XRR5HDB3.js → chunk-CZXW3DJH.js} +2 -2
  15. package/dist/chunks/chunk-DVQ4SIWF.js +183 -0
  16. package/dist/chunks/{chunk-A4NVECX5.js → chunk-ECRBC4HL.js} +4 -581
  17. package/dist/chunks/{chunk-RK4TKB3D.js → chunk-FNFZO3WQ.js} +7 -5
  18. package/dist/chunks/{chunk-L2BKVTHL.js → chunk-G6RXZLQ2.js} +2 -2
  19. package/dist/chunks/{chunk-4YZKA4FN.js → chunk-GE6G37P4.js} +1 -1
  20. package/dist/chunks/{chunk-NELCIT4M.js → chunk-GLDQ23LD.js} +1 -1
  21. package/dist/chunks/{chunk-5DLMAFQU.js → chunk-GYBFQLYR.js} +6 -4
  22. package/dist/chunks/{chunk-XAVGWINL.js → chunk-JEON5XEH.js} +44 -13
  23. package/dist/chunks/{chunk-Y5YCSB6X.js → chunk-LDXYSGPZ.js} +2 -2
  24. package/dist/chunks/{chunk-U5J73OA3.js → chunk-N45K6NXC.js} +1 -1
  25. package/dist/chunks/{chunk-SSOWPEZT.js → chunk-NCQBQGI6.js} +2 -2
  26. package/dist/chunks/chunk-NE34PEHL.js +167 -0
  27. package/dist/chunks/{chunk-QQTF2FEY.js → chunk-OFUQPP26.js} +9 -5
  28. package/dist/chunks/{chunk-FSOFFJDV.js → chunk-R2BVH5SQ.js} +1 -1
  29. package/dist/chunks/chunk-RFMC2QXQ.js +602 -0
  30. package/dist/chunks/{chunk-VTQNSCUG.js → chunk-RHXEHBO3.js} +8 -6
  31. package/dist/chunks/{chunk-K5XJCQQO.js → chunk-RRYVGOVK.js} +1 -1
  32. package/dist/chunks/{chunk-EHZKWVK2.js → chunk-T7CL42FK.js} +5 -5
  33. package/dist/chunks/{chunk-WXNT7WJO.js → chunk-TAOVG4PS.js} +49 -4
  34. package/dist/chunks/{chunk-57RLFBKC.js → chunk-UB325PS7.js} +1 -1
  35. package/dist/chunks/{chunk-2IAZZEVQ.js → chunk-UWKTUK3W.js} +4 -2
  36. package/dist/chunks/{chunk-VE7MY76H.js → chunk-VGWGLBUC.js} +4 -2
  37. package/dist/chunks/{chunk-4EGCWWSR.js → chunk-VMTOBGCO.js} +50 -16
  38. package/dist/chunks/{chunk-W5K4YCTI.js → chunk-ZS5VKEZL.js} +5 -3
  39. package/dist/chunks/{compile-vercel-config-2GV46IDP.js → compile-vercel-config-A2SLMCWK.js} +4 -2
  40. package/dist/chunks/{delete-PXMYSQGR.js → delete-SEQBCYWT.js} +7 -5
  41. package/dist/chunks/{disable-2ZQ4OG4A.js → disable-GRM5DJGU.js} +7 -5
  42. package/dist/chunks/{discard-FQZTZ5HK.js → discard-IVQWWSPI.js} +7 -5
  43. package/dist/chunks/{edit-F3J7Q5SZ.js → edit-YTMZBT4Y.js} +8 -6
  44. package/dist/chunks/{enable-ZW4W33H5.js → enable-SSU3MG6J.js} +7 -5
  45. package/dist/chunks/{export-ZZV6ESIW.js → export-INCDZTYW.js} +7 -5
  46. package/dist/chunks/inspect-QMY2ZE6J.js +353 -0
  47. package/dist/chunks/{list-VFPV4TUW.js → list-FF4VGSZ2.js} +115 -85
  48. package/dist/chunks/{list-SSIMVNNN.js → list-MMIBPSB3.js} +10 -7
  49. package/dist/chunks/ls-TYEDISJD.js +114 -0
  50. package/dist/chunks/{publish-3K76MNS3.js → publish-OJQCVDL5.js} +7 -5
  51. package/dist/chunks/{query-CY7JJSSX.js → query-LACPOOBL.js} +15 -12
  52. package/dist/chunks/{reorder-6L7MENN5.js → reorder-TBFWHFQZ.js} +7 -5
  53. package/dist/chunks/{restore-XUYXOJQ2.js → restore-5LUZRUME.js} +7 -5
  54. package/dist/chunks/rm-LDXY2G45.js +164 -0
  55. package/dist/chunks/rule-inspect-THIN6POX.js +142 -0
  56. package/dist/chunks/rules-4ZH7VTGC.js +83 -0
  57. package/dist/chunks/{schema-G5FSLZVA.js → schema-OK4OOI2N.js} +9 -7
  58. package/dist/chunks/{types-A4EAQ6F6.js → types-QNN5CDCB.js} +6 -4
  59. package/dist/chunks/update-EXPUPEH6.js +196 -0
  60. package/dist/commands/build/index.js +27 -23
  61. package/dist/commands/deploy/index.js +171 -32
  62. package/dist/commands/dev/index.js +21 -17
  63. package/dist/commands/env/index.js +32 -27
  64. package/dist/commands/link/index.js +21 -17
  65. package/dist/commands/list/index.js +14 -11
  66. package/dist/commands-bulk.js +322 -128
  67. package/dist/index.js +28 -24
  68. package/dist/version.mjs +1 -1
  69. package/package.json +19 -19
@@ -0,0 +1,602 @@
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
+ getCommandName,
9
+ getCommandNamePlain,
10
+ parseRetryAfterHeaderAsMillis,
11
+ require_bytes
12
+ } from "./chunk-ECRBC4HL.js";
13
+ import {
14
+ output_manager_default
15
+ } from "./chunk-ZQKJVHXY.js";
16
+ import {
17
+ require_source
18
+ } from "./chunk-S7KYDPEM.js";
19
+ import {
20
+ __commonJS,
21
+ __toESM
22
+ } from "./chunk-TZ2YI2VH.js";
23
+
24
+ // ../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js
25
+ var require_arg = __commonJS({
26
+ "../../node_modules/.pnpm/arg@5.0.0/node_modules/arg/index.js"(exports, module) {
27
+ var flagSymbol = Symbol("arg flag");
28
+ var ArgError = class _ArgError extends Error {
29
+ constructor(msg, code) {
30
+ super(msg);
31
+ this.name = "ArgError";
32
+ this.code = code;
33
+ Object.setPrototypeOf(this, _ArgError.prototype);
34
+ }
35
+ };
36
+ function arg2(opts, { argv = process.argv.slice(2), permissive = false, stopAtPositional = false } = {}) {
37
+ if (!opts) {
38
+ throw new ArgError("argument specification object is required", "ARG_CONFIG_NO_SPEC");
39
+ }
40
+ const result = { _: [] };
41
+ const aliases = {};
42
+ const handlers = {};
43
+ for (const key of Object.keys(opts)) {
44
+ if (!key) {
45
+ throw new ArgError("argument key cannot be an empty string", "ARG_CONFIG_EMPTY_KEY");
46
+ }
47
+ if (key[0] !== "-") {
48
+ throw new ArgError(`argument key must start with '-' but found: '${key}'`, "ARG_CONFIG_NONOPT_KEY");
49
+ }
50
+ if (key.length === 1) {
51
+ throw new ArgError(`argument key must have a name; singular '-' keys are not allowed: ${key}`, "ARG_CONFIG_NONAME_KEY");
52
+ }
53
+ if (typeof opts[key] === "string") {
54
+ aliases[key] = opts[key];
55
+ continue;
56
+ }
57
+ let type = opts[key];
58
+ let isFlag = false;
59
+ if (Array.isArray(type) && type.length === 1 && typeof type[0] === "function") {
60
+ const [fn] = type;
61
+ type = (value, name, prev = []) => {
62
+ prev.push(fn(value, name, prev[prev.length - 1]));
63
+ return prev;
64
+ };
65
+ isFlag = fn === Boolean || fn[flagSymbol] === true;
66
+ } else if (typeof type === "function") {
67
+ isFlag = type === Boolean || type[flagSymbol] === true;
68
+ } else {
69
+ throw new ArgError(`type missing or not a function or valid array type: ${key}`, "ARG_CONFIG_VAD_TYPE");
70
+ }
71
+ if (key[1] !== "-" && key.length > 2) {
72
+ throw new ArgError(`short argument keys (with a single hyphen) must have only one character: ${key}`, "ARG_CONFIG_SHORTOPT_TOOLONG");
73
+ }
74
+ handlers[key] = [type, isFlag];
75
+ }
76
+ for (let i = 0, len = argv.length; i < len; i++) {
77
+ const wholeArg = argv[i];
78
+ if (stopAtPositional && result._.length > 0) {
79
+ result._ = result._.concat(argv.slice(i));
80
+ break;
81
+ }
82
+ if (wholeArg === "--") {
83
+ result._ = result._.concat(argv.slice(i + 1));
84
+ break;
85
+ }
86
+ if (wholeArg.length > 1 && wholeArg[0] === "-") {
87
+ const separatedArguments = wholeArg[1] === "-" || wholeArg.length === 2 ? [wholeArg] : wholeArg.slice(1).split("").map((a) => `-${a}`);
88
+ for (let j = 0; j < separatedArguments.length; j++) {
89
+ const arg3 = separatedArguments[j];
90
+ const [originalArgName, argStr] = arg3[1] === "-" ? arg3.split(/=(.*)/, 2) : [arg3, void 0];
91
+ let argName = originalArgName;
92
+ while (argName in aliases) {
93
+ argName = aliases[argName];
94
+ }
95
+ if (!(argName in handlers)) {
96
+ if (permissive) {
97
+ result._.push(arg3);
98
+ continue;
99
+ } else {
100
+ throw new ArgError(`unknown or unexpected option: ${originalArgName}`, "ARG_UNKNOWN_OPTION");
101
+ }
102
+ }
103
+ const [type, isFlag] = handlers[argName];
104
+ if (!isFlag && j + 1 < separatedArguments.length) {
105
+ throw new ArgError(`option requires argument (but was followed by another short argument): ${originalArgName}`, "ARG_MISSING_REQUIRED_SHORTARG");
106
+ }
107
+ if (isFlag) {
108
+ result[argName] = type(true, argName, result[argName]);
109
+ } else if (argStr === void 0) {
110
+ if (argv.length < i + 2 || argv[i + 1].length > 1 && argv[i + 1][0] === "-" && !(argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) && (type === Number || // eslint-disable-next-line no-undef
111
+ typeof BigInt !== "undefined" && type === BigInt))) {
112
+ const extended = originalArgName === argName ? "" : ` (alias for ${argName})`;
113
+ throw new ArgError(`option requires argument: ${originalArgName}${extended}`, "ARG_MISSING_REQUIRED_LONGARG");
114
+ }
115
+ result[argName] = type(argv[i + 1], argName, result[argName]);
116
+ ++i;
117
+ } else {
118
+ result[argName] = type(argStr, argName, result[argName]);
119
+ }
120
+ }
121
+ } else {
122
+ result._.push(wholeArg);
123
+ }
124
+ }
125
+ return result;
126
+ }
127
+ arg2.flag = (fn) => {
128
+ fn[flagSymbol] = true;
129
+ return fn;
130
+ };
131
+ arg2.COUNT = arg2.flag((v, name, existingCount) => (existingCount || 0) + 1);
132
+ arg2.ArgError = ArgError;
133
+ module.exports = arg2;
134
+ }
135
+ });
136
+
137
+ // ../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js
138
+ var require_ansi_regex = __commonJS({
139
+ "../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports, module) {
140
+ "use strict";
141
+ module.exports = ({ onlyFirst = false } = {}) => {
142
+ const pattern = [
143
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
144
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
145
+ ].join("|");
146
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
147
+ };
148
+ }
149
+ });
150
+
151
+ // ../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js
152
+ var require_strip_ansi = __commonJS({
153
+ "../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) {
154
+ "use strict";
155
+ var ansiRegex = require_ansi_regex();
156
+ module.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
157
+ }
158
+ });
159
+
160
+ // ../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js
161
+ var require_is_fullwidth_code_point = __commonJS({
162
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module) {
163
+ "use strict";
164
+ var isFullwidthCodePoint = (codePoint) => {
165
+ if (Number.isNaN(codePoint)) {
166
+ return false;
167
+ }
168
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
169
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
170
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
171
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
172
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
173
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
174
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
175
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
176
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
177
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
178
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
179
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
180
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
181
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
182
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
183
+ 131072 <= codePoint && codePoint <= 262141)) {
184
+ return true;
185
+ }
186
+ return false;
187
+ };
188
+ module.exports = isFullwidthCodePoint;
189
+ module.exports.default = isFullwidthCodePoint;
190
+ }
191
+ });
192
+
193
+ // ../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js
194
+ var require_emoji_regex = __commonJS({
195
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module) {
196
+ "use strict";
197
+ module.exports = function() {
198
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
199
+ };
200
+ }
201
+ });
202
+
203
+ // ../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js
204
+ var require_string_width = __commonJS({
205
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module) {
206
+ "use strict";
207
+ var stripAnsi = require_strip_ansi();
208
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
209
+ var emojiRegex = require_emoji_regex();
210
+ var stringWidth = (string) => {
211
+ if (typeof string !== "string" || string.length === 0) {
212
+ return 0;
213
+ }
214
+ string = stripAnsi(string);
215
+ if (string.length === 0) {
216
+ return 0;
217
+ }
218
+ string = string.replace(emojiRegex(), " ");
219
+ let width = 0;
220
+ for (let i = 0; i < string.length; i++) {
221
+ const code = string.codePointAt(i);
222
+ if (code <= 31 || code >= 127 && code <= 159) {
223
+ continue;
224
+ }
225
+ if (code >= 768 && code <= 879) {
226
+ continue;
227
+ }
228
+ if (code > 65535) {
229
+ i++;
230
+ }
231
+ width += isFullwidthCodePoint(code) ? 2 : 1;
232
+ }
233
+ return width;
234
+ };
235
+ module.exports = stringWidth;
236
+ module.exports.default = stringWidth;
237
+ }
238
+ });
239
+
240
+ // src/util/get-flags-specification.ts
241
+ function getFlagsSpecification(options) {
242
+ const flagsSpecification = {};
243
+ for (const option of options) {
244
+ flagsSpecification[`--${option.name}`] = option.type;
245
+ if (option.shorthand) {
246
+ flagsSpecification[`-${option.shorthand}`] = `--${option.name}`;
247
+ }
248
+ }
249
+ return flagsSpecification;
250
+ }
251
+
252
+ // src/util/arg-common.ts
253
+ var globalCommandOptions = [
254
+ {
255
+ name: "help",
256
+ shorthand: "h",
257
+ type: Boolean,
258
+ description: "Output usage information",
259
+ deprecated: false
260
+ },
261
+ {
262
+ name: "version",
263
+ shorthand: "v",
264
+ type: Boolean,
265
+ description: "Output the version number",
266
+ deprecated: false
267
+ },
268
+ {
269
+ name: "cwd",
270
+ shorthand: null,
271
+ type: String,
272
+ argument: "DIR",
273
+ description: "Sets the current working directory for a single run of a command",
274
+ deprecated: false
275
+ },
276
+ {
277
+ name: "local-config",
278
+ shorthand: "A",
279
+ type: String,
280
+ argument: "FILE",
281
+ description: "Path to the local `vercel.json` file",
282
+ deprecated: false
283
+ },
284
+ {
285
+ name: "global-config",
286
+ shorthand: "Q",
287
+ type: String,
288
+ argument: "DIR",
289
+ description: "Path to the global `.vercel` directory",
290
+ deprecated: false
291
+ },
292
+ {
293
+ name: "debug",
294
+ shorthand: "d",
295
+ type: Boolean,
296
+ description: "Debug mode (default off)",
297
+ deprecated: false
298
+ },
299
+ {
300
+ name: "no-color",
301
+ shorthand: null,
302
+ type: Boolean,
303
+ description: "No color mode (default off)",
304
+ deprecated: false
305
+ },
306
+ {
307
+ name: "non-interactive",
308
+ shorthand: null,
309
+ type: Boolean,
310
+ description: "Run without interactive prompts; when an agent is detected this is the default",
311
+ deprecated: false
312
+ },
313
+ {
314
+ name: "scope",
315
+ shorthand: "S",
316
+ type: String,
317
+ description: "Set a custom scope",
318
+ deprecated: false
319
+ },
320
+ {
321
+ name: "token",
322
+ shorthand: "t",
323
+ type: String,
324
+ argument: "TOKEN",
325
+ description: "Login token",
326
+ deprecated: false
327
+ },
328
+ { name: "team", shorthand: "T", type: String, deprecated: false },
329
+ { name: "api", shorthand: null, type: String, deprecated: false }
330
+ ];
331
+ var GLOBAL_CLI_FLAG_NAMES = (() => {
332
+ const set = /* @__PURE__ */ new Set();
333
+ for (const opt of globalCommandOptions) {
334
+ set.add(`--${opt.name}`);
335
+ if (opt.shorthand) {
336
+ set.add(`-${opt.shorthand}`);
337
+ }
338
+ }
339
+ return set;
340
+ })();
341
+ function globalCliFlagTakesValue(flagName) {
342
+ const normalized = flagName.includes("=") ? flagName.slice(0, flagName.indexOf("=")) : flagName;
343
+ for (const opt of globalCommandOptions) {
344
+ if (`--${opt.name}` === normalized) {
345
+ return opt.type === String;
346
+ }
347
+ if (opt.shorthand && `-${opt.shorthand}` === normalized) {
348
+ return opt.type === String;
349
+ }
350
+ }
351
+ return false;
352
+ }
353
+ var SUBCOMMAND_FLAG_TAKES_VALUE = /* @__PURE__ */ new Set([
354
+ "--status",
355
+ "--name",
356
+ "--slug",
357
+ "--version",
358
+ // redirects list --version
359
+ "--search",
360
+ "--format",
361
+ "--page",
362
+ "--per-page"
363
+ ]);
364
+ function suggestionFlagTakesSeparateValue(flagName) {
365
+ const name = flagName.includes("=") ? flagName.slice(0, flagName.indexOf("=")) : flagName;
366
+ if (globalCliFlagTakesValue(name))
367
+ return true;
368
+ return SUBCOMMAND_FLAG_TAKES_VALUE.has(name);
369
+ }
370
+ function getSameSubcommandSuggestionFlags(args) {
371
+ const out = [];
372
+ for (let i = 0; i < args.length; i++) {
373
+ const a = args[i];
374
+ if (!a.startsWith("-"))
375
+ continue;
376
+ out.push(a);
377
+ if (a.includes("="))
378
+ continue;
379
+ const name = a;
380
+ if (suggestionFlagTakesSeparateValue(name) && i + 1 < args.length && !args[i + 1].startsWith("-")) {
381
+ out.push(args[++i]);
382
+ }
383
+ }
384
+ return out;
385
+ }
386
+ var GLOBAL_OPTIONS = getFlagsSpecification(globalCommandOptions);
387
+ var arg_common_default = () => GLOBAL_OPTIONS;
388
+ var yesOption = {
389
+ name: "yes",
390
+ shorthand: "y",
391
+ type: Boolean,
392
+ deprecated: false,
393
+ description: "Accept default value for all prompts"
394
+ };
395
+ var nextOption = {
396
+ name: "next",
397
+ shorthand: "N",
398
+ type: Number,
399
+ deprecated: false,
400
+ description: "Show next page of results",
401
+ argument: "MS"
402
+ };
403
+ var confirmOption = {
404
+ name: "confirm",
405
+ shorthand: "c",
406
+ type: Boolean,
407
+ deprecated: true
408
+ };
409
+ var limitOption = {
410
+ name: "limit",
411
+ shorthand: null,
412
+ type: Number,
413
+ deprecated: false,
414
+ description: "Number of results to return per page (default: 20, max: 100)",
415
+ argument: "NUMBER"
416
+ };
417
+ var forceOption = {
418
+ name: "force",
419
+ shorthand: "f",
420
+ type: Boolean,
421
+ deprecated: false
422
+ };
423
+ var formatOption = {
424
+ name: "format",
425
+ shorthand: "F",
426
+ type: String,
427
+ argument: "FORMAT",
428
+ description: "Specify the output format (json)",
429
+ deprecated: false
430
+ };
431
+ var jsonOption = {
432
+ name: "json",
433
+ shorthand: null,
434
+ type: Boolean,
435
+ deprecated: true,
436
+ description: "DEPRECATED: Use --format=json instead"
437
+ };
438
+ var allOption = {
439
+ name: "all",
440
+ shorthand: "a",
441
+ type: Boolean,
442
+ deprecated: false,
443
+ description: "List resources across all projects"
444
+ };
445
+ var GLOBAL_LONG_TO_OPT = /* @__PURE__ */ new Map();
446
+ var GLOBAL_SHORT_TO_OPT = /* @__PURE__ */ new Map();
447
+ for (const opt of globalCommandOptions) {
448
+ GLOBAL_LONG_TO_OPT.set(`--${opt.name}`, opt);
449
+ if (opt.shorthand) {
450
+ GLOBAL_SHORT_TO_OPT.set(`-${opt.shorthand}`, opt);
451
+ }
452
+ }
453
+ function getGlobalFlagsOnlyFromArgs(args) {
454
+ const out = [];
455
+ for (let i = 0; i < args.length; i++) {
456
+ const a = args[i];
457
+ let opt;
458
+ if (a.startsWith("--") && a.includes("=")) {
459
+ const name = a.slice(2).split("=")[0];
460
+ opt = GLOBAL_LONG_TO_OPT.get(`--${name}`);
461
+ if (opt)
462
+ out.push(a);
463
+ continue;
464
+ }
465
+ opt = GLOBAL_LONG_TO_OPT.get(a) || GLOBAL_SHORT_TO_OPT.get(a);
466
+ if (!opt)
467
+ continue;
468
+ out.push(a);
469
+ if (opt.type === String && !a.includes("=")) {
470
+ const next = args[i + 1];
471
+ if (next && !next.startsWith("-")) {
472
+ out.push(next);
473
+ i++;
474
+ }
475
+ }
476
+ }
477
+ return out;
478
+ }
479
+ function getCommandNameWithGlobalFlags(commandTemplate, argv) {
480
+ const flags = getGlobalFlagsOnlyFromArgs(argv.slice(2));
481
+ return getCommandNamePlain(`${commandTemplate} ${flags.join(" ")}`.trim());
482
+ }
483
+
484
+ // src/util/get-args.ts
485
+ var import_arg = __toESM(require_arg(), 1);
486
+ function getArgs(argv, argsOptions, argOptions = {}) {
487
+ return (0, import_arg.default)(Object.assign({}, arg_common_default(), argsOptions), {
488
+ ...argOptions,
489
+ argv
490
+ });
491
+ }
492
+ function parseArguments(args, flagsSpecification, parserOptions = {}) {
493
+ const { _: positional, ...rest } = (0, import_arg.default)(
494
+ Object.assign({}, arg_common_default(), flagsSpecification),
495
+ {
496
+ ...parserOptions,
497
+ argv: args
498
+ }
499
+ );
500
+ return { args: positional, flags: rest };
501
+ }
502
+
503
+ // src/util/output/error.ts
504
+ var import_chalk = __toESM(require_source(), 1);
505
+
506
+ // src/util/error.ts
507
+ var import_bytes = __toESM(require_bytes(), 1);
508
+ async function responseError(res, fallbackMessage = null, parsedBody = {}) {
509
+ let message = "";
510
+ let bodyError;
511
+ if (res.status >= 400 && res.status < 500) {
512
+ let body;
513
+ try {
514
+ body = await res.json();
515
+ } catch (_err) {
516
+ body = parsedBody;
517
+ }
518
+ bodyError = body.error || body.err || {};
519
+ message = bodyError.message;
520
+ }
521
+ if (!message) {
522
+ message = fallbackMessage === null ? "Response Error" : fallbackMessage;
523
+ }
524
+ const err = new Error(`${message} (${res.status})`);
525
+ err.status = res.status;
526
+ err.serverMessage = message;
527
+ if (bodyError) {
528
+ for (const field of Object.keys(bodyError)) {
529
+ if (field !== "message") {
530
+ err[field] = bodyError[field];
531
+ }
532
+ }
533
+ }
534
+ if (res.status === 429 || res.status === 503) {
535
+ const parsed = parseRetryAfterHeaderAsMillis(
536
+ res.headers.get("Retry-After")
537
+ );
538
+ err.retryAfterMs = parsed ?? (res.status === 429 ? 0 : void 0);
539
+ }
540
+ return err;
541
+ }
542
+ function toEnumerableError(err) {
543
+ const enumerable = {};
544
+ enumerable.name = err.name;
545
+ for (const key of Object.getOwnPropertyNames(err)) {
546
+ enumerable[key] = err[key];
547
+ }
548
+ return enumerable;
549
+ }
550
+ function printError(error2) {
551
+ if (typeof error2 === "string") {
552
+ error2 = new Error(error2);
553
+ }
554
+ const apiError = error2;
555
+ const { message, stack, status, code, sizeLimit } = apiError;
556
+ output_manager_default.debug(`handling error: ${stack}`);
557
+ if (message === "User force closed the prompt with 0 null") {
558
+ return;
559
+ }
560
+ if (status === 403) {
561
+ output_manager_default.error(
562
+ message || `Authentication error. Run ${getCommandName("login")} to log-in again.`
563
+ );
564
+ } else if (status === 429) {
565
+ output_manager_default.error(message);
566
+ } else if (code === "size_limit_exceeded") {
567
+ output_manager_default.error(`File size limit exceeded (${(0, import_bytes.default)(sizeLimit)})`);
568
+ } else if (message) {
569
+ output_manager_default.prettyError(apiError);
570
+ } else if (status === 500) {
571
+ output_manager_default.error("Unexpected server error. Please retry.");
572
+ } else if (code === "USER_ABORT") {
573
+ output_manager_default.log("Canceled");
574
+ } else {
575
+ output_manager_default.error(`Unexpected error. Please try again later. (${message})`);
576
+ }
577
+ }
578
+
579
+ export {
580
+ getFlagsSpecification,
581
+ globalCommandOptions,
582
+ GLOBAL_CLI_FLAG_NAMES,
583
+ globalCliFlagTakesValue,
584
+ getSameSubcommandSuggestionFlags,
585
+ yesOption,
586
+ nextOption,
587
+ confirmOption,
588
+ limitOption,
589
+ forceOption,
590
+ formatOption,
591
+ jsonOption,
592
+ allOption,
593
+ getGlobalFlagsOnlyFromArgs,
594
+ getCommandNameWithGlobalFlags,
595
+ getArgs,
596
+ parseArguments,
597
+ require_strip_ansi,
598
+ require_string_width,
599
+ responseError,
600
+ toEnumerableError,
601
+ printError
602
+ };
@@ -6,10 +6,10 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getLocalPathConfig
9
- } from "./chunk-5DLMAFQU.js";
9
+ } from "./chunk-GYBFQLYR.js";
10
10
  import {
11
11
  table
12
- } from "./chunk-4YZKA4FN.js";
12
+ } from "./chunk-GE6G37P4.js";
13
13
  import {
14
14
  VERCEL_DIR_PROJECT,
15
15
  VERCEL_DIR_README,
@@ -36,13 +36,15 @@ import {
36
36
  selectAndParseRemoteUrl,
37
37
  selectOrg,
38
38
  writeServicesConfig
39
- } from "./chunk-7S7GE4BN.js";
39
+ } from "./chunk-4VP55L4V.js";
40
+ import {
41
+ printError
42
+ } from "./chunk-RFMC2QXQ.js";
40
43
  import {
41
44
  CantParseJSONFile,
42
45
  ProjectNotFound,
43
- isAPIError,
44
- printError
45
- } from "./chunk-A4NVECX5.js";
46
+ isAPIError
47
+ } from "./chunk-ECRBC4HL.js";
46
48
  import {
47
49
  output_manager_default
48
50
  } from "./chunk-ZQKJVHXY.js";
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  formatCondition,
9
9
  formatTransform
10
- } from "./chunk-QQTF2FEY.js";
10
+ } from "./chunk-OFUQPP26.js";
11
11
  import {
12
12
  output_manager_default
13
13
  } from "./chunk-ZQKJVHXY.js";
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommand
9
- } from "./chunk-SSOWPEZT.js";
9
+ } from "./chunk-NCQBQGI6.js";
10
10
  import {
11
11
  login
12
- } from "./chunk-W6FW7CCT.js";
12
+ } from "./chunk-2JQVASXJ.js";
13
13
  import {
14
14
  loginCommand
15
- } from "./chunk-4EGCWWSR.js";
15
+ } from "./chunk-VMTOBGCO.js";
16
16
  import {
17
17
  help
18
- } from "./chunk-Y5YCSB6X.js";
18
+ } from "./chunk-LDXYSGPZ.js";
19
19
  import {
20
20
  TelemetryClient
21
21
  } from "./chunk-U3WLEFHU.js";
@@ -24,7 +24,7 @@ import {
24
24
  parseArguments,
25
25
  printError,
26
26
  require_strip_ansi
27
- } from "./chunk-A4NVECX5.js";
27
+ } from "./chunk-RFMC2QXQ.js";
28
28
  import {
29
29
  output_manager_default
30
30
  } from "./chunk-ZQKJVHXY.js";