actionspack 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -13,6 +13,23 @@ It currently supports inlining composite actions and safely transformable
13
13
  reusable workflows. JavaScript and Docker actions are pinned as external
14
14
  dependencies instead of being bundled.
15
15
 
16
+ ## Why actionspack?
17
+
18
+ GitHub Actions workflows often depend on reusable workflows and actions from
19
+ other repositories. You may want to author those dependencies with convenient
20
+ floating refs like `@main` in `.github/workflows/src/`, but generated workflows
21
+ should be reproducible and reviewable.
22
+
23
+ `actionspack` gives workflows a lockfile mechanism similar to `pnpm`. It locks
24
+ remote workflows and actions in `.github/workflow.lock.yml`, inlines everything
25
+ that can be transformed safely into the local repository, and pins anything that
26
+ cannot be inlined to a fixed SHA.
27
+
28
+ To update workflow and action dependencies, run `actionspack update`
29
+ periodically. The updated lockfile and generated workflows are normal repository
30
+ files, so `git diff` shows exactly which dependencies changed and what generated
31
+ workflow output changed.
32
+
16
33
  ## Install
17
34
 
18
35
  ```bash
@@ -49,6 +66,16 @@ npx actionspack
49
66
  Generated workflows are safe to commit. Existing lockfile SHAs are reused until
50
67
  you explicitly run `actionspack update`.
51
68
 
69
+ When you want to refresh workflow/action dependencies:
70
+
71
+ ```bash
72
+ npx actionspack update
73
+ git diff
74
+ ```
75
+
76
+ Review the dependency SHA changes in `.github/workflow.lock.yml` and the
77
+ resulting generated workflow changes before committing.
78
+
52
79
  ## Commands
53
80
 
54
81
  ```bash
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
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-CPJczWTq.mjs";
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-jdSon0td.mjs";
3
3
  import { styleText } from "node:util";
4
4
  import process from "node:process";
5
5
  import { cac } from "cac";
@@ -909,6 +909,8 @@ function substituteString(value, values) {
909
909
  const expr = parseExpression(expression);
910
910
  const replacement = directReplacement(expr, values);
911
911
  if (replacement !== void 0) return replacement;
912
+ const evaluated = staticExpression(expr, values);
913
+ if (evaluated) return evaluated.value;
912
914
  const simplified = printExpression(expr, values);
913
915
  const staticValue = staticExpression(parseExpression(simplified), values);
914
916
  return staticValue ? staticValue.value : `\${{ ${simplified} }}`;
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-CPJczWTq.mjs";
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-jdSon0td.mjs";
2
2
  export { assertNoRemoteUses, collectStepDependencies, collectWorkflowDependencies, diff, diffLockfiles, pack, packWorkflow, scan, tree, update, verify, why };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "actionspack",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Lockfile-first GitHub Actions workflow packer",
6
6
  "author": "Kevin Deng <sxzz@sxzz.moe>",
7
7
  "license": "MIT",