@theholocron/astromech 5.0.0-alpha.422 → 5.0.0-alpha.424

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
@@ -76,9 +76,9 @@ documents, not a naming convention repos need to follow.
76
76
  | `release` | semantic-release | no local equivalent — CI only; carries `preview` (npm dist-tags) |
77
77
  | `deploy` | Cloudflare Pages / Vercel | no local equivalent — CI only; carries `preview` |
78
78
  | `measure:bundle` | bundle-size upload to Codecov | no local equivalent — CI only |
79
- | `check-preview` | `holocron monitoring check <url>` against the PR's own Vercel preview URL | no local equivalent — CI only; triggered by `deployment_status`, not `push`/`pull_request` |
79
+ | `check-preview` | `holocron check monitor <url>` against the PR's own Vercel preview URL | no local equivalent — CI only; triggered by `deployment_status`, not `push`/`pull_request` |
80
80
  | `check-notify` | _(none — manual workflow)_ | posts a labelled test message to every notification channel; fails per channel that does not work |
81
- | `sync-repo` | `holocron repo sync` | keeps generated files current |
81
+ | `sync-repo` | `holocron sync` | keeps generated files current |
82
82
  | `lint:commits` | commitlint | no local equivalent — enforced by the `commit-msg` hook locally, over the PR's commit range in CI |
83
83
  | `validate:specs` | `holocron probe specs check` | spec/ADR frontmatter — a leaf of the `validate` suite, not a linter |
84
84
  | `validate:docs` | `holocron probe docs validate` | docs presence (warns) and token docs (fails) — a leaf of the `validate` suite, not a linter |
@@ -177,7 +177,7 @@ neither has a plain-production-only fallback template.
177
177
  `packageScripts()` emits the `holocron` entry (`holocronScript ?? "holocron"`)
178
178
  plus the scripts `scriptsFor(config, registry, { monorepo })` computes; it skips
179
179
  `local: false` entries and tasks with no local runner at all, and returns
180
- `{}` when `syncScripts: false` or there is no config. The same function backs `repo sync`, which merges the result with
180
+ `{}` when `syncScripts: false` or there is no config. The same function backs `sync`, which merges the result with
181
181
  `mergeScripts()`, and `probe generated check`, which fails on a root script that differs and on a script that breaks the
182
182
  rules of `checkPackageScripts()`.
183
183
 
@@ -211,7 +211,7 @@ single always-run jobs now, so their context
211
211
  names that job directly (`"typecheck / Run tsc --noEmit"`) — the `… /
212
212
  Conclusion` fan-in job inside a workflow is only used where a task genuinely has
213
213
  several conditionally-run jobs feeding one check
214
- (`test:unit`). `holocron repo setup`
214
+ (`test:unit`). `holocron setup`
215
215
  applies the list for `protection: "strict"` repos. Policy-free — manifest only.
216
216
 
217
217
  ### The `ci` aggregate
@@ -220,7 +220,7 @@ applies the list for `protection: "strict"` repos. Policy-free — manifest only
220
220
  `expected` ids are the part before `/` of each required task's context and of each `extraRequiredChecks` entry that
221
221
  is not a `codecov/` status (the hand-written `Generated files / Check` becomes `Generated files`), and `statuses` are
222
222
  the `codecov/` entries. `aggregateCaller()` renders the `pull_request` caller, whose job `ci` calls the reusable's `Required checks` job.
223
- `holocron repo sync` writes it only in the repo that contains the reusables. The ids are today's check names; the later
223
+ `holocron sync` writes it only in the repo that contains the reusables. The ids are today's check names; the later
224
224
  rename changes them here and costs no ruleset edit.
225
225
 
226
226
  ### `codecov.yml`
@@ -233,7 +233,7 @@ came from), same manifest-derived category as `thinCallers()`. Pass the
233
233
  current file's content (or `null`) and it either merges the
234
234
  `individual_components` list in (preserving everything else in the file —
235
235
  thresholds, flags, custom rules) or scaffolds a fresh file from the base
