vercel 58.0.0 → 58.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 (108) hide show
  1. package/dist/chunks/{add-E4KH6P4A.js → add-3RKTVRL7.js} +10 -8
  2. package/dist/chunks/{add-7PPD4ZUJ.js → add-X634O3US.js} +14 -9
  3. package/dist/chunks/add-YTFWON7N.js +187 -0
  4. package/dist/chunks/build-DJIDUWYB.js +243 -0
  5. package/dist/chunks/{chunk-DWMH5M4Q.js → chunk-2SFMOCWR.js} +1 -1
  6. package/dist/chunks/{chunk-3PKFXNJZ.js → chunk-3KNPVXJ3.js} +7 -5
  7. package/dist/chunks/chunk-3ZE5CFVM.js +346 -0
  8. package/dist/chunks/{chunk-FHEMFAHB.js → chunk-4LDQIDRM.js} +15 -9
  9. package/dist/chunks/{chunk-R5FOIIHT.js → chunk-4N7XLXM2.js} +2 -2
  10. package/dist/chunks/{chunk-KCF6S3XF.js → chunk-4UYKSYKQ.js} +10 -6
  11. package/dist/chunks/{chunk-AZTV7WPZ.js → chunk-5YXUTGSY.js} +1 -1
  12. package/dist/chunks/{chunk-MDQJLTGN.js → chunk-752Z4JQP.js} +1 -1
  13. package/dist/chunks/{chunk-OGG6UBXK.js → chunk-7QVJTI5H.js} +1 -1
  14. package/dist/chunks/{chunk-FYQPTH5C.js → chunk-A5KP5HAI.js} +7 -5
  15. package/dist/chunks/{chunk-3VS4DTAU.js → chunk-AW5YINX6.js} +106 -12
  16. package/dist/chunks/{chunk-BYQQLGCT.js → chunk-AZNCOIGT.js} +2 -2
  17. package/dist/chunks/{chunk-GIL3VAUR.js → chunk-B3JTF4CF.js} +5 -3
  18. package/dist/chunks/{chunk-4QVAYRYH.js → chunk-BEQV3X2L.js} +16 -1
  19. package/dist/chunks/{chunk-TPX7RZBM.js → chunk-BM5FP7VW.js} +9 -5
  20. package/dist/chunks/{chunk-WDE2EDYX.js → chunk-C33L5ZKY.js} +4 -4
  21. package/dist/chunks/{chunk-VUESC3YO.js → chunk-C6BDHNNF.js} +207 -4
  22. package/dist/chunks/{chunk-4G6QZSBL.js → chunk-CSJBZKC5.js} +6 -4
  23. package/dist/chunks/{chunk-TEWJ7TIW.js → chunk-D3EEVTWR.js} +2 -2
  24. package/dist/chunks/{chunk-3PGXYIKC.js → chunk-EBLH23AQ.js} +2 -2
  25. package/dist/chunks/{chunk-YA3WQFLY.js → chunk-GFG6QDIE.js} +1 -1
  26. package/dist/chunks/{chunk-FB4UFWEC.js → chunk-IH5JOYGQ.js} +4 -4
  27. package/dist/chunks/chunk-J6LK45HT.js +163 -0
  28. package/dist/chunks/{chunk-FYR7WEUJ.js → chunk-JID5CRQL.js} +3 -3
  29. package/dist/chunks/{chunk-ZVLPUREX.js → chunk-JLWQWYKO.js} +2 -2
  30. package/dist/chunks/{chunk-SZXT3PDQ.js → chunk-KBEX5MYS.js} +1 -136
  31. package/dist/chunks/{chunk-NZRWTCRM.js → chunk-KT4XXKJK.js} +1 -1
  32. package/dist/chunks/{chunk-VZSZBD4V.js → chunk-M22O6CYY.js} +1 -1
  33. package/dist/chunks/{chunk-2MJROFVC.js → chunk-MAHXF73X.js} +8 -5
  34. package/dist/chunks/{chunk-YZMZCQP3.js → chunk-MTW6MVY7.js} +10 -8
  35. package/dist/chunks/{chunk-ZMVFTCQF.js → chunk-NVSQ6KXI.js} +1 -1
  36. package/dist/chunks/{chunk-LHFNIZ2P.js → chunk-O5GNPPTU.js} +4 -2
  37. package/dist/chunks/{chunk-KGVT2RSG.js → chunk-OTQD3MHJ.js} +5 -11
  38. package/dist/chunks/{chunk-RSCSALZH.js → chunk-PNXQB4IO.js} +6 -5
  39. package/dist/chunks/{chunk-L4WYMJB3.js → chunk-QZV24TDR.js} +28 -12
  40. package/dist/chunks/chunk-RBIFXFZX.js +52 -0
  41. package/dist/chunks/{chunk-OF2GNB42.js → chunk-RQ7H43CJ.js} +1 -1
  42. package/dist/chunks/{chunk-EA22NMFU.js → chunk-RUOBMMEA.js} +2 -2
  43. package/dist/chunks/{chunk-KSSNLCL4.js → chunk-SOFC4MLS.js} +2 -2
  44. package/dist/chunks/{chunk-R54DAHCL.js → chunk-UDDCOV62.js} +2 -2
  45. package/dist/chunks/{chunk-OQGN4TEC.js → chunk-UJNNTGJY.js} +3 -3
  46. package/dist/chunks/{chunk-DGFASMSE.js → chunk-UQJMDWCY.js} +7 -5
  47. package/dist/chunks/{chunk-B2MTCHPO.js → chunk-WXJ6E3MY.js} +6 -4
  48. package/dist/chunks/{chunk-QZD5DKUR.js → chunk-XIG4GH62.js} +2 -2
  49. package/dist/chunks/chunk-XLKFJPMT.js +150 -0
  50. package/dist/chunks/{chunk-UDWRZXIT.js → chunk-Z5ZQJ5VJ.js} +15 -14
  51. package/dist/chunks/{chunk-WANVKOVB.js → chunk-ZPH66MB6.js} +808 -538
  52. package/dist/chunks/{chunk-DMSLNAVH.js → chunk-ZX2FSPWV.js} +2 -2
  53. package/dist/chunks/clear-J3OCB2DQ.js +132 -0
  54. package/dist/chunks/{compile-vercel-config-G2IVBXEI.js → compile-vercel-config-G2WILJR4.js} +5 -4
  55. package/dist/chunks/{delete-2EIVGM6P.js → delete-3NQLU7PQ.js} +7 -6
  56. package/dist/chunks/{delete-E6ZQNE5X.js → delete-HKUZTZE7.js} +7 -6
  57. package/dist/chunks/{disable-M3Q6BBB7.js → disable-7AIA4JV3.js} +7 -6
  58. package/dist/chunks/{discard-3R6ETBPS.js → discard-MIGUGPGO.js} +7 -6
  59. package/dist/chunks/{edit-7JUDPVXD.js → edit-3AU746TG.js} +8 -7
  60. package/dist/chunks/{edit-ICVMGRRU.js → edit-MDQW3S4R.js} +7 -6
  61. package/dist/chunks/{enable-HLTA35QL.js → enable-EGNWRQEI.js} +7 -6
  62. package/dist/chunks/{export-E6XZUFW3.js → export-EMBHNUMU.js} +7 -6
  63. package/dist/chunks/{image-SIRPPQZT.js → image-XXZ5DRIW.js} +5 -5
  64. package/dist/chunks/{inspect-6TQWDIBG.js → inspect-7V5ZHBBB.js} +13 -11
  65. package/dist/chunks/{inspect-65YX7L3O.js → inspect-MYUNZMLJ.js} +14 -12
  66. package/dist/chunks/{inspect-NFOURIGN.js → inspect-O7SVDBHM.js} +16 -13
  67. package/dist/chunks/{inspect-OEWWGAHZ.js → inspect-S5WJ47OH.js} +8 -7
  68. package/dist/chunks/{inspect-4FYBOOM5.js → inspect-TXVTHRAZ.js} +14 -12
  69. package/dist/chunks/{list-APFMKZJO.js → list-BQLJJACX.js} +13 -11
  70. package/dist/chunks/{list-27DCGMBI.js → list-LC2ON7OM.js} +8 -6
  71. package/dist/chunks/{list-XQCZVLES.js → list-NZ4ZOO6B.js} +8 -7
  72. package/dist/chunks/{login-FMU4CQOV.js → login-4B7KPSUW.js} +22 -51
  73. package/dist/chunks/ls-4J2WGR7U.js +178 -0
  74. package/dist/chunks/{ls-BFACWH6C.js → ls-7XMM4KCU.js} +17 -14
  75. package/dist/chunks/{ls-24BRCAZR.js → ls-FRSKR6K2.js} +15 -13
  76. package/dist/chunks/{ls-3L6EN4YU.js → ls-TWNQ7KZN.js} +13 -11
  77. package/dist/chunks/{ls-T5RGDBCV.js → ls-WCTLFAPI.js} +15 -13
  78. package/dist/chunks/{open-AG3VYJZM.js → open-J4SAVWUP.js} +7 -6
  79. package/dist/chunks/permissions-67T43WNH.js +95 -0
  80. package/dist/chunks/{publish-5OVCPS4J.js → publish-CSXOTJLD.js} +7 -6
  81. package/dist/chunks/push-7KOVRV5N.js +183 -0
  82. package/dist/chunks/{query-QS4VKBXJ.js → query-CTRPYYXR.js} +12 -10
  83. package/dist/chunks/{reorder-B5V2P7YM.js → reorder-E4PPJNEX.js} +7 -6
  84. package/dist/chunks/{reply-JBLWE6RS.js → reply-Z742BMF3.js} +7 -6
  85. package/dist/chunks/{resolve-2I6XH2G3.js → resolve-KPZJZ6IQ.js} +7 -6
  86. package/dist/chunks/{restore-O63FZXCL.js → restore-ZTH2FY4I.js} +7 -6
  87. package/dist/chunks/{rm-P3NJSCMY.js → rm-C4ODJDWP.js} +12 -8
  88. package/dist/chunks/{rm-N7W3QYWZ.js → rm-DE37CFKU.js} +15 -10
  89. package/dist/chunks/{rm-HUED5R3Q.js → rm-FVGLSIHP.js} +10 -8
  90. package/dist/chunks/rm-VOFJM4XW.js +186 -0
  91. package/dist/chunks/{rule-inspect-M3QUSPU2.js → rule-inspect-6RLS3ZNB.js} +13 -11
  92. package/dist/chunks/{rules-NSSWPJ2B.js → rules-VSXJT2QE.js} +8 -8
  93. package/dist/chunks/{schema-G2PAXPVA.js → schema-3E24G2AG.js} +11 -9
  94. package/dist/chunks/{tags-JFMO63D4.js → tags-AIZLNITP.js} +4 -4
  95. package/dist/chunks/{types-QKLIFDDP.js → types-QTOA2BTQ.js} +7 -5
  96. package/dist/chunks/{update-VJCKD6YG.js → update-QHWT7YG4.js} +10 -8
  97. package/dist/commands/build/index.js +15 -19
  98. package/dist/commands/deploy/index.js +33 -25
  99. package/dist/commands/dev/index.js +85 -17
  100. package/dist/commands/env/index.js +32 -24
  101. package/dist/commands/link/index.js +25 -22
  102. package/dist/commands/list/index.js +16 -9
  103. package/dist/commands-bulk.js +4171 -2411
  104. package/dist/help.js +1 -1
  105. package/dist/index.js +38 -34
  106. package/dist/version.mjs +1 -1
  107. package/package.json +43 -94
  108. package/dist/chunks/chunk-6OMC3HOW.js +0 -73
