vercel 54.18.7 → 54.20.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 (45) hide show
  1. package/dist/chunks/add-IB7HE5S5.js +134 -0
  2. package/dist/chunks/{add-P6CBTAGK.js → add-TF5VZLCY.js} +3 -3
  3. package/dist/chunks/{chunk-AXFSALI3.js → chunk-4BEUS7AL.js} +293 -71
  4. package/dist/chunks/chunk-4QVAYRYH.js +71 -0
  5. package/dist/chunks/{chunk-RKLBPBRM.js → chunk-7PAKWBN4.js} +2 -2
  6. package/dist/chunks/chunk-AUECDTMX.js +128 -0
  7. package/dist/chunks/{chunk-E2ENQE2W.js → chunk-BUZRVER7.js} +1 -0
  8. package/dist/chunks/{chunk-L6QLQSJE.js → chunk-GDAO4PGA.js} +1 -1
  9. package/dist/chunks/chunk-I3HGCZ4E.js +72 -0
  10. package/dist/chunks/{chunk-DXL7EPOQ.js → chunk-JDO6BSKN.js} +2 -2
  11. package/dist/chunks/chunk-JHQOIGTY.js +363 -0
  12. package/dist/chunks/chunk-KXGWAWRV.js +148 -0
  13. package/dist/chunks/{chunk-XQQXV6ZZ.js → chunk-LFODAB54.js} +1 -0
  14. package/dist/chunks/chunk-RY3AVR6E.js +111 -0
  15. package/dist/chunks/{chunk-JREEV2EL.js → chunk-T63I6OUR.js} +1 -1
  16. package/dist/chunks/chunk-VGIMO3ZK.js +17 -0
  17. package/dist/chunks/{chunk-VTE7W5ZP.js → chunk-ZZIAWRCX.js} +0 -8
  18. package/dist/chunks/image-2DL7JEWW.js +73 -0
  19. package/dist/chunks/inspect-6IHZTLFA.js +167 -0
  20. package/dist/chunks/inspect-EGXHWKY3.js +163 -0
  21. package/dist/chunks/inspect-PL3PE5IJ.js +136 -0
  22. package/dist/chunks/{inspect-KYVZQL56.js → inspect-Z3QJOMNP.js} +2 -2
  23. package/dist/chunks/{list-MUFZTUZA.js → list-BB4T4KT5.js} +1 -1
  24. package/dist/chunks/{list-BYTNF7D7.js → list-KNRPDNQF.js} +2 -2
  25. package/dist/chunks/ls-EP4Q6VF4.js +214 -0
  26. package/dist/chunks/{ls-PDILBRUL.js → ls-FTQGK4R6.js} +3 -3
  27. package/dist/chunks/ls-IQKMDRUB.js +165 -0
  28. package/dist/chunks/ls-MUS72LBS.js +201 -0
  29. package/dist/chunks/{query-75PT24SH.js → query-C6FEOG5R.js} +1 -1
  30. package/dist/chunks/rm-EZFCCZFT.js +137 -0
  31. package/dist/chunks/{rm-BJSTNUIJ.js → rm-GWW57H2V.js} +3 -3
  32. package/dist/chunks/rm-NMSG2WG6.js +137 -0
  33. package/dist/chunks/{rule-inspect-WTU3MGMH.js → rule-inspect-XPZJO3Y4.js} +3 -3
  34. package/dist/chunks/{rules-6PXGKHFH.js → rules-C6SB24UO.js} +6 -6
  35. package/dist/chunks/tags-5PFVWGLK.js +67 -0
  36. package/dist/chunks/{update-TTPNV44H.js → update-BCLMLJM7.js} +3 -3
  37. package/dist/commands/build/index.js +5 -1
  38. package/dist/commands/deploy/index.js +5 -2
  39. package/dist/commands/env/index.js +8 -3
  40. package/dist/commands/link/index.js +4 -1
  41. package/dist/commands-bulk.js +3304 -1952
  42. package/dist/help.js +1 -1
  43. package/dist/index.js +28 -5
  44. package/dist/version.mjs +1 -1
  45. package/package.json +16 -16
