@theholocron/cli 5.0.0-alpha.12 → 5.0.0-alpha.16
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 +8 -8
- package/dist/cli.mjs +20 -10
- package/dist/cli.mjs.map +1 -1
- package/dist/plugin/capabilities.d.mts +3 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -129,14 +129,14 @@ properties; properties are never a second editable source of truth):
|
|
|
129
129
|
|
|
130
130
|
**Derived** — computed from resolved config + `package.json`, not a config field:
|
|
131
131
|
|
|
132
|
-
| Property
|
|
133
|
-
|
|
|
134
|
-
| `monorepo`
|
|
135
|
-
| `
|
|
136
|
-
| `holocron_profile`
|
|
137
|
-
| `holocron_capabilities`
|
|
138
|
-
| `holocron_stack`
|
|
139
|
-
| `holocron_compliance`
|
|
132
|
+
| Property | Value |
|
|
133
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
134
|
+
| `monorepo` | `boolean` — whether `pnpm-workspace.yaml` exists |
|
|
135
|
+
| `holocron_branch_protection_level` | the active `repo.protection` preset |
|
|
136
|
+
| `holocron_profile` | repo archetype: `library` / `cli` / `plugin` / `template` / `app` / `docs` / `platform` |
|
|
137
|
+
| `holocron_capabilities` | provider capability keys actually wired in `providers: {}` (`multi_select`) |
|
|
138
|
+
| `holocron_stack` | detected build/framework tooling — `next`, `vite`, `astro`, `tsdown`, … (`multi_select`) |
|
|
139
|
+
| `holocron_compliance` | `"compliant" \| "non-compliant"` against a minimal `source` + `ci` baseline |
|
|
140
140
|
|
|
141
141
|
Field definitions and derivation heuristics:
|
|
142
142
|
`.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
|
package/dist/cli.mjs
CHANGED
|
@@ -3804,16 +3804,26 @@ function vaultProviderName(loader) {
|
|
|
3804
3804
|
* package has `bin`) → `platform` — matches `holocron` itself: the CLI is
|
|
3805
3805
|
* the deliverable, the plugin packages are supporting infrastructure for
|
|
3806
3806
|
* it, not separate products.
|
|
3807
|
-
* 3.
|
|
3808
|
-
*
|
|
3807
|
+
* 3. Monorepo with no CLI but at least one non-private workspace package →
|
|
3808
|
+
* `library` — matches `clients`/`configs`/`utils`/`themes`/
|
|
3809
|
+
* `observability`: a family of published packages, none of them a CLI.
|
|
3810
|
+
* Checked *before* falling into the root-package branch below, because
|
|
3811
|
+
* these repos' own root `package.json` is private and often carries
|
|
3812
|
+
* `@theholocron/astro-config` for a docs site built from the monorepo
|
|
3813
|
+
* root — without this check they'd wrongly resolve to `docs` off that
|
|
3814
|
+
* root-level signal alone, when the docs site is a secondary concern of
|
|
3815
|
+
* a library collection, not what the repo fundamentally is.
|
|
3816
|
+
* 4. Single-package repo with `package.json#bin` → `cli`.
|
|
3817
|
+
* 5. Docs-only site (astro/starlight present, root package private, no
|
|
3809
3818
|
* publishable exports) → `docs`.
|
|
3810
|
-
*
|
|
3811
|
-
*
|
|
3819
|
+
* 6. Private, non-publishable, non-docs → `app`.
|
|
3820
|
+
* 7. Otherwise, a single publishable package → `library`.
|
|
3812
3821
|
*/
|
|
3813
3822
|
function deriveProfile(input) {
|
|
3814
3823
|
if (/-template$/.test(input.repoName)) return "template";
|
|
3815
3824
|
if (input.isMonorepo) {
|
|
3816
3825
|
if (input.workspacePackageJsons.some((pkg) => Boolean(pkg.bin))) return "platform";
|
|
3826
|
+
if (input.workspacePackageJsons.some((pkg) => pkg.private !== true)) return "library";
|
|
3817
3827
|
}
|
|
3818
3828
|
const pkg = input.rootPackageJson;
|
|
3819
3829
|
if (pkg?.bin) return "cli";
|
|
@@ -5240,7 +5250,7 @@ async function runSetup(input) {
|
|
|
5240
5250
|
print(formatStep(steps[steps.length - 1]));
|
|
5241
5251
|
}
|
|
5242
5252
|
const properties = {};
|
|
5243
|
-
if (effectivePreset && effectivePreset !== "none") properties["
|
|
5253
|
+
if (effectivePreset && effectivePreset !== "none") properties["holocron_branch_protection_level"] = effectivePreset;
|
|
5244
5254
|
const isMonorepo = await access(join(input.context.repoRoot, "pnpm-workspace.yaml")).then(() => true).catch(() => false);
|
|
5245
5255
|
properties["monorepo"] = String(isMonorepo);
|
|
5246
5256
|
const manual = repo?.properties ?? {};
|
|
@@ -5258,9 +5268,9 @@ async function runSetup(input) {
|
|
|
5258
5268
|
isMonorepo,
|
|
5259
5269
|
workspacePackageJsons
|
|
5260
5270
|
});
|
|
5261
|
-
properties["holocron_stack"] = deriveStack(rootPackageJson)
|
|
5271
|
+
properties["holocron_stack"] = deriveStack(rootPackageJson);
|
|
5262
5272
|
const capabilities = deriveCapabilities(config.providers);
|
|
5263
|
-
properties["holocron_capabilities"] = capabilities
|
|
5273
|
+
properties["holocron_capabilities"] = capabilities;
|
|
5264
5274
|
properties["holocron_compliance"] = deriveCompliance(capabilities);
|
|
5265
5275
|
}
|
|
5266
5276
|
if (source.syncProperties) {
|
|
@@ -6181,7 +6191,7 @@ async function runSync(input) {
|
|
|
6181
6191
|
const repo = config.repo;
|
|
6182
6192
|
const properties = {};
|
|
6183
6193
|
const effectivePreset = repo?.protection;
|
|
6184
|
-
if (effectivePreset && effectivePreset !== "none") properties["
|
|
6194
|
+
if (effectivePreset && effectivePreset !== "none") properties["holocron_branch_protection_level"] = effectivePreset;
|
|
6185
6195
|
const isMonorepo = await access(join(input.context.repoRoot, "pnpm-workspace.yaml")).then(() => true).catch(() => false);
|
|
6186
6196
|
properties["monorepo"] = String(isMonorepo);
|
|
6187
6197
|
const manual = repo?.properties ?? {};
|
|
@@ -6199,9 +6209,9 @@ async function runSync(input) {
|
|
|
6199
6209
|
isMonorepo,
|
|
6200
6210
|
workspacePackageJsons
|
|
6201
6211
|
});
|
|
6202
|
-
properties["holocron_stack"] = deriveStack(rootPackageJson)
|
|
6212
|
+
properties["holocron_stack"] = deriveStack(rootPackageJson);
|
|
6203
6213
|
const capabilities = deriveCapabilities(config.providers);
|
|
6204
|
-
properties["holocron_capabilities"] = capabilities
|
|
6214
|
+
properties["holocron_capabilities"] = capabilities;
|
|
6205
6215
|
properties["holocron_compliance"] = deriveCompliance(capabilities);
|
|
6206
6216
|
}
|
|
6207
6217
|
steps.push(await runSyncStep("source", "sync properties", dryRun, () => source.syncProperties(properties)));
|