@@ -4,19 +4,23 @@ 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
- tagsAggregateCommand
9
- } from "./chunk-GIL3VAUR.js";
10
7
  import {
11
8
  imageAggregateCommand
12
- } from "./chunk-FYQPTH5C.js";
9
+ } from "./chunk-A5KP5HAI.js";
10
+ import {
11
+ permissionsAggregateCommand
12
+ } from "./chunk-J6LK45HT.js";
13
+ import {
14
+ tagsAggregateCommand
15
+ } from "./chunk-B3JTF4CF.js";
13
16
  import {
14
17
  formatOption,
18
+ jsonOption,
15
19
  limitOption,
16
20
  packageName,
17
21
  projectOption,
18
22
  yesOption
19
- } from "./chunk-KSSNLCL4.js";
23
+ } from "./chunk-SOFC4MLS.js";
20
24
 
21
25
  // src/commands/vcr/command.ts
22
26
  var projectScopeOption = {
@@ -32,12 +36,33 @@ var cursorOption = {
32
36
  description: "Cursor from a previous page to continue listing from",
33
37
  argument: "STRING"
34
38
  };
39
+ var platformOption = {
40
+ name: "platform",
41
+ shorthand: null,
42
+ type: String,
43
+ deprecated: false,
44
+ description: "Target platform for the build (defaults to linux/amd64).",
45
+ argument: "PLATFORM"
46
+ };
47
+ var pushOption = {
48
+ name: "push",
49
+ shorthand: null,
50
+ type: Boolean,
51
+ deprecated: false,
52
+ description: "Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."
53
+ };
35
54
  var listSubcommand = {
36
55
  name: "ls",
37
56
  aliases: ["list"],
38
57
  description: "List container registry repositories for a project",
39
58
  arguments: [],
40
- options: [projectScopeOption, limitOption, cursorOption, formatOption],
59
+ options: [
60
+ projectScopeOption,
61
+ limitOption,
62
+ cursorOption,
63
+ formatOption,
64
+ jsonOption
65
+ ],
41
66
  examples: [
42
67
  {
43
68
  name: "List repositories in the linked project",
@@ -45,7 +70,7 @@ var listSubcommand = {
45
70
  },
46
71
  {
47
72
  name: "List repositories for a specific project as JSON",
48
- value: `${packageName} vcr ls --project my-app --format json`
73
+ value: `${packageName} vcr ls --project my-app --json`
49
74
  }
50
75
  ]
51
76
  };
@@ -59,7 +84,7 @@ var inspectSubcommand = {
59
84
  required: true
60
85
  }
61
86
  ],
62
- options: [projectScopeOption, formatOption],
87
+ options: [projectScopeOption, formatOption, jsonOption],
63
88
  examples: [
64
89
  {
65
90
  name: "Inspect a repository by name",
@@ -77,7 +102,7 @@ var addSubcommand = {
77
102
  required: true
78
103
  }
79
104
  ],
80
- options: [projectScopeOption, formatOption],
105
+ options: [projectScopeOption, formatOption, jsonOption],
81
106
  examples: [
82
107
  {
83
108
  name: "Create a repository",
@@ -95,7 +120,7 @@ var removeSubcommand = {
95
120
  required: true
96
121
  }
97
122
  ],
98
- options: [projectScopeOption, yesOption, formatOption],
123
+ options: [projectScopeOption, yesOption, formatOption, jsonOption],
99
124
  examples: [
100
125
  {
101
126
  name: "Delete a repository",
@@ -117,7 +142,7 @@ var loginSubcommand = {
117
142
  required: true
118
143
  }
119
144
  ],
120
- options: [projectScopeOption, formatOption],
145
+ options: [projectScopeOption, formatOption, jsonOption],
121
146
  examples: [
122
147
  {
123
148
  name: "Log in with Docker",
@@ -137,6 +162,70 @@ var loginSubcommand = {
137
162
  }
138
163
  ]
139
164
  };
165
+ var buildSubcommand = {
166
+ name: "build",
167
+ aliases: [],
168
+ description: "Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",
169
+ arguments: [
170
+ {
171
+ name: "engine",
172
+ required: true
173
+ },
174
+ {
175
+ name: "path",
176
+ required: false
177
+ },
178
+ {
179
+ name: "name",
180
+ required: false
181
+ }
182
+ ],
183
+ options: [projectScopeOption, platformOption, pushOption],
184
+ examples: [
185
+ {
186
+ name: "Build the current directory into the linked project (repository defaults to the project name, tag to latest)",
187
+ value: `${packageName} vcr build docker`
188
+ },
189
+ {
190
+ name: "Build and push in one step (Docker Buildx enables zstd compression)",
191
+ value: `${packageName} vcr build docker --push`
192
+ },
193
+ {
194
+ name: "Build a specific context path with a repository and tag",
195
+ value: `${packageName} vcr build docker ./app my-api:1.2.3`
196
+ },
197
+ {
198
+ name: "Pass extra flags through to the container tool",
199
+ value: `${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`
200
+ }
201
+ ]
202
+ };
203
+ var pushSubcommand = {
204
+ name: "push",
205
+ aliases: [],
206
+ description: "Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",
207
+ arguments: [
208
+ {
209
+ name: "engine",
210
+ required: true
211
+ },
212
+ {
213
+ name: "name",
214
+ required: false
215
+ }
216
+ ],
217
+ options: [projectScopeOption],
218
+ examples: [
219
+ {
220
+ name: "Push the linked project image (repository defaults to the project name, tag to latest)",
221
+ value: `${packageName} vcr push docker`
222
+ },
223
+ {
224
+ name: "Push a specific repository and tag",
225
+ value: `${packageName} vcr push docker my-api:1.2.3`
226
+ }
227
+ ]
228
+ };
140
229
  var vcrCommand = {
141
230
  name: "vcr",
142
231
  aliases: [],
@@ -148,8 +237,11 @@ var vcrCommand = {
148
237
  addSubcommand,
149
238
  removeSubcommand,
150
239
  loginSubcommand,
240
+ buildSubcommand,
241
+ pushSubcommand,
151
242
  tagsAggregateCommand,
152
- imageAggregateCommand
243
+ imageAggregateCommand,
244
+ permissionsAggregateCommand
153
245
  ],
154
246
  options: [],
155
247
  examples: [
@@ -174,5 +266,7 @@ export {
174
266
  addSubcommand,
175
267
  removeSubcommand,
176
268
  loginSubcommand,
269
+ buildSubcommand,
270
+ pushSubcommand,
177
271
  vcrCommand
178
272
  };
@@ -6,13 +6,13 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-TPX7RZBM.js";
9
+ } from "./chunk-BM5FP7VW.js";
10
10
  import {
11
11
  isNativeBinaryInstall
12
12
  } from "./chunk-ECCWJHC6.js";
13
13
  import {
14
14
  packageName
15
- } from "./chunk-KSSNLCL4.js";
15
+ } from "./chunk-SOFC4MLS.js";
16
16
  import {
17
17
  __toESM
18
18
  } from "./chunk-TZ2YI2VH.js";
@@ -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
  limitOption,
10
11
  packageName,
11
12
  projectOption
12
- } from "./chunk-KSSNLCL4.js";
13
+ } from "./chunk-SOFC4MLS.js";
13
14
 
14
15
  // src/commands/vcr/tags/command.ts
15
16
  var projectScopeOption = {
@@ -59,7 +60,8 @@ var tagsLsSubcommand = {
59
60
  },
60
61
  limitOption,
61
62
  cursorOption,
62
- formatOption
63
+ formatOption,
64
+ jsonOption
63
65
  ],
64
66
  examples: [
65
67
  {
@@ -82,7 +84,7 @@ var tagsInspectSubcommand = {
82
84
  required: true
83
85
  }
84
86
  ],
85
- options: [projectScopeOption, formatOption],
87
+ options: [projectScopeOption, formatOption, jsonOption],
86
88
  examples: [
87
89
  {
88
90
  name: "Inspect a tag by name",
@@ -60,6 +60,19 @@ function repositoryTagsPath(scope, idOrName, opts = {}) {
60
60
  function repositoryTagPath(scope, idOrName, tag) {
61
61
  return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/tags/${encodeURIComponent(tag)}?${baseQuery(scope).toString()}`;
62
62
  }
63
+ function repositoryPermissionsPath(scope, idOrName, opts = {}) {
64
+ const query = baseQuery(scope);
65
+ if (opts.limit !== void 0) {
66
+ query.set("limit", String(opts.limit));
67
+ }
68
+ if (opts.cursor) {
69
+ query.set("cursor", opts.cursor);
70
+ }
71
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/permissions?${query.toString()}`;
72
+ }
73
+ function repositoryPermissionsClearPath(scope, idOrName) {
74
+ return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/permissions/all?${baseQuery(scope).toString()}`;
75
+ }
63
76
 
64
77
  export {
65
78
  repositoriesPath,
@@ -67,5 +80,7 @@ export {
67
80
  repositoryImagesPath,
68
81
  imagePath,
69
82
  repositoryTagsPath,
70
- repositoryTagPath
83
+ repositoryTagPath,
84
+ repositoryPermissionsPath,
85
+ repositoryPermissionsClearPath
71
86
  };
@@ -20,13 +20,15 @@ import {
20
20
  outputActionRequired,
21
21
  outputAgentError,
22
22
  shouldEmitNonInteractiveCommandError
23
- } from "./chunk-UDWRZXIT.js";
23
+ } from "./chunk-Z5ZQJ5VJ.js";
24
24
  import {
25
- parseArguments,
26
25
  printError,
27
26
  require_string_width,
28
27
  require_strip_ansi
29
- } from "./chunk-SZXT3PDQ.js";
28
+ } from "./chunk-KBEX5MYS.js";
29
+ import {
30
+ parseArguments
31
+ } from "./chunk-XLKFJPMT.js";
30
32
  import {
31
33
  APIError,
32
34
  CantParseJSONFile,
@@ -52,11 +54,12 @@ import {
52
54
  getCommandNamePlain,
53
55
  getFlagsSpecification,
54
56
  isAPIError,
57
+ jsonOption,
55
58
  packageName,
56
59
  projectOption,
57
60
  require_lib,
58
61
  yesOption
59
- } from "./chunk-KSSNLCL4.js";
62
+ } from "./chunk-SOFC4MLS.js";
60
63
  import {
61
64
  pkg_default
62
65
  } from "./chunk-P4QNYOFB.js";
@@ -38147,7 +38150,7 @@ var require_package = __commonJS({
38147
38150
  "../client/package.json"(exports, module) {
38148
38151
  module.exports = {
38149
38152
  name: "@vercel/client",
38150
- version: "18.2.0",
38153
+ version: "18.2.1",
38151
38154
  main: "dist/index.js",
38152
38155
  typings: "dist/index.d.ts",
38153
38156
  homepage: "https://vercel.com",
@@ -56968,6 +56971,7 @@ var listSubcommand = {
56968
56971
  ],
56969
56972
  options: [
56970
56973
  formatOption,
56974
+ jsonOption,
56971
56975
  projectOption,
56972
56976
  {
56973
56977
  name: "guidance",
@@ -6,22 +6,22 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  setupAndLink
9
- } from "./chunk-KGVT2RSG.js";
9
+ } from "./chunk-OTQD3MHJ.js";
10
10
  import {
11
11
  detectExplicitScope,
12
12
  getLinkedProject,
13
13
  param,
14
14
  printProjectNotFoundError,
15
15
  resolveProjectCwd
16
- } from "./chunk-TPX7RZBM.js";
16
+ } from "./chunk-BM5FP7VW.js";
17
17
  import {
18
18
  buildCommandWithYes,
19
19
  outputActionRequired
20
- } from "./chunk-UDWRZXIT.js";
20
+ } from "./chunk-Z5ZQJ5VJ.js";
21
21
  import {
22
22
  getCommandName,
23
23
  getCommandNamePlain
24
- } from "./chunk-KSSNLCL4.js";
24
+ } from "./chunk-SOFC4MLS.js";
25
25
  import {
26
26
  output_manager_default
27
27
  } from "./chunk-OX7KI3LF.js";
@@ -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-TPX7RZBM.js";
23
+ } from "./chunk-BM5FP7VW.js";
18
24
  import {
19
25
  AGENT_REASON,
20
26
  buildCommandWithGlobalFlags,
21
27
  outputAgentError
22
- } from "./chunk-UDWRZXIT.js";
28
+ } from "./chunk-Z5ZQJ5VJ.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
  };
@@ -6,9 +6,10 @@ 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
- } from "./chunk-KSSNLCL4.js";
12
+ } from "./chunk-SOFC4MLS.js";
12
13
 
13
14
  // src/commands/metrics/command.ts
14
15
  var schemaSubcommand = {
@@ -16,7 +17,7 @@ var schemaSubcommand = {
16
17
  aliases: [],
17
18
  description: "List available metrics or inspect a specific metric.",
18
19
  arguments: [{ name: "metric-or-prefix", required: false }],
19
- options: [formatOption],
20
+ options: [formatOption, jsonOption],
20
21
  examples: [
21
22
  {
22
23
  name: "List all metrics",
@@ -28,7 +29,7 @@ var schemaSubcommand = {
28
29
  },
29
30
  {
30
31
  name: "Schema as JSON for agents",
31
- value: `${packageName} metrics schema vercel.request.count --format=json`
32
+ value: `${packageName} metrics schema vercel.request.count --json`
32
33
  }
33
34
  ]
34
35
  };
@@ -151,7 +152,8 @@ var metricsCommand = {
151
152
  deprecated: false,
152
153
  description: "Query across all projects for the team"
153
154
  },
154
- formatOption
155
+ formatOption,
156
+ jsonOption
155
157
  ],
156
158
  examples: [
157
159
  {
@@ -6,11 +6,11 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  STANDARD_ENVIRONMENTS
9
- } from "./chunk-TPX7RZBM.js";
9
+ } from "./chunk-BM5FP7VW.js";
10
10
  import {
11
11
  getCommandName,
12
12
  require_lib
13
- } from "./chunk-KSSNLCL4.js";
13
+ } from "./chunk-SOFC4MLS.js";
14
14
  import {
15
15
  output_manager_default
16
16
  } from "./chunk-OX7KI3LF.js";
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-FGDKMNEN.js";
13
13
  import {
14
14
  truncateMiddle
15
- } from "./chunk-OF2GNB42.js";
15
+ } from "./chunk-RQ7H43CJ.js";
16
16
  import {
17
17
  table
18
- } from "./chunk-NZRWTCRM.js";
18
+ } from "./chunk-KT4XXKJK.js";
19
19
 
20
20
  // src/commands/alerts/format.ts
21
21
  function renderAlertTable(rows, hsep = 3) {
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-NM43FFV6.js";
11
11
  import {
12
12
  isAPIError
13
- } from "./chunk-KSSNLCL4.js";
13
+ } from "./chunk-SOFC4MLS.js";
14
14
  import {
15
15
  output_manager_default
16
16
  } from "./chunk-OX7KI3LF.js";