vercel 54.18.6 → 54.19.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 (72) hide show
  1. package/dist/chunks/{add-DFHK2LCD.js → add-P6CBTAGK.js} +4 -4
  2. package/dist/chunks/add-WB6SXGXX.js +134 -0
  3. package/dist/chunks/{chunk-LQALVXRD.js → chunk-3S2QGKYZ.js} +1 -1
  4. package/dist/chunks/chunk-4QVAYRYH.js +71 -0
  5. package/dist/chunks/{chunk-22CQWS5E.js → chunk-5MVXR7B7.js} +1 -1
  6. package/dist/chunks/{chunk-VKGCONIM.js → chunk-6ISLGUMI.js} +3 -3
  7. package/dist/chunks/chunk-AUECDTMX.js +128 -0
  8. package/dist/chunks/{chunk-3WENOEKR.js → chunk-FM24W7ET.js} +4 -4
  9. package/dist/chunks/{chunk-GXAVQSHO.js → chunk-FVI6UYNL.js} +1 -1
  10. package/dist/chunks/{chunk-DHLDURNP.js → chunk-FZZWTDNQ.js} +2 -2
  11. package/dist/chunks/chunk-I3HGCZ4E.js +72 -0
  12. package/dist/chunks/{chunk-CXGDCPH4.js → chunk-ITU4COOO.js} +12 -3
  13. package/dist/chunks/chunk-KXGWAWRV.js +148 -0
  14. package/dist/chunks/{chunk-NN7E6Y4F.js → chunk-L6QLQSJE.js} +2 -2
  15. package/dist/chunks/{chunk-XQQXV6ZZ.js → chunk-LFODAB54.js} +1 -0
  16. package/dist/chunks/{chunk-I43WUYKE.js → chunk-O2QNLUYX.js} +1 -1
  17. package/dist/chunks/{chunk-BI2IN6RX.js → chunk-P726GMBL.js} +1 -1
  18. package/dist/chunks/{chunk-7273TMGI.js → chunk-Q4A2Q46Z.js} +4 -4
  19. package/dist/chunks/{chunk-ODVBO56J.js → chunk-Q7GZMMHB.js} +2 -2
  20. package/dist/chunks/{chunk-F6YGVA2L.js → chunk-RB7WQKNC.js} +3 -2
  21. package/dist/chunks/{chunk-URFSONFS.js → chunk-RKLBPBRM.js} +1 -1
  22. package/dist/chunks/chunk-RY3AVR6E.js +111 -0
  23. package/dist/chunks/{chunk-QPBO2QDL.js → chunk-SQYJEUZD.js} +4 -4
  24. package/dist/chunks/{chunk-ZAJ4OMXG.js → chunk-TV7GKFSY.js} +1 -1
  25. package/dist/chunks/{chunk-PPW2JATF.js → chunk-U3FBUYRS.js} +1 -1
  26. package/dist/chunks/chunk-VGIMO3ZK.js +17 -0
  27. package/dist/chunks/{chunk-BSSEGYXP.js → chunk-WFXGLPSI.js} +7 -3
  28. package/dist/chunks/{chunk-V7IBBQ2D.js → chunk-YWLVPKNT.js} +1 -1
  29. package/dist/chunks/chunk-ZVDYGXRA.js +363 -0
  30. package/dist/chunks/{chunk-VTE7W5ZP.js → chunk-ZZIAWRCX.js} +0 -8
  31. package/dist/chunks/{compile-vercel-config-WRCB2TG2.js → compile-vercel-config-XEZ2TPQ4.js} +1 -1
  32. package/dist/chunks/{delete-DIFVXSQA.js → delete-O3F4EP2W.js} +2 -2
  33. package/dist/chunks/{disable-623SZAWT.js → disable-SJWGUQKZ.js} +2 -2
  34. package/dist/chunks/{discard-R7YAQI6C.js → discard-EQD6ENC3.js} +2 -2
  35. package/dist/chunks/{edit-CY2RYSKD.js → edit-NAIWNSXE.js} +3 -3
  36. package/dist/chunks/{enable-HHOQLDPW.js → enable-LXO62HU5.js} +2 -2
  37. package/dist/chunks/{export-TNFZHJKM.js → export-EHVTYAAP.js} +2 -2
  38. package/dist/chunks/image-R4JG4NX4.js +73 -0
  39. package/dist/chunks/inspect-57BITHYZ.js +136 -0
  40. package/dist/chunks/{inspect-7JLYYYAR.js → inspect-KYVZQL56.js} +3 -3
  41. package/dist/chunks/inspect-RTJALSXC.js +167 -0
  42. package/dist/chunks/inspect-VXODLWNM.js +163 -0
  43. package/dist/chunks/{list-5LKLQBXP.js → list-BYTNF7D7.js} +3 -3
  44. package/dist/chunks/{list-K4F7WGQR.js → list-MUFZTUZA.js} +2 -2
  45. package/dist/chunks/ls-D7NWJACX.js +165 -0
  46. package/dist/chunks/ls-JPWOOVMW.js +214 -0
  47. package/dist/chunks/{ls-DUHNXBAL.js → ls-PDILBRUL.js} +4 -4
  48. package/dist/chunks/ls-ZDMXBOJF.js +201 -0
  49. package/dist/chunks/{publish-O5UJJQKF.js → publish-27V2MMFS.js} +2 -2
  50. package/dist/chunks/{query-FE6G54EI.js → query-75PT24SH.js} +2 -2
  51. package/dist/chunks/{reorder-YH47SCZC.js → reorder-DCSIJX72.js} +2 -2
  52. package/dist/chunks/{restore-TSR6PO3H.js → restore-NRUBGNSK.js} +2 -2
  53. package/dist/chunks/{rm-PQSDPXP2.js → rm-BJSTNUIJ.js} +4 -4
  54. package/dist/chunks/rm-OSIDD4VR.js +137 -0
  55. package/dist/chunks/rm-ZJQ5DOAW.js +137 -0
  56. package/dist/chunks/{rule-inspect-TNP2HULT.js → rule-inspect-WTU3MGMH.js} +4 -4
  57. package/dist/chunks/{rules-IO4KI6U7.js → rules-6PXGKHFH.js} +6 -6
  58. package/dist/chunks/{schema-QFN4XSPZ.js → schema-Z6L3EN6F.js} +2 -2
  59. package/dist/chunks/tags-HHNNZLC6.js +67 -0
  60. package/dist/chunks/{update-PGYIRCOQ.js → update-TTPNV44H.js} +4 -4
  61. package/dist/commands/build/index.js +148 -50
  62. package/dist/commands/deploy/index.js +13 -10
  63. package/dist/commands/dev/index.js +8 -8
  64. package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +20 -0
  65. package/dist/commands/env/index.js +11 -6
  66. package/dist/commands/link/index.js +10 -7
  67. package/dist/commands/list/index.js +3 -3
  68. package/dist/commands-bulk.js +957 -723
  69. package/dist/help.js +1 -1
  70. package/dist/index.js +22 -9
  71. package/dist/version.mjs +1 -1
  72. package/package.json +15 -15
