@theholocron/astromech 5.0.0-alpha.60 → 5.0.0-alpha.601
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 +236 -81
- package/dist/config/index.d.mts +55 -12
- package/dist/config/index.mjs +15 -23
- package/dist/editorconfig-checker-BKNGE7U2.mjs +27 -0
- package/dist/index.d.mts +1454 -512
- package/dist/index.mjs +4330 -1426
- package/dist/lint/index.d.mts +97 -0
- package/dist/lint/index.mjs +160 -0
- package/dist/load-p1cNGQsb.mjs +554 -0
- package/dist/repo-validation/index.d.mts +300 -0
- package/dist/repo-validation/index.mjs +577 -0
- package/dist/schema.type-MUEwDLrg.d.mts +132 -0
- package/dist/upgrade/index.d.mts +126 -0
- package/dist/upgrade/index.mjs +283 -0
- package/package.json +48 -22
- package/dist/schema-Cf5dfaDO.mjs +0 -11
- package/dist/schema-D01VYg43.d.mts +0 -77
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
//#region src/config/schema.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The `tasks` config shape — the single manifest of what a repo runs.
|
|
4
|
-
* Read from a dedicated `astromech.config.*` file or the `tasks` key of
|
|
5
|
-
* `holocron.config.*` (see {@link loadTasksConfig}).
|
|
6
|
-
*
|
|
7
|
-
* Runtime validation is the loader's job, not this type's — the type only
|
|
8
|
-
* describes what an author writes.
|
|
9
|
-
*/
|
|
10
|
-
interface TaskEntry {
|
|
11
|
-
/** Registry task name — `verification.unitTests`, `sourceQuality.staticAnalysis`, `delivery.build`, … */
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* Emit a `.github/workflows/<name>.yml` thin caller and include the task
|
|
15
|
-
* in `holocron ci`. Default `true`.
|
|
16
|
-
*/
|
|
17
|
-
ci?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Write a `"<name>": "holocron run <name>"` script to `package.json` and
|
|
20
|
-
* let `holocron run <name>` resolve the task. Default `true`.
|
|
21
|
-
* `false` → `holocron run <name>` prints "CI-only task" and exits 0.
|
|
22
|
-
*/
|
|
23
|
-
local?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The task's CI check context (from `WORKFLOW_CHECK_CONTEXTS`) is a
|
|
26
|
-
* required status check in branch protection (`astromech.requiredChecks()`)
|
|
27
|
-
* and part of `holocron ci`'s default run.
|
|
28
|
-
*/
|
|
29
|
-
required?: boolean;
|
|
30
|
-
/** Per-repo overrides on the same channel the reusable workflow reads. */
|
|
31
|
-
with?: Record<string, unknown>;
|
|
32
|
-
/** Extra `on.push.paths` entries for the generated CI workflow. */
|
|
33
|
-
paths?: string[];
|
|
34
|
-
/**
|
|
35
|
-
* Per-repo additions to this task's generated `turbo.json` entry — a
|
|
36
|
-
* separate channel from `with:` (that's the reusable *workflow's* inputs;
|
|
37
|
-
* this is local turbo cache config, unrelated). No-op for a task with no
|
|
38
|
-
* {@link TurboTaskConfig} in the registry (nothing to add to).
|
|
39
|
-
*/
|
|
40
|
-
turbo?: {
|
|
41
|
-
/** Extra env vars turbo hashes into this task's cache key, appended to the registry default (empty when the task has none). */
|
|
42
|
-
passThroughEnv?: string[];
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/** A task is either its bare name (all defaults) or an entry object. */
|
|
46
|
-
type TaskConfigItem = string | TaskEntry;
|
|
47
|
-
interface TasksConfig {
|
|
48
|
-
/** The manifest. */
|
|
49
|
-
tasks?: TaskConfigItem[];
|
|
50
|
-
/** Opt out of the `package.json` script writes. Default `true`. */
|
|
51
|
-
syncScripts?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* The command the synced `"holocron"` `package.json` script runs. Default
|
|
54
|
-
* `"holocron"` (the installed bin). The source repo overrides it to run
|
|
55
|
-
* its own build, e.g. `"node packages/cli/dist/cli.mjs"`.
|
|
56
|
-
*/
|
|
57
|
-
holocronScript?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Required status-check contexts not backed by a task — codecov gates,
|
|
60
|
-
* a bundle-build check, … Appended to `astromech.requiredChecks()` after the
|
|
61
|
-
* `required`-task contexts. (`DCO` is prepended by `holocron setup` itself.)
|
|
62
|
-
*/
|
|
63
|
-
extraRequiredChecks?: string[];
|
|
64
|
-
/**
|
|
65
|
-
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
66
|
-
* `.husky/pre-push` (runs `holocron ci`); `false` / `{ prePush: false }`
|
|
67
|
-
* opts out. Omitted → on for `protection: "strict"` repos, off otherwise.
|
|
68
|
-
* When enabled, `packageScripts()` also emits `prepare: "husky"`.
|
|
69
|
-
*/
|
|
70
|
-
hooks?: boolean | {
|
|
71
|
-
prePush?: boolean;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
/** Normalise a `TaskConfigItem` to a full {@link TaskEntry} with defaults applied. */
|
|
75
|
-
declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
|
|
76
|
-
//#endregion
|
|
77
|
-
export { normalizeTaskEntry as i, TaskEntry as n, TasksConfig as r, TaskConfigItem as t };
|