@theholocron/astromech 4.9.0 → 4.10.1

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.
@@ -1,4 +1,4 @@
1
- import { i as normalizeTaskEntry, n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema-uPSn69gZ.mjs";
1
+ import { i as normalizeTaskEntry, n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema-BegK4MsY.mjs";
2
2
  //#region src/config/define.d.ts
3
3
  /**
4
4
  * Typed identity helper for `astromech.config.ts`:
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { r as TasksConfig } from "./schema-uPSn69gZ.mjs";
1
+ import { r as TasksConfig } from "./schema-BegK4MsY.mjs";
2
2
  //#region src/run.d.ts
3
3
  /**
4
4
  * `holocron run <task> [-- <passthrough>]` — run a registry task locally.
@@ -173,7 +173,7 @@ declare const KNOWN_WORKFLOWS: Set<string>;
173
173
  * These name the **aggregate `Conclusion` job** (fan-in, `if: always()`), not
174
174
  * an individual inner job — `test` has several conditionally-run sub-jobs, so
175
175
  * `"Test / Conclusion"` is the only stable gate. Only merge-gating workflows
176
- * are listed. `astro.requiredChecks()` reads this for every `required` task.
176
+ * are listed. `astromech.requiredChecks()` reads this for every `required` task.
177
177
  */
178
178
  declare const WORKFLOW_CHECK_CONTEXTS: Partial<Record<string, string>>;
179
179
  /**
package/dist/index.mjs CHANGED
@@ -488,7 +488,7 @@ const KNOWN_WORKFLOWS = new Set(Object.keys(WORKFLOW_TEMPLATES));
488
488
  * These name the **aggregate `Conclusion` job** (fan-in, `if: always()`), not
489
489
  * an individual inner job — `test` has several conditionally-run sub-jobs, so
490
490
  * `"Test / Conclusion"` is the only stable gate. Only merge-gating workflows
491
- * are listed. `astro.requiredChecks()` reads this for every `required` task.
491
+ * are listed. `astromech.requiredChecks()` reads this for every `required` task.
492
492
  */
493
493
  const WORKFLOW_CHECK_CONTEXTS = {
494
494
  lint: "Lint / Conclusion",
@@ -718,7 +718,7 @@ function deriveDeployPaths(raw) {
718
718
  //#endregion
719
719
  //#region src/ci.ts
720
720
  /**
721
- * `holocron ci` / `astro.ci()` — run the merge-gating checks locally, in CI
721
+ * `holocron ci` / `astromech.ci()` — run the merge-gating checks locally, in CI
722
722
  * order, and exit non-zero on the first failure. The "will CI pass?" command a
723
723
  * `pre-push` hook and the agent skills point at.
724
724
  *
@@ -985,6 +985,8 @@ function createAstromech(options) {
985
985
  if (entry.local === false || !KNOWN_TASKS.has(entry.name) || TASKS[entry.name]?.local === null) continue;
986
986
  out[entry.name] = `holocron run ${entry.name}`;
987
987
  }
988
+ const hooks = options.config.hooks;
989
+ if (hooks === true || typeof hooks === "object" && hooks.prePush !== false) out.prepare = "husky";
988
990
  return out;
989
991
  },
990
992
  superLinterConfig: () => superLinterConfig({
@@ -23,7 +23,7 @@ interface TaskEntry {
23
23
  local?: boolean;
24
24
  /**
25
25
  * The task's CI check context (from `WORKFLOW_CHECK_CONTEXTS`) is a
26
- * required status check in branch protection (`astro.requiredChecks()`)
26
+ * required status check in branch protection (`astromech.requiredChecks()`)
27
27
  * and part of `holocron ci`'s default run.
28
28
  */
29
29
  required?: boolean;
@@ -53,10 +53,19 @@ interface TasksConfig {
53
53
  holocronScript?: string;
54
54
  /**
55
55
  * Required status-check contexts not backed by a task — codecov gates,
56
- * a bundle-build check, … Appended to `astro.requiredChecks()` after the
56
+ * a bundle-build check, … Appended to `astromech.requiredChecks()` after the
57
57
  * `required`-task contexts. (`DCO` is prepended by `holocron setup` itself.)
58
58
  */
59
59
  extraRequiredChecks?: string[];
60
+ /**
61
+ * Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
62
+ * `.husky/pre-push` (runs `holocron ci`); `false` / `{ prePush: false }`
63
+ * opts out. Omitted → on for `protection: "strict"` repos, off otherwise.
64
+ * When enabled, `packageScripts()` also emits `prepare: "husky"`.
65
+ */
66
+ hooks?: boolean | {
67
+ prePush?: boolean;
68
+ };
60
69
  }
61
70
  /** Normalise a `TaskConfigItem` to a full {@link TaskEntry} with defaults applied. */
62
71
  declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "4.9.0",
3
+ "version": "4.10.1",
4
4
  "description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron ci`, the CI workflows, package.json scripts, linters, and required checks.",
5
5
  "keywords": [
6
6
  "ci",
@@ -37,7 +37,7 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@theholocron/datapad": "4.9.0"
40
+ "@theholocron/datapad": "4.10.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@theholocron/eslint-config": "^8.0.0",
@@ -53,7 +53,7 @@
53
53
  "tsdown": "^0.22.14",
54
54
  "typescript": "^5.9.3",
55
55
  "vitest": "^4.1.11",
56
- "@theholocron/rollup-plugin-transform-template": "4.9.0"
56
+ "@theholocron/rollup-plugin-transform-template": "4.10.1"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"