@@ -0,0 +1,363 @@
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
+ outputError
9
+ } from "./chunk-E2ENQE2W.js";
10
+ import {
11
+ validateJsonOutput
12
+ } from "./chunk-XPKWKPWA.js";
13
+ import {
14
+ AGENT_REASON
15
+ } from "./chunk-QH7WYDEP.js";
16
+ import {
17
+ getScope
18
+ } from "./chunk-P726GMBL.js";
19
+ import {
20
+ getLinkedProject,
21
+ getProjectByNameOrId
22
+ } from "./chunk-RB7WQKNC.js";
23
+ import {
24
+ buildCommandWithGlobalFlags,
25
+ outputAgentError
26
+ } from "./chunk-IZOHLD5D.js";
27
+ import {
28
+ ProjectNotFound,
29
+ isAPIError,
30
+ packageName
31
+ } from "./chunk-P6AK7SVK.js";
32
+ import {
33
+ output_manager_default
34
+ } from "./chunk-OX7KI3LF.js";
35
+
36
+ // src/commands/vcr/utils/resolve-vcr-scope.ts
37
+ function emitVcrScopeError(client, jsonOutput, code, message, agent) {
38
+ outputAgentError(
39
+ client,
40
+ {
41
+ status: "error",
42
+ reason: agent.reason,
43
+ message,
44
+ hint: agent.hint,
45
+ next: agent.next
46
+ },
47
+ 1
48
+ );
49
+ return outputError(client, jsonOutput, code, message);
50
+ }
51
+ async function resolveVcrScope(client, opts) {
52
+ if (opts.project) {
53
+ const { team } = await getScope(client);
54
+ if (!team) {
55
+ const msg = "No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";
56
+ return emitVcrScopeError(client, opts.jsonOutput, "NO_TEAM", msg, {
57
+ reason: AGENT_REASON.MISSING_SCOPE,
58
+ hint: "Select a team scope before using --project with vcr.",
59
+ next: [
60
+ {
61
+ command: buildCommandWithGlobalFlags(client.argv, "whoami"),
62
+ when: "See current user and team"
63
+ },
64
+ {
65
+ command: buildCommandWithGlobalFlags(client.argv, "teams switch"),
66
+ when: "Switch to a team that owns the project"
67
+ }
68
+ ]
69
+ });
70
+ }
71
+ let projectResult;
72
+ try {
73
+ projectResult = await getProjectByNameOrId(client, opts.project, team.id);
74
+ } catch (err) {
75
+ if (isAPIError(err)) {
76
+ const msg = err.serverMessage || (err.status === 403 ? `You do not have permission to access project "${opts.project}" in team "${team.slug}".` : `API error (${err.status}).`);
77
+ const reason = err.status === 401 ? "not_authorized" : err.status === 403 ? "forbidden" : AGENT_REASON.API_ERROR;
78
+ return emitVcrScopeError(
79
+ client,
80
+ opts.jsonOutput,
81
+ err.code || "API_ERROR",
82
+ msg,
83
+ {
84
+ reason,
85
+ next: [
86
+ {
87
+ command: buildCommandWithGlobalFlags(
88
+ client.argv,
89
+ "vcr ls --project <name_or_id>"
90
+ ),
91
+ when: "Retry with a project you can access (replace <name_or_id>)"
92
+ }
93
+ ]
94
+ }
95
+ );
96
+ }
97
+ throw err;
98
+ }
99
+ if (projectResult instanceof ProjectNotFound) {
100
+ const msg = `Project "${opts.project}" was not found in team "${team.slug}".`;
101
+ return emitVcrScopeError(
102
+ client,
103
+ opts.jsonOutput,
104
+ "PROJECT_NOT_FOUND",
105
+ msg,
106
+ {
107
+ reason: AGENT_REASON.NOT_FOUND,
108
+ next: [
109
+ {
110
+ command: buildCommandWithGlobalFlags(client.argv, "project ls"),
111
+ when: "List projects in the current team to pick a name"
112
+ }
113
+ ]
114
+ }
115
+ );
116
+ }
117
+ return {
118
+ teamId: team.id,
119
+ teamSlug: team.slug,
120
+ projectId: projectResult.id,
121
+ projectName: projectResult.name
122
+ };
123
+ }
124
+ const linkedProject = await getLinkedProject(client);
125
+ if (linkedProject.status === "error") {
126
+ return linkedProject.exitCode;
127
+ }
128
+ if (linkedProject.status === "not_linked") {
129
+ const msg = "No linked project found. Run `vercel link` to link a project, or pass --project <name>.";
130
+ return emitVcrScopeError(client, opts.jsonOutput, "NOT_LINKED", msg, {
131
+ reason: AGENT_REASON.NOT_LINKED,
132
+ hint: "Agents should pass --project when no .vercel link exists in --cwd.",
133
+ next: [
134
+ {
135
+ command: buildCommandWithGlobalFlags(client.argv, "link"),
136
+ when: "Link this directory to a Vercel project"
137
+ },
138
+ {
139
+ command: buildCommandWithGlobalFlags(
140
+ client.argv,
141
+ "vcr ls --project <name_or_id>"
142
+ ),
143
+ when: "List repositories for a project without linking (replace <name_or_id>)"
144
+ }
145
+ ]
146
+ });
147
+ }
148
+ return {
149
+ teamId: linkedProject.org.id,
150
+ teamSlug: linkedProject.org.slug,
151
+ projectId: linkedProject.project.id,
152
+ projectName: linkedProject.project.name
153
+ };
154
+ }
155
+
156
+ // src/commands/vcr/utils/validators.ts
157
+ function validateVcrJsonOutput(client, flags) {
158
+ const fr = validateJsonOutput(flags);
159
+ if (!fr.valid) {
160
+ outputAgentError(
161
+ client,
162
+ {
163
+ status: "error",
164
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
165
+ message: fr.error
166
+ },
167
+ 1
168
+ );
169
+ output_manager_default.error(fr.error);
170
+ return 1;
171
+ }
172
+ return { jsonOutput: fr.jsonOutput };
173
+ }
174
+ function validateVcrChoice(client, flag, value, choices, jsonOutput) {
175
+ if (value === void 0 || choices.includes(value)) {
176
+ return void 0;
177
+ }
178
+ const message = `Invalid value for ${flag}: "${value}". Must be one of: ${choices.join(", ")}.`;
179
+ outputAgentError(
180
+ client,
181
+ {
182
+ status: "error",
183
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
184
+ message
185
+ },
186
+ 1
187
+ );
188
+ return outputError(client, jsonOutput, "INVALID_ARGUMENTS", message);
189
+ }
190
+ function requireVcrRepository(client, repository, jsonOutput, usage) {
191
+ if (repository) {
192
+ return void 0;
193
+ }
194
+ outputAgentError(
195
+ client,
196
+ {
197
+ status: "error",
198
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
199
+ message: `Missing repository. Example: ${packageName} ${usage}`,
200
+ next: [
201
+ {
202
+ command: buildCommandWithGlobalFlags(client.argv, "vcr ls"),
203
+ when: "List repositories to pick a name or id"
204
+ }
205
+ ]
206
+ },
207
+ 1
208
+ );
209
+ return outputError(
210
+ client,
211
+ jsonOutput,
212
+ "MISSING_ARGUMENTS",
213
+ `Usage: \`vercel ${usage}\``
214
+ );
215
+ }
216
+ function requireVcrRepositoryAndTag(client, repository, tag, jsonOutput, usage) {
217
+ if (repository && tag) {
218
+ return void 0;
219
+ }
220
+ outputAgentError(
221
+ client,
222
+ {
223
+ status: "error",
224
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
225
+ message: `Missing arguments. Example: ${packageName} ${usage}`,
226
+ next: [
227
+ {
228
+ command: buildCommandWithGlobalFlags(
229
+ client.argv,
230
+ "vcr tag ls <repository>"
231
+ ),
232
+ when: "List tags to pick a tag (replace <repository>)"
233
+ }
234
+ ]
235
+ },
236
+ 1
237
+ );
238
+ return outputError(
239
+ client,
240
+ jsonOutput,
241
+ "MISSING_ARGUMENTS",
242
+ `Usage: \`vercel ${usage}\``
243
+ );
244
+ }
245
+ function requireVcrRepositoryAndImageId(client, repository, imageId, jsonOutput, usage) {
246
+ if (repository && imageId) {
247
+ return void 0;
248
+ }
249
+ outputAgentError(
250
+ client,
251
+ {
252
+ status: "error",
253
+ reason: AGENT_REASON.MISSING_ARGUMENTS,
254
+ message: `Missing arguments. Example: ${packageName} ${usage}`,
255
+ next: [
256
+ {
257
+ command: buildCommandWithGlobalFlags(
258
+ client.argv,
259
+ "vcr image ls <repository>"
260
+ ),
261
+ when: "List images to pick an image id (replace <repository>)"
262
+ }
263
+ ]
264
+ },
265
+ 1
266
+ );
267
+ return outputError(
268
+ client,
269
+ jsonOutput,
270
+ "MISSING_ARGUMENTS",
271
+ `Usage: \`vercel ${usage}\``
272
+ );
273
+ }
274
+
275
+ // src/commands/vcr/utils/errors.ts
276
+ var NOT_AUTHORIZED_MESSAGE = "You do not have access to the container registry in this scope. Ensure your role can manage the project, or pass --token and --scope.";
277
+ var NOT_AUTHORIZED_HINT = "Confirm team scope with whoami; use --scope <team-slug> if the repository lives under another team.";
278
+ var genericMessage = (err) => err.serverMessage || `API error (${err.status}).`;
279
+ var STATUS_INFO = {
280
+ 401: {
281
+ reason: "not_authorized",
282
+ message: () => NOT_AUTHORIZED_MESSAGE,
283
+ hint: NOT_AUTHORIZED_HINT,
284
+ suggestWhoami: true
285
+ },
286
+ 403: {
287
+ reason: "forbidden",
288
+ message: () => NOT_AUTHORIZED_MESSAGE,
289
+ hint: NOT_AUTHORIZED_HINT,
290
+ suggestWhoami: true
291
+ },
292
+ 404: { reason: AGENT_REASON.NOT_FOUND, message: genericMessage },
293
+ 409: { reason: "conflict", message: genericMessage },
294
+ 429: { reason: "rate_limited", message: genericMessage }
295
+ };
296
+ function resolveStatusInfo(err) {
297
+ if (STATUS_INFO[err.status]) {
298
+ return STATUS_INFO[err.status];
299
+ }
300
+ if (err.status >= 500) {
301
+ return {
302
+ reason: AGENT_REASON.API_ERROR,
303
+ message: () => `The container registry endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`
304
+ };
305
+ }
306
+ return { reason: AGENT_REASON.API_ERROR, message: genericMessage };
307
+ }
308
+ function handleVcrApiError(client, err, jsonOutput, opts = {}) {
309
+ const info = resolveStatusInfo(err);
310
+ const message = info.message(err);
311
+ const next = [];
312
+ if (info.suggestWhoami) {
313
+ next.push({
314
+ command: buildCommandWithGlobalFlags(client.argv, "whoami"),
315
+ when: "See current user and team"
316
+ });
317
+ }
318
+ if (opts.retry) {
319
+ next.push(opts.retry);
320
+ }
321
+ outputAgentError(
322
+ client,
323
+ {
324
+ status: "error",
325
+ reason: info.reason,
326
+ message,
327
+ ...info.hint ? { hint: info.hint } : {},
328
+ ...next.length > 0 ? { next } : {}
329
+ },
330
+ 1
331
+ );
332
+ return outputError(client, jsonOutput, err.code || "API_ERROR", message);
333
+ }
334
+ function emitVcrArgParseError(client, err, recoverTemplate) {
335
+ const msg = err instanceof Error ? err.message : String(err);
336
+ const projectFlagMissingArg = msg.includes("--project") && msg.includes("requires argument");
337
+ outputAgentError(
338
+ client,
339
+ {
340
+ status: "error",
341
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
342
+ message: projectFlagMissingArg ? "`--project` requires a project name or id (for example `--project my-app`)." : msg,
343
+ next: [
344
+ {
345
+ command: buildCommandWithGlobalFlags(client.argv, recoverTemplate),
346
+ when: projectFlagMissingArg ? "Re-run with a project name or id (replace placeholder)" : "See valid usage"
347
+ }
348
+ ]
349
+ },
350
+ 1
351
+ );
352
+ }
353
+
354
+ export {
355
+ resolveVcrScope,
356
+ validateVcrJsonOutput,
357
+ validateVcrChoice,
358
+ requireVcrRepository,
359
+ requireVcrRepositoryAndTag,
360
+ requireVcrRepositoryAndImageId,
361
+ handleVcrApiError,
362
+ emitVcrArgParseError
363
+ };
@@ -240,13 +240,6 @@ var require_dist2 = __commonJS({
240
240
  }
241
241
  });
