@theholocron/cli 2.0.0-alpha.35 → 2.0.0-alpha.37
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 +26 -14
- package/dist/cli.mjs +16 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,11 @@ spinning up and operating software projects.
|
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
|
+
<!-- prettier-ignore -->
|
|
10
11
|
```bash
|
|
11
12
|
npm i -g @theholocron/cli@alpha
|
|
12
13
|
holocron --help
|
|
14
|
+
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Config file
|
|
@@ -19,30 +21,34 @@ Holocron reads `holocron.config.{json,js,ts}` from the project root
|
|
|
19
21
|
|
|
20
22
|
**JSON** (simplest):
|
|
21
23
|
|
|
24
|
+
<!-- prettier-ignore -->
|
|
22
25
|
```jsonc
|
|
23
26
|
// holocron.config.json
|
|
24
27
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
"project": { "name": "my-app" },
|
|
29
|
+
"providers": {
|
|
30
|
+
"vault": ["1password", { "vault": "my-app" }],
|
|
31
|
+
"source": "github",
|
|
32
|
+
},
|
|
30
33
|
}
|
|
34
|
+
|
|
31
35
|
```
|
|
32
36
|
|
|
33
37
|
**JS/TS** — use `defineConfig` for autocomplete and type-checking:
|
|
34
38
|
|
|
39
|
+
<!-- prettier-ignore -->
|
|
35
40
|
```ts
|
|
36
41
|
// holocron.config.ts
|
|
37
42
|
import { defineConfig } from "@theholocron/cli";
|
|
38
43
|
|
|
39
44
|
export default defineConfig({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
project: { name: "my-app" },
|
|
46
|
+
providers: {
|
|
47
|
+
vault: ["1password", { vault: "my-app" }],
|
|
48
|
+
source: "github",
|
|
49
|
+
},
|
|
45
50
|
});
|
|
51
|
+
|
|
46
52
|
```
|
|
47
53
|
|
|
48
54
|
### Shareable configs
|
|
@@ -52,30 +58,36 @@ package in any provider slot and Holocron resolves its bundled
|
|
|
52
58
|
`{ provider, options }` automatically. Per-project options merge on
|
|
53
59
|
top (project wins):
|
|
54
60
|
|
|
61
|
+
<!-- prettier-ignore -->
|
|
55
62
|
```ts
|
|
56
63
|
providers: {
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
vault: '@acme/holocron-vault', // preset only
|
|
65
|
+
source: ['@acme/holocron-github', { repo: 'x' }], // preset + override
|
|
59
66
|
}
|
|
67
|
+
|
|
60
68
|
```
|
|
61
69
|
|
|
62
70
|
A capability config package exports a `CapabilityConfigPackage` default:
|
|
63
71
|
|
|
72
|
+
<!-- prettier-ignore -->
|
|
64
73
|
```ts
|
|
65
74
|
import type { CapabilityConfigPackage } from "@theholocron/cli";
|
|
66
75
|
export default {
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
provider: "1password",
|
|
77
|
+
options: { vault: "acme-app" },
|
|
69
78
|
} satisfies CapabilityConfigPackage;
|
|
79
|
+
|
|
70
80
|
```
|
|
71
81
|
|
|
72
82
|
**Level 2 — whole-config presets.** Because the config file can be
|
|
73
83
|
JS/TS, a shared base is just an import:
|
|
74
84
|
|
|
85
|
+
<!-- prettier-ignore -->
|
|
75
86
|
```ts
|
|
76
87
|
// holocron.config.ts
|
|
77
88
|
import { acmeConfig } from "@acme/holocron-config";
|
|
78
89
|
export default acmeConfig;
|
|
90
|
+
|
|
79
91
|
```
|
|
80
92
|
|
|
81
93
|
## What's in here
|
package/dist/cli.mjs
CHANGED
|
@@ -934,9 +934,10 @@ jobs:
|
|
|
934
934
|
- uses: theholocron/.github/.github/actions/setup@main
|
|
935
935
|
name: Setup
|
|
936
936
|
|
|
937
|
-
- run:
|
|
937
|
+
- run: eval "$BUILD_SCRIPT"
|
|
938
938
|
name: Build and upload bundle stats
|
|
939
939
|
env:
|
|
940
|
+
BUILD_SCRIPT: \${{ inputs.build-script }}
|
|
940
941
|
CODECOV_TOKEN: \${{ secrets.CODECOV_TOKEN }}
|
|
941
942
|
`,
|
|
942
943
|
"bookkeeping-pr": `\
|
|
@@ -1572,12 +1573,13 @@ on: # yamllint disable-line rule:truthy
|
|
|
1572
1573
|
secondary-repos:
|
|
1573
1574
|
description: >
|
|
1574
1575
|
Space-separated list of secondary repos (reusable workflows + thin
|
|
1575
|
-
callers only, no composite actions).
|
|
1576
|
+
callers only, no composite actions). Changes are delivered via pull
|
|
1577
|
+
request, same as the primary repo.
|
|
1576
1578
|
type: string
|
|
1577
1579
|
required: false
|
|
1578
1580
|
default: ""
|
|
1579
1581
|
sync-branch:
|
|
1580
|
-
description: Branch name used for the primary
|
|
1582
|
+
description: Branch name used for the primary and secondary repo PRs
|
|
1581
1583
|
type: string
|
|
1582
1584
|
required: false
|
|
1583
1585
|
default: chore/sync-templates
|
|
@@ -1629,15 +1631,24 @@ jobs:
|
|
|
1629
1631
|
PRIMARY_REPO: \${{ inputs.primary-repo }}
|
|
1630
1632
|
SYNC_BRANCH: \${{ inputs.sync-branch }}
|
|
1631
1633
|
|
|
1632
|
-
- name: Sync secondary repos (
|
|
1634
|
+
- name: Sync secondary repos (PR)
|
|
1633
1635
|
if: \${{ inputs.secondary-repos != '' }}
|
|
1634
1636
|
run: |
|
|
1637
|
+
GIT_NAME=$(gh api user --jq .name 2>/dev/null || echo "github-actions[bot]")
|
|
1638
|
+
GIT_EMAIL=$(gh api user --jq '"\\(.id)+\\(.login)@users.noreply.github.com"' 2>/dev/null || echo "41898282+github-actions[bot]@users.noreply.github.com")
|
|
1639
|
+
COMMIT_MSG="chore: sync from theholocron/holocron"$'\\n\\n'"Signed-off-by: $GIT_NAME <$GIT_EMAIL>"
|
|
1635
1640
|
for repo in $SECONDARY_REPOS; do
|
|
1636
|
-
node packages/cli/dist/cli.mjs sync-github
|
|
1641
|
+
node packages/cli/dist/cli.mjs sync-github \\
|
|
1642
|
+
--repo "$repo" \\
|
|
1643
|
+
--branch "$SYNC_BRANCH" \\
|
|
1644
|
+
--pr \\
|
|
1645
|
+
--message "$COMMIT_MSG"
|
|
1637
1646
|
done
|
|
1638
1647
|
env:
|
|
1639
1648
|
GITHUB_TOKEN: \${{ secrets.SYNC_TOKEN }}
|
|
1649
|
+
GH_TOKEN: \${{ secrets.SYNC_TOKEN }}
|
|
1640
1650
|
SECONDARY_REPOS: \${{ inputs.secondary-repos }}
|
|
1651
|
+
SYNC_BRANCH: \${{ inputs.sync-branch }}
|
|
1641
1652
|
`,
|
|
1642
1653
|
typecheck: `\
|
|
1643
1654
|
name: Typecheck
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.37",
|
|
4
4
|
"description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/holocron/issues",
|