@theholocron/cli 2.0.0-alpha.21 → 2.0.0-alpha.22
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 +22 -17
- package/dist/cli.mjs +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- editorconfig-checker-disable-file -->
|
|
2
|
+
|
|
1
3
|
# `@theholocron/cli`
|
|
2
4
|
|
|
3
5
|
The Holocron CLI — a pluggable, capability-based orchestrator for
|
|
@@ -16,29 +18,31 @@ Holocron reads `holocron.config.{json,js,ts}` from the project root
|
|
|
16
18
|
(priority: json → js → ts).
|
|
17
19
|
|
|
18
20
|
**JSON** (simplest):
|
|
21
|
+
|
|
19
22
|
```jsonc
|
|
20
23
|
// holocron.config.json
|
|
21
24
|
{
|
|
22
25
|
"project": { "name": "my-app" },
|
|
23
26
|
"providers": {
|
|
24
27
|
"vault": ["1password", { "vault": "my-app" }],
|
|
25
|
-
"source": "github"
|
|
26
|
-
}
|
|
28
|
+
"source": "github",
|
|
29
|
+
},
|
|
27
30
|
}
|
|
28
31
|
```
|
|
29
32
|
|
|
30
33
|
**JS/TS** — use `defineConfig` for autocomplete and type-checking:
|
|
34
|
+
|
|
31
35
|
```ts
|
|
32
36
|
// holocron.config.ts
|
|
33
|
-
import { defineConfig } from
|
|
37
|
+
import { defineConfig } from "@theholocron/cli";
|
|
34
38
|
|
|
35
39
|
export default defineConfig({
|
|
36
|
-
project: { name:
|
|
40
|
+
project: { name: "my-app" },
|
|
37
41
|
providers: {
|
|
38
|
-
vault: [
|
|
39
|
-
source:
|
|
42
|
+
vault: ["1password", { vault: "my-app" }],
|
|
43
|
+
source: "github",
|
|
40
44
|
},
|
|
41
|
-
})
|
|
45
|
+
});
|
|
42
46
|
```
|
|
43
47
|
|
|
44
48
|
### Shareable configs
|
|
@@ -56,12 +60,13 @@ providers: {
|
|
|
56
60
|
```
|
|
57
61
|
|
|
58
62
|
A capability config package exports a `CapabilityConfigPackage` default:
|
|
63
|
+
|
|
59
64
|
```ts
|
|
60
|
-
import type { CapabilityConfigPackage } from
|
|
65
|
+
import type { CapabilityConfigPackage } from "@theholocron/cli";
|
|
61
66
|
export default {
|
|
62
|
-
provider:
|
|
63
|
-
options: { vault:
|
|
64
|
-
} satisfies CapabilityConfigPackage
|
|
67
|
+
provider: "1password",
|
|
68
|
+
options: { vault: "acme-app" },
|
|
69
|
+
} satisfies CapabilityConfigPackage;
|
|
65
70
|
```
|
|
66
71
|
|
|
67
72
|
**Level 2 — whole-config presets.** Because the config file can be
|
|
@@ -69,23 +74,23 @@ JS/TS, a shared base is just an import:
|
|
|
69
74
|
|
|
70
75
|
```ts
|
|
71
76
|
// holocron.config.ts
|
|
72
|
-
import { acmeConfig } from
|
|
73
|
-
export default acmeConfig
|
|
77
|
+
import { acmeConfig } from "@acme/holocron-config";
|
|
78
|
+
export default acmeConfig;
|
|
74
79
|
```
|
|
75
80
|
|
|
76
81
|
## What's in here
|
|
77
82
|
|
|
78
83
|
- `src/capabilities/` — the 14 capability interfaces that providers
|
|
79
|
-
|
|
84
|
+
implement
|
|
80
85
|
- `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
|
|
81
|
-
|
|
86
|
+
`CapabilityConfigPackage`
|
|
82
87
|
- `src/load-config.ts` — `loadConfig` — reads JSON/JS/TS config files
|
|
83
88
|
- `src/define-config.ts` — `defineConfig` typed pass-through
|
|
84
89
|
- `src/loader.ts` — `PluginLoader` — dynamic-imports plugins, resolves
|
|
85
|
-
|
|
90
|
+
capability config packages, builds the capability registry
|
|
86
91
|
- `src/cli.ts` — yargs entry, dispatches subcommands
|
|
87
92
|
- `src/commands/` — `setup`, `doctor`, `deploy`, `secret set`,
|
|
88
|
-
|
|
93
|
+
`secrets sync`, `npm publish-initial`
|
|
89
94
|
|
|
90
95
|
## Status
|
|
91
96
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1167,6 +1167,7 @@ jobs:
|
|
|
1167
1167
|
name: Run Super Linter
|
|
1168
1168
|
env:
|
|
1169
1169
|
GITHUB_TOKEN: \${{ github.token }}
|
|
1170
|
+
DEFAULT_BRANCH: \${{ github.event.pull_request.base.ref || github.event.repository.default_branch }}
|
|
1170
1171
|
ANNOTATE_ONLY: true
|
|
1171
1172
|
DISABLE_COMMENTS: false
|
|
1172
1173
|
IGNORE_GITIGNORED_FILES: true
|
|
@@ -3565,6 +3566,15 @@ function vaultProviderName(loader) {
|
|
|
3565
3566
|
}
|
|
3566
3567
|
//#endregion
|
|
3567
3568
|
//#region src/commands/setup.ts
|
|
3569
|
+
const ALEX_CONFIG = JSON.stringify({ allow: [
|
|
3570
|
+
"dead",
|
|
3571
|
+
"failure",
|
|
3572
|
+
"failures",
|
|
3573
|
+
"hook",
|
|
3574
|
+
"hooks",
|
|
3575
|
+
"husky",
|
|
3576
|
+
"period"
|
|
3577
|
+
] }, null, 2) + "\n";
|
|
3568
3578
|
const DEPENDABOT_CONFIG = `\
|
|
3569
3579
|
# AUTO-GENERATED by holocron — run \`holocron setup\` to regenerate.
|
|
3570
3580
|
version: 2
|
|
@@ -3788,6 +3798,13 @@ async function runSetup(input) {
|
|
|
3788
3798
|
}));
|
|
3789
3799
|
print(formatStep(steps[steps.length - 1]));
|
|
3790
3800
|
}
|
|
3801
|
+
if (loader.has("source")) {
|
|
3802
|
+
const source = loader.get("source");
|
|
3803
|
+
steps.push(await runStep("source", "write .alexrc.json", dryRun, async () => {
|
|
3804
|
+
await source.writeRepoFile(".alexrc.json", ALEX_CONFIG);
|
|
3805
|
+
}));
|
|
3806
|
+
print(formatStep(steps[steps.length - 1]));
|
|
3807
|
+
}
|
|
3791
3808
|
if (loader.has("environments")) {
|
|
3792
3809
|
const envs = loader.get("environments");
|
|
3793
3810
|
print(" → environments");
|
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.22",
|
|
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",
|