vercel 56.4.1 → 57.0.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 (94) hide show
  1. package/dist/chunks/{add-L3Z6PL54.js → add-7M577U56.js} +7 -6
  2. package/dist/chunks/{add-RFEJCIBM.js → add-YRZTDNXX.js} +3 -3
  3. package/dist/chunks/{chunk-V5P25P7F.js → chunk-2473DUBR.js} +4 -11
  4. package/dist/chunks/{chunk-5EXIJBLL.js → chunk-2EDWKVNP.js} +8 -8
  5. package/dist/chunks/{chunk-YS6EDZHB.js → chunk-2MJROFVC.js} +5 -1
  6. package/dist/chunks/{chunk-OOD67FAL.js → chunk-3242RXCN.js} +1 -1
  7. package/dist/chunks/chunk-3PGXYIKC.js +147 -0
  8. package/dist/chunks/{chunk-CHZBEMLF.js → chunk-4PGF367U.js} +47 -210
  9. package/dist/chunks/{chunk-GKVAAY2A.js → chunk-555WJSO5.js} +1 -1
  10. package/dist/chunks/chunk-5AJPMLDV.js +28 -0
  11. package/dist/chunks/{chunk-IHQ7DPQI.js → chunk-A2TYQBX2.js} +117 -3
  12. package/dist/chunks/chunk-A3NYPUKZ.js +17 -0
  13. package/dist/chunks/{chunk-W346YNDN.js → chunk-DWMH5M4Q.js} +4 -1
  14. package/dist/chunks/chunk-E336ZXPP.js +43 -0
  15. package/dist/chunks/chunk-F5PQWDOC.js +245 -0
  16. package/dist/chunks/{chunk-Y7TVKRRJ.js → chunk-F7X55TOY.js} +15 -839
  17. package/dist/chunks/chunk-FGDKMNEN.js +21 -0
  18. package/dist/chunks/chunk-FHEMFAHB.js +320 -0
  19. package/dist/chunks/{chunk-NLRIKNPX.js → chunk-GP5VCTEU.js} +1 -1
  20. package/dist/chunks/chunk-GZLPFESR.js +48 -0
  21. package/dist/chunks/{chunk-HZKJMZEQ.js → chunk-HD7B425F.js} +2 -2
  22. package/dist/chunks/{chunk-J6KTUJHV.js → chunk-IOAZNR6Z.js} +1 -1
  23. package/dist/chunks/{chunk-STJJ3DFO.js → chunk-KCF6S3XF.js} +16 -1
  24. package/dist/chunks/chunk-LMHT3QR3.js +247 -0
  25. package/dist/chunks/{chunk-A4XB42AB.js → chunk-MAHINYBW.js} +4 -3
  26. package/dist/chunks/{chunk-DXFSBJTA.js → chunk-MIFDRYTN.js} +1 -1
  27. package/dist/chunks/{chunk-VLTQJKP6.js → chunk-NH43BFJ3.js} +1 -1
  28. package/dist/chunks/{chunk-Z7NPYIZ6.js → chunk-NM43FFV6.js} +0 -8
  29. package/dist/chunks/{chunk-MQRHJEBS.js → chunk-NRNMT43R.js} +3 -3
  30. package/dist/chunks/chunk-OF2GNB42.js +53 -0
  31. package/dist/chunks/chunk-PRWJUY5U.js +848 -0
  32. package/dist/chunks/{chunk-F5OMERHI.js → chunk-QZD5DKUR.js} +10 -23
  33. package/dist/chunks/{chunk-4M3ZQCYN.js → chunk-RAFH25WW.js} +8 -1
  34. package/dist/chunks/{chunk-43B3LNUF.js → chunk-RYO6FJFB.js} +1 -1
  35. package/dist/chunks/{chunk-XFGY3JAX.js → chunk-T4NODP6Y.js} +11 -18
  36. package/dist/chunks/{chunk-GLAHGVBS.js → chunk-TBR2Q37Y.js} +2038 -1786
  37. package/dist/chunks/chunk-V4RMJKQP.js +36 -0
  38. package/dist/chunks/chunk-WR7JTCGL.js +104 -0
  39. package/dist/chunks/{chunk-6RTK6BWX.js → chunk-YA3WQFLY.js} +1 -1
  40. package/dist/chunks/{chunk-UHGAPG7O.js → chunk-YOZCJHLZ.js} +4 -4
  41. package/dist/chunks/{compile-vercel-config-J2X5OV6K.js → compile-vercel-config-3OHO3TJA.js} +2 -2
  42. package/dist/chunks/config-validator.mjs +1 -0
  43. package/dist/chunks/delete-3DZOCWCC.js +150 -0
  44. package/dist/chunks/{delete-57A44RN7.js → delete-VOSJLNEA.js} +3 -3
  45. package/dist/chunks/{disable-DNZ52MEO.js → disable-LQDEVRQF.js} +3 -3
  46. package/dist/chunks/{discard-HACSIZ74.js → discard-RGV4JKXQ.js} +3 -3
  47. package/dist/chunks/{edit-HJ47TQU3.js → edit-SFIEOQ24.js} +4 -4
  48. package/dist/chunks/edit-UPZPI54L.js +153 -0
  49. package/dist/chunks/{enable-BVLRVRYM.js → enable-6UVH35WC.js} +3 -3
  50. package/dist/chunks/{export-7MJFGMG7.js → export-6CEG3CK7.js} +3 -3
  51. package/dist/chunks/{image-4UMD7UZP.js → image-CQRCD2OE.js} +3 -3
  52. package/dist/chunks/inspect-4ZAH3RFT.js +205 -0
  53. package/dist/chunks/inspect-EXQBIAFF.js +587 -0
  54. package/dist/chunks/{inspect-WBHUZC3R.js → inspect-K5ZMQG7X.js} +3 -3
  55. package/dist/chunks/{inspect-4JD2QN67.js → inspect-UM3LDRPV.js} +3 -3
  56. package/dist/chunks/{inspect-XX3OXSHC.js → inspect-ZFRY3X3H.js} +3 -3
  57. package/dist/chunks/{list-AM6K2JCW.js → list-4DRVM7Q4.js} +42 -55
  58. package/dist/chunks/{list-5H57NTM4.js → list-FJCBOCCA.js} +2 -2
  59. package/dist/chunks/list-KCUHD4OA.js +360 -0
  60. package/dist/chunks/{login-YO34E4V5.js → login-DFGYNU3K.js} +3 -3
  61. package/dist/chunks/{ls-44NPIO2N.js → ls-34NCZKBE.js} +3 -3
  62. package/dist/chunks/{ls-P7ZLBWW2.js → ls-4QHHVXXD.js} +3 -3
  63. package/dist/chunks/{ls-YDUYTLXW.js → ls-CG6A7UXF.js} +3 -3
  64. package/dist/chunks/ls-RHEQ6YQB.js +188 -0
  65. package/dist/chunks/open-E3XADEMX.js +106 -0
  66. package/dist/chunks/{publish-RXFUYSW3.js → publish-Z3AQRUCS.js} +3 -3
  67. package/dist/chunks/{query-ILJJL3BZ.js → query-3EV66DO3.js} +9 -9
  68. package/dist/chunks/{reorder-GBCOPZT4.js → reorder-VA5E5ZJT.js} +3 -3
  69. package/dist/chunks/reply-SNSCNKAW.js +167 -0
  70. package/dist/chunks/resolve-6ZX4RTXX.js +228 -0
  71. package/dist/chunks/{restore-YK5DGGRX.js → restore-NEHI5B5P.js} +3 -3
  72. package/dist/chunks/{rm-O474MI5C.js → rm-22B22E47.js} +3 -3
  73. package/dist/chunks/{rm-LK6P7XTA.js → rm-E5ZVLAKO.js} +3 -3
  74. package/dist/chunks/{rm-FRZMXB2W.js → rm-FR6KE744.js} +7 -6
  75. package/dist/chunks/rule-inspect-DMP2CKJQ.js +283 -0
  76. package/dist/chunks/{rules-MZ2MP6KJ.js → rules-EYGXEI2Z.js} +7 -7
  77. package/dist/chunks/{schema-FR6CCQIZ.js → schema-2IIWOBSQ.js} +7 -5
  78. package/dist/chunks/{tags-AKRTKFRV.js → tags-ZDVYRHAY.js} +2 -2
  79. package/dist/chunks/{update-W3CWQB2F.js → update-QH4DQMZV.js} +7 -6
  80. package/dist/commands/build/index.js +45 -13
  81. package/dist/commands/deploy/index.js +38 -27
  82. package/dist/commands/dev/index.js +13 -16
  83. package/dist/commands/env/index.js +13 -11
  84. package/dist/commands/link/index.js +10 -9
  85. package/dist/commands/list/index.js +5 -5
  86. package/dist/commands-bulk.js +2981 -2179
  87. package/dist/index.js +31 -21
  88. package/dist/vc.js +54 -18
  89. package/dist/version.mjs +1 -1
  90. package/package.json +35 -35
  91. package/dist/chunks/chunk-F32B76CK.js +0 -86
  92. package/dist/chunks/inspect-5YZP7IWI.js +0 -351
  93. package/dist/chunks/ls-MB74DIQV.js +0 -113
  94. package/dist/chunks/rule-inspect-YEZGYINZ.js +0 -141
