@theholocron/cli 2.0.0-alpha.34 → 2.0.0-alpha.36

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.
Files changed (3) hide show
  1. package/README.md +26 -14
  2. package/dist/cli.mjs +40 -30
  3. 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
- "project": { "name": "my-app" },
26
- "providers": {
27
- "vault": ["1password", { "vault": "my-app" }],
28
- "source": "github",
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
- project: { name: "my-app" },
41
- providers: {
42
- vault: ["1password", { vault: "my-app" }],
43
- source: "github",
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
- vault: '@acme/holocron-vault', // preset only
58
- source: ['@acme/holocron-github', { repo: 'x' }], // preset + override
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
- provider: "1password",
68
- options: { vault: "acme-app" },
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: \${{ inputs.build-script }}
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": `\
@@ -3581,34 +3582,43 @@ function vaultProviderName(loader) {
3581
3582
  }
3582
3583
  //#endregion
3583
3584
  //#region src/commands/setup.ts
3584
- const EDITORCONFIG = `\
3585
- root = true
3586
-
3587
- [*]
3588
- end_of_line = lf
3589
- charset = utf-8
3590
- trim_trailing_whitespace = true
3591
- insert_final_newline = true
3592
- indent_style = tab
3593
- indent_size = 4
3594
-
3595
- [.gitattributes]
3596
- indent_style = space
3597
- indent_size = 2
3598
-
3599
- [*.{json,yml,yaml}]
3600
- indent_style = space
3601
- indent_size = 2
3602
-
3603
- [*.md]
3604
- trim_trailing_whitespace = false
3605
- indent_style = space
3606
- indent_size = 2
3607
-
3608
- [.*{rc,ignore}]
3609
- indent_style = space
3610
- indent_size = 2
3611
- `;
3585
+ function editorconfigContent() {
3586
+ return [
3587
+ `# AUTO-GENERATED — do not edit directly.`,
3588
+ `# Source: theholocron/holocron · packages/cli/src/commands/setup.ts`,
3589
+ `# Synced: ${(/* @__PURE__ */ new Date()).toISOString()}`,
3590
+ `# Tool: holocron setup`,
3591
+ `# Changes: run \`holocron setup\` to regenerate.`,
3592
+ ``,
3593
+ `root = true`,
3594
+ ``,
3595
+ `[*]`,
3596
+ `end_of_line = lf`,
3597
+ `charset = utf-8`,
3598
+ `trim_trailing_whitespace = true`,
3599
+ `insert_final_newline = true`,
3600
+ `indent_style = tab`,
3601
+ `indent_size = 4`,
3602
+ ``,
3603
+ `[.gitattributes]`,
3604
+ `indent_style = space`,
3605
+ `indent_size = 2`,
3606
+ ``,
3607
+ `[*.{json,yml,yaml}]`,
3608
+ `indent_style = space`,
3609
+ `indent_size = 2`,
3610
+ ``,
3611
+ `[*.md]`,
3612
+ `trim_trailing_whitespace = false`,
3613
+ `indent_style = space`,
3614
+ `indent_size = 2`,
3615
+ ``,
3616
+ `[.*{rc,ignore}]`,
3617
+ `indent_style = space`,
3618
+ `indent_size = 2`,
3619
+ ``
3620
+ ].join("\n");
3621
+ }
3612
3622
  const EDITORCONFIG_CHECKER_CONFIG = JSON.stringify({
3613
3623
  Version: "v3.7.0",
3614
3624
  Verbose: false,
@@ -3910,7 +3920,7 @@ async function runSetup(input) {
3910
3920
  }));
3911
3921
  print(formatStep(steps[steps.length - 1]));
3912
3922
  steps.push(await runStep("source", "write .editorconfig", dryRun, async () => {
3913
- await source.writeRepoFile(".editorconfig", EDITORCONFIG);
3923
+ await source.writeRepoFile(".editorconfig", editorconfigContent());
3914
3924
  }));
3915
3925
  print(formatStep(steps[steps.length - 1]));
3916
3926
  steps.push(await runStep("source", "write .editorconfig-checker.json", dryRun, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "2.0.0-alpha.34",
3
+ "version": "2.0.0-alpha.36",
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",