242
242
 
243
- // src/util/get-invalid-subcommand.ts
244
- function getInvalidSubcommand(config) {
245
- return `Please specify a valid subcommand: ${Object.keys(config).join(
246
- " | "
247
- )}`;
248
- }
249
-
250
243
  // src/util/input/read-standard-input.ts
251
244
  async function readStandardInput(stdin) {
252
245
  return new Promise((resolve) => {
@@ -290,7 +283,6 @@ function ellipsis(str, length) {
290
283
  }
291
284
 
292
285
  export {
293
- getInvalidSubcommand,
294
286
  readStandardInput,
295
287
  getCustomEnvironments,
296
288
  pickCustomEnvironment,
@@ -11,7 +11,7 @@ import {
11
11
  findSourceVercelConfigFile,
12
12
  getVercelConfigPath,
13
13
  normalizeConfig
14
- } from "./chunk-F6YGVA2L.js";
14
+ } from "./chunk-RB7WQKNC.js";
15
15
  import "./chunk-IZOHLD5D.js";
16
16
  import "./chunk-ECCWJHC6.js";
17
17
  import "./chunk-EJ6GQI6F.js";
@@ -15,7 +15,7 @@ import {
15
15
  parseSubcommandArgs,
16
16
  resolveRoutes,
17
17
  withGlobalFlags
18
- } from "./chunk-ZAJ4OMXG.js";
18
+ } from "./chunk-TV7GKFSY.js";
19
19
  import {
20
20
  deleteSubcommand
21
21
  } from "./chunk-EFUR47FZ.js";
@@ -27,7 +27,7 @@ import {
27
27
  AGENT_REASON,
28
28
  AGENT_STATUS
29
29
  } from "./chunk-QH7WYDEP.js";
30
- import "./chunk-F6YGVA2L.js";
30
+ import "./chunk-RB7WQKNC.js";
31
31
  import {
32
32
  outputAgentError
33
33
  } from "./chunk-IZOHLD5D.js";
@@ -17,7 +17,7 @@ import {
17
17
  parseSubcommandArgs,
18
18
  resolveRoute,
19
19
  withGlobalFlags
20
- } from "./chunk-ZAJ4OMXG.js";
20
+ } from "./chunk-TV7GKFSY.js";
21
21
  import {
22
22
  disableSubcommand
23
23
  } from "./chunk-EFUR47FZ.js";
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-64IF634X.js";
27
27
  import "./chunk-VXYGCOKL.js";
28
28
  import "./chunk-QH7WYDEP.js";
29
- import "./chunk-F6YGVA2L.js";
29
+ import "./chunk-RB7WQKNC.js";
30
30
  import {
31
31
  outputAgentError
32
32
  } from "./chunk-IZOHLD5D.js";
@@ -17,7 +17,7 @@ import {
17
17
  parseSubcommandArgs,
18
18
  printDiffSummary,
19
19
  withGlobalFlags
20
- } from "./chunk-ZAJ4OMXG.js";
20
+ } from "./chunk-TV7GKFSY.js";
21
21
  import {
22
22
  discardSubcommand
23
23
  } from "./chunk-EFUR47FZ.js";
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-64IF634X.js";
27
27
  import "./chunk-VXYGCOKL.js";
