@depup/vercel 57.0.0-depup.0 → 58.4.4-depup.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 (114) hide show
  1. package/README.md +5 -5
  2. package/changes.json +4 -4
  3. package/dist/chunks/{add-YRZTDNXX.js → add-245XOFJO.js} +14 -9
  4. package/dist/chunks/{add-7M577U56.js → add-P7WBQMBW.js} +10 -8
  5. package/dist/chunks/add-XH24V5VU.js +187 -0
  6. package/dist/chunks/build-M7NJYJPE.js +243 -0
  7. package/dist/chunks/{chunk-HD7B425F.js → chunk-2FMPLU44.js} +4 -4
  8. package/dist/chunks/{chunk-LMHT3QR3.js → chunk-2LBVX2H3.js} +3 -3
  9. package/dist/chunks/{chunk-YOZCJHLZ.js → chunk-2MAPZXVV.js} +10 -8
  10. package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
  11. package/dist/chunks/{chunk-F5PQWDOC.js → chunk-2WILSD7J.js} +1 -1
  12. package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
  13. package/dist/chunks/{chunk-A2TYQBX2.js → chunk-3QAUXPIR.js} +927 -518
  14. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  15. package/dist/chunks/{chunk-555WJSO5.js → chunk-4BUPRO5B.js} +7 -5
  16. package/dist/chunks/{chunk-TBR2Q37Y.js → chunk-4CCY5OPH.js} +1232 -1216
  17. package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
  18. package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
  19. package/dist/chunks/{chunk-KCF6S3XF.js → chunk-4UYKSYKQ.js} +10 -6
  20. package/dist/chunks/{chunk-GP5VCTEU.js → chunk-62MH5KPX.js} +207 -4
  21. package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
  22. package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
  23. package/dist/chunks/{chunk-2EDWKVNP.js → chunk-AQDWMAPM.js} +32 -16
  24. package/dist/chunks/{chunk-3VS4DTAU.js → chunk-AW5YINX6.js} +106 -12
  25. package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
  26. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  27. package/dist/chunks/chunk-CPFNFVCL.js +85 -0
  28. package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
  29. package/dist/chunks/{chunk-3PGXYIKC.js → chunk-EBLH23AQ.js} +2 -2
  30. package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
  31. package/dist/chunks/{chunk-IOAZNR6Z.js → chunk-HSYF5SI3.js} +1 -1
  32. package/dist/chunks/{chunk-F7X55TOY.js → chunk-IEDUCUDV.js} +6 -5
  33. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  34. package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
  35. package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
  36. package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
  37. package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
  38. package/dist/chunks/{chunk-3242RXCN.js → chunk-M5NOLAJ4.js} +1 -1
  39. package/dist/chunks/{chunk-2MJROFVC.js → chunk-MAHXF73X.js} +8 -5
  40. package/dist/chunks/{chunk-RYO6FJFB.js → chunk-NJ6QXKQD.js} +2 -2
  41. package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
  42. package/dist/chunks/chunk-RBIFXFZX.js +52 -0
  43. package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
  44. package/dist/chunks/{chunk-4PGF367U.js → chunk-SJYAUEZR.js} +232 -50
  45. package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
  46. package/dist/chunks/{chunk-UDWRZXIT.js → chunk-TJJ562C5.js} +18 -14
  47. package/dist/chunks/{chunk-NRNMT43R.js → chunk-UE3JUVUZ.js} +7 -13
  48. package/dist/chunks/chunk-V5P25P7F.js +22 -0
  49. package/dist/chunks/{chunk-MIFDRYTN.js → chunk-XE5VSQ25.js} +2 -2
  50. package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
  51. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  52. package/dist/chunks/{chunk-MAHINYBW.js → chunk-Y5GTPWXB.js} +2 -2
  53. package/dist/chunks/{chunk-NH43BFJ3.js → chunk-YCPUAG77.js} +2 -2
  54. package/dist/chunks/{chunk-T4NODP6Y.js → chunk-YDUINEII.js} +3 -3
  55. package/dist/chunks/{chunk-RAFH25WW.js → chunk-ZGBBPJ6B.js} +10 -6
  56. package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
  57. package/dist/chunks/clear-HWIKQ4NC.js +132 -0
  58. package/dist/chunks/{compile-vercel-config-3OHO3TJA.js → compile-vercel-config-U5NRIMZ2.js} +5 -4
  59. package/dist/chunks/config-validator.mjs +1 -1
  60. package/dist/chunks/{delete-3DZOCWCC.js → delete-FZCOUFGN.js} +7 -6
  61. package/dist/chunks/{delete-VOSJLNEA.js → delete-NVMGVD5Z.js} +7 -6
  62. package/dist/chunks/{disable-LQDEVRQF.js → disable-ERM2BWEQ.js} +7 -6
  63. package/dist/chunks/{discard-RGV4JKXQ.js → discard-KM5OLEN4.js} +7 -6
  64. package/dist/chunks/{edit-SFIEOQ24.js → edit-HT3UTATZ.js} +8 -7
  65. package/dist/chunks/{edit-UPZPI54L.js → edit-TOSB2EMI.js} +7 -6
  66. package/dist/chunks/{enable-6UVH35WC.js → enable-BQL6AOQV.js} +7 -6
  67. package/dist/chunks/{export-6CEG3CK7.js → export-UOWQHOG3.js} +7 -6
  68. package/dist/chunks/{image-CQRCD2OE.js → image-F5SC6Q7Y.js} +5 -5
  69. package/dist/chunks/{inspect-ZFRY3X3H.js → inspect-35FU5R62.js} +16 -13
  70. package/dist/chunks/{inspect-UM3LDRPV.js → inspect-5J5GSTOB.js} +14 -12
  71. package/dist/chunks/{inspect-K5ZMQG7X.js → inspect-GKJ6T5H4.js} +14 -12
  72. package/dist/chunks/{inspect-4ZAH3RFT.js → inspect-LGKOLH2O.js} +8 -7
  73. package/dist/chunks/{inspect-EXQBIAFF.js → inspect-PZJM2CWT.js} +13 -11
  74. package/dist/chunks/{list-KCUHD4OA.js → list-2IIE7CAP.js} +8 -7
  75. package/dist/chunks/{list-4DRVM7Q4.js → list-ITFJYYQ2.js} +13 -11
  76. package/dist/chunks/{list-FJCBOCCA.js → list-KZETH3ZE.js} +8 -6
  77. package/dist/chunks/{login-DFGYNU3K.js → login-BQPJCJEZ.js} +22 -51
  78. package/dist/chunks/{ls-RHEQ6YQB.js → ls-7GHDK4MD.js} +13 -11
  79. package/dist/chunks/{ls-CG6A7UXF.js → ls-DL2LA35C.js} +15 -13
  80. package/dist/chunks/{ls-34NCZKBE.js → ls-UXUEP54B.js} +15 -13
  81. package/dist/chunks/ls-YSFWSM6J.js +178 -0
  82. package/dist/chunks/{ls-4QHHVXXD.js → ls-ZZFLH7PK.js} +17 -14
  83. package/dist/chunks/{open-E3XADEMX.js → open-ADNJQN5E.js} +7 -6
  84. package/dist/chunks/permissions-72SZCBIY.js +95 -0
  85. package/dist/chunks/{publish-Z3AQRUCS.js → publish-OOAGSEBM.js} +7 -6
  86. package/dist/chunks/push-B6TZDXNF.js +183 -0
  87. package/dist/chunks/{query-3EV66DO3.js → query-LZWS5TDH.js} +12 -10
  88. package/dist/chunks/{reorder-VA5E5ZJT.js → reorder-MRHFKPMK.js} +7 -6
  89. package/dist/chunks/{reply-SNSCNKAW.js → reply-BKTJXO3B.js} +7 -6
  90. package/dist/chunks/{resolve-6ZX4RTXX.js → resolve-BKVGSGPN.js} +7 -6
  91. package/dist/chunks/{restore-NEHI5B5P.js → restore-USR7SKWV.js} +7 -6
  92. package/dist/chunks/{rm-FR6KE744.js → rm-2UO6BT3A.js} +10 -8
  93. package/dist/chunks/rm-37MKKV3I.js +186 -0
  94. package/dist/chunks/{rm-E5ZVLAKO.js → rm-KUWPNZIS.js} +15 -10
  95. package/dist/chunks/{rm-22B22E47.js → rm-VY3OHKFH.js} +12 -8
  96. package/dist/chunks/{rule-inspect-DMP2CKJQ.js → rule-inspect-JVDOOTWK.js} +13 -11
  97. package/dist/chunks/{rules-EYGXEI2Z.js → rules-NTBFZBIF.js} +8 -8
  98. package/dist/chunks/{schema-2IIWOBSQ.js → schema-6EZ72OVH.js} +11 -9
  99. package/dist/chunks/{tags-ZDVYRHAY.js → tags-HNPC63QA.js} +4 -4
  100. package/dist/chunks/{types-QKLIFDDP.js → types-QTOA2BTQ.js} +7 -5
  101. package/dist/chunks/{update-QH4DQMZV.js → update-LUYWNZP3.js} +10 -8
  102. package/dist/commands/build/index.js +16 -20
  103. package/dist/commands/deploy/index.js +39 -28
  104. package/dist/commands/dev/index.js +112 -20
  105. package/dist/commands/env/index.js +308 -36
  106. package/dist/commands/link/index.js +26 -23
  107. package/dist/commands/list/index.js +16 -9
  108. package/dist/commands-bulk.js +5414 -2654
  109. package/dist/help.js +1 -1
  110. package/dist/index.js +50 -44
  111. package/dist/version.mjs +1 -1
  112. package/package.json +47 -105
  113. package/dist/chunks/chunk-6OMC3HOW.js +0 -73
  114. package/dist/chunks/chunk-V4RMJKQP.js +0 -36
