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,201 @@
|
|
|
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
|
+
formatDigest,
|
|
10
|
+
formatImageStatus,
|
|
11
|
+
formatRelativeTime
|
|
12
|
+
} from "./chunk-I3HGCZ4E.js";
|
|
13
|
+
import {
|
|
14
|
+
repositoryImagesPath
|
|
15
|
+
} from "./chunk-4QVAYRYH.js";
|
|
16
|
+
import {
|
|
17
|
+
emitVcrArgParseError,
|
|
18
|
+
handleVcrApiError,
|
|
19
|
+
requireVcrRepository,
|
|
20
|
+
resolveVcrScope,
|
|
21
|
+
validateVcrJsonOutput
|
|
22
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
23
|
+
import {
|
|
24
|
+
outputError,
|
|
25
|
+
validateOptionalIntegerRange
|
|
26
|
+
} from "./chunk-E2ENQE2W.js";
|
|
27
|
+
import "./chunk-XPKWKPWA.js";
|
|
28
|
+
import {
|
|
29
|
+
imageLsSubcommand
|
|
30
|
+
} from "./chunk-AUECDTMX.js";
|
|
31
|
+
import {
|
|
32
|
+
AGENT_REASON
|
|
33
|
+
} from "./chunk-QH7WYDEP.js";
|
|
34
|
+
import "./chunk-P726GMBL.js";
|
|
35
|
+
import {
|
|
36
|
+
table
|
|
37
|
+
} from "./chunk-VKBYAWTL.js";
|
|
38
|
+
import "./chunk-RB7WQKNC.js";
|
|
39
|
+
import {
|
|
40
|
+
outputAgentError
|
|
41
|
+
} from "./chunk-IZOHLD5D.js";
|
|
42
|
+
import "./chunk-ECCWJHC6.js";
|
|
43
|
+
import {
|
|
44
|
+
getFlagsSpecification,
|
|
45
|
+
parseArguments,
|
|
46
|
+
printError
|
|
47
|
+
} from "./chunk-EJ6GQI6F.js";
|
|
48
|
+
import {
|
|
49
|
+
isAPIError
|
|
50
|
+
} from "./chunk-P6AK7SVK.js";
|
|
51
|
+
import "./chunk-P4QNYOFB.js";
|
|
52
|
+
import "./chunk-2RVK3DDN.js";
|
|
53
|
+
import {
|
|
54
|
+
output_manager_default
|
|
55
|
+
} from "./chunk-OX7KI3LF.js";
|
|
56
|
+
import "./chunk-GGP5R3FU.js";
|
|
57
|
+
import {
|
|
58
|
+
require_source
|
|
59
|
+
} from "./chunk-S7KYDPEM.js";
|
|
60
|
+
import {
|
|
61
|
+
__toESM
|
|
62
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
63
|
+
|
|
64
|
+
// src/commands/vcr/image/ls.ts
|
|
65
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
66
|
+
function formatType(kind) {
|
|
67
|
+
return kind === "index" ? "Index" : "Image";
|
|
68
|
+
}
|
|
69
|
+
function printImages(list) {
|
|
70
|
+
if (list.images.length === 0) {
|
|
71
|
+
output_manager_default.log("No images found.");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const headers = [
|
|
75
|
+
"Image ID",
|
|
76
|
+
"Digest",
|
|
77
|
+
"Tags",
|
|
78
|
+
"Type",
|
|
79
|
+
"Status",
|
|
80
|
+
"Arch",
|
|
81
|
+
"Size",
|
|
82
|
+
"Created"
|
|
83
|
+
].map((h) => import_chalk.default.cyan(h));
|
|
84
|
+
const rows = [
|
|
85
|
+
headers,
|
|
86
|
+
...list.images.map((image) => [
|
|
87
|
+
import_chalk.default.bold(image.id),
|
|
88
|
+
import_chalk.default.dim(formatDigest(image.manifestDigest)),
|
|
89
|
+
image.tags.length > 0 ? image.tags.join(", ") : import_chalk.default.dim("<none>"),
|
|
90
|
+
formatType(image.kind),
|
|
91
|
+
formatImageStatus(image.status),
|
|
92
|
+
image.arch ?? "-",
|
|
93
|
+
formatBytes(image.sizeInBytes),
|
|
94
|
+
formatRelativeTime(image.createdAt)
|
|
95
|
+
])
|
|
96
|
+
];
|
|
97
|
+
const tableOutput = table(rows, { hsep: 3 }).split("\n").map((line) => line.trimEnd()).join("\n").replace(/^/gm, " ");
|
|
98
|
+
output_manager_default.print(`
|
|
99
|
+
${tableOutput}
|
|
100
|
+
`);
|
|
101
|
+
if (list.nextCursor) {
|
|
102
|
+
output_manager_default.log(
|
|
103
|
+
`More results available. Re-run with \`--cursor ${list.nextCursor}\`.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async function ls(client, argv, telemetry) {
|
|
108
|
+
let parsedArgs;
|
|
109
|
+
try {
|
|
110
|
+
parsedArgs = parseArguments(
|
|
111
|
+
argv,
|
|
112
|
+
getFlagsSpecification(imageLsSubcommand.options)
|
|
113
|
+
);
|
|
114
|
+
} catch (err) {
|
|
115
|
+
emitVcrArgParseError(
|
|
116
|
+
client,
|
|
117
|
+
err,
|
|
118
|
+
"vcr image ls <repository> --project <name-or-id>"
|
|
119
|
+
);
|
|
120
|
+
printError(err);
|
|
121
|
+
return 1;
|
|
122
|
+
}
|
|
123
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
124
|
+
if (typeof fr === "number") {
|
|
125
|
+
return fr;
|
|
126
|
+
}
|
|
127
|
+
const repository = parsedArgs.args[0];
|
|
128
|
+
const project = parsedArgs.flags["--project"];
|
|
129
|
+
const cursor = parsedArgs.flags["--cursor"];
|
|
130
|
+
const limitFlag = parsedArgs.flags["--limit"];
|
|
131
|
+
const untagged = parsedArgs.flags["--untagged"];
|
|
132
|
+
telemetry.trackCliOptionProject(project);
|
|
133
|
+
telemetry.trackCliOptionLimit(limitFlag);
|
|
134
|
+
telemetry.trackCliOptionCursor(cursor);
|
|
135
|
+
telemetry.trackCliFlagUntagged(untagged);
|
|
136
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
137
|
+
const missingRepository = requireVcrRepository(
|
|
138
|
+
client,
|
|
139
|
+
repository,
|
|
140
|
+
fr.jsonOutput,
|
|
141
|
+
"vcr image ls <repository>"
|
|
142
|
+
);
|
|
143
|
+
if (typeof missingRepository === "number") {
|
|
144
|
+
return missingRepository;
|
|
145
|
+
}
|
|
146
|
+
const limitResult = validateOptionalIntegerRange(limitFlag, {
|
|
147
|
+
flag: "--limit",
|
|
148
|
+
min: 1,
|
|
149
|
+
max: 100
|
|
150
|
+
});
|
|
151
|
+
if (!limitResult.valid) {
|
|
152
|
+
outputAgentError(
|
|
153
|
+
client,
|
|
154
|
+
{
|
|
155
|
+
status: "error",
|
|
156
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
157
|
+
message: limitResult.message
|
|
158
|
+
},
|
|
159
|
+
1
|
|
160
|
+
);
|
|
161
|
+
return outputError(
|
|
162
|
+
client,
|
|
163
|
+
fr.jsonOutput,
|
|
164
|
+
limitResult.code,
|
|
165
|
+
limitResult.message
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
const scope = await resolveVcrScope(client, {
|
|
169
|
+
project,
|
|
170
|
+
jsonOutput: fr.jsonOutput
|
|
171
|
+
});
|
|
172
|
+
if (typeof scope === "number") {
|
|
173
|
+
return scope;
|
|
174
|
+
}
|
|
175
|
+
const path = repositoryImagesPath(scope, repository, {
|
|
176
|
+
limit: limitResult.value,
|
|
177
|
+
cursor,
|
|
178
|
+
untagged
|
|
179
|
+
});
|
|
180
|
+
output_manager_default.spinner("Fetching images...");
|
|
181
|
+
try {
|
|
182
|
+
const list = await client.fetch(path);
|
|
183
|
+
if (fr.jsonOutput) {
|
|
184
|
+
client.stdout.write(`${JSON.stringify(list, null, 2)}
|
|
185
|
+
`);
|
|
186
|
+
} else {
|
|
187
|
+
printImages(list);
|
|
188
|
+
}
|
|
189
|
+
return 0;
|
|
190
|
+
} catch (err) {
|
|
191
|
+
if (isAPIError(err)) {
|
|
192
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
193
|
+
}
|
|
194
|
+
throw err;
|
|
195
|
+
} finally {
|
|
196
|
+
output_manager_default.stopSpinner();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
export {
|
|
200
|
+
ls as default
|
|
201
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
repositoryPath
|
|
9
|
+
} from "./chunk-4QVAYRYH.js";
|
|
10
|
+
import {
|
|
11
|
+
emitVcrArgParseError,
|
|
12
|
+
handleVcrApiError,
|
|
13
|
+
requireVcrRepository,
|
|
14
|
+
resolveVcrScope,
|
|
15
|
+
validateVcrJsonOutput
|
|
16
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
17
|
+
import "./chunk-E2ENQE2W.js";
|
|
18
|
+
import "./chunk-XPKWKPWA.js";
|
|
19
|
+
import {
|
|
20
|
+
removeSubcommand
|
|
21
|
+
} from "./chunk-KXGWAWRV.js";
|
|
22
|
+
import "./chunk-RY3AVR6E.js";
|
|
23
|
+
import "./chunk-AUECDTMX.js";
|
|
24
|
+
import {
|
|
25
|
+
AGENT_REASON
|
|
26
|
+
} from "./chunk-QH7WYDEP.js";
|
|
27
|
+
import "./chunk-P726GMBL.js";
|
|
28
|
+
import "./chunk-RB7WQKNC.js";
|
|
29
|
+
import {
|
|
30
|
+
buildCommandWithYes,
|
|
31
|
+
outputAgentError
|
|
32
|
+
} from "./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 "./chunk-S7KYDPEM.js";
|
|
49
|
+
import "./chunk-TZ2YI2VH.js";
|
|
50
|
+
|
|
51
|
+
// src/commands/vcr/rm.ts
|
|
52
|
+
async function rm(client, argv, telemetry) {
|
|
53
|
+
let parsedArgs;
|
|
54
|
+
try {
|
|
55
|
+
parsedArgs = parseArguments(
|
|
56
|
+
argv,
|
|
57
|
+
getFlagsSpecification(removeSubcommand.options)
|
|
58
|
+
);
|
|
59
|
+
} catch (err) {
|
|
60
|
+
emitVcrArgParseError(
|
|
61
|
+
client,
|
|
62
|
+
err,
|
|
63
|
+
"vcr rm <repository> --project <name-or-id>"
|
|
64
|
+
);
|
|
65
|
+
printError(err);
|
|
66
|
+
return 1;
|
|
67
|
+
}
|
|
68
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
69
|
+
if (typeof fr === "number") {
|
|
70
|
+
return fr;
|
|
71
|
+
}
|
|
72
|
+
const repository = parsedArgs.args[0];
|
|
73
|
+
const project = parsedArgs.flags["--project"];
|
|
74
|
+
const skipConfirmation = Boolean(parsedArgs.flags["--yes"]);
|
|
75
|
+
telemetry.trackCliOptionProject(project);
|
|
76
|
+
telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
77
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
78
|
+
const missingRepository = requireVcrRepository(
|
|
79
|
+
client,
|
|
80
|
+
repository,
|
|
81
|
+
fr.jsonOutput,
|
|
82
|
+
"vcr rm <repository>"
|
|
83
|
+
);
|
|
84
|
+
if (typeof missingRepository === "number") {
|
|
85
|
+
return missingRepository;
|
|
86
|
+
}
|
|
87
|
+
const scope = await resolveVcrScope(client, {
|
|
88
|
+
project,
|
|
89
|
+
jsonOutput: fr.jsonOutput
|
|
90
|
+
});
|
|
91
|
+
if (typeof scope === "number") {
|
|
92
|
+
return scope;
|
|
93
|
+
}
|
|
94
|
+
if (!skipConfirmation) {
|
|
95
|
+
outputAgentError(
|
|
96
|
+
client,
|
|
97
|
+
{
|
|
98
|
+
status: "error",
|
|
99
|
+
reason: AGENT_REASON.CONFIRMATION_REQUIRED,
|
|
100
|
+
message: "Deleting a repository deletes it and all of its images. Re-run with --yes.",
|
|
101
|
+
next: [{ command: buildCommandWithYes(client.argv) }]
|
|
102
|
+
},
|
|
103
|
+
1
|
|
104
|
+
);
|
|
105
|
+
if (!await client.input.confirm(
|
|
106
|
+
`Delete repository ${repository} and all of its images? This cannot be undone.`,
|
|
107
|
+
false
|
|
108
|
+
)) {
|
|
109
|
+
output_manager_default.log("Canceled");
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const path = repositoryPath(scope, repository);
|
|
114
|
+
output_manager_default.spinner("Deleting repository...");
|
|
115
|
+
try {
|
|
116
|
+
await client.fetch(path, { method: "DELETE" });
|
|
117
|
+
if (fr.jsonOutput) {
|
|
118
|
+
client.stdout.write(
|
|
119
|
+
`${JSON.stringify({ repository, deleted: true }, null, 2)}
|
|
120
|
+
`
|
|
121
|
+
);
|
|
122
|
+
} else {
|
|
123
|
+
output_manager_default.success(`Repository ${repository} deleted`);
|
|
124
|
+
}
|
|
125
|
+
return 0;
|
|
126
|
+
} catch (err) {
|
|
127
|
+
if (isAPIError(err)) {
|
|
128
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
129
|
+
}
|
|
130
|
+
throw err;
|
|
131
|
+
} finally {
|
|
132
|
+
output_manager_default.stopSpinner();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
rm as default
|
|
137
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
imagePath
|
|
9
|
+
} from "./chunk-4QVAYRYH.js";
|
|
10
|
+
import {
|
|
11
|
+
emitVcrArgParseError,
|
|
12
|
+
handleVcrApiError,
|
|
13
|
+
requireVcrRepositoryAndImageId,
|
|
14
|
+
resolveVcrScope,
|
|
15
|
+
validateVcrJsonOutput
|
|
16
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
17
|
+
import "./chunk-E2ENQE2W.js";
|
|
18
|
+
import "./chunk-XPKWKPWA.js";
|
|
19
|
+
import {
|
|
20
|
+
imageRmSubcommand
|
|
21
|
+
} from "./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
|
+
buildCommandWithYes,
|
|
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
|
+
} from "./chunk-P6AK7SVK.js";
|
|
40
|
+
import "./chunk-P4QNYOFB.js";
|
|
41
|
+
import "./chunk-2RVK3DDN.js";
|
|
42
|
+
import {
|
|
43
|
+
output_manager_default
|
|
44
|
+
} from "./chunk-OX7KI3LF.js";
|
|
45
|
+
import "./chunk-GGP5R3FU.js";
|
|
46
|
+
import "./chunk-S7KYDPEM.js";
|
|
47
|
+
import "./chunk-TZ2YI2VH.js";
|
|
48
|
+
|
|
49
|
+
// src/commands/vcr/image/rm.ts
|
|
50
|
+
async function rm(client, argv, telemetry) {
|
|
51
|
+
let parsedArgs;
|
|
52
|
+
try {
|
|
53
|
+
parsedArgs = parseArguments(
|
|
54
|
+
argv,
|
|
55
|
+
getFlagsSpecification(imageRmSubcommand.options)
|
|
56
|
+
);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
emitVcrArgParseError(
|
|
59
|
+
client,
|
|
60
|
+
err,
|
|
61
|
+
"vcr image rm <repository> <imageId> --project <name-or-id>"
|
|
62
|
+
);
|
|
63
|
+
printError(err);
|
|
64
|
+
return 1;
|
|
65
|
+
}
|
|
66
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
67
|
+
if (typeof fr === "number") {
|
|
68
|
+
return fr;
|
|
69
|
+
}
|
|
70
|
+
const repository = parsedArgs.args[0];
|
|
71
|
+
const imageId = parsedArgs.args[1];
|
|
72
|
+
const project = parsedArgs.flags["--project"];
|
|
73
|
+
const skipConfirmation = Boolean(parsedArgs.flags["--yes"]);
|
|
74
|
+
telemetry.trackCliOptionProject(project);
|
|
75
|
+
telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
|
76
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
77
|
+
const missingArgs = requireVcrRepositoryAndImageId(
|
|
78
|
+
client,
|
|
79
|
+
repository,
|
|
80
|
+
imageId,
|
|
81
|
+
fr.jsonOutput,
|
|
82
|
+
"vcr image rm <repository> <imageId>"
|
|
83
|
+
);
|
|
84
|
+
if (typeof missingArgs === "number") {
|
|
85
|
+
return missingArgs;
|
|
86
|
+
}
|
|
87
|
+
const scope = await resolveVcrScope(client, {
|
|
88
|
+
project,
|
|
89
|
+
jsonOutput: fr.jsonOutput
|
|
90
|
+
});
|
|
91
|
+
if (typeof scope === "number") {
|
|
92
|
+
return scope;
|
|
93
|
+
}
|
|
94
|
+
if (!skipConfirmation) {
|
|
95
|
+
outputAgentError(
|
|
96
|
+
client,
|
|
97
|
+
{
|
|
98
|
+
status: "error",
|
|
99
|
+
reason: AGENT_REASON.CONFIRMATION_REQUIRED,
|
|
100
|
+
message: "Deleting an image is permanent. Re-run with --yes.",
|
|
101
|
+
next: [{ command: buildCommandWithYes(client.argv) }]
|
|
102
|
+
},
|
|
103
|
+
1
|
|
104
|
+
);
|
|
105
|
+
if (!await client.input.confirm(
|
|
106
|
+
`Delete image ${imageId} from ${repository}? This cannot be undone.`,
|
|
107
|
+
false
|
|
108
|
+
)) {
|
|
109
|
+
output_manager_default.log("Canceled");
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const path = imagePath(scope, repository, imageId);
|
|
114
|
+
output_manager_default.spinner("Deleting image...");
|
|
115
|
+
try {
|
|
116
|
+
await client.fetch(path, { method: "DELETE" });
|
|
117
|
+
if (fr.jsonOutput) {
|
|
118
|
+
client.stdout.write(
|
|
119
|
+
`${JSON.stringify({ imageId, repository, deleted: true }, null, 2)}
|
|
120
|
+
`
|
|
121
|
+
);
|
|
122
|
+
} else {
|
|
123
|
+
output_manager_default.success(`Image ${imageId} deleted`);
|
|
124
|
+
}
|
|
125
|
+
return 0;
|
|
126
|
+
} catch (err) {
|
|
127
|
+
if (isAPIError(err)) {
|
|
128
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
129
|
+
}
|
|
130
|
+
throw err;
|
|
131
|
+
} finally {
|
|
132
|
+
output_manager_default.stopSpinner();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
rm as default
|
|
137
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
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/tags/index.ts
|
|
29
|
+
var TAGS_CONFIG = {
|
|
30
|
+
ls: ["ls", "list"],
|
|
31
|
+
inspect: ["inspect", "get"]
|
|
32
|
+
};
|
|
33
|
+
async function tags(client, argv, telemetry) {
|
|
34
|
+
const { subcommand, args } = getSubcommand(argv, TAGS_CONFIG);
|
|
35
|
+
if (subcommand == null) {
|
|
36
|
+
const message = argv.length === 0 ? getInvalidSubcommand(TAGS_CONFIG) : `Unknown "vcr tag" subcommand "${argv[0]}".`;
|
|
37
|
+
outputAgentError(
|
|
38
|
+
client,
|
|
39
|
+
{
|
|
40
|
+
status: "error",
|
|
41
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
42
|
+
message,
|
|
43
|
+
next: [
|
|
44
|
+
{
|
|
45
|
+
command: buildCommandWithGlobalFlags(client.argv, "vcr tag --help"),
|
|
46
|
+
when: "Show valid tag subcommands"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
1
|
|
51
|
+
);
|
|
52
|
+
output_manager_default.error(`${message} Run \`vercel vcr tag --help\`.`);
|
|
53
|
+
return 1;
|
|
54
|
+
}
|
|
55
|
+
switch (subcommand) {
|
|
56
|
+
case "ls":
|
|
57
|
+
return (await import("./ls-JPWOOVMW.js")).default(client, args, telemetry);
|
|
58
|
+
case "inspect":
|
|
59
|
+
return (await import("./inspect-VXODLWNM.js")).default(client, args, telemetry);
|
|
60
|
+
default:
|
|
61
|
+
output_manager_default.error(`Unhandled tags subcommand: ${subcommand}`);
|
|
62
|
+
return 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
tags as default
|
|
67
|
+
};
|
|
@@ -1957,9 +1957,13 @@ async function doBuild(client, project, buildsJson, cwd, outputDir, span, standa
|
|
|
1957
1957
|
routesResult.routes,
|
|
1958
1958
|
detectedExperimentalServicesV2RootRoutes ?? existingConfig?.routes
|
|
1959
1959
|
);
|
|
1960
|
+
const mergedRoutesWithGeneratedServicesV2Routes = nestExperimentalServicesV2Output ? appendBuildOutputRouteTables(
|
|
1961
|
+
mergedRoutes,
|
|
1962
|
+
detectedExperimentalServicesV2RootRoutes ?? existingConfig?.routes
|
|
1963
|
+
) : mergedRoutes;
|
|
1960
1964
|
const config = {
|
|
1961
1965
|
version: 3,
|
|
1962
|
-
routes:
|
|
1966
|
+
routes: mergedRoutesWithGeneratedServicesV2Routes ?? explicitRootRoutes,
|
|
1963
1967
|
images: mergedImages,
|
|
1964
1968
|
wildcard: mergedWildcard,
|
|
1965
1969
|
overrides: mergedOverrides,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
purchaseDomainIfAvailable,
|
|
14
14
|
require_cjs,
|
|
15
15
|
setupDomain
|
|
16
|
-
} from "../../chunks/chunk-
|
|
16
|
+
} from "../../chunks/chunk-FM24W7ET.js";
|
|
17
17
|
import {
|
|
18
18
|
readLocalConfig
|
|
19
19
|
} from "../../chunks/chunk-FZZWTDNQ.js";
|
|
@@ -40,7 +40,10 @@ import {
|
|
|
40
40
|
deprecatedArchiveSplitTgz,
|
|
41
41
|
getCommandAliases,
|
|
42
42
|
initSubcommand
|
|
43
|
-
} from "../../chunks/chunk-
|
|
43
|
+
} from "../../chunks/chunk-WFXGLPSI.js";
|
|
44
|
+
import "../../chunks/chunk-KXGWAWRV.js";
|
|
45
|
+
import "../../chunks/chunk-RY3AVR6E.js";
|
|
46
|
+
import "../../chunks/chunk-AUECDTMX.js";
|
|
44
47
|
import "../../chunks/chunk-MAJWH2PD.js";
|
|
45
48
|
import "../../chunks/chunk-EFUR47FZ.js";
|
|
46
49
|
import "../../chunks/chunk-UJ5UEAMC.js";
|
|
@@ -7,10 +7,12 @@ const __dirname = __dirname_(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
ellipsis,
|
|
9
9
|
getCustomEnvironments,
|
|
10
|
-
getInvalidSubcommand,
|
|
11
10
|
readStandardInput,
|
|
12
11
|
require_dist as require_dist3
|
|
13
|
-
} from "../../chunks/chunk-
|
|
12
|
+
} from "../../chunks/chunk-ZZIAWRCX.js";
|
|
13
|
+
import {
|
|
14
|
+
getInvalidSubcommand
|
|
15
|
+
} from "../../chunks/chunk-VGIMO3ZK.js";
|
|
14
16
|
import {
|
|
15
17
|
formatTable
|
|
16
18
|
} from "../../chunks/chunk-ULKM3ZD4.js";
|
|
@@ -29,7 +31,10 @@ import {
|
|
|
29
31
|
} from "../../chunks/chunk-YPQSDAEW.js";
|
|
30
32
|
import {
|
|
31
33
|
getCommandAliases
|
|
32
|
-
} from "../../chunks/chunk-
|
|
34
|
+
} from "../../chunks/chunk-WFXGLPSI.js";
|
|
35
|
+
import "../../chunks/chunk-KXGWAWRV.js";
|
|
36
|
+
import "../../chunks/chunk-RY3AVR6E.js";
|
|
37
|
+
import "../../chunks/chunk-AUECDTMX.js";
|
|
33
38
|
import "../../chunks/chunk-MAJWH2PD.js";
|
|
34
39
|
import "../../chunks/chunk-EFUR47FZ.js";
|
|
35
40
|
import "../../chunks/chunk-UJ5UEAMC.js";
|
|
@@ -11,7 +11,10 @@ import {
|
|
|
11
11
|
addSubcommand7 as addSubcommand,
|
|
12
12
|
getCommandAliases,
|
|
13
13
|
linkCommand
|
|
14
|
-
} from "../../chunks/chunk-
|
|
14
|
+
} from "../../chunks/chunk-WFXGLPSI.js";
|
|
15
|
+
import "../../chunks/chunk-KXGWAWRV.js";
|
|
16
|
+
import "../../chunks/chunk-RY3AVR6E.js";
|
|
17
|
+
import "../../chunks/chunk-AUECDTMX.js";
|
|
15
18
|
import "../../chunks/chunk-MAJWH2PD.js";
|
|
16
19
|
import "../../chunks/chunk-EFUR47FZ.js";
|
|
17
20
|
import "../../chunks/chunk-UJ5UEAMC.js";
|