28
28
  import "./chunk-QH7WYDEP.js";
29
- import "./chunk-F6YGVA2L.js";
29
+ import "./chunk-RB7WQKNC.js";
30
30
  import {
31
31
  outputAgentError
32
32
  } from "./chunk-IZOHLD5D.js";
@@ -19,7 +19,7 @@ import {
19
19
  printRouteConfig,
20
20
  routingRuleToCurrentRoute,
21
21
  runInteractiveEditLoop
22
- } from "./chunk-LQALVXRD.js";
22
+ } from "./chunk-3S2QGKYZ.js";
23
23
  import {
24
24
  getRouteVersions
25
25
  } from "./chunk-AHU7WNL2.js";
@@ -31,7 +31,7 @@ import {
31
31
  resolveRoute,
32
32
  shellQuoteRouteIdentifierForSuggestion,
33
33
  withGlobalFlags
34
- } from "./chunk-ZAJ4OMXG.js";
34
+ } from "./chunk-TV7GKFSY.js";
35
35
  import {
36
36
  editSubcommand
37
37
  } from "./chunk-EFUR47FZ.js";
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-64IF634X.js";
41
41
  import "./chunk-VXYGCOKL.js";
42
42
  import "./chunk-QH7WYDEP.js";
43
- import "./chunk-F6YGVA2L.js";
43
+ import "./chunk-RB7WQKNC.js";
44
44
  import {
45
45
  outputAgentError
46
46
  } from "./chunk-IZOHLD5D.js";