@@ -6,11 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  formatOption,
9
+ jsonOption,
9
10
  limitOption,
10
11
  packageName,
11
12
  projectOption,
12
13
  yesOption
13
- } from "./chunk-KSSNLCL4.js";
14
+ } from "./chunk-SOFC4MLS.js";
14
15
 
15
16
  // src/commands/comments/command.ts
16
17
  var commentsProjectOption = {
@@ -115,7 +116,8 @@ var listSubcommand = {
115
116
  },
116
117
  limitOption,
117
118
  nextCursorOption,
118
- formatOption
119
+ formatOption,
120
+ jsonOption
119
121
  ],
120
122
  examples: [
121
123
  {
@@ -128,7 +130,7 @@ var listSubcommand = {
128
130
  },
129
131
  {
130
132
  name: "List comments as JSON",
131
- value: `${packageName} comments --format json | jq '.threads[].id'`
133
+ value: `${packageName} comments --json | jq '.threads[].id'`
132
134
  }
133
135
  ]
134
136
  };
@@ -146,7 +148,8 @@ var inspectSubcommand = {
146
148
  deprecated: false,
147
149
  description: "Include framework and device context"
148
150
  },
149
- formatOption
151
+ formatOption,
152
+ jsonOption
150
153
  ],
151
154
  examples: [
152
155
  {
@@ -190,7 +193,8 @@ var replySubcommand = {
190
193
  messageContentOption,
191
194
  fileOption,
192
195
  attachOption,
193
- formatOption
196
+ formatOption,
197
+ jsonOption
194
198
  ],
195
199
  examples: [
196
200
  {
@@ -212,7 +216,8 @@ var resolveSubcommand = {
212
216
  commentsProjectOption,
213
217
  messageContentOption,
214
218
  yesOption,
215
- formatOption
219
+ formatOption,
220
+ jsonOption
216
221
  ],
217
222
  examples: [
218
223
  {
@@ -230,7 +235,7 @@ var reopenSubcommand = {
230
235
  aliases: [],
231
236
  description: "Reopen resolved comment threads",
232
237
  arguments: [{ name: "thread", required: true, multiple: true }],
233
- options: [commentsProjectOption, yesOption, formatOption],
238
+ options: [commentsProjectOption, yesOption, formatOption, jsonOption],
234
239
  examples: [
235
240
  {
236
241
  name: "Reopen a comment",
@@ -250,7 +255,8 @@ var editSubcommand = {
250
255
  commentsProjectOption,
251
256
  messageContentOption,
252
257
  fileOption,
253
- formatOption
258
+ formatOption,
259
+ jsonOption
254
260
  ],
255
261
  examples: [
256
262
  {
@@ -267,7 +273,7 @@ var deleteSubcommand = {
267
273
  { name: "thread", required: true },
268
274
  { name: "message-id", required: true }
269
275
  ],
270
- options: [commentsProjectOption, yesOption, formatOption],
276
+ options: [commentsProjectOption, yesOption, formatOption, jsonOption],
271
277
  examples: [
272
278
  {
273
279
  name: "Delete a message",
@@ -65,13 +65,13 @@ var help = () => `
65
65
  connect [cmd] Manage connectors [beta]
66
66
  contract Show contract information for billing periods
67
67
  cron | crons [cmd] Manage cron jobs for a project [beta]
68
- curl [path] cURL requests to your linked project's deployment [beta]
68
+ curl [url|path] cURL requests with automatic deployment protection bypass [beta]
69
69
  deploy-hooks [cmd] Manage deploy hooks for Git-triggered builds
70
70
  dns [name] Manages your DNS records
71
71
  domains [name] Manages your domain names
72
- edge-config [cmd] Manage Edge Config stores
73
72
  firewall [cmd] Manages Vercel Firewall configuration and custom rules
74
73
  flags [cmd] Manage feature flags for a Vercel project
74
+ global-config [cmd] Manage Global Config stores
75
75
  httpstat path Visualize HTTP timing statistics for deployments
76
76
  logs [url] Displays the logs for a deployment
77
77
  metrics <metric> Queries observability metrics for your project or team
@@ -6,10 +6,11 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  formatOption,
9
+ jsonOption,
9
10
  packageName,
10
11
  projectOption,
11
12
  yesOption
12
- } from "./chunk-KSSNLCL4.js";
13
+ } from "./chunk-SOFC4MLS.js";
13
14
 
14
15
  // src/commands/alerts/rules/command.ts
15
16
  var scopeOptions = [
@@ -41,7 +42,8 @@ var rulesLsSubcommand = {
41
42
  deprecated: false,
42
43
  description: "Filter by alert type. Repeatable and comma-separated (for example --type custom_alert)."
43
44
  },
44
- formatOption
45
+ formatOption,
46
+ jsonOption
45
47
  ],
46
48
  examples: [
47
49
  {
@@ -58,7 +60,7 @@ var rulesLsSubcommand = {
58
60
  },
59
61
  {
60
62
  name: "JSON output",
61
- value: `${packageName} alerts rules ls --format json`
63
+ value: `${packageName} alerts rules ls --json`
62
64
  }
63
65
  ]
64
66
  };
@@ -70,6 +72,7 @@ var rulesAddSubcommand = {
70
72
  options: [
71
73
  ...scopeOptions,
72
74
  formatOption,
75
+ jsonOption,
73
76
  {
74
77
  name: "body",
75
78
  shorthand: null,
@@ -96,7 +99,7 @@ var rulesInspectSubcommand = {
96
99
  required: true
97
100
  }
98
101
  ],
99
- options: [...scopeOptions, formatOption],
102
+ options: [...scopeOptions, formatOption, jsonOption],
100
103
  examples: [
101
104
  {
102
105
  name: "Inspect a rule",
@@ -104,7 +107,7 @@ var rulesInspectSubcommand = {
104
107
  },
105
108
  {
106
109
  name: "JSON output",
107
- value: `${packageName} alerts rules inspect ar_abc123 --format json`
110
+ value: `${packageName} alerts rules inspect ar_abc123 --json`
108
111
  }
109
112
  ]
110
113
  };
@@ -118,7 +121,7 @@ var rulesRmSubcommand = {
118
121
  required: true
119
122
  }
120
123
  ],
121
- options: [...scopeOptions, formatOption, yesOption],
124
+ options: [...scopeOptions, formatOption, jsonOption, yesOption],
122
125
  examples: [
123
126
  {
124
127
  name: "Delete with confirmation",
@@ -143,6 +146,7 @@ var rulesUpdateSubcommand = {
143
146
  options: [
144
147
  ...scopeOptions,
145
148
  formatOption,
149
+ jsonOption,
146
150
  {
147
151
  name: "body",
148
152
  shorthand: null,
@@ -4,30 +4,43 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
+ import {
8
+ require_lib
9
+ } from "./chunk-G75NFPIT.js";
7
10
  import {
8
11
  outputError
9
12
  } from "./chunk-BUZRVER7.js";
10
13
  import {
11
14
  validateJsonOutput
12
15
  } from "./chunk-XPKWKPWA.js";
16
+ import {
17
+ require_execa
18
+ } from "./chunk-R6IGDGX3.js";
13
19
  import {
14
20
  getLinkedProject,
15
21
  getProjectByNameOrId,
16
22
  getScope
17
- } from "./chunk-TBR2Q37Y.js";
23
+ } from "./chunk-4CCY5OPH.js";
18
24
  import {
19
25
  AGENT_REASON,
20
26
  buildCommandWithGlobalFlags,
21
27
  outputAgentError
22
- } from "./chunk-UDWRZXIT.js";
28
+ } from "./chunk-TJJ562C5.js";
23
29
  import {
24
30
  ProjectNotFound,
25
31
  isAPIError,
26
- packageName
27
- } from "./chunk-KSSNLCL4.js";
32
+ packageName,
33
+ require_bytes
34
+ } from "./chunk-SOFC4MLS.js";
28
35
  import {
29
36
  output_manager_default
30
37
  } from "./chunk-OX7KI3LF.js";
38
+ import {
39
+ require_ms
40
+ } from "./chunk-GGP5R3FU.js";
41
+ import {
42
+ __toESM
43
+ } from "./chunk-TZ2YI2VH.js";
31
44
 
32
45
  // src/commands/vcr/utils/resolve-vcr-scope.ts
33
46
  function emitVcrScopeError(client, jsonOutput, code, message, agent) {
@@ -149,6 +162,54 @@ async function resolveVcrScope(client, opts) {
149
162
  };
150
163
  }
151
164
 
165
+ // src/commands/vcr/utils/format.ts
166
+ var import_ms = __toESM(require_ms(), 1);
167
+ var import_bytes = __toESM(require_bytes(), 1);
168
+ function formatBytes(size) {
169
+ if (typeof size !== "number" || Number.isNaN(size)) {
170
+ return "-";
171
+ }
172
+ return import_bytes.default.format(size, { decimalPlaces: 1 }) ?? "-";
173
+ }
174
+ function formatRelativeTime(iso) {
175
+ const time = new Date(iso).getTime();
176
+ if (Number.isNaN(time)) {
177
+ return "-";
178
+ }
179
+ return `${(0, import_ms.default)(Date.now() - time)} ago`;
180
+ }
181
+ function formatDigest(digest) {
182
+ if (!digest) {
183
+ return "-";
184
+ }
185
+ return digest.replace(/^sha256:/, "").slice(0, 12);
186
+ }
187
+ function formatImageStatus(status) {
188
+ switch (status) {
189
+ case "ready":
190
+ return "Ready";
191
+ case "preparing":
192
+ return "Preparing";
193
+ case "unoptimized":
194
+ return "Ready (unoptimized)";
195
+ default:
196
+ return "-";
197
+ }
198
+ }
199
+ var VCR_REGISTRY = "vcr.vercel.com";
200
+ function formatImageReference(teamSlug, projectName, repositoryName, digest) {
201
+ if (!digest) {
202
+ return "-";
203
+ }
204
+ return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}@${digest}`;
205
+ }
206
+ function formatTagReference(teamSlug, projectName, repositoryName, tag) {
207
+ if (!tag) {
208
+ return "-";
209
+ }
210
+ return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}:${tag}`;
211
+ }
212
+
152
213
  // src/commands/vcr/utils/validators.ts
153
214
  function validateVcrJsonOutput(client, flags) {
154
215
  const fr = validateJsonOutput(flags);
@@ -268,6 +329,89 @@ function requireVcrRepositoryAndImageId(client, repository, imageId, jsonOutput,
268
329
  );
269
330
  }
270
331
 
332
+ // src/commands/vcr/utils/engine.ts
333
+ var import_which = __toESM(require_lib(), 1);
334
+ var import_execa = __toESM(require_execa(), 1);
335
+ var VCR_ENGINES = ["docker", "podman", "buildah"];
336
+ var VCR_LOGIN_USERNAME = "oidc";
337
+ function resolveRegistry() {
338
+ return process.env.VERCEL_VCR_REGISTRY || VCR_REGISTRY;
339
+ }
340
+ function isEngineInstalled(engine) {
341
+ return import_which.default.sync(engine, { nothrow: true }) !== null;
342
+ }
343
+ function splitPassthrough(argv) {
344
+ const idx = argv.indexOf("--");
345
+ if (idx === -1) {
346
+ return { own: argv.slice(2), passthrough: [] };
347
+ }
348
+ return { own: argv.slice(2, idx), passthrough: argv.slice(idx + 1) };
349
+ }
350
+ async function isBuildxAvailable() {
351
+ const result = await (0, import_execa.default)("docker", ["buildx", "version"], {
352
+ reject: false,
353
+ stdio: "ignore"
354
+ });
355
+ if (result instanceof Error) {
356
+ return false;
357
+ }
358
+ return result.exitCode === 0;
359
+ }
360
+ function pushCompressionArgs(engine) {
361
+ if (engine === "docker") {
362
+ return [];
363
+ }
364
+ return ["--compression-format", "zstd", "--compression-level", "3"];
365
+ }
366
+ var AUTH_FAILURE = /\b(?:unauthorized|denied|forbidden)\b\s*:|authentication required|access to the resource is denied|\b(?:401 unauthorized|403 forbidden)\b/i;
367
+ function stderrTail(stderr) {
368
+ return stderr.trim().split("\n").slice(-5).join("\n");
369
+ }
370
+ async function engineLogin(engine, registry, token) {
371
+ const result = await (0, import_execa.default)(
372
+ engine,
373
+ ["login", registry, "--username", VCR_LOGIN_USERNAME, "--password-stdin"],
374
+ { input: token, reject: false }
375
+ );
376
+ if (result instanceof Error && typeof result.exitCode !== "number") {
377
+ return { exitCode: 1, stderr: result.message };
378
+ }
379
+ return {
380
+ exitCode: typeof result.exitCode === "number" ? result.exitCode : 1,
381
+ stderr: result.stderr ?? ""
382
+ };
383
+ }
384
+ async function runEngine(engine, args, opts) {
385
+ if (opts.captureStderr) {
386
+ const subprocess = (0, import_execa.default)(engine, args, {
387
+ cwd: opts.cwd,
388
+ stdio: ["inherit", "inherit", "pipe"],
389
+ reject: false
390
+ });
391
+ subprocess.stderr?.pipe(process.stderr);
392
+ const result2 = await subprocess;
393
+ if (result2 instanceof Error && typeof result2.exitCode !== "number") {
394
+ return { exitCode: 1, stderr: result2.message };
395
+ }
396
+ return {
397
+ exitCode: typeof result2.exitCode === "number" ? result2.exitCode : 1,
398
+ stderr: result2.stderr ?? ""
399
+ };
400
+ }
401
+ const result = await (0, import_execa.default)(engine, args, {
402
+ cwd: opts.cwd,
403
+ stdio: "inherit",
404
+ reject: false
405
+ });
406
+ if (result instanceof Error && typeof result.exitCode !== "number") {
407
+ return { exitCode: 1, stderr: result.message };
408
+ }
409
+ return {
410
+ exitCode: typeof result.exitCode === "number" ? result.exitCode : 1,
411
+ stderr: ""
412
+ };
413
+ }
414
+
271
415
  // src/commands/vcr/utils/errors.ts
272
416
  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.";
273
417
  var NOT_AUTHORIZED_HINT = "Confirm team scope with whoami; use --scope <team-slug> if the repository lives under another team.";
@@ -327,6 +471,46 @@ function handleVcrApiError(client, err, jsonOutput, opts = {}) {
327
471
  );
328
472
  return outputError(client, jsonOutput, err.code || "API_ERROR", message);
329
473
  }
474
+ function reportEngineCommandFailure(client, engine, verb, result) {
475
+ const tail = stderrTail(result.stderr);
476
+ const message = `\`${engine} ${verb}\` failed (exit code ${result.exitCode}).${tail ? `
477
+ ${tail}` : ""}`;
478
+ outputAgentError(
479
+ client,
480
+ {
481
+ status: "error",
482
+ reason: "command_failed",
483
+ message
484
+ },
485
+ 1
486
+ );
487
+ return outputError(client, false, "COMMAND_FAILED", message);
488
+ }
489
+ function reportEnginePushFailure(client, engine, verb, result) {
490
+ if (AUTH_FAILURE.test(result.stderr)) {
491
+ const message = `Push to ${resolveRegistry()} was rejected. Your registry credentials may be missing or expired.`;
492
+ outputAgentError(
493
+ client,
494
+ {
495
+ status: "error",
496
+ reason: "not_authorized",
497
+ message,
498
+ next: [
499
+ {
500
+ command: buildCommandWithGlobalFlags(
501
+ client.argv,
502
+ `vcr login ${engine}`
503
+ ),
504
+ when: "Refresh registry credentials (valid ~12 hours)"
505
+ }
506
+ ]
507
+ },
508
+ 1
509
+ );
510
+ return outputError(client, false, "NOT_AUTHORIZED", message);
511
+ }
512
+ return reportEngineCommandFailure(client, engine, verb, result);
513
+ }
330
514
  function emitVcrArgParseError(client, err, recoverTemplate) {
331
515
  const msg = err instanceof Error ? err.message : String(err);
332
516
  const projectFlagMissingArg = msg.includes("--project") && msg.includes("requires argument");
@@ -349,11 +533,30 @@ function emitVcrArgParseError(client, err, recoverTemplate) {
349
533
 
350
534
  export {
351
535
  resolveVcrScope,
536
+ formatBytes,
537
+ formatRelativeTime,
538
+ formatDigest,
539
+ formatImageStatus,
540
+ formatImageReference,
541
+ formatTagReference,
352
542
  validateVcrJsonOutput,
353
543
  validateVcrChoice,
354
544
  requireVcrRepository,
355
545
  requireVcrRepositoryAndTag,
356
546
  requireVcrRepositoryAndImageId,
547
+ VCR_ENGINES,
548
+ VCR_LOGIN_USERNAME,
549
+ resolveRegistry,
550
+ isEngineInstalled,
551
+ splitPassthrough,
552
+ isBuildxAvailable,
553
+ pushCompressionArgs,
554
+ AUTH_FAILURE,
555
+ stderrTail,
556
+ engineLogin,
557
+ runEngine,
357
558
  handleVcrApiError,
559
+ reportEngineCommandFailure,
560
+ reportEnginePushFailure,
358
561
  emitVcrArgParseError
359
562
  };
@@ -9,7 +9,7 @@ import {
9
9
  packageName,
10
10
  projectOption,
11
11
  yesOption
12
- } from "./chunk-KSSNLCL4.js";
12
+ } from "./chunk-SOFC4MLS.js";
13
13
 
14
14
  // src/commands/dev/command.ts
15
15
  var devCommand = {
@@ -6,11 +6,12 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  formatOption,
9
+ jsonOption,
9
10
  limitOption,
10
11
  packageName,
11
12
  projectOption,
12
13
  yesOption
13
- } from "./chunk-KSSNLCL4.js";
14
+ } from "./chunk-SOFC4MLS.js";
14
15
 
15
16
  // src/commands/vcr/image/command.ts
16
17
  var projectScopeOption = {
@@ -47,7 +48,8 @@ var imageLsSubcommand = {
47
48
  },
48
49
  limitOption,
49
50
  cursorOption,
50
- formatOption
51
+ formatOption,
52
+ jsonOption
51
53
  ],
52
54
  examples: [
53
55
  {
@@ -56,7 +58,7 @@ var imageLsSubcommand = {
56
58
  },
57
59
  {
58
60
  name: "List untagged images as JSON",
59
- value: `${packageName} vcr image ls my-app --untagged --format json`
61
+ value: `${packageName} vcr image ls my-app --untagged --json`
60
62
  }
61
63
  ]
62
64
  };
@@ -74,7 +76,7 @@ var imageInspectSubcommand = {
74
76
  required: true
75
77
  }
76
78
  ],
77
- options: [projectScopeOption, formatOption],
79
+ options: [projectScopeOption, formatOption, jsonOption],
78
80
  examples: [
79
81
  {
80
82
  name: "Inspect an image by id",
@@ -96,7 +98,7 @@ var imageRmSubcommand = {
96
98
  required: true
97
99
  }
98
100
  ],
99
- options: [projectScopeOption, yesOption, formatOption],
101
+ options: [projectScopeOption, yesOption, formatOption, jsonOption],
100
102
  examples: [
101
103
  {
102
104
  name: "Delete an image by id",
@@ -7,39 +7,44 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getUpdateCommandInfo,
9
9
  isGlobal
10
- } from "./chunk-RYO6FJFB.js";
10
+ } from "./chunk-NJ6QXKQD.js";
11
11
  import {
12
- progress
13
- } from "./chunk-4PGF367U.js";
12
+ getGlobalPathConfig,
13
+ progress,
14
+ writeToConfigFile
15
+ } from "./chunk-SJYAUEZR.js";
16
+ import {
17
+ validateJsonOutput
18
+ } from "./chunk-XPKWKPWA.js";
14
19
  import {
15
20
  apiCommand,
16
- listSubcommand3 as listSubcommand,
21
+ listSubcommand4 as listSubcommand,
17
22
  loginCommand
18
- } from "./chunk-A2TYQBX2.js";
23
+ } from "./chunk-3QAUXPIR.js";
19
24
  import {
20
25
  require_semver
21
26
  } from "./chunk-IB5L4LKZ.js";
22
27
  import {
23
28
  help
24
- } from "./chunk-DMSLNAVH.js";
29
+ } from "./chunk-ZX2FSPWV.js";
25
30
  import {
26
- getGlobalPathConfig,
27
- login,
28
- writeToConfigFile
29
- } from "./chunk-TBR2Q37Y.js";
31
+ login
32
+ } from "./chunk-4CCY5OPH.js";
30
33
  import {
31
34
  TelemetryClient,
32
35
  isNativeBinaryInstall
33
36
  } from "./chunk-ECCWJHC6.js";
34
37
  import {
35
- parseArguments,
36
38
  printError,
37
39
  require_strip_ansi
38
- } from "./chunk-SZXT3PDQ.js";
40
+ } from "./chunk-KBEX5MYS.js";
41
+ import {
42
+ parseArguments
43
+ } from "./chunk-XLKFJPMT.js";
39
44
  import {
40
45
  getFlagsSpecification,
41
46
  packageName
42
- } from "./chunk-KSSNLCL4.js";
47
+ } from "./chunk-SOFC4MLS.js";
43
48
  import {
44
49
  pkg_default
45
50
  } from "./chunk-P4QNYOFB.js";
@@ -1147,6 +1152,11 @@ var ApiTelemetryClient = class extends TelemetryClient {
1147
1152
  });
1148
1153
  }
1149
1154
  }
1155
+ trackCliFlagJson(json) {
1156
+ if (json) {
1157
+ this.trackCliFlag("json");
1158
+ }
1159
+ }
1150
1160
  /**
1151
1161
  * Normalize endpoint by replacing IDs with placeholders for privacy
1152
1162
  */
@@ -1360,7 +1370,7 @@ async function parseOperationKeyValuePairs(endpoint, bodyFields, flags, position
1360
1370
  return;
1361
1371
  }
1362
1372
  throw new Error(
1363
- `Unknown option "${key}" for operation ${endpoint.operationId}. Check the API docs or run \`vercel api ls --format json\`.`
1373
+ `Unknown option "${key}" for operation ${endpoint.operationId}. Check the API docs or run \`vercel api ls --json\`.`
1364
1374
  );
1365
1375
  }
1366
1376
  for (const field of flags["--field"] || []) {
@@ -1910,18 +1920,24 @@ async function api(client) {
1910
1920
  );
1911
1921
  return 2;
1912
1922
  }
1923
+ const formatResult = validateJsonOutput(lsFlags);
1924
+ if (!formatResult.valid) {
1925
+ output_manager_default.error(formatResult.error);
1926
+ return 1;
1927
+ }
1913
1928
  telemetryClient.trackCliSubcommandList();
1914
1929
  if (lsFlags["--refresh"])
1915
1930
  telemetryClient.trackCliFlagRefresh(true);
1916
1931
  if (lsFlags["--format"])
1917
1932
  telemetryClient.trackCliOptionFormat(lsFlags["--format"]);
1933
+ telemetryClient.trackCliFlagJson(lsFlags["--json"]);
1918
1934
  if (lsFlags["--spec-url"])
1919
1935
  telemetryClient.trackCliOptionSpecUrl(lsFlags["--spec-url"]);
1920
1936
  return listEndpoints(
1921
1937
  client,
1922
1938
  lsFlags["--refresh"] ?? false,
1923
1939
  lsFlags["--spec-url"],
1924
- lsFlags["--format"] ?? "table"
1940
+ formatResult.jsonOutput ? "json" : "table"
1925
1941
  );
1926
1942
  }
1927
1943
  if (needHelp) {
@@ -2276,7 +2292,7 @@ function printTagOperationResolveError(result, allEndpoints) {
2276
2292
  const tags = [...new Set(allEndpoints.flatMap((ep) => ep.tags || []))].sort();
2277
2293
  const preview = tags.slice(0, 25).join(", ");
2278
2294
  output_manager_default.error(
2279
- `No operations use tag "${result.tag}".${tags.length > 0 ? ` Example tags: ${preview}${tags.length > 25 ? ", \u2026" : ""}.` : ""} Run \`vercel api ls --format json\` to inspect tags.`
2295
+ `No operations use tag "${result.tag}".${tags.length > 0 ? ` Example tags: ${preview}${tags.length > 25 ? ", \u2026" : ""}.` : ""} Run \`vercel api ls --json\` to inspect tags.`
2280
2296
  );
2281
2297
  return;
2282
2298
  }