actionspack 0.1.2 → 0.1.3
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/cli.mjs
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as why, f as scan, i as update, l as verify, r as tree, s as pack, t as diff } from "./commands-
|
|
2
|
+
import { a as why, f as scan, i as update, l as verify, r as tree, s as pack, t as diff } from "./commands-4KKgssQI.mjs";
|
|
3
3
|
import { styleText } from "node:util";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { cac } from "cac";
|
|
6
|
+
//#region package.json
|
|
7
|
+
var name = "actionspack";
|
|
8
|
+
var version = "0.1.3";
|
|
6
9
|
//#endregion
|
|
7
10
|
//#region src/cli.ts
|
|
8
|
-
const cli = cac(
|
|
11
|
+
const cli = cac(name);
|
|
9
12
|
async function main() {
|
|
10
|
-
cli.command("", "Pack workflows").option("--entry <source:output>", "Use an explicit source/output workflow mapping").option("--external <selector>", "Pin a workflow or action without bundling it").action(async (flags) => {
|
|
11
|
-
await pack({
|
|
12
|
-
...normalizeConfigFlags(flags),
|
|
13
|
-
stderr: process.stderr,
|
|
14
|
-
stdout: process.stdout
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
cli.command("pack", "Pack workflows").option("--entry <source:output>", "Use an explicit source/output workflow mapping").option("--external <selector>", "Pin a workflow or action without bundling it").action(async (flags) => {
|
|
13
|
+
cli.command("", "Pack workflows").alias("pack").option("--entry <source:output>", "Use an explicit source/output workflow mapping").option("--external <selector>", "Pin a workflow or action without bundling it").action(async (flags) => {
|
|
18
14
|
await pack({
|
|
19
15
|
...normalizeConfigFlags(flags),
|
|
20
16
|
stderr: process.stderr,
|
|
@@ -53,7 +49,7 @@ async function main() {
|
|
|
53
49
|
cli.command("verify", "Verify lockfile and packed workflows").action(async () => {
|
|
54
50
|
await verify();
|
|
55
51
|
});
|
|
56
|
-
cli.help();
|
|
52
|
+
cli.version(version).help();
|
|
57
53
|
cli.parse(process.argv, { run: false });
|
|
58
54
|
await cli.runMatchedCommand();
|
|
59
55
|
}
|
|
@@ -1263,11 +1263,15 @@ function appendDependencyTree(lines, lockfile, dependencies, prefix) {
|
|
|
1263
1263
|
dependencies.forEach((dependency, index) => {
|
|
1264
1264
|
const last = index === dependencies.length - 1;
|
|
1265
1265
|
const item = lockfile.packages[dependency.package];
|
|
1266
|
-
const label = item ?
|
|
1266
|
+
const label = item ? formatPackageTreeLabel(item) : `${dependency.package}@${dependency.requested}`;
|
|
1267
1267
|
lines.push(`${prefix}${last ? "└─" : "├─"} ${label}`);
|
|
1268
1268
|
if (item) appendDependencyTree(lines, lockfile, item.dependencies, `${prefix}${last ? " " : "│ "}`);
|
|
1269
1269
|
});
|
|
1270
1270
|
}
|
|
1271
|
+
function formatPackageTreeLabel(item) {
|
|
1272
|
+
const requested = `${`${item.owner}/${item.repo}${item.path === "." ? "" : `/${item.path}`}`}@${item.requested}`;
|
|
1273
|
+
return item.requested === item.resolved ? requested : `${requested} (${item.resolved})`;
|
|
1274
|
+
}
|
|
1271
1275
|
function collectWhyPaths(lockfile, dependency, matches, current, paths) {
|
|
1272
1276
|
const item = lockfile.packages[dependency.package];
|
|
1273
1277
|
const label = item ? `${item.owner}/${item.repo}${item.path === "." ? "" : `/${item.path}`}` : dependency.package;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as why, c as packWorkflow, d as collectWorkflowDependencies, f as scan, i as update, l as verify, n as diffLockfiles, o as assertNoRemoteUses, r as tree, s as pack, t as diff, u as collectStepDependencies } from "./commands-
|
|
1
|
+
import { a as why, c as packWorkflow, d as collectWorkflowDependencies, f as scan, i as update, l as verify, n as diffLockfiles, o as assertNoRemoteUses, r as tree, s as pack, t as diff, u as collectStepDependencies } from "./commands-4KKgssQI.mjs";
|
|
2
2
|
export { assertNoRemoteUses, collectStepDependencies, collectWorkflowDependencies, diff, diffLockfiles, pack, packWorkflow, scan, tree, update, verify, why };
|