@@ -17,7 +17,7 @@ import {
17
17
  parseSubcommandArgs,
18
18
  resolveRoute,
19
19
  withGlobalFlags
20
- } from "./chunk-ZAJ4OMXG.js";
20
+ } from "./chunk-TV7GKFSY.js";
21
21
  import {
22
22
  enableSubcommand
23
23
  } from "./chunk-EFUR47FZ.js";
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-64IF634X.js";
27
27
  import "./chunk-VXYGCOKL.js";
28
28
  import "./chunk-QH7WYDEP.js";
29
- import "./chunk-F6YGVA2L.js";
29
+ import "./chunk-RB7WQKNC.js";
30
30
  import {
31
31
  outputAgentError
32
32
  } from "./chunk-IZOHLD5D.js";
@@ -9,12 +9,12 @@ import {
9
9
  getRoutes,
10
10
  parseSubcommandArgs,
11
11
  withGlobalFlags
12
- } from "./chunk-ZAJ4OMXG.js";
12
+ } from "./chunk-TV7GKFSY.js";
13
13
  import {
14
14
  exportSubcommand
15
15
  } from "./chunk-EFUR47FZ.js";
16
16
  import "./chunk-QH7WYDEP.js";
17
- import "./chunk-F6YGVA2L.js";
17
+ import "./chunk-RB7WQKNC.js";
18
18
  import {
19
19
  outputAgentError
20
20
  } from "./chunk-IZOHLD5D.js";
