vercel 54.18.6 → 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-DFHK2LCD.js → add-P6CBTAGK.js} +4 -4
- package/dist/chunks/add-WB6SXGXX.js +134 -0
- package/dist/chunks/{chunk-LQALVXRD.js → chunk-3S2QGKYZ.js} +1 -1
- package/dist/chunks/chunk-4QVAYRYH.js +71 -0
- package/dist/chunks/{chunk-22CQWS5E.js → chunk-5MVXR7B7.js} +1 -1
- package/dist/chunks/{chunk-VKGCONIM.js → chunk-6ISLGUMI.js} +3 -3
- package/dist/chunks/chunk-AUECDTMX.js +128 -0
- package/dist/chunks/{chunk-3WENOEKR.js → chunk-FM24W7ET.js} +4 -4
- package/dist/chunks/{chunk-GXAVQSHO.js → chunk-FVI6UYNL.js} +1 -1
- package/dist/chunks/{chunk-DHLDURNP.js → chunk-FZZWTDNQ.js} +2 -2
- package/dist/chunks/chunk-I3HGCZ4E.js +72 -0
- package/dist/chunks/{chunk-CXGDCPH4.js → chunk-ITU4COOO.js} +12 -3
- package/dist/chunks/chunk-KXGWAWRV.js +148 -0
- package/dist/chunks/{chunk-NN7E6Y4F.js → chunk-L6QLQSJE.js} +2 -2
- package/dist/chunks/{chunk-XQQXV6ZZ.js → chunk-LFODAB54.js} +1 -0
- package/dist/chunks/{chunk-I43WUYKE.js → chunk-O2QNLUYX.js} +1 -1
- package/dist/chunks/{chunk-BI2IN6RX.js → chunk-P726GMBL.js} +1 -1
- package/dist/chunks/{chunk-7273TMGI.js → chunk-Q4A2Q46Z.js} +4 -4
- package/dist/chunks/{chunk-ODVBO56J.js → chunk-Q7GZMMHB.js} +2 -2
- package/dist/chunks/{chunk-F6YGVA2L.js → chunk-RB7WQKNC.js} +3 -2
- package/dist/chunks/{chunk-URFSONFS.js → chunk-RKLBPBRM.js} +1 -1
- package/dist/chunks/chunk-RY3AVR6E.js +111 -0
- package/dist/chunks/{chunk-QPBO2QDL.js → chunk-SQYJEUZD.js} +4 -4
- package/dist/chunks/{chunk-ZAJ4OMXG.js → chunk-TV7GKFSY.js} +1 -1
- package/dist/chunks/{chunk-PPW2JATF.js → chunk-U3FBUYRS.js} +1 -1
- package/dist/chunks/chunk-VGIMO3ZK.js +17 -0
- package/dist/chunks/{chunk-BSSEGYXP.js → chunk-WFXGLPSI.js} +7 -3
- package/dist/chunks/{chunk-V7IBBQ2D.js → chunk-YWLVPKNT.js} +1 -1
- package/dist/chunks/chunk-ZVDYGXRA.js +363 -0
- package/dist/chunks/{chunk-VTE7W5ZP.js → chunk-ZZIAWRCX.js} +0 -8
- package/dist/chunks/{compile-vercel-config-WRCB2TG2.js → compile-vercel-config-XEZ2TPQ4.js} +1 -1
- package/dist/chunks/{delete-DIFVXSQA.js → delete-O3F4EP2W.js} +2 -2
- package/dist/chunks/{disable-623SZAWT.js → disable-SJWGUQKZ.js} +2 -2
- package/dist/chunks/{discard-R7YAQI6C.js → discard-EQD6ENC3.js} +2 -2
- package/dist/chunks/{edit-CY2RYSKD.js → edit-NAIWNSXE.js} +3 -3
- package/dist/chunks/{enable-HHOQLDPW.js → enable-LXO62HU5.js} +2 -2
- package/dist/chunks/{export-TNFZHJKM.js → export-EHVTYAAP.js} +2 -2
- package/dist/chunks/image-R4JG4NX4.js +73 -0
- package/dist/chunks/inspect-57BITHYZ.js +136 -0
- package/dist/chunks/{inspect-7JLYYYAR.js → inspect-KYVZQL56.js} +3 -3
- package/dist/chunks/inspect-RTJALSXC.js +167 -0
- package/dist/chunks/inspect-VXODLWNM.js +163 -0
- package/dist/chunks/{list-5LKLQBXP.js → list-BYTNF7D7.js} +3 -3
- package/dist/chunks/{list-K4F7WGQR.js → list-MUFZTUZA.js} +2 -2
- package/dist/chunks/ls-D7NWJACX.js +165 -0
- package/dist/chunks/ls-JPWOOVMW.js +214 -0
- package/dist/chunks/{ls-DUHNXBAL.js → ls-PDILBRUL.js} +4 -4
- package/dist/chunks/ls-ZDMXBOJF.js +201 -0
- package/dist/chunks/{publish-O5UJJQKF.js → publish-27V2MMFS.js} +2 -2
- package/dist/chunks/{query-FE6G54EI.js → query-75PT24SH.js} +2 -2
- package/dist/chunks/{reorder-YH47SCZC.js → reorder-DCSIJX72.js} +2 -2
- package/dist/chunks/{restore-TSR6PO3H.js → restore-NRUBGNSK.js} +2 -2
- package/dist/chunks/{rm-PQSDPXP2.js → rm-BJSTNUIJ.js} +4 -4
- package/dist/chunks/rm-OSIDD4VR.js +137 -0
- package/dist/chunks/rm-ZJQ5DOAW.js +137 -0
- package/dist/chunks/{rule-inspect-TNP2HULT.js → rule-inspect-WTU3MGMH.js} +4 -4
- package/dist/chunks/{rules-IO4KI6U7.js → rules-6PXGKHFH.js} +6 -6
- package/dist/chunks/{schema-QFN4XSPZ.js → schema-Z6L3EN6F.js} +2 -2
- package/dist/chunks/tags-HHNNZLC6.js +67 -0
- package/dist/chunks/{update-PGYIRCOQ.js → update-TTPNV44H.js} +4 -4
- package/dist/commands/build/index.js +148 -50
- package/dist/commands/deploy/index.js +13 -10
- package/dist/commands/dev/index.js +8 -8
- package/dist/commands/dev/next-dev-websocket-shim-preload.cjs +20 -0
- package/dist/commands/env/index.js +11 -6
- package/dist/commands/link/index.js +10 -7
- package/dist/commands/list/index.js +3 -3
- package/dist/commands-bulk.js +957 -723
- package/dist/help.js +1 -1
- package/dist/index.js +22 -9
- package/dist/version.mjs +1 -1
- package/package.json +15 -15
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
formatRelativeTime
|
|
9
|
+
} from "./chunk-I3HGCZ4E.js";
|
|
10
|
+
import {
|
|
11
|
+
repositoryPath
|
|
12
|
+
} from "./chunk-4QVAYRYH.js";
|
|
13
|
+
import {
|
|
14
|
+
emitVcrArgParseError,
|
|
15
|
+
handleVcrApiError,
|
|
16
|
+
requireVcrRepository,
|
|
17
|
+
resolveVcrScope,
|
|
18
|
+
validateVcrJsonOutput
|
|
19
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
20
|
+
import "./chunk-E2ENQE2W.js";
|
|
21
|
+
import "./chunk-XPKWKPWA.js";
|
|
22
|
+
import {
|
|
23
|
+
inspectSubcommand
|
|
24
|
+
} from "./chunk-KXGWAWRV.js";
|
|
25
|
+
import "./chunk-RY3AVR6E.js";
|
|
26
|
+
import "./chunk-AUECDTMX.js";
|
|
27
|
+
import "./chunk-QH7WYDEP.js";
|
|
28
|
+
import "./chunk-P726GMBL.js";
|
|
29
|
+
import "./chunk-RB7WQKNC.js";
|
|
30
|
+
import "./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 {
|
|
47
|
+
require_source
|
|
48
|
+
} from "./chunk-S7KYDPEM.js";
|
|
49
|
+
import {
|
|
50
|
+
__toESM
|
|
51
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
52
|
+
|
|
53
|
+
// src/commands/vcr/inspect.ts
|
|
54
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
55
|
+
function printRepository(repository) {
|
|
56
|
+
output_manager_default.print("\n");
|
|
57
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Name")} ${repository.name}
|
|
58
|
+
`);
|
|
59
|
+
output_manager_default.print(` ${import_chalk.default.cyan("ID")} ${repository.id}
|
|
60
|
+
`);
|
|
61
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Project ID")} ${repository.projectId}
|
|
62
|
+
`);
|
|
63
|
+
output_manager_default.print(
|
|
64
|
+
` ${import_chalk.default.cyan("Created")} ${formatRelativeTime(repository.createdAt)}
|
|
65
|
+
`
|
|
66
|
+
);
|
|
67
|
+
output_manager_default.print(
|
|
68
|
+
` ${import_chalk.default.cyan("Updated")} ${formatRelativeTime(repository.updatedAt)}
|
|
69
|
+
`
|
|
70
|
+
);
|
|
71
|
+
output_manager_default.print("\n");
|
|
72
|
+
}
|
|
73
|
+
async function inspect(client, argv, telemetry) {
|
|
74
|
+
let parsedArgs;
|
|
75
|
+
try {
|
|
76
|
+
parsedArgs = parseArguments(
|
|
77
|
+
argv,
|
|
78
|
+
getFlagsSpecification(inspectSubcommand.options)
|
|
79
|
+
);
|
|
80
|
+
} catch (err) {
|
|
81
|
+
emitVcrArgParseError(
|
|
82
|
+
client,
|
|
83
|
+
err,
|
|
84
|
+
"vcr inspect <repository> --project <name-or-id>"
|
|
85
|
+
);
|
|
86
|
+
printError(err);
|
|
87
|
+
return 1;
|
|
88
|
+
}
|
|
89
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
90
|
+
if (typeof fr === "number") {
|
|
91
|
+
return fr;
|
|
92
|
+
}
|
|
93
|
+
const repository = parsedArgs.args[0];
|
|
94
|
+
const project = parsedArgs.flags["--project"];
|
|
95
|
+
telemetry.trackCliOptionProject(project);
|
|
96
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
97
|
+
const missingRepository = requireVcrRepository(
|
|
98
|
+
client,
|
|
99
|
+
repository,
|
|
100
|
+
fr.jsonOutput,
|
|
101
|
+
"vcr inspect <repository>"
|
|
102
|
+
);
|
|
103
|
+
if (typeof missingRepository === "number") {
|
|
104
|
+
return missingRepository;
|
|
105
|
+
}
|
|
106
|
+
const scope = await resolveVcrScope(client, {
|
|
107
|
+
project,
|
|
108
|
+
jsonOutput: fr.jsonOutput
|
|
109
|
+
});
|
|
110
|
+
if (typeof scope === "number") {
|
|
111
|
+
return scope;
|
|
112
|
+
}
|
|
113
|
+
const path = repositoryPath(scope, repository);
|
|
114
|
+
output_manager_default.spinner("Fetching repository...");
|
|
115
|
+
try {
|
|
116
|
+
const result = await client.fetch(path);
|
|
117
|
+
if (fr.jsonOutput) {
|
|
118
|
+
client.stdout.write(`${JSON.stringify(result.repository, null, 2)}
|
|
119
|
+
`);
|
|
120
|
+
} else {
|
|
121
|
+
output_manager_default.log(`${import_chalk.default.bold("Repository")} ${import_chalk.default.cyan(repository)}`);
|
|
122
|
+
printRepository(result.repository);
|
|
123
|
+
}
|
|
124
|
+
return 0;
|
|
125
|
+
} catch (err) {
|
|
126
|
+
if (isAPIError(err)) {
|
|
127
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
128
|
+
}
|
|
129
|
+
throw err;
|
|
130
|
+
} finally {
|
|
131
|
+
output_manager_default.stopSpinner();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export {
|
|
135
|
+
inspect as default
|
|
136
|
+
};
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
emitAlertsScopeError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L6QLQSJE.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
outputError,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
} from "./chunk-QH7WYDEP.js";
|
|
25
25
|
import {
|
|
26
26
|
getScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-P726GMBL.js";
|
|
28
28
|
import {
|
|
29
29
|
getLinkedProject,
|
|
30
30
|
getProjectByNameOrId
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RB7WQKNC.js";
|
|
32
32
|
import {
|
|
33
33
|
buildCommandWithGlobalFlags,
|
|
34
34
|
outputAgentError
|
|
@@ -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-ZVDYGXRA.js";
|
|
24
|
+
import "./chunk-E2ENQE2W.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
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
formatImageStatus,
|
|
10
|
+
formatRelativeTime,
|
|
11
|
+
formatTagReference
|
|
12
|
+
} from "./chunk-I3HGCZ4E.js";
|
|
13
|
+
import {
|
|
14
|
+
repositoryPath,
|
|
15
|
+
repositoryTagPath
|
|
16
|
+
} from "./chunk-4QVAYRYH.js";
|
|
17
|
+
import {
|
|
18
|
+
emitVcrArgParseError,
|
|
19
|
+
handleVcrApiError,
|
|
20
|
+
requireVcrRepositoryAndTag,
|
|
21
|
+
resolveVcrScope,
|
|
22
|
+
validateVcrJsonOutput
|
|
23
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
24
|
+
import "./chunk-E2ENQE2W.js";
|
|
25
|
+
import "./chunk-XPKWKPWA.js";
|
|
26
|
+
import {
|
|
27
|
+
tagsInspectSubcommand
|
|
28
|
+
} from "./chunk-RY3AVR6E.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/tags/inspect.ts
|
|
56
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
57
|
+
function printTag(tag, scope, repository) {
|
|
58
|
+
output_manager_default.print("\n");
|
|
59
|
+
output_manager_default.print(` ${import_chalk.default.cyan("ID")} ${tag.imageId}
|
|
60
|
+
`);
|
|
61
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Digest")} ${tag.manifestDigest}
|
|
62
|
+
`);
|
|
63
|
+
output_manager_default.print(
|
|
64
|
+
` ${import_chalk.default.cyan("Image")} ${formatTagReference(
|
|
65
|
+
scope.teamSlug,
|
|
66
|
+
scope.projectName,
|
|
67
|
+
repository.name,
|
|
68
|
+
tag.tag
|
|
69
|
+
)}
|
|
70
|
+
`
|
|
71
|
+
);
|
|
72
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Type")} ${tag.kind}
|
|
73
|
+
`);
|
|
74
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Arch")} ${tag.arch ?? "-"}
|
|
75
|
+
`);
|
|
76
|
+
output_manager_default.print(` ${import_chalk.default.cyan("Platform")} ${tag.platform ?? "-"}
|
|
77
|
+
`);
|
|
78
|
+
output_manager_default.print(
|
|
79
|
+
` ${import_chalk.default.cyan("Size")} ${formatBytes(tag.sizeInBytes)}
|
|
80
|
+
`
|
|
81
|
+
);
|
|
82
|
+
output_manager_default.print(
|
|
83
|
+
` ${import_chalk.default.cyan("Status")} ${formatImageStatus(tag.status)}
|
|
84
|
+
`
|
|
85
|
+
);
|
|
86
|
+
output_manager_default.print(
|
|
87
|
+
` ${import_chalk.default.cyan("Created")} ${formatRelativeTime(tag.createdAt)}
|
|
88
|
+
`
|
|
89
|
+
);
|
|
90
|
+
output_manager_default.print("\n");
|
|
91
|
+
}
|
|
92
|
+
async function inspect(client, argv, telemetry) {
|
|
93
|
+
let parsedArgs;
|
|
94
|
+
try {
|
|
95
|
+
parsedArgs = parseArguments(
|
|
96
|
+
argv,
|
|
97
|
+
getFlagsSpecification(tagsInspectSubcommand.options)
|
|
98
|
+
);
|
|
99
|
+
} catch (err) {
|
|
100
|
+
emitVcrArgParseError(
|
|
101
|
+
client,
|
|
102
|
+
err,
|
|
103
|
+
"vcr tag inspect <repository> <tag> --project <name-or-id>"
|
|
104
|
+
);
|
|
105
|
+
printError(err);
|
|
106
|
+
return 1;
|
|
107
|
+
}
|
|
108
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
109
|
+
if (typeof fr === "number") {
|
|
110
|
+
return fr;
|
|
111
|
+
}
|
|
112
|
+
const repository = parsedArgs.args[0];
|
|
113
|
+
const tag = parsedArgs.args[1];
|
|
114
|
+
const project = parsedArgs.flags["--project"];
|
|
115
|
+
telemetry.trackCliOptionProject(project);
|
|
116
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
117
|
+
const missingArgs = requireVcrRepositoryAndTag(
|
|
118
|
+
client,
|
|
119
|
+
repository,
|
|
120
|
+
tag,
|
|
121
|
+
fr.jsonOutput,
|
|
122
|
+
"vcr tag inspect <repository> <tag>"
|
|
123
|
+
);
|
|
124
|
+
if (typeof missingArgs === "number") {
|
|
125
|
+
return missingArgs;
|
|
126
|
+
}
|
|
127
|
+
const scope = await resolveVcrScope(client, {
|
|
128
|
+
project,
|
|
129
|
+
jsonOutput: fr.jsonOutput
|
|
130
|
+
});
|
|
131
|
+
if (typeof scope === "number") {
|
|
132
|
+
return scope;
|
|
133
|
+
}
|
|
134
|
+
const path = repositoryTagPath(scope, repository, tag);
|
|
135
|
+
output_manager_default.spinner("Fetching tag...");
|
|
136
|
+
try {
|
|
137
|
+
if (fr.jsonOutput) {
|
|
138
|
+
const result = await client.fetch(path);
|
|
139
|
+
client.stdout.write(`${JSON.stringify(result.tag, null, 2)}
|
|
140
|
+
`);
|
|
141
|
+
} else {
|
|
142
|
+
const [tagResult, repositoryResult] = await Promise.all([
|
|
143
|
+
client.fetch(path),
|
|
144
|
+
client.fetch(
|
|
145
|
+
repositoryPath(scope, repository)
|
|
146
|
+
)
|
|
147
|
+
]);
|
|
148
|
+
output_manager_default.log(`${import_chalk.default.bold("Tag")} ${import_chalk.default.cyan(tag)}`);
|
|
149
|
+
printTag(tagResult.tag, scope, repositoryResult.repository);
|
|
150
|
+
}
|
|
151
|
+
return 0;
|
|
152
|
+
} catch (err) {
|
|
153
|
+
if (isAPIError(err)) {
|
|
154
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
155
|
+
}
|
|
156
|
+
throw err;
|
|
157
|
+
} finally {
|
|
158
|
+
output_manager_default.stopSpinner();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
inspect as default
|
|
163
|
+
};
|
|
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveAlertsScope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L6QLQSJE.js";
|
|
10
10
|
import {
|
|
11
11
|
handleValidationError,
|
|
12
12
|
normalizeRepeatableStringFilters,
|
|
@@ -26,11 +26,11 @@ import "./chunk-OGJB2GHI.js";
|
|
|
26
26
|
import {
|
|
27
27
|
AGENT_REASON
|
|
28
28
|
} from "./chunk-QH7WYDEP.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-P726GMBL.js";
|
|
30
30
|
import {
|
|
31
31
|
table
|
|
32
32
|
} from "./chunk-VKBYAWTL.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-RB7WQKNC.js";
|
|
34
34
|
import {
|
|
35
35
|
buildCommandWithGlobalFlags,
|
|
36
36
|
outputAgentError,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
} from "./chunk-UJ5UEAMC.js";
|
|
25
25
|
import {
|
|
26
26
|
getScope
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-P726GMBL.js";
|
|
28
28
|
import {
|
|
29
29
|
getLinkedProject,
|
|
30
30
|
getProjectByNameOrId
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-RB7WQKNC.js";
|
|
32
32
|
import "./chunk-IZOHLD5D.js";
|
|
33
33
|
import "./chunk-ECCWJHC6.js";
|
|
34
34
|
import {
|
|
@@ -0,0 +1,165 @@
|
|
|
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
|
+
formatRelativeTime
|
|
9
|
+
} from "./chunk-I3HGCZ4E.js";
|
|
10
|
+
import {
|
|
11
|
+
repositoriesPath
|
|
12
|
+
} from "./chunk-4QVAYRYH.js";
|
|
13
|
+
import {
|
|
14
|
+
emitVcrArgParseError,
|
|
15
|
+
handleVcrApiError,
|
|
16
|
+
resolveVcrScope,
|
|
17
|
+
validateVcrJsonOutput
|
|
18
|
+
} from "./chunk-ZVDYGXRA.js";
|
|
19
|
+
import {
|
|
20
|
+
outputError,
|
|
21
|
+
validateOptionalIntegerRange
|
|
22
|
+
} from "./chunk-E2ENQE2W.js";
|
|
23
|
+
import "./chunk-XPKWKPWA.js";
|
|
24
|
+
import {
|
|
25
|
+
listSubcommand
|
|
26
|
+
} from "./chunk-KXGWAWRV.js";
|
|
27
|
+
import "./chunk-RY3AVR6E.js";
|
|
28
|
+
import "./chunk-AUECDTMX.js";
|
|
29
|
+
import {
|
|
30
|
+
AGENT_REASON
|
|
31
|
+
} from "./chunk-QH7WYDEP.js";
|
|
32
|
+
import "./chunk-P726GMBL.js";
|
|
33
|
+
import {
|
|
34
|
+
table
|
|
35
|
+
} from "./chunk-VKBYAWTL.js";
|
|
36
|
+
import "./chunk-RB7WQKNC.js";
|
|
37
|
+
import {
|
|
38
|
+
outputAgentError
|
|
39
|
+
} from "./chunk-IZOHLD5D.js";
|
|
40
|
+
import "./chunk-ECCWJHC6.js";
|
|
41
|
+
import {
|
|
42
|
+
getFlagsSpecification,
|
|
43
|
+
parseArguments,
|
|
44
|
+
printError
|
|
45
|
+
} from "./chunk-EJ6GQI6F.js";
|
|
46
|
+
import {
|
|
47
|
+
isAPIError
|
|
48
|
+
} from "./chunk-P6AK7SVK.js";
|
|
49
|
+
import "./chunk-P4QNYOFB.js";
|
|
50
|
+
import "./chunk-2RVK3DDN.js";
|
|
51
|
+
import {
|
|
52
|
+
output_manager_default
|
|
53
|
+
} from "./chunk-OX7KI3LF.js";
|
|
54
|
+
import "./chunk-GGP5R3FU.js";
|
|
55
|
+
import {
|
|
56
|
+
require_source
|
|
57
|
+
} from "./chunk-S7KYDPEM.js";
|
|
58
|
+
import {
|
|
59
|
+
__toESM
|
|
60
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
61
|
+
|
|
62
|
+
// src/commands/vcr/ls.ts
|
|
63
|
+
var import_chalk = __toESM(require_source(), 1);
|
|
64
|
+
function printRepositories(list) {
|
|
65
|
+
if (list.repositories.length === 0) {
|
|
66
|
+
output_manager_default.log("No repositories found.");
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const headers = ["Name", "ID", "Created"].map((h) => import_chalk.default.cyan(h));
|
|
70
|
+
const rows = [
|
|
71
|
+
headers,
|
|
72
|
+
...list.repositories.map((repo) => [
|
|
73
|
+
import_chalk.default.bold(repo.name),
|
|
74
|
+
import_chalk.default.dim(repo.id),
|
|
75
|
+
formatRelativeTime(repo.createdAt)
|
|
76
|
+
])
|
|
77
|
+
];
|
|
78
|
+
const tableOutput = table(rows, { hsep: 3 }).split("\n").map((line) => line.trimEnd()).join("\n").replace(/^/gm, " ");
|
|
79
|
+
output_manager_default.print(`
|
|
80
|
+
${tableOutput}
|
|
81
|
+
`);
|
|
82
|
+
if (list.nextCursor) {
|
|
83
|
+
output_manager_default.log(
|
|
84
|
+
`More results available. Re-run with \`--cursor ${list.nextCursor}\`.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function ls(client, argv, telemetry) {
|
|
89
|
+
let parsedArgs;
|
|
90
|
+
try {
|
|
91
|
+
parsedArgs = parseArguments(
|
|
92
|
+
argv,
|
|
93
|
+
getFlagsSpecification(listSubcommand.options)
|
|
94
|
+
);
|
|
95
|
+
} catch (err) {
|
|
96
|
+
emitVcrArgParseError(client, err, "vcr ls --project <name-or-id>");
|
|
97
|
+
printError(err);
|
|
98
|
+
return 1;
|
|
99
|
+
}
|
|
100
|
+
const fr = validateVcrJsonOutput(client, parsedArgs.flags);
|
|
101
|
+
if (typeof fr === "number") {
|
|
102
|
+
return fr;
|
|
103
|
+
}
|
|
104
|
+
const project = parsedArgs.flags["--project"];
|
|
105
|
+
const cursor = parsedArgs.flags["--cursor"];
|
|
106
|
+
const limitFlag = parsedArgs.flags["--limit"];
|
|
107
|
+
telemetry.trackCliOptionProject(project);
|
|
108
|
+
telemetry.trackCliOptionLimit(limitFlag);
|
|
109
|
+
telemetry.trackCliOptionCursor(cursor);
|
|
110
|
+
telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);
|
|
111
|
+
const limitResult = validateOptionalIntegerRange(limitFlag, {
|
|
112
|
+
flag: "--limit",
|
|
113
|
+
min: 1,
|
|
114
|
+
max: 100
|
|
115
|
+
});
|
|
116
|
+
if (!limitResult.valid) {
|
|
117
|
+
outputAgentError(
|
|
118
|
+
client,
|
|
119
|
+
{
|
|
120
|
+
status: "error",
|
|
121
|
+
reason: AGENT_REASON.INVALID_ARGUMENTS,
|
|
122
|
+
message: limitResult.message
|
|
123
|
+
},
|
|
124
|
+
1
|
|
125
|
+
);
|
|
126
|
+
return outputError(
|
|
127
|
+
client,
|
|
128
|
+
fr.jsonOutput,
|
|
129
|
+
limitResult.code,
|
|
130
|
+
limitResult.message
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
const scope = await resolveVcrScope(client, {
|
|
134
|
+
project,
|
|
135
|
+
jsonOutput: fr.jsonOutput
|
|
136
|
+
});
|
|
137
|
+
if (typeof scope === "number") {
|
|
138
|
+
return scope;
|
|
139
|
+
}
|
|
140
|
+
const path = repositoriesPath(scope, {
|
|
141
|
+
limit: limitResult.value,
|
|
142
|
+
cursor
|
|
143
|
+
});
|
|
144
|
+
output_manager_default.spinner("Fetching repositories...");
|
|
145
|
+
try {
|
|
146
|
+
const list = await client.fetch(path);
|
|
147
|
+
if (fr.jsonOutput) {
|
|
148
|
+
client.stdout.write(`${JSON.stringify(list, null, 2)}
|
|
149
|
+
`);
|
|
150
|
+
} else {
|
|
151
|
+
printRepositories(list);
|
|
152
|
+
}
|
|
153
|
+
return 0;
|
|
154
|
+
} catch (err) {
|
|
155
|
+
if (isAPIError(err)) {
|
|
156
|
+
return handleVcrApiError(client, err, fr.jsonOutput);
|
|
157
|
+
}
|
|
158
|
+
throw err;
|
|
159
|
+
} finally {
|
|
160
|
+
output_manager_default.stopSpinner();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
export {
|
|
164
|
+
ls as default
|
|
165
|
+
};
|