@@ -0,0 +1,43 @@
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
+
8
+ // src/commands/comments/threads.ts
9
+ function parseThreadArg(arg) {
10
+ if (!/^https?:\/\//i.test(arg)) {
11
+ return { id: arg };
12
+ }
13
+ let url;
14
+ try {
15
+ url = new URL(arg);
16
+ } catch {
17
+ return void 0;
18
+ }
19
+ const segments = url.pathname.split("/").filter(Boolean);
20
+ const cIndex = segments.lastIndexOf("c");
21
+ if (cIndex !== -1 && cIndex + 1 < segments.length) {
22
+ const id = safeDecode(segments[cIndex + 1]);
23
+ if (!id) {
24
+ return void 0;
25
+ }
26
+ return {
27
+ id,
28
+ teamSlug: cIndex > 1 ? safeDecode(segments[0]) : void 0
29
+ };
30
+ }
31
+ return void 0;
32
+ }
33
+ function safeDecode(segment) {
34
+ try {
35
+ return decodeURIComponent(segment) || void 0;
36
+ } catch {
37
+ return void 0;
38
+ }
39
+ }
40
+
41
+ export {
42
+ parseThreadArg
43
+ };
@@ -0,0 +1,245 @@
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
+ ALIGNED_LABEL_WIDTH
9
+ } from "./chunk-TBR2Q37Y.js";
10
+ import {
11
+ require_ms
12
+ } from "./chunk-GGP5R3FU.js";
13
+ import {
14
+ require_source
15
+ } from "./chunk-S7KYDPEM.js";
16
+ import {
17
+ __toESM
18
+ } from "./chunk-TZ2YI2VH.js";
19
+
20
+ // src/commands/comments/format.ts
21
+ var import_chalk = __toESM(require_source(), 1);
22
+ var import_ms = __toESM(require_ms(), 1);
23
+ function alignedRow(label, value) {
24
+ return ` ${import_chalk.default.bold(label.padEnd(ALIGNED_LABEL_WIDTH))}${value}`;
25
+ }
26
+ function actorLabel(actor) {
27
+ if (!actor) {
28
+ return "-";
29
+ }
30
+ const base = actor.name || actor.username || actor.id;
31
+ return actor.type === "app" ? `${base} (app)` : base;
32
+ }
33
+ function relativeAge(timestamp) {
34
+ if (!timestamp || !Number.isFinite(timestamp)) {
35
+ return "-";
36
+ }
37
+ const delta = Date.now() - timestamp;
38
+ if (delta < 1e3) {
39
+ return "now";
40
+ }
41
+ return (0, import_ms.default)(delta);
42
+ }
43
+ function displayPath(thread) {
44
+ const href = thread.context?.href;
45
+ if (href) {
46
+ try {
47
+ return new URL(href).pathname;
48
+ } catch {
49
+ }
50
+ }
51
+ return thread.context?.path || "/";
52
+ }
53
+ function truncate(text, max) {
54
+ const normalized = text.replace(/\s+/g, " ").trim();
55
+ const segmenter = new Intl.Segmenter();
56
+ const graphemes = [...segmenter.segment(normalized)];
57
+ if (graphemes.length <= max) {
58
+ return normalized;
59
+ }
60
+ return `${graphemes.slice(0, Math.max(0, max - 1)).map((s) => s.segment).join("")}\u2026`;
61
+ }
62
+ function firstMessageText(thread) {
63
+ return thread.messages[0]?.text ?? "";
64
+ }
65
+ function threadAge(thread) {
66
+ return relativeAge(thread.messages[0]?.timestamp);
67
+ }
68
+ function renderThreadSummary(thread, complete) {
69
+ const replies = thread.messageCount - 1;
70
+ const rootAuthorId = complete ? thread.messages[0]?.author.id : void 0;
71
+ const names = [];
72
+ const seen = /* @__PURE__ */ new Set();
73
+ for (const message of thread.messages) {
74
+ const { author } = message;
75
+ if (author.id === rootAuthorId || seen.has(author.id)) {
76
+ continue;
77
+ }
78
+ seen.add(author.id);
79
+ names.push(actorLabel(author));
80
+ }
81
+ const shown = names.slice(0, 3);
82
+ const overflow = names.length - shown.length;
83
+ const participants = shown.length > 0 ? `${shown.join(", ")}${overflow > 0 ? ` +${overflow} more` : ""}` : void 0;
84
+ const lastTimestamp = thread.messages[thread.messages.length - 1]?.timestamp;
85
+ const parts = [`\u2192 ${replies} ${replies === 1 ? "reply" : "replies"}`];
86
+ if (participants) {
87
+ parts.push(participants);
88
+ }
89
+ parts.push(`last ${relativeAge(lastTimestamp)} ago`);
90
+ return parts.join(" \xB7 ");
91
+ }
92
+ function renderThreadRow(thread, opts) {
93
+ const complete = thread.messageCount <= thread.messages.length;
94
+ const dot = thread.resolved ? import_chalk.default.dim("\u25CB") : "\u25CF";
95
+ const author = complete ? actorLabel(thread.messages[0]?.author) : "\u2026";
96
+ const columns = [
97
+ dot,
98
+ thread.id,
99
+ import_chalk.default.dim(threadAge(thread)),
100
+ author,
101
+ displayPath(thread)
102
+ ];
103
+ if (opts.showBranch && thread.branch) {
104
+ columns.push(import_chalk.default.dim(thread.branch));
105
+ }
106
+ if (thread.isLocalhost) {
107
+ columns.push(import_chalk.default.dim("localhost"));
108
+ }
109
+ const lines = [` ${columns.join(" ")}`];
110
+ if (complete) {
111
+ const excerpt = truncate(firstMessageText(thread), 80);
112
+ if (excerpt) {
113
+ lines.push(` \u201C${excerpt}\u201D`);
114
+ }
115
+ } else {
116
+ lines.push(
117
+ import_chalk.default.dim(" (long thread \u2014 inspect for the full conversation)")
118
+ );
119
+ }
120
+ const selection = thread.context?.selection;
121
+ if (selection) {
122
+ lines.push(import_chalk.default.dim(` \u2192 selected: \u201C${truncate(selection, 60)}\u201D`));
123
+ }
124
+ if (thread.messageCount > 1) {
125
+ lines.push(import_chalk.default.dim(` ${renderThreadSummary(thread, complete)}`));
126
+ }
127
+ const meta = [];
128
+ const reactionCount = thread.messages.reduce(
129
+ (acc, message) => acc + (message.reactions?.length ?? 0),
130
+ 0
131
+ );
132
+ if (reactionCount > 0) {
133
+ meta.push(
134
+ `${reactionCount} ${reactionCount === 1 ? "reaction" : "reactions"}`
135
+ );
136
+ }
137
+ const attachmentCount = thread.messages.reduce(
138
+ (acc, message) => acc + (message.attachments?.length ?? 0),
139
+ 0
140
+ );
141
+ if (attachmentCount > 0) {
142
+ meta.push(
143
+ `${attachmentCount} ${attachmentCount === 1 ? "attachment" : "attachments"}`
144
+ );
145
+ }
146
+ if (thread.resolved) {
147
+ meta.push(`resolved by ${actorLabel(thread.resolvedBy)}`);
148
+ }
149
+ if (meta.length > 0) {
150
+ lines.push(import_chalk.default.dim(` ${meta.join(" \xB7 ")}`));
151
+ }
152
+ return lines.join("\n");
153
+ }
154
+ function renderReactions(message) {
155
+ if (!message.reactions || message.reactions.length === 0) {
156
+ return void 0;
157
+ }
158
+ return message.reactions.map((r) => `${r.emoji} ${r.name} \xB7 ${r.users.length}`).join(" ");
159
+ }
160
+ function renderMessage(message) {
161
+ const lines = [
162
+ `${import_chalk.default.bold(actorLabel(message.author))} \xB7 ${relativeAge(message.timestamp)} ago \xB7 ${import_chalk.default.dim(message.id)}`
163
+ ];
164
+ for (const textLine of message.text.split("\n")) {
165
+ lines.push(` ${textLine}`);
166
+ }
167
+ for (const attachment of message.attachments ?? []) {
168
+ const dimensions = attachment.width && attachment.height ? ` (${attachment.width}\xD7${attachment.height})` : "";
169
+ lines.push(
170
+ `${import_chalk.default.dim(` \u2192 attachment ${attachment.filename}${dimensions}`)} ${import_chalk.default.cyan(attachment.url)}`
171
+ );
172
+ }
173
+ const reactions = renderReactions(message);
174
+ if (reactions) {
175
+ lines.push(` ${reactions}`);
176
+ }
177
+ return lines.join("\n");
178
+ }
179
+ function renderThreadDetail(thread, messages, opts) {
180
+ const sections = [];
181
+ const status = thread.resolved ? import_chalk.default.dim(`resolved by ${actorLabel(thread.resolvedBy)}`) : "unresolved";
182
+ const headline = [import_chalk.default.bold(thread.id), status];
183
+ if (thread.branch) {
184
+ headline.push(import_chalk.default.dim(thread.branch));
185
+ }
186
+ if (thread.isLocalhost) {
187
+ headline.push(import_chalk.default.dim("localhost"));
188
+ }
189
+ sections.push(headline.join(" \xB7 "));
190
+ const headerLines = [];
191
+ const path = displayPath(thread);
192
+ const pageTitle = thread.context?.pageTitle;
193
+ headerLines.push(pageTitle ? `${path} \u2014 \u201C${pageTitle}\u201D` : path);
194
+ if (thread.context?.href) {
195
+ headerLines.push(import_chalk.default.cyan(thread.context.href));
196
+ }
197
+ sections.push(headerLines.join("\n"));
198
+ const contextLines = [];
199
+ if (thread.context?.selection) {
200
+ contextLines.push(alignedRow("Selected", `\u201C${thread.context.selection}\u201D`));
201
+ }
202
+ if (thread.context?.selector) {
203
+ contextLines.push(alignedRow("Element", thread.context.selector));
204
+ }
205
+ for (const link of thread.links ?? []) {
206
+ contextLines.push(
207
+ alignedRow("Linked", `${link.label} \u2014 ${import_chalk.default.cyan(link.link)}`)
208
+ );
209
+ }
210
+ if (contextLines.length > 0) {
211
+ sections.push(contextLines.join("\n"));
212
+ }
213
+ sections.push(messages.map(renderMessage).join("\n\n"));
214
+ if (opts.showContext) {
215
+ const extra = [];
216
+ if (thread.context?.frameworkContext) {
217
+ extra.push(
218
+ `${import_chalk.default.bold("Framework context")}
219
+ ${thread.context.frameworkContext}`
220
+ );
221
+ }
222
+ if (thread.context?.device) {
223
+ extra.push(
224
+ `${import_chalk.default.bold("Device")}
225
+ ${JSON.stringify(thread.context.device, null, 2)}`
226
+ );
227
+ }
228
+ if (extra.length > 0) {
229
+ sections.push(extra.join("\n\n"));
230
+ }
231
+ }
232
+ if (thread.webUrl) {
233
+ sections.push(`Open in Vercel \u2192 ${import_chalk.default.cyan(thread.webUrl)}`);
234
+ }
235
+ return sections.join("\n\n");
236
+ }
237
+
238
+ export {
239
+ actorLabel,
240
+ displayPath,
241
+ truncate,
242
+ threadAge,
243
+ renderThreadRow,
244
+ renderThreadDetail
245
+ };