@@ -0,0 +1,73 @@
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
+ getInvalidSubcommand
9
+ } from "./chunk-VGIMO3ZK.js";
10
+ import {
11
+ getSubcommand
12
+ } from "./chunk-YPQSDAEW.js";
13
+ import {
14
+ AGENT_REASON
15
+ } from "./chunk-QH7WYDEP.js";
16
+ import {
17
+ buildCommandWithGlobalFlags,
18
+ outputAgentError
19
+ } from "./chunk-IZOHLD5D.js";
20
+ import "./chunk-P6AK7SVK.js";
21
+ import "./chunk-P4QNYOFB.js";
22
+ import {
23
+ output_manager_default
24
+ } from "./chunk-OX7KI3LF.js";
25
+ import "./chunk-S7KYDPEM.js";
26
+ import "./chunk-TZ2YI2VH.js";
27
+
28
+ // src/commands/vcr/image/index.ts
29
+ var IMAGE_CONFIG = {
30
+ ls: ["ls", "list"],
31
+ inspect: ["inspect", "get"],
32
+ rm: ["rm", "remove", "delete"]
33
+ };
34
+ async function image(client, argv, telemetry) {
35
+ const { subcommand, args } = getSubcommand(argv, IMAGE_CONFIG);
36
+ if (subcommand == null) {
37
+ const message = argv.length === 0 ? getInvalidSubcommand(IMAGE_CONFIG) : `Unknown "vcr image" subcommand "${argv[0]}".`;
38
+ outputAgentError(
39
+ client,
40
+ {
41
+ status: "error",
42
+ reason: AGENT_REASON.INVALID_ARGUMENTS,
43
+ message,
44
+ next: [
45
+ {
46
+ command: buildCommandWithGlobalFlags(
47
+ client.argv,
48
+ "vcr image --help"
49
+ ),
50
+ when: "Show valid image subcommands"
51
+ }
52
+ ]
53
+ },
54
+ 1
55
+ );
56
+ output_manager_default.error(`${message} Run \`vercel vcr image --help\`.`);
57
+ return 1;
58
+ }
59
+ switch (subcommand) {
60
+ case "ls":
61
+ return (await import("./ls-ZDMXBOJF.js")).default(client, args, telemetry);
62
+ case "inspect":
63
+ return (await import("./inspect-RTJALSXC.js")).default(client, args, telemetry);
64
+ case "rm":
65
+ return (await import("./rm-ZJQ5DOAW.js")).default(client, args, telemetry);
66
+ default:
67
+ output_manager_default.error(`Unhandled image subcommand: ${subcommand}`);
68
+ return 1;
69
+ }
70
+ }
71
+ export {
72
+ image as default
73
+ };