@@ -0,0 +1,148 @@
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
+ tagsAggregateCommand
9
+ } from "./chunk-RY3AVR6E.js";
10
+ import {
11
+ imageAggregateCommand
12
+ } from "./chunk-AUECDTMX.js";
13
+ import {
14
+ formatOption,
15
+ limitOption,
16
+ projectOption,
17
+ yesOption
18
+ } from "./chunk-EJ6GQI6F.js";
19
+ import {
20
+ packageName
21
+ } from "./chunk-P6AK7SVK.js";
22
+
23
+ // src/commands/vcr/command.ts
24
+ var projectScopeOption = {
25
+ ...projectOption,
26
+ shorthand: "p",
27
+ description: "Project name or ID (defaults to the linked project)."
28
+ };
29
+ var cursorOption = {
30
+ name: "cursor",
31
+ shorthand: "c",
32
+ type: String,
33
+ deprecated: false,
34
+ description: "Cursor from a previous page to continue listing from",
35
+ argument: "STRING"
36
+ };
37
+ var listSubcommand = {
38
+ name: "ls",
39
+ aliases: ["list"],
40
+ description: "List container registry repositories for a project",
41
+ arguments: [],
42
+ options: [projectScopeOption, limitOption, cursorOption, formatOption],
43
+ examples: [
44
+ {
45
+ name: "List repositories in the linked project",
46
+ value: `${packageName} vcr ls`
47
+ },
48
+ {
49
+ name: "List repositories for a specific project as JSON",
50
+ value: `${packageName} vcr ls --project my-app --format json`
51
+ }
52
+ ]
53
+ };
54
+ var inspectSubcommand = {
55
+ name: "inspect",
56
+ aliases: ["get"],
57
+ description: "Show details for a single repository",
58
+ arguments: [
59
+ {
60
+ name: "repository",
61
+ required: true
62
+ }
63
+ ],
64
+ options: [projectScopeOption, formatOption],
65
+ examples: [
66
+ {
67
+ name: "Inspect a repository by name",
68
+ value: `${packageName} vcr inspect my-repository`
69
+ }
70
+ ]
71
+ };
72
+ var addSubcommand = {
73
+ name: "add",
74
+ aliases: ["create"],
75
+ description: "Create a container registry repository",
76
+ arguments: [
77
+ {
78
+ name: "name",
79
+ required: true
80
+ }
81
+ ],
82
+ options: [projectScopeOption, formatOption],
83
+ examples: [
84
+ {
85
+ name: "Create a repository",
86
+ value: `${packageName} vcr add my-repository`
87
+ }
88
+ ]
89
+ };
90
+ var removeSubcommand = {
91
+ name: "rm",
92
+ aliases: ["remove", "delete"],
93
+ description: "Delete a container registry repository",
94
+ arguments: [
95
+ {
96
+ name: "repository",
97
+ required: true
98
+ }
99
+ ],
100
+ options: [projectScopeOption, yesOption, formatOption],
101
+ examples: [
102
+ {
103
+ name: "Delete a repository",
104
+ value: `${packageName} vcr rm my-repository`
105
+ },
106
+ {
107
+ name: "Delete a repository without the confirmation prompt",
108
+ value: `${packageName} vcr rm my-repository --yes`
109
+ }
110
+ ]
111
+ };
112
+ var vcrCommand = {
113
+ name: "vcr",
114
+ aliases: [],
115
+ description: "Manage Vercel Container Registry repositories and images (see `vcr image`).",
116
+ arguments: [],
117
+ subcommands: [
118
+ listSubcommand,
119
+ inspectSubcommand,
120
+ addSubcommand,
121
+ removeSubcommand,
122
+ tagsAggregateCommand,
123
+ imageAggregateCommand
124
+ ],
125
+ options: [],
126
+ examples: [
127
+ {
128
+ name: "List repositories in the linked project",
129
+ value: `${packageName} vcr ls`
130
+ },
131
+ {
132
+ name: "Create a repository",
133
+ value: `${packageName} vcr add my-app`
134
+ },
135
+ {
136
+ name: "List images in a repository",
137
+ value: `${packageName} vcr image ls my-app`
138
+ }
139
+ ]
140
+ };
141
+
142
+ export {
143
+ listSubcommand,
144
+ inspectSubcommand,
145
+ addSubcommand,
146
+ removeSubcommand,
147
+ vcrCommand
148
+ };
@@ -86,6 +86,7 @@ var help = () => `
86
86
  traces [cmd] Fetch and capture traces for your project's deployment
87
87
  upgrade Upgrade the Vercel CLI to the latest version
88
88
  usage Show billing usage for the current billing period
89
+ vcr [cmd] Manages your Container Registry repositories and images
89
90
  webhooks [cmd] Manages webhooks [beta]
90
91
  whoami Shows the username of the currently logged in user
91
92
 
@@ -0,0 +1,111 @@
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
+ formatOption,
9
+ limitOption,
10
+ projectOption
11
+ } from "./chunk-EJ6GQI6F.js";
12
+ import {
13
+ packageName
14
+ } from "./chunk-P6AK7SVK.js";
15
+
16
+ // src/commands/vcr/tags/command.ts
17
+ var projectScopeOption = {
18
+ ...projectOption,
19
+ shorthand: "p",
20
+ description: "Project name or ID (defaults to the linked project)."
21
+ };
22
+ var cursorOption = {
23
+ name: "cursor",
24
+ shorthand: "c",
25
+ type: String,
26
+ deprecated: false,
27
+ description: "Cursor from a previous page to continue listing from",
28
+ argument: "STRING"
29
+ };
30
+ var TAGS_SORT_BY_CHOICES = ["updatedAt", "tag"];
31
+ var TAGS_SORT_ORDER_CHOICES = ["asc", "desc"];
32
+ var tagsLsSubcommand = {
33
+ name: "ls",
34
+ aliases: ["list"],
35
+ description: "List a repository's tags",
36
+ arguments: [
37
+ {
38
+ name: "repository",
39
+ required: true
40
+ }
41
+ ],
42
+ options: [
43
+ projectScopeOption,
44
+ {
45
+ name: "sort-by",
46
+ shorthand: null,
47
+ type: String,
48
+ deprecated: false,
49
+ description: "Field to sort tags by (default: updatedAt)",
50
+ argument: "FIELD",
51
+ choices: TAGS_SORT_BY_CHOICES
52
+ },
53
+ {
54
+ name: "sort-order",
55
+ shorthand: null,
56
+ type: String,
57
+ deprecated: false,
58
+ description: "Sort direction (default: desc)",
59
+ argument: "ORDER",
60
+ choices: TAGS_SORT_ORDER_CHOICES
61
+ },
62
+ limitOption,
63
+ cursorOption,
64
+ formatOption
65
+ ],
66
+ examples: [
67
+ {
68
+ name: "List a repository's tags",
69
+ value: `${packageName} vcr tag ls my-app`
70
+ }
71
+ ]
72
+ };
73
+ var tagsInspectSubcommand = {
74
+ name: "inspect",
75
+ aliases: ["get"],
76
+ description: "Show details for a single tag",
77
+ arguments: [
78
+ {
79
+ name: "repository",
80
+ required: true
81
+ },
82
+ {
83
+ name: "tag",
84
+ required: true
85
+ }
86
+ ],
87
+ options: [projectScopeOption, formatOption],
88
+ examples: [
89
+ {
90
+ name: "Inspect a tag by name",
91
+ value: `${packageName} vcr tag inspect my-app latest`
92
+ }
93
+ ]
94
+ };
95
+ var tagsAggregateCommand = {
96
+ name: "tag",
97
+ aliases: ["tags"],
98
+ description: "List or inspect a repository's tags",
99
+ arguments: [],
100
+ subcommands: [tagsLsSubcommand, tagsInspectSubcommand],
101
+ options: [],
102
+ examples: []
103
+ };
104
+
105
+ export {
106
+ TAGS_SORT_BY_CHOICES,
107
+ TAGS_SORT_ORDER_CHOICES,
108
+ tagsLsSubcommand,
109
+ tagsInspectSubcommand,
110
+ tagsAggregateCommand
111
+ };
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-SGL3NMOP.js";
21
21
  import {
22
22
  CommandTimeout
23
- } from "./chunk-AXFSALI3.js";
23
+ } from "./chunk-4BEUS7AL.js";
24
24
  import {
25
25
  showPluginTipIfNeeded
26
26
  } from "./chunk-NJUPUGOE.js";
@@ -0,0 +1,17 @@
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/util/get-invalid-subcommand.ts
9
+ function getInvalidSubcommand(config) {
10
+ return `Please specify a valid subcommand: ${Object.keys(config).join(
11
+ " | "
12
+ )}`;
13
+ }
14
+
15
+ export {
16
+ getInvalidSubcommand
17
+ };
@@ -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,
@@ -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-MUS72LBS.js")).default(client, args, telemetry);
62
+ case "inspect":
63
+ return (await import("./inspect-6IHZTLFA.js")).default(client, args, telemetry);
64
+ case "rm":
65
+ return (await import("./rm-EZFCCZFT.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
+ };
@@ -0,0 +1,167 @@
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
+ formatBytes,
9
+ formatImageReference,
10
+ formatImageStatus,
11
+ formatRelativeTime
12
+ } from "./chunk-I3HGCZ4E.js";
13
+ import {
14
+ imagePath,
15
+ repositoryPath
16
+ } from "./chunk-4QVAYRYH.js";
17
+ import {
18
+ emitVcrArgParseError,
19
+ handleVcrApiError,
20
+ requireVcrRepositoryAndImageId,
21
+ resolveVcrScope,
22
+ validateVcrJsonOutput
23
+ } from "./chunk-JHQOIGTY.js";
24
+ import "./chunk-BUZRVER7.js";
25
+ import "./chunk-XPKWKPWA.js";
26
+ import {
27
+ imageInspectSubcommand
28
+ } from "./chunk-AUECDTMX.js";
29
+ import "./chunk-QH7WYDEP.js";
30
+ import "./chunk-P726GMBL.js";
31
+ import "./chunk-RB7WQKNC.js";
32
+ import "./chunk-IZOHLD5D.js";
33
+ import "./chunk-ECCWJHC6.js";
34
+ import {
35
+ getFlagsSpecification,
36
+ parseArguments,
37
+ printError
38
+ } from "./chunk-EJ6GQI6F.js";
39
+ import {
40
+ isAPIError
41
+ } from "./chunk-P6AK7SVK.js";
42
+ import "./chunk-P4QNYOFB.js";
43
+ import "./chunk-2RVK3DDN.js";
44
+ import {
45
+ output_manager_default
46
+ } from "./chunk-OX7KI3LF.js";
47
+ import "./chunk-GGP5R3FU.js";
48
+ import {
49
+ require_source
50
+ } from "./chunk-S7KYDPEM.js";
51
+ import {
52
+ __toESM
53
+ } from "./chunk-TZ2YI2VH.js";
54
+
55
+ // src/commands/vcr/image/inspect.ts
56
+ var import_chalk = __toESM(require_source(), 1);
57
+ function printImage(image, scope, repository) {
58
+ output_manager_default.print("\n");
59
+ output_manager_default.print(` ${import_chalk.default.cyan("ID")} ${image.id}
60
+ `);
61
+ output_manager_default.print(` ${import_chalk.default.cyan("Digest")} ${image.manifestDigest}
62
+ `);
63
+ output_manager_default.print(
64
+ ` ${import_chalk.default.cyan("Image")} ${formatImageReference(
65
+ scope.teamSlug,
66
+ scope.projectName,
67
+ repository.name,
68
+ image.manifestDigest
69
+ )}
70
+ `
71
+ );
72
+ output_manager_default.print(` ${import_chalk.default.cyan("Type")} ${image.kind}
73
+ `);
74
+ output_manager_default.print(` ${import_chalk.default.cyan("Arch")} ${image.arch ?? "-"}
75
+ `);
76
+ output_manager_default.print(` ${import_chalk.default.cyan("Platform")} ${image.platform ?? "-"}
77
+ `);
78
+ output_manager_default.print(
79
+ ` ${import_chalk.default.cyan("Size")} ${formatBytes(image.sizeInBytes)}
80
+ `
81
+ );
82
+ output_manager_default.print(
83
+ ` ${import_chalk.default.cyan("Status")} ${formatImageStatus(image.status)}
84
+ `
85
+ );
86
+ output_manager_default.print(
87
+ ` ${import_chalk.default.cyan("Created")} ${formatRelativeTime(image.createdAt)}
88
+ `
89
+ );
90
+ output_manager_default.print(
91
+ ` ${import_chalk.default.cyan("Tags")} ${image.tags?.length ? image.tags.join(", ") : "-"}
92
+ `
93
+ );
94
+ output_manager_default.print("\n");
95
+ }
96
+ async function inspect(client, argv, telemetry) {
97
+ let parsedArgs;
98
+ try {
99
+ parsedArgs = parseArguments(
100
+ argv,
101
+ getFlagsSpecification(imageInspectSubcommand.options)
102
+ );
103
+ } catch (err) {
104
+ emitVcrArgParseError(
105
+ client,
106
+ err,
107
+ "vcr image inspect <repository> <imageId> --project <name-or-id>"
108
+ );
109
+ printError(err);
110
+ return 1;
111
+ }
112
+ const fr = validateVcrJsonOutput(client, parsedArgs.flags);
113
+ if (typeof fr === "number") {
114
+ return fr;
115
+ }
116
+ const repository = parsedArgs.args[0];
117
+ const imageId = parsedArgs.args[1];
118
+ const project = parsedArgs.flags["--project"];
119
+ telemetry.trackCliOptionProject(project);
120
+ telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
121
+ const missingArgs = requireVcrRepositoryAndImageId(
122
+ client,
123
+ repository,
124
+ imageId,
125
+ fr.jsonOutput,
126
+ "vcr image inspect <repository> <imageId>"
127
+ );
128
+ if (typeof missingArgs === "number") {
129
+ return missingArgs;
130
+ }
131
+ const scope = await resolveVcrScope(client, {
132
+ project,
133
+ jsonOutput: fr.jsonOutput
134
+ });
135
+ if (typeof scope === "number") {
136
+ return scope;
137
+ }
138
+ const path = imagePath(scope, repository, imageId);
139
+ output_manager_default.spinner("Fetching image...");
140
+ try {
141
+ if (fr.jsonOutput) {
142
+ const result = await client.fetch(path);
143
+ client.stdout.write(`${JSON.stringify(result.image, null, 2)}
144
+ `);
145
+ } else {
146
+ const [imageResult, repositoryResult] = await Promise.all([
147
+ client.fetch(path),
148
+ client.fetch(
149
+ repositoryPath(scope, repository)
150
+ )
151
+ ]);
152
+ output_manager_default.log(`${import_chalk.default.bold("Image")} ${import_chalk.default.cyan(imageId)}`);
153
+ printImage(imageResult.image, scope, repositoryResult.repository);
154
+ }
155
+ return 0;
156
+ } catch (err) {
157
+ if (isAPIError(err)) {
158
+ return handleVcrApiError(client, err, fr.jsonOutput);
159
+ }
160
+ throw err;
161
+ } finally {
162
+ output_manager_default.stopSpinner();
163
+ }
164
+ }
165
+ export {
166
+ inspect as default
167
+ };