236
- template. `holocron repo setup` writes the result via the `source` capability;
236
+ template. `holocron setup` writes the result via the `source` capability;
237
237
  this method never touches the filesystem beyond reading `packages/*` and
238
238
  `apps/*` under `cwd`.
239
239
 
@@ -284,10 +284,10 @@ config surface don't pull `@commitlint/*` in:
284
284
  what `holocron run lint commit-msg <file>` (the `commit-msg` hook) runs.
285
285
  - `ALEX_CONFIG`, `ALEX_IGNORE_PATTERNS`, `PRETTIER_IGNORE_PATTERNS`,
286
286
  `EDITORCONFIG_CHECKER_EXCLUDE` and `isEditorConfigExcluded(path)` — read
287
- from the same templates `holocron repo setup` writes, so Sentinel's central
287
+ from the same templates `holocron setup` writes, so Sentinel's central
288
288
  checks skip exactly what each repo's own CI skips.
289
289
 
290
- The root entry also exports the config-file generators `holocron repo setup`
290
+ The root entry also exports the config-file generators `holocron setup`
291
291
  writes (`createEditorconfig`, `createAlexrc`, `createPrePush`, …) and
292
292
  `createHeader`.
293
293
 
@@ -311,7 +311,7 @@ webhook and the GitHub API (#929).
311
311
 
312
312
  ## Upgrade — `@theholocron/astromech/upgrade`
313
313
 
314
- The repo-agnostic machinery behind `holocron repo upgrade`, in a subpath so the CLI and any other tool can use it.
314
+ The repo-agnostic machinery behind `holocron upgrade`, in a subpath so the CLI and any other tool can use it.
315
315
 
316
316
  - `runUpgradeNode({ to, from?, cwd?, dryRun?, extra?, logger? })` walks the repo and rewrites every Node.js major pin:
317
317
  `engines.node`, an exact `@types/node`, `.nvmrc`, `.node-version`, workflow `node-version:`, Dockerfile
@@ -1,4 +1,4 @@
1
- import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-BfeI4AnM.mjs";
1
+ import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-DRfLKO70.mjs";
2
2
  import { Loaded } from "@theholocron/datapad";
3
3
  /**
4
4
  * The `tasks` config shape — the single manifest of what a repo runs.
@@ -1,4 +1,4 @@
1
- import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-BWX_CDp6.mjs";
1
+ import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-BpZu8IZr.mjs";
2
2
  import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
3
3
  // src/config/define/define.ts
4
4
  /**
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as TasksConfig } from "./schema.type-BfeI4AnM.mjs";
1
+ import { r as TasksConfig } from "./schema.type-DRfLKO70.mjs";
2
2
  /** What the `ci` aggregate check waits on, as the two inputs of its reusable workflow. */
3
3
  interface AggregateChecks {
4
4
  /**
@@ -56,6 +56,13 @@ export declare function legacyGate(home?: CiHome): boolean;
56
56
  * reusable called from another repository cannot see this checkout.
57
57
  */
58
58
  export declare function localize(text: string, home?: CiHome): string;
59
+ /**
60
+ * `text` with each reference to a hosted composite action in `names` at `home` rewritten to its folder in the same
61
+ * checkout (`./ci/actions/<name>`). For the written copy of a reusable in the repo that hosts it, which only that
62
+ * repo's own callers run: a change to the action then takes effect at the PR's own commit, instead of waiting for
63
+ * the frozen copy in `theholocron/.github` that `home` still names. An action not in `names` keeps its full ref.
64
+ */
65
+ export declare function localizeActions(text: string, names: readonly string[], home?: CiHome): string;
59
66
  /**
60
67
  * How strictly a repo enforces doc-comment coverage of its public API (`repoValidation.docsCoverage`, spec
61
68
  * `tech-api-docs`): `off` (the default) does nothing, `warn` reports without failing and posts informational Codecov
@@ -118,7 +125,7 @@ export declare function readWorkspacePackages(repoRoot: string): WorkspacePackag
118
125
  /** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
119
126
  export declare function createCodecovConfig(packages: WorkspacePackage$1[], options?: CodecovConfigOptions): string;
120
127
  /**
121
- * The full pipeline `holocron repo setup` needs: read this repo's public
128
+ * The full pipeline `holocron setup` needs: read this repo's public
122
129
  * `packages/*`, then either merge them into an `existing` `codecov.yml` or
123
130
  * scaffold a new one.
124
131
  */
@@ -179,7 +186,7 @@ interface PreviewConfig {
179
186
  project: string;
180
187
  /**
181
188
  * Base domain for preview URLs (e.g. `"preview.theholocron.dev"`).
182
- * When set, `holocron repo setup` automatically provisions:
189
+ * When set, `holocron setup` automatically provisions:
183
190
  * - Cloudflare Pages custom domain `*.<domain>` on the project
184
191
  * - DNS wildcard CNAME `*.<domain>` → `<project>.pages.dev`
185
192
  *
@@ -274,12 +281,12 @@ id?: string): string;
274
281
  * - chromatic-projects entries' untraced array → newline-joined string
275
282
  * - plain arrays → JSON-stringified for YAML scalar quoting
276
283
  *
277
- * Used by both `holocron repo setup` and `sync-workflow-templates`.
284
+ * Used by both `holocron setup` and `sync-workflow-templates`.
278
285
  */
279
286
  export declare function normalizeWorkflowWith(raw: Record<string, unknown>): Record<string, unknown>;
280
287
  /**
281
288
  * Derive on.push.paths entries from the deploy with: shorthand.
282
- * Used by both `holocron repo setup` and `sync-workflow-templates`.
289
+ * Used by both `holocron setup` and `sync-workflow-templates`.
283
290
  */
284
291
  export declare function deriveDeployPaths(raw: Record<string, unknown>): string[];
285
292
  /**
@@ -510,7 +517,7 @@ interface RepoShape {
510
517
  monorepo: boolean;
511
518
  }
512
519
  /**
513
- * The `package.json` scripts a manifest asks for, by name: the one rule that `repo sync` writes, `probe generated
520
+ * The `package.json` scripts a manifest asks for, by name: the one rule that `sync` writes, `probe generated
514
521
  * check` compares against, and the `turbo.json` generator agrees with (spec `ci-flat-task-vocabulary`, "Scripts").
515
522
  * `holocron` and `prepare` are not tasks and are added by the caller.
516
523
  *
@@ -675,7 +682,7 @@ type WorkflowHeaderFormat = "yaml" | "cjs" | "shebang";
675
682
  interface CreateHeaderOptions {
676
683
  /** Path within theholocron/holocron that owns the file being generated. */
677
684
  source: string;
678
- /** CLI command that produces the file. Defaults to "holocron repo setup". */
685
+ /** CLI command that produces the file. Defaults to "holocron setup". */
679
686
  tool?: string;
680
687
  /** Set true only when writing to theholocron/.github itself. */
681
688
  forPrimary?: boolean;
@@ -1000,7 +1007,7 @@ interface Astromech {
1000
1007
  /**
1001
1008
  * The branch-protection required-status-check contexts for this repo. With `aggregate` (the repo hosts the `ci`
1002
1009
  * check, see {@link aggregateCaller}) they are `ci / Required checks` and `DCO`; without it, `DCO`, every `required: true` task's
1003
- * check context and `extraRequiredChecks`, ordered and de-duplicated. `holocron repo setup` applies the list; this
1010
+ * check context and `extraRequiredChecks`, ordered and de-duplicated. `holocron setup` applies the list; this
1004
1011
  * method is policy-free (manifest only).
1005
1012
  */
1006
1013
  requiredChecks(aggregate: boolean): string[];
@@ -1014,7 +1021,7 @@ interface Astromech {
1014
1021
  * This repo's `codecov.yml` — component `paths` derived from the workspace packages.
1015
1022
  * Pass the current file's content (`null` if none exists yet) to either
1016
1023
  * merge the component list in or scaffold a fresh file. Policy-free same
1017
- * as {@link requiredChecks} — `holocron repo setup` owns writing the result.
1024
+ * as {@link requiredChecks} — `holocron setup` owns writing the result.
1018
1025
  * `options.docsCoverage` adds the `documentation` flag and its statuses.
1019
1026
  */
1020
1027
  codecovConfig(existing: string | null, options?: CodecovConfigOptions): string;
@@ -1198,7 +1205,7 @@ declare function createIgnoreConfig(): string;
1198
1205
  /**
1199
1206
  * `.husky/commit-msg` — lints the commit message via `holocron run lint
1200
1207
  * commit-msg` (holocron#789), the real programmatic replacement for
1201
- * shelling out to `commitlint --edit`. Installed by `holocron repo setup` when
1208
+ * shelling out to `commitlint --edit`. Installed by `holocron setup` when
1202
1209
  * hooks are enabled. Same `__HOLOCRON_SCRIPT__` substitution as `pre-push`.
1203
1210
  *
1204
1211
  * @param holocronScript - the command that invokes the CLI. Defaults to
@@ -1215,12 +1222,19 @@ interface DependabotConfigOptions {
1215
1222
  * only honours an `ignore` entry that lists `versions`.
1216
1223
  */
1217
1224
  ignore?: readonly string[];
1225
+ /**
1226
+ * Directories, besides `.github/workflows` (`/`), whose workflow and action files the github-actions ecosystem
1227
+ * watches: the sources a repo generates its workflows from. Dependabot does not bump those otherwise, so
1228
+ * `probe generated check` fails on the difference. Globs are allowed.
1229
+ */
1230
+ sources?: readonly string[];
1218
1231
  }
1219
1232
  /**
1220
1233
  * The content of `.github/dependabot.yml`, with its generated-file header. Names in `ignore` get a name-only
1221
- * `ignore` entry on the npm ecosystem; with none, the file is the shared body unchanged.
1234
+ * `ignore` entry on the npm ecosystem, and `sources` are watched next to `/` (`.github/workflows`) by the
1235
+ * github-actions one; with neither, the file is the shared body unchanged.
1222
1236
  */
1223
- declare function createConfig$2({ ignore }?: DependabotConfigOptions): string;
1237
+ declare function createConfig$2({ ignore, sources }?: DependabotConfigOptions): string;
1224
1238
  /** The `devmoji.config.cjs` body, which defers to `@theholocron/devmoji-config`. */
1225
1239
  declare function createConfig$3(): string;
1226
1240
  /** The `.editorconfig` body, under the auto-generated header. */
@@ -1241,7 +1255,7 @@ declare function createConfig$5(): string;
1241
1255
  declare function createConfig$6(): string;
1242
1256
  /**
1243
1257
  * `.husky/pre-commit` — runs GitLeaks (scoped to staged changes) and
1244
- * lint-staged before every commit. Installed by `holocron repo setup` when hooks
1258
+ * lint-staged before every commit. Installed by `holocron setup` when hooks
1245
1259
  * are enabled (default for `protection: "strict"`). `git commit --no-verify`
1246
1260
  * bypasses it.
1247
1261
  *
@@ -1254,7 +1268,7 @@ declare function createConfig$6(): string;
1254
1268
  declare function createConfig$7(): string;
1255
1269
  /**
1256
1270
  * `.husky/pre-push` — runs `holocron run ci` (the merge-gating checks, in CI order)
1257
- * before every push. Installed by `holocron repo setup` when hooks are enabled
1271
+ * before every push. Installed by `holocron setup` when hooks are enabled
1258
1272
  * (default for `protection: "strict"`). `git push --no-verify` bypasses it.
1259
1273
  *
1260
1274
  * @param holocronScript - the command that invokes the CLI. Defaults to