vercel 54.18.7 → 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.
- package/dist/chunks/add-WB6SXGXX.js +134 -0
- package/dist/chunks/chunk-4QVAYRYH.js +71 -0
- package/dist/chunks/chunk-AUECDTMX.js +128 -0
- package/dist/chunks/{chunk-JREEV2EL.js → chunk-FM24W7ET.js} +1 -1
- package/dist/chunks/chunk-I3HGCZ4E.js +72 -0
- package/dist/chunks/chunk-KXGWAWRV.js +148 -0
- package/dist/chunks/{chunk-XQQXV6ZZ.js → chunk-LFODAB54.js} +1 -0
- package/dist/chunks/chunk-RY3AVR6E.js +111 -0
- package/dist/chunks/{chunk-DXL7EPOQ.js → chunk-SQYJEUZD.js} +1 -1
- package/dist/chunks/chunk-VGIMO3ZK.js +17 -0
- package/dist/chunks/{chunk-AXFSALI3.js → chunk-WFXGLPSI.js} +5 -1
- package/dist/chunks/chunk-ZVDYGXRA.js +363 -0
- package/dist/chunks/{chunk-VTE7W5ZP.js → chunk-ZZIAWRCX.js} +0 -8
- package/dist/chunks/image-R4JG4NX4.js +73 -0
- package/dist/chunks/inspect-57BITHYZ.js +136 -0
- package/dist/chunks/inspect-RTJALSXC.js +167 -0
- package/dist/chunks/inspect-VXODLWNM.js +163 -0
- package/dist/chunks/ls-D7NWJACX.js +165 -0
- package/dist/chunks/ls-JPWOOVMW.js +214 -0
- package/dist/chunks/ls-ZDMXBOJF.js +201 -0
- package/dist/chunks/rm-OSIDD4VR.js +137 -0
- package/dist/chunks/rm-ZJQ5DOAW.js +137 -0
- package/dist/chunks/tags-HHNNZLC6.js +67 -0
- package/dist/commands/build/index.js +5 -1
- package/dist/commands/deploy/index.js +5 -2
- package/dist/commands/env/index.js +8 -3
- package/dist/commands/link/index.js +4 -1
- package/dist/commands-bulk.js +929 -695
- package/dist/help.js +1 -1
- package/dist/index.js +16 -3
- package/dist/version.mjs +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
emitVcrArgParseError,
|
|
9
|
+
handleVcrApiError,
|
|
10
|
+
resolveVcrScope,
|
|
11
|
+
validateVcrJsonOutput
|
|
12
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
13
|
+
import {
|
|
14
|
+
outputError
|
|
15
|
+
} from "./chunk-E2ENQE2W.js";
|
|
16
|
+
import "./chunk-XPKWKPWA.js";
|
|
17
|
+
import {
|
|
18
|
+
addSubcommand
|
|
19
|
+
} from "./chunk-KXGWAWRV.js";
|
|
20
|
+
import "./chunk-RY3AVR6E.js";
|
|
21
|
+
import "./chunk-AUECDTMX.js";
|
|
22
|
+
import {
|
|
23
|
+
AGENT_REASON
|
|
24
|
+
} from "./chunk-QH7WYDEP.js";
|
|
25
|
+
import "./chunk-P726GMBL.js";
|
|
26
|
+
import "./chunk-RB7WQKNC.js";
|
|
27
|
+
import {
|
|
28
|
+
buildCommandWithGlobalFlags,
|
|
29
|
+
outputAgentError
|
|
30
|
+
} from "./chunk-IZOHLD5D.js";
|
|
31
|
+
import "./chunk-ECCWJHC6.js";
|
|
32
|
+
import {
|
|
33
|
+
getFlagsSpecification,
|
|
34
|
+
parseArguments,
|
|
35
|
+
printError
|
|
36
|
+
} from "./chunk-EJ6GQI6F.js";
|
|
37
|
+
import {
|
|
38
|
+
isAPIError,
|
|
39
|
+
packageName
|
|
40
|
+
} from "./chunk-P6AK7SVK.js";
|
|
41
|
+
import "./chunk-P4QNYOFB.js";
|
|
42
|
+
import "./chunk-2RVK3DDN.js";
|
|
43
|
+
import {
|
|
44
|
+
output_manager_default
|
|
45
|
+
} from "./chunk-OX7KI3LF.js";
|
|
46
|
+
import "./chunk-GGP5R3FU.js";
|
|
47
|
+
import "./chunk-S7KYDPEM.js";
|
|
48
|
+
import "./chunk-TZ2YI2VH.js";
|
|
49
|
+
|
|
50
|
+
// src/commands/vcr/add.ts
|
|
51
|
+
async function add(client, argv, telemetry) {
|
|
52
|
+
let parsedArgs;
|
|
53
|
+
try {
|
|
54
|
+
parsedArgs = parseArguments(
|
|
55
|
+
argv,
|
|
56
|
+
getFlagsSpecification(addSubcommand.options)
|
|
57
|
+
);
|
|
58
|
+
} catch (err) {
|
|
59
|
+
emitVcrArgParseError(client, err, "vcr add <name> --project <name-or-id>");
|
|
60
|
+
printError(err);
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
64
|
+
if (typeof fr === "number") {
|
|
65
|
+
return fr;
|
|
66
|
+
}
|
|
67
|
+
const name = parsedArgs.args[0];
|
|
68
|
+
const project = parsedArgs.flags["--project"];
|
|
69
|
+
telemetry.trackCliOptionProject(project);
|
|
70
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
71
|
+
if (!name) {
|
|
72
|
+
outputAgentError(
|
|
73
|
+
client,
|
|
74
|
+
{
|
|
75
|
+
status: "error",
|
|
76
|
+
reason: AGENT_REASON.MISSING_ARGUMENTS,
|
|
77
|
+
message: `Missing repository name. Example: ${packageName} vcr add <name>`,
|
|
78
|
+
next: [
|
|
79
|
+
{
|
|
80
|
+
command: buildCommandWithGlobalFlags(client.argv, "vcr add <name>"),
|
|
81
|
+
when: "Replace <name> with the repository name to create"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
1
|
|
86
|
+
);
|
|
87
|
+
return outputError(
|
|
88
|
+
client,
|
|
89
|
+
fr.jsonOutput,
|
|
90
|
+
"MISSING_ARGUMENTS",
|
|
91
|
+
"Usage: `vercel vcr add <name>`"
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
const scope = await resolveVcrScope(client, {
|
|
95
|
+
project,
|
|
96
|
+
jsonOutput: fr.jsonOutput
|
|
97
|
+
});
|
|
98
|
+
if (typeof scope === "number") {
|
|
99
|
+
return scope;
|
|
100
|
+
}
|
|
101
|
+
const path = `/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;
|
|
102
|
+
output_manager_default.spinner("Creating repository...");
|
|
103
|
+
try {
|
|
104
|
+
const created = await client.fetch(
|
|
105
|
+
path,
|
|
106
|
+
{
|
|
107
|
+
method: "POST",
|
|
108
|
+
body: { projectId: scope.projectId, name }
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
if (fr.jsonOutput) {
|
|
112
|
+
client.stdout.write(`${JSON.stringify(created, null, 2)}
|
|
113
|
+
`);
|
|
114
|
+
} else {
|
|
115
|
+
output_manager_default.success(`Created repository ${created.repository?.name ?? name}`);
|
|
116
|
+
}
|
|
117
|
+
return 0;
|
|
118
|
+
} catch (err) {
|
|
119
|
+
if (isAPIError(err)) {
|
|
120
|
+
return handleVcrApiError(client, err, fr.jsonOutput, {
|
|
121
|
+
retry: {
|
|
122
|
+
command: buildCommandWithGlobalFlags(client.argv, "vcr ls"),
|
|
123
|
+
when: "List existing repositories (a name conflict means it already exists)"
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
throw err;
|
|
128
|
+
} finally {
|
|
129
|
+
output_manager_default.stopSpinner();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
add as default
|
|
134
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
|
|
8
|
+
// src/commands/vcr/utils/paths.ts
|
|
9
|
+
function baseQuery(scope) {
|
|
10
|
+
return new URLSearchParams({
|
|
11
|
+
teamId: scope.teamId,
|
|
12
|
+
projectId: scope.projectId
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function repositoriesPath(scope, opts = {}) {
|
|
16
|
+
const query = baseQuery(scope);
|
|
17
|
+
if (opts.limit !== void 0) {
|
|
18
|
+
query.set("limit", String(opts.limit));
|
|
19
|
+
}
|
|
20
|
+
if (opts.cursor) {
|
|
21
|
+
query.set("cursor", opts.cursor);
|
|
22
|
+
}
|
|
23
|
+
return `/v1/vcr/repository?${query.toString()}`;
|
|
24
|
+
}
|
|
25
|
+
function repositoryPath(scope, idOrName) {
|
|
26
|
+
return `/v1/vcr/repository/${encodeURIComponent(idOrName)}?${baseQuery(scope).toString()}`;
|
|
27
|
+
}
|
|
28
|
+
function repositoryImagesPath(scope, idOrName, opts = {}) {
|
|
29
|
+
const query = baseQuery(scope);
|
|
30
|
+
if (opts.limit !== void 0) {
|
|
31
|
+
query.set("limit", String(opts.limit));
|
|
32
|
+
}
|
|
33
|
+
if (opts.cursor) {
|
|
34
|
+
query.set("cursor", opts.cursor);
|
|
35
|
+
}
|
|
36
|
+
if (opts.untagged) {
|
|
37
|
+
query.set("untagged", "true");
|
|
38
|
+
}
|
|
39
|
+
return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/images?${query.toString()}`;
|
|
40
|
+
}
|
|
41
|
+
function imagePath(scope, idOrName, imageId) {
|
|
42
|
+
return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/images/${encodeURIComponent(imageId)}?${baseQuery(scope).toString()}`;
|
|
43
|
+
}
|
|
44
|
+
function repositoryTagsPath(scope, idOrName, opts = {}) {
|
|
45
|
+
const query = baseQuery(scope);
|
|
46
|
+
if (opts.limit !== void 0) {
|
|
47
|
+
query.set("limit", String(opts.limit));
|
|
48
|
+
}
|
|
49
|
+
if (opts.cursor) {
|
|
50
|
+
query.set("cursor", opts.cursor);
|
|
51
|
+
}
|
|
52
|
+
if (opts.sortBy) {
|
|
53
|
+
query.set("sortBy", opts.sortBy);
|
|
54
|
+
}
|
|
55
|
+
if (opts.sortOrder) {
|
|
56
|
+
query.set("sortOrder", opts.sortOrder);
|
|
57
|
+
}
|
|
58
|
+
return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/tags?${query.toString()}`;
|
|
59
|
+
}
|
|
60
|
+
function repositoryTagPath(scope, idOrName, tag) {
|
|
61
|
+
return `/v1/vcr/repository/${encodeURIComponent(idOrName)}/tags/${encodeURIComponent(tag)}?${baseQuery(scope).toString()}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
repositoriesPath,
|
|
66
|
+
repositoryPath,
|
|
67
|
+
repositoryImagesPath,
|
|
68
|
+
imagePath,
|
|
69
|
+
repositoryTagsPath,
|
|
70
|
+
repositoryTagPath
|
|
71
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
yesOption
|
|
12
|
+
} from "./chunk-EJ6GQI6F.js";
|
|
13
|
+
import {
|
|
14
|
+
packageName
|
|
15
|
+
} from "./chunk-P6AK7SVK.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/vcr/image/command.ts
|
|
18
|
+
var projectScopeOption = {
|
|
19
|
+
...projectOption,
|
|
20
|
+
shorthand: "p",
|
|
21
|
+
description: "Project name or ID (defaults to the linked project)."
|
|
22
|
+
};
|
|
23
|
+
var cursorOption = {
|
|
24
|
+
name: "cursor",
|
|
25
|
+
shorthand: "c",
|
|
26
|
+
type: String,
|
|
27
|
+
deprecated: false,
|
|
28
|
+
description: "Cursor from a previous page to continue listing from",
|
|
29
|
+
argument: "STRING"
|
|
30
|
+
};
|
|
31
|
+
var imageLsSubcommand = {
|
|
32
|
+
name: "ls",
|
|
33
|
+
aliases: ["list"],
|
|
34
|
+
description: "List images in a container registry repository",
|
|
35
|
+
arguments: [
|
|
36
|
+
{
|
|
37
|
+
name: "repository",
|
|
38
|
+
required: true
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
options: [
|
|
42
|
+
projectScopeOption,
|
|
43
|
+
{
|
|
44
|
+
name: "untagged",
|
|
45
|
+
shorthand: null,
|
|
46
|
+
type: Boolean,
|
|
47
|
+
deprecated: false,
|
|
48
|
+
description: "Only list images that have no tags"
|
|
49
|
+
},
|
|
50
|
+
limitOption,
|
|
51
|
+
cursorOption,
|
|
52
|
+
formatOption
|
|
53
|
+
],
|
|
54
|
+
examples: [
|
|
55
|
+
{
|
|
56
|
+
name: "List images in a repository",
|
|
57
|
+
value: `${packageName} vcr image ls my-app`
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "List untagged images as JSON",
|
|
61
|
+
value: `${packageName} vcr image ls my-app --untagged --format json`
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
var imageInspectSubcommand = {
|
|
66
|
+
name: "inspect",
|
|
67
|
+
aliases: ["get"],
|
|
68
|
+
description: "Show details for a single image, including its layer history",
|
|
69
|
+
arguments: [
|
|
70
|
+
{
|
|
71
|
+
name: "repository",
|
|
72
|
+
required: true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "imageId",
|
|
76
|
+
required: true
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
options: [projectScopeOption, formatOption],
|
|
80
|
+
examples: [
|
|
81
|
+
{
|
|
82
|
+
name: "Inspect an image by id",
|
|
83
|
+
value: `${packageName} vcr image inspect my-app img_abc123`
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
};
|
|
87
|
+
var imageRmSubcommand = {
|
|
88
|
+
name: "rm",
|
|
89
|
+
aliases: ["remove", "delete"],
|
|
90
|
+
description: "Delete an image from a repository",
|
|
91
|
+
arguments: [
|
|
92
|
+
{
|
|
93
|
+
name: "repository",
|
|
94
|
+
required: true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "imageId",
|
|
98
|
+
required: true
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
options: [projectScopeOption, yesOption, formatOption],
|
|
102
|
+
examples: [
|
|
103
|
+
{
|
|
104
|
+
name: "Delete an image by id",
|
|
105
|
+
value: `${packageName} vcr image rm my-app img_abc123`
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "Delete an image without the confirmation prompt",
|
|
109
|
+
value: `${packageName} vcr image rm my-app img_abc123 --yes`
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
var imageAggregateCommand = {
|
|
114
|
+
name: "image",
|
|
115
|
+
aliases: ["images"],
|
|
116
|
+
description: "List, inspect, or delete images in a repository",
|
|
117
|
+
arguments: [],
|
|
118
|
+
subcommands: [imageLsSubcommand, imageInspectSubcommand, imageRmSubcommand],
|
|
119
|
+
options: [],
|
|
120
|
+
examples: []
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
imageLsSubcommand,
|
|
125
|
+
imageInspectSubcommand,
|
|
126
|
+
imageRmSubcommand,
|
|
127
|
+
imageAggregateCommand
|
|
128
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
require_bytes
|
|
9
|
+
} from "./chunk-P6AK7SVK.js";
|
|
10
|
+
import {
|
|
11
|
+
require_ms
|
|
12
|
+
} from "./chunk-GGP5R3FU.js";
|
|
13
|
+
import {
|
|
14
|
+
__toESM
|
|
15
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/vcr/utils/format.ts
|
|
18
|
+
var import_ms = __toESM(require_ms(), 1);
|
|
19
|
+
var import_bytes = __toESM(require_bytes(), 1);
|
|
20
|
+
function formatBytes(size) {
|
|
21
|
+
if (typeof size !== "number" || Number.isNaN(size)) {
|
|
22
|
+
return "-";
|
|
23
|
+
}
|
|
24
|
+
return import_bytes.default.format(size, { decimalPlaces: 1 }) ?? "-";
|
|
25
|
+
}
|
|
26
|
+
function formatRelativeTime(iso) {
|
|
27
|
+
const time = new Date(iso).getTime();
|
|
28
|
+
if (Number.isNaN(time)) {
|
|
29
|
+
return "-";
|
|
30
|
+
}
|
|
31
|
+
return `${(0, import_ms.default)(Date.now() - time)} ago`;
|
|
32
|
+
}
|
|
33
|
+
function formatDigest(digest) {
|
|
34
|
+
if (!digest) {
|
|
35
|
+
return "-";
|
|
36
|
+
}
|
|
37
|
+
return digest.replace(/^sha256:/, "").slice(0, 12);
|
|
38
|
+
}
|
|
39
|
+
function formatImageStatus(status) {
|
|
40
|
+
switch (status) {
|
|
41
|
+
case "ready":
|
|
42
|
+
return "Ready";
|
|
43
|
+
case "preparing":
|
|
44
|
+
return "Preparing";
|
|
45
|
+
case "unoptimized":
|
|
46
|
+
return "Ready (unoptimized)";
|
|
47
|
+
default:
|
|
48
|
+
return "-";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var VCR_REGISTRY = "vcr.vercel.com";
|
|
52
|
+
function formatImageReference(teamSlug, projectName, repositoryName, digest) {
|
|
53
|
+
if (!digest) {
|
|
54
|
+
return "-";
|
|
55
|
+
}
|
|
56
|
+
return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}@${digest}`;
|
|
57
|
+
}
|
|
58
|
+
function formatTagReference(teamSlug, projectName, repositoryName, tag) {
|
|
59
|
+
if (!tag) {
|
|
60
|
+
return "-";
|
|
61
|
+
}
|
|
62
|
+
return `${VCR_REGISTRY}/${teamSlug}/${projectName}/${repositoryName}:${tag}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export {
|
|
66
|
+
formatBytes,
|
|
67
|
+
formatRelativeTime,
|
|
68
|
+
formatDigest,
|
|
69
|
+
formatImageStatus,
|
|
70
|
+
formatImageReference,
|
|
71
|
+
formatTagReference
|
|
72
|
+
};
|
|
@@ -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
|
+
};
|