@theholocron/astromech 5.0.0-alpha.246 → 5.0.0-alpha.247
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/dist/config/index.d.mts +6 -16
- package/dist/config/index.mjs +4 -6
- package/dist/{editorconfig-checker-DPejtR5z.mjs → editorconfig-checker-HPpphHhI.mjs} +2 -4
- package/dist/index.d.mts +40 -126
- package/dist/index.mjs +130 -257
- package/dist/lint/index.d.mts +8 -26
- package/dist/lint/index.mjs +8 -15
- package/dist/{load-Bk9SYAfX.mjs → load-C1uY2yBv.mjs} +2 -4
- package/dist/release/index.d.mts +13 -33
- package/dist/release/index.mjs +7 -13
- package/dist/{schema-Djtv0sLM.mjs → schema-CalPyBNd.mjs} +1 -2
- package/dist/{schema.type-eVRlTGL1.d.mts → schema.type-B28guVbH.d.mts} +0 -2
- package/package.json +5 -5
package/dist/config/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-
|
|
1
|
+
import { n as TaskEntry, r as TasksConfig, t as TaskConfigItem } from "../schema.type-B28guVbH.mjs";
|
|
2
2
|
import { Loaded } from "@theholocron/datapad";
|
|
3
|
-
//#region src/config/schema/schema.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The `tasks` config shape — the single manifest of what a repo runs.
|
|
6
5
|
* Read from a dedicated `astromech.config.*` file or the `tasks` key of
|
|
@@ -10,9 +9,7 @@ import { Loaded } from "@theholocron/datapad";
|
|
|
10
9
|
* describes what an author writes.
|
|
11
10
|
*/
|
|
12
11
|
/** Normalise a `TaskConfigItem` to a full {@link TaskEntry} with defaults applied. */
|
|
13
|
-
declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/config/define/define.d.ts
|
|
12
|
+
export declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEntry, "name" | "ci" | "local">> & TaskEntry;
|
|
16
13
|
/**
|
|
17
14
|
* Typed identity helper for `astromech.config.ts`:
|
|
18
15
|
*
|
|
@@ -24,9 +21,7 @@ declare function normalizeTaskEntry(item: TaskConfigItem): Required<Pick<TaskEnt
|
|
|
24
21
|
* });
|
|
25
22
|
* ```
|
|
26
23
|
*/
|
|
27
|
-
declare const defineConfig: <C extends TasksConfig>(config: C) => C;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/config/load/load.type.d.ts
|
|
24
|
+
export declare const defineConfig: <C extends TasksConfig>(config: C) => C;
|
|
30
25
|
/**
|
|
31
26
|
* The `tasks` value in each source. A dedicated `astromech.config.*`
|
|
32
27
|
* default-exports the full {@link TasksConfig} object; the `tasks` key of
|
|
@@ -42,8 +37,6 @@ interface LoadTasksConfigOptions {
|
|
|
42
37
|
*/
|
|
43
38
|
holocron?: Loaded<object> | null;
|
|
44
39
|
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/config/load/load.d.ts
|
|
47
40
|
/**
|
|
48
41
|
* Resolve the task manifest for a repo: the `tasks` key of
|
|
49
42
|
* `holocron.config.*`, then a dedicated `astromech.config.*` merged on
|
|
@@ -57,9 +50,7 @@ interface LoadTasksConfigOptions {
|
|
|
57
50
|
* A caller that has already loaded `holocron.config.*` passes it as
|
|
58
51
|
* `options.holocron` so it is not found and loaded again.
|
|
59
52
|
*/
|
|
60
|
-
declare function loadTasksConfig(cwd: string, options?: LoadTasksConfigOptions): Promise<TasksConfig>;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/config/merge-tasks-layers/merge-tasks-layers.d.ts
|
|
53
|
+
export declare function loadTasksConfig(cwd: string, options?: LoadTasksConfigOptions): Promise<TasksConfig>;
|
|
63
54
|
/**
|
|
64
55
|
* The same layering as {@link loadTasksConfig}, for callers that load the two
|
|
65
56
|
* sources some other way (Sentinel reads them from the GitHub API, not
|
|
@@ -67,6 +58,5 @@ declare function loadTasksConfig(cwd: string, options?: LoadTasksConfigOptions):
|
|
|
67
58
|
* then a dedicated `astromech.config.*`'s default export merged on top.
|
|
68
59
|
* Either may be `undefined` (source absent); returns `{}` when both are.
|
|
69
60
|
*/
|
|
70
|
-
declare function mergeTasksLayers(parentTasks: TasksInput | undefined, dedicated: TasksInput | undefined): TasksConfig;
|
|
71
|
-
|
|
72
|
-
export { type TaskConfigItem, type TaskEntry, type TasksConfig, defineConfig, loadTasksConfig, mergeTasksLayers, normalizeTaskEntry };
|
|
61
|
+
export declare function mergeTasksLayers(parentTasks: TasksInput | undefined, dedicated: TasksInput | undefined): TasksConfig;
|
|
62
|
+
export type { TaskConfigItem, TaskEntry, TasksConfig };
|
package/dist/config/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as normalizeTaskEntry } from "../schema-
|
|
2
|
-
import { n as coerceTasks, t as loadTasksConfig } from "../load-
|
|
1
|
+
import { t as normalizeTaskEntry } from "../schema-CalPyBNd.mjs";
|
|
2
|
+
import { n as coerceTasks, t as loadTasksConfig } from "../load-C1uY2yBv.mjs";
|
|
3
3
|
import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
|
|
4
|
-
|
|
4
|
+
// src/config/define/define.ts
|
|
5
5
|
/**
|
|
6
6
|
* Typed identity helper for `astromech.config.ts`:
|
|
7
7
|
*
|
|
@@ -14,8 +14,7 @@ import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
|
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
const defineConfig = createDefineConfig();
|
|
17
|
-
|
|
18
|
-
//#region src/config/merge-tasks-layers/merge-tasks-layers.ts
|
|
17
|
+
// src/config/merge-tasks-layers/merge-tasks-layers.ts
|
|
19
18
|
/**
|
|
20
19
|
* The same layering as {@link loadTasksConfig}, for callers that load the two
|
|
21
20
|
* sources some other way (Sentinel reads them from the GitHub API, not
|
|
@@ -26,5 +25,4 @@ const defineConfig = createDefineConfig();
|
|
|
26
25
|
function mergeTasksLayers(parentTasks, dedicated) {
|
|
27
26
|
return mergeLayers([coerceTasks(parentTasks), coerceTasks(dedicated)]) ?? {};
|
|
28
27
|
}
|
|
29
|
-
//#endregion
|
|
30
28
|
export { defineConfig, loadTasksConfig, mergeTasksLayers, normalizeTaskEntry };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/templates/configs/alexjs/alexrc.json
|
|
2
2
|
var alexrc_default = { allow: [
|
|
3
3
|
"dead",
|
|
4
4
|
"execute",
|
|
@@ -11,8 +11,7 @@ var alexrc_default = { allow: [
|
|
|
11
11
|
"husky",
|
|
12
12
|
"period"
|
|
13
13
|
] };
|
|
14
|
-
|
|
15
|
-
//#region src/templates/configs/editorconfig-checker/editorconfig-checker.json
|
|
14
|
+
// src/templates/configs/editorconfig-checker/editorconfig-checker.json
|
|
16
15
|
var editorconfig_checker_default = {
|
|
17
16
|
Verbose: false,
|
|
18
17
|
Format: "",
|
|
@@ -37,5 +36,4 @@ var editorconfig_checker_default = {
|
|
|
37
36
|
"MaxLineLength": false
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
|
-
//#endregion
|
|
41
39
|
export { alexrc_default as n, editorconfig_checker_default as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as TasksConfig } from "./schema.type-
|
|
1
|
+
import { r as TasksConfig } from "./schema.type-B28guVbH.mjs";
|
|
2
2
|
import { ListWorkspacePackagesOptions, WorkspacePackageEntry } from "@theholocron/pkg-utils";
|
|
3
|
-
//#region src/generators/codecov/codecov.type.d.ts
|
|
4
3
|
interface WorkspacePackage$1 {
|
|
5
4
|
slug: string;
|
|
6
5
|
name: string;
|
|
@@ -12,9 +11,7 @@ interface WorkspacePackage$1 {
|
|
|
12
11
|
*/
|
|
13
12
|
path?: string;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
//#region src/generators/codecov/codecov.d.ts
|
|
17
|
-
declare function codecovComponentBlock(packages: WorkspacePackage$1[]): string;
|
|
14
|
+
export declare function codecovComponentBlock(packages: WorkspacePackage$1[]): string;
|
|
18
15
|
/**
|
|
19
16
|
* Ensure every codecov status default carries `if_not_found: success`, so an
|
|
20
17
|
* infra-only PR (dep bump, config, lockfile — no coverable change) passes
|
|
@@ -25,8 +22,8 @@ declare function codecovComponentBlock(packages: WorkspacePackage$1[]): string;
|
|
|
25
22
|
* or ≥ 8 for a `- type:` list entry), when the immediate sibling lines do not
|
|
26
23
|
* already declare it.
|
|
27
24
|
*/
|
|
28
|
-
declare function ensureIfNotFound(yaml: string): string;
|
|
29
|
-
declare function mergeCodecovComponents(existing: string, packages: WorkspacePackage$1[]): string;
|
|
25
|
+
export declare function ensureIfNotFound(yaml: string): string;
|
|
26
|
+
export declare function mergeCodecovComponents(existing: string, packages: WorkspacePackage$1[]): string;
|
|
30
27
|
/**
|
|
31
28
|
* Every package the repo's `pnpm-workspace.yaml` declares (the default roots
|
|
32
29
|
* when it declares none), sorted by slug -- the folder name. Every one needs a
|
|
@@ -36,17 +33,15 @@ declare function mergeCodecovComponents(existing: string, packages: WorkspacePac
|
|
|
36
33
|
* `path`. Two packages with the same folder name are told apart by their full
|
|
37
34
|
* path (`docs-theme`). `[]` when there are none.
|
|
38
35
|
*/
|
|
39
|
-
declare function readWorkspacePackages(repoRoot: string): WorkspacePackage$1[];
|
|
36
|
+
export declare function readWorkspacePackages(repoRoot: string): WorkspacePackage$1[];
|
|
40
37
|
/** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
|
|
41
|
-
declare function createCodecovConfig(packages: WorkspacePackage$1[]): string;
|
|
38
|
+
export declare function createCodecovConfig(packages: WorkspacePackage$1[]): string;
|
|
42
39
|
/**
|
|
43
40
|
* The full pipeline `holocron repo setup` needs: read this repo's public
|
|
44
41
|
* `packages/*`, then either merge them into an `existing` `codecov.yml` or
|
|
45
42
|
* scaffold a new one.
|
|
46
43
|
*/
|
|
47
|
-
declare function codecovConfig(repoRoot: string, existing: string | null): string;
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/generators/github-action-reusable-workflows/github-action-reusable-workflows.d.ts
|
|
44
|
+
export declare function codecovConfig(repoRoot: string, existing: string | null): string;
|
|
50
45
|
/**
|
|
51
46
|
* The **reusable** GitHub Actions surface pushed to `theholocron/.github` by
|
|
52
47
|
* `holocron sync github` — the `workflow_call` implementations and composite
|
|
@@ -61,19 +56,17 @@ declare function codecovConfig(repoRoot: string, existing: string | null): strin
|
|
|
61
56
|
* the *thin-caller bases* written into each consumer repo's `.github/workflows/`.
|
|
62
57
|
*/
|
|
63
58
|
/** `workflow_call` implementations → `.github/workflows/<name>.yml`. */
|
|
64
|
-
declare const REUSABLE_WORKFLOWS: Record<string, string>;
|
|
59
|
+
export declare const REUSABLE_WORKFLOWS: Record<string, string>;
|
|
65
60
|
/** Composite actions → `.github/actions/<name>/action.yml` (key includes `/action`). */
|
|
66
|
-
declare const REUSABLE_ACTIONS: Record<string, string>;
|
|
61
|
+
export declare const REUSABLE_ACTIONS: Record<string, string>;
|
|
67
62
|
/** GitHub starter-workflow metadata → `workflow-templates/<name>.properties.json`. */
|
|
68
|
-
declare const WORKFLOW_TEMPLATE_PROPERTIES: Record<string, string>;
|
|
63
|
+
export declare const WORKFLOW_TEMPLATE_PROPERTIES: Record<string, string>;
|
|
69
64
|
/**
|
|
70
65
|
* The complete file batch `holocron sync github` pushes to `theholocron/.github`:
|
|
71
66
|
* path → content. YAML gets the "do not edit" header; the starter-workflow
|
|
72
67
|
* `.properties.json` files are left bare (native JSON, not a commented file).
|
|
73
68
|
*/
|
|
74
|
-
declare function reusableTemplates(): Map<string, string>;
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/generators/github-action-thin-callers/github-action-thin-callers.type.d.ts
|
|
69
|
+
export declare function reusableTemplates(): Map<string, string>;
|
|
77
70
|
interface PreviewConfig {
|
|
78
71
|
/** Cloudflare Pages project name shared across all repos for previews. */
|
|
79
72
|
project: string;
|
|
@@ -96,10 +89,8 @@ interface OrgContext {
|
|
|
96
89
|
/** Project name — injected as the `name` input to the deploy reusable when `docs: true`. */
|
|
97
90
|
repoName?: string;
|
|
98
91
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
declare const WORKFLOW_TEMPLATES: Record<string, string>;
|
|
102
|
-
declare const KNOWN_WORKFLOWS: Set<string>;
|
|
92
|
+
export declare const WORKFLOW_TEMPLATES: Record<string, string>;
|
|
93
|
+
export declare const KNOWN_WORKFLOWS: Set<string>;
|
|
103
94
|
/**
|
|
104
95
|
* The GitHub status-check context a `required` task contributes to branch
|
|
105
96
|
* protection. Format: `"{workflow name} / {job name}"`.
|
|
@@ -116,7 +107,7 @@ declare const KNOWN_WORKFLOWS: Set<string>;
|
|
|
116
107
|
* merge-gating workflows are listed. `astromech.requiredChecks()` reads this
|
|
117
108
|
* for every `required` task.
|
|
118
109
|
*/
|
|
119
|
-
declare const WORKFLOW_CHECK_CONTEXTS: Partial<Record<string, string>>;
|
|
110
|
+
export declare const WORKFLOW_CHECK_CONTEXTS: Partial<Record<string, string>>;
|
|
120
111
|
/**
|
|
121
112
|
* Generate the thin caller content for a workflow, optionally injecting or
|
|
122
113
|
* merging `with:` overrides into the jobs block.
|
|
@@ -130,7 +121,7 @@ declare const WORKFLOW_CHECK_CONTEXTS: Partial<Record<string, string>>;
|
|
|
130
121
|
* If neither pattern matches the template, a warning is emitted and the
|
|
131
122
|
* base template is returned unchanged.
|
|
132
123
|
*/
|
|
133
|
-
declare function generateThinCallerContent(name: string, withOverrides?: Record<string, unknown>, additionalPaths?: string[],
|
|
124
|
+
export declare function generateThinCallerContent(name: string, withOverrides?: Record<string, unknown>, additionalPaths?: string[],
|
|
134
125
|
/** Optional sink for the "could not inject `with:`" warning. */
|
|
135
126
|
logger?: {
|
|
136
127
|
warn(obj: Record<string, unknown>, msg: string): void;
|
|
@@ -151,7 +142,7 @@ comments?: Record<string, string>): string;
|
|
|
151
142
|
*
|
|
152
143
|
* Returns null when `preview:` is absent, false, or can't be resolved.
|
|
153
144
|
*/
|
|
154
|
-
declare function extractPreviewConfig(raw: Record<string, unknown>, ctx?: OrgContext): PreviewConfig | null;
|
|
145
|
+
export declare function extractPreviewConfig(raw: Record<string, unknown>, ctx?: OrgContext): PreviewConfig | null;
|
|
155
146
|
/**
|
|
156
147
|
* Generate the full thin-caller YAML for a `deploy.yml` that handles both
|
|
157
148
|
* production (push to main → GitHub Pages) and preview (pull_request →
|
|
@@ -162,7 +153,7 @@ declare function extractPreviewConfig(raw: Record<string, unknown>, ctx?: OrgCon
|
|
|
162
153
|
* falls back to the `CLOUDFLARE_PAGES_PROJECT` org variable — set that once and
|
|
163
154
|
* all repos with a `deploy` workflow get previews without per-repo config.
|
|
164
155
|
*/
|
|
165
|
-
declare function generateCombinedDeployContent(deployWith: Record<string, unknown>, paths: string[], preview: Pick<PreviewConfig, "project">): string;
|
|
156
|
+
export declare function generateCombinedDeployContent(deployWith: Record<string, unknown>, paths: string[], preview: Pick<PreviewConfig, "project">): string;
|
|
166
157
|
/**
|
|
167
158
|
* Expand structured with-values to flat GitHub Actions inputs before
|
|
168
159
|
* generating the thin caller. Handles:
|
|
@@ -173,18 +164,14 @@ declare function generateCombinedDeployContent(deployWith: Record<string, unknow
|
|
|
173
164
|
*
|
|
174
165
|
* Used by both `holocron repo setup` and `sync-workflow-templates`.
|
|
175
166
|
*/
|
|
176
|
-
declare function normalizeWorkflowWith(raw: Record<string, unknown>): Record<string, unknown>;
|
|
167
|
+
export declare function normalizeWorkflowWith(raw: Record<string, unknown>): Record<string, unknown>;
|
|
177
168
|
/**
|
|
178
169
|
* Derive on.push.paths entries from the deploy with: shorthand.
|
|
179
170
|
* Used by both `holocron repo setup` and `sync-workflow-templates`.
|
|
180
171
|
*/
|
|
181
|
-
declare function deriveDeployPaths(raw: Record<string, unknown>): string[];
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region src/generators/required-checks/required-checks.d.ts
|
|
172
|
+
export declare function deriveDeployPaths(raw: Record<string, unknown>): string[];
|
|
184
173
|
/** Ordered (task contexts in {@link CI_ORDER}, then extras), de-duplicated. */
|
|
185
|
-
declare function requiredChecks(config: TasksConfig): string[];
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region src/generators/tsconfig/tsconfig.type.d.ts
|
|
174
|
+
export declare function requiredChecks(config: TasksConfig): string[];
|
|
188
175
|
interface TsconfigOptions {
|
|
189
176
|
/** Human-readable name for the `display` field — the package's own name is the usual choice. */
|
|
190
177
|
display: string;
|
|
@@ -201,8 +188,6 @@ interface TsconfigOptions {
|
|
|
201
188
|
*/
|
|
202
189
|
paths?: boolean;
|
|
203
190
|
}
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/generators/tsconfig/tsconfig.d.ts
|
|
206
191
|
/**
|
|
207
192
|
* A package-level `tsconfig.json` — the uniform shape confirmed across
|
|
208
193
|
* every package checked, parameterized only by the two fields that
|
|
@@ -212,9 +197,7 @@ interface TsconfigOptions {
|
|
|
212
197
|
* for JSONC comments in `tsconfig.json` isn't worth relying on for a file
|
|
213
198
|
* this thin).
|
|
214
199
|
*/
|
|
215
|
-
declare function createTsconfig(options: TsconfigOptions): string;
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region src/generators/turbo/turbo.type.d.ts
|
|
200
|
+
export declare function createTsconfig(options: TsconfigOptions): string;
|
|
218
201
|
interface EnsureRootWorkspaceMemberResult {
|
|
219
202
|
content: string;
|
|
220
203
|
changed: boolean;
|
|
@@ -223,8 +206,6 @@ interface EnsureTurboDependencyResult {
|
|
|
223
206
|
content: string;
|
|
224
207
|
changed: boolean;
|
|
225
208
|
}
|
|
226
|
-
//#endregion
|
|
227
|
-
//#region src/tasks/run/run.type.d.ts
|
|
228
209
|
/** Minimal structural logger — `@theholocron/observability`'s `Logger` satisfies it. */
|
|
229
210
|
interface RunLogger {
|
|
230
211
|
debug(obj: Record<string, unknown>, msg?: string): void;
|
|
@@ -276,11 +257,7 @@ interface RunTaskReport {
|
|
|
276
257
|
command?: string;
|
|
277
258
|
message?: string;
|
|
278
259
|
}
|
|
279
|
-
|
|
280
|
-
//#region src/tasks/run/run.d.ts
|
|
281
|
-
declare function runTask(input: RunTaskInput): RunTaskReport;
|
|
282
|
-
//#endregion
|
|
283
|
-
//#region src/tasks/ci/ci.type.d.ts
|
|
260
|
+
export declare function runTask(input: RunTaskInput): RunTaskReport;
|
|
284
261
|
interface CiOptions {
|
|
285
262
|
/** Print the plan without running anything. */
|
|
286
263
|
dryRun?: boolean;
|
|
@@ -305,11 +282,7 @@ interface CiInput extends RunDeps, CiOptions {
|
|
|
305
282
|
cwd: string;
|
|
306
283
|
config: TasksConfig;
|
|
307
284
|
}
|
|
308
|
-
|
|
309
|
-
//#region src/tasks/ci/ci.d.ts
|
|
310
|
-
declare function runCi(input: CiInput): CiReport;
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region src/utils/create-header/create-header.type.d.ts
|
|
285
|
+
export declare function runCi(input: CiInput): CiReport;
|
|
313
286
|
/** Comment style produced by workflowHeader. */
|
|
314
287
|
type WorkflowHeaderFormat = "yaml" | "cjs" | "shebang";
|
|
315
288
|
interface CreateHeaderOptions {
|
|
@@ -336,8 +309,6 @@ interface HeaderFunctions {
|
|
|
336
309
|
*/
|
|
337
310
|
scaffoldHeader(): string;
|
|
338
311
|
}
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region src/utils/create-header/create-header.d.ts
|
|
341
312
|
/**
|
|
342
313
|
* Factory that binds `source` and `tool` once and returns all header
|
|
343
314
|
* constructors for auto-generated files. Prefer this over passing source
|
|
@@ -367,23 +338,15 @@ interface HeaderFunctions {
|
|
|
367
338
|
* | `"cjs"` | `/* … *\/` block | CommonJS config files (`.cjs`) |
|
|
368
339
|
* | `"shebang"` | `#!/bin/sh` + `# …` | Shell scripts (`prepare-commit-msg`, hooks) |
|
|
369
340
|
*/
|
|
370
|
-
declare function createHeader(options: CreateHeaderOptions): HeaderFunctions;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
declare const defaultListDirs: (path: string) => string[];
|
|
374
|
-
//#endregion
|
|
375
|
-
//#region src/utils/default-read-json/default-read-json.d.ts
|
|
376
|
-
declare const defaultReadJson: (path: string) => unknown;
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/utils/default-run/default-run.type.d.ts
|
|
341
|
+
export declare function createHeader(options: CreateHeaderOptions): HeaderFunctions;
|
|
342
|
+
export declare const defaultListDirs: (path: string) => string[];
|
|
343
|
+
export declare const defaultReadJson: (path: string) => unknown;
|
|
379
344
|
interface SpawnResult {
|
|
380
345
|
status: number | null;
|
|
381
346
|
stdout: string;
|
|
382
347
|
stderr: string;
|
|
383
348
|
}
|
|
384
349
|
type Run = (command: string, args: string[], options: Record<string, unknown>) => SpawnResult;
|
|
385
|
-
//#endregion
|
|
386
|
-
//#region src/tasks/deploy-on-release/workspace-packages/workspace-packages.type.d.ts
|
|
387
350
|
/** A workspace package: absolute folder, and what its `package.json` says. */
|
|
388
351
|
interface WorkspacePackage {
|
|
389
352
|
name: string;
|
|
@@ -404,16 +367,12 @@ interface Tree {
|
|
|
404
367
|
readJson: (path: string) => unknown;
|
|
405
368
|
listDirs: (path: string) => string[];
|
|
406
369
|
}
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region src/tasks/deploy-on-release/workspace-packages/workspace-packages.d.ts
|
|
409
370
|
/**
|
|
410
371
|
* Every package the repo's `pnpm-workspace.yaml` declares (`packages/*`,
|
|
411
372
|
* `apps/*` and `plugins/*` when it declares none) with a readable, named
|
|
412
373
|
* `package.json`.
|
|
413
374
|
*/
|
|
414
|
-
declare function workspacePackages(repoRoot: string, { readJson, listDirs }: Tree): WorkspacePackage[];
|
|
415
|
-
//#endregion
|
|
416
|
-
//#region src/tasks/deploy-on-release/deploy-on-release.type.d.ts
|
|
375
|
+
export declare function workspacePackages(repoRoot: string, { readJson, listDirs }: Tree): WorkspacePackage[];
|
|
417
376
|
interface DeployOnReleaseOptions {
|
|
418
377
|
cwd: string;
|
|
419
378
|
/** The release's channel: its prerelease identifier (`alpha`); empty or `main` for a stable release. */
|
|
@@ -443,16 +402,12 @@ interface DeployOnReleaseReport {
|
|
|
443
402
|
status: "ok" | "fail" | "skip";
|
|
444
403
|
results: DeployOnReleaseResult[];
|
|
445
404
|
}
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region src/tasks/deploy-on-release/deploy-on-release.d.ts
|
|
448
405
|
/**
|
|
449
406
|
* Deploys every package whose manifest declares a release-time deploy that
|
|
450
407
|
* applies to this release. Never throws for a deploy problem: each package's
|
|
451
408
|
* outcome is in the report, and `status: "fail"` is the caller's exit code.
|
|
452
409
|
*/
|
|
453
|
-
declare function deployOnRelease(options: DeployOnReleaseOptions, { run, readJson, listDirs, sleep, now, loadTasks }?: DeployOnReleaseDeps): Promise<DeployOnReleaseReport>;
|
|
454
|
-
//#endregion
|
|
455
|
-
//#region src/tasks/group/group.type.d.ts
|
|
410
|
+
export declare function deployOnRelease(options: DeployOnReleaseOptions, { run, readJson, listDirs, sleep, now, loadTasks }?: DeployOnReleaseDeps): Promise<DeployOnReleaseReport>;
|
|
456
411
|
interface GroupOptions {
|
|
457
412
|
/** Print the resolved commands without running anything. */
|
|
458
413
|
dryRun?: boolean;
|
|
@@ -476,15 +431,9 @@ interface GroupInput extends RunDeps, GroupOptions {
|
|
|
476
431
|
/** The bare namespace, e.g. `"sourceQuality"` — matched against `"sourceQuality."`-prefixed task names. */
|
|
477
432
|
namespace: string;
|
|
478
433
|
}
|
|
479
|
-
|
|
480
|
-
//#region src/tasks/group/group.d.ts
|
|
481
|
-
declare function runGroup(input: GroupInput): GroupReport;
|
|
482
|
-
//#endregion
|
|
483
|
-
//#region src/tasks/match-namespace/match-namespace.d.ts
|
|
434
|
+
export declare function runGroup(input: GroupInput): GroupReport;
|
|
484
435
|
/** Every configured task whose name starts with `"<namespace>."`, in manifest declaration order. */
|
|
485
|
-
declare function matchNamespace(config: TasksConfig, namespace: string): string[];
|
|
486
|
-
//#endregion
|
|
487
|
-
//#region src/astromech.type.d.ts
|
|
436
|
+
export declare function matchNamespace(config: TasksConfig, namespace: string): string[];
|
|
488
437
|
interface AstromechOptions {
|
|
489
438
|
/** Repo root. */
|
|
490
439
|
cwd: string;
|
|
@@ -620,11 +569,7 @@ interface Astromech {
|
|
|
620
569
|
*/
|
|
621
570
|
ensureTurboDependency(packageJson: string, workspaceYaml: string): EnsureTurboDependencyResult;
|
|
622
571
|
}
|
|
623
|
-
|
|
624
|
-
//#region src/astromech.d.ts
|
|
625
|
-
declare function createAstromech(options: AstromechOptions): Astromech;
|
|
626
|
-
//#endregion
|
|
627
|
-
//#region src/registry/registry.type.d.ts
|
|
572
|
+
export declare function createAstromech(options: AstromechOptions): Astromech;
|
|
628
573
|
/** How to run one task (or job) locally. */
|
|
629
574
|
interface LocalRunner {
|
|
630
575
|
/** Binary to invoke — resolved from `node_modules/.bin` then PATH. */
|
|
@@ -700,8 +645,6 @@ interface TaskDef {
|
|
|
700
645
|
/** Turborepo fan-out config for this task — see {@link TurboTaskConfig}. Omitted for whole-repo, non-fan-out tasks. */
|
|
701
646
|
turbo?: TurboTaskConfig;
|
|
702
647
|
}
|
|
703
|
-
//#endregion
|
|
704
|
-
//#region src/registry/registry.d.ts
|
|
705
648
|
/**
|
|
706
649
|
* The task registry — how each task runs *locally*, without GitHub
|
|
707
650
|
* Actions. `holocron run <task>` and `holocron run ci` resolve against this;
|
|
@@ -723,18 +666,16 @@ interface TaskDef {
|
|
|
723
666
|
*
|
|
724
667
|
* Spec: `docs/wiki/specifications/tech-astromech-task-runner.spec.md` (epic #581).
|
|
725
668
|
*/
|
|
726
|
-
declare const TASKS: Record<string, TaskDef>;
|
|
669
|
+
export declare const TASKS: Record<string, TaskDef>;
|
|
727
670
|
/** Every task name the registry knows. */
|
|
728
|
-
declare const KNOWN_TASKS: Set<string>;
|
|
671
|
+
export declare const KNOWN_TASKS: Set<string>;
|
|
729
672
|
/**
|
|
730
673
|
* The order `holocron run ci` runs tasks in — cheapest / fastest signal first, so
|
|
731
674
|
* an agent or a `pre-push` hook fails early. Tasks not listed here run last, in
|
|
732
675
|
* manifest order. (The generated thin callers carry no `needs:` — cross-workflow
|
|
733
676
|
* ordering lives in `theholocron/.github` — so `holocron run ci` declares its own.)
|
|
734
677
|
*/
|
|
735
|
-
declare const CI_ORDER: string[];
|
|
736
|
-
//#endregion
|
|
737
|
-
//#region src/tasks/deploy-on-release/default-paths/default-paths.d.ts
|
|
678
|
+
export declare const CI_ORDER: string[];
|
|
738
679
|
/**
|
|
739
680
|
* The paths a release must touch to redeploy `pkg` when its manifest doesn't
|
|
740
681
|
* list them: its own folder plus the folder of every
|
|
@@ -743,13 +684,9 @@ declare const CI_ORDER: string[];
|
|
|
743
684
|
*
|
|
744
685
|
* @returns Repo-relative prefixes, each ending in `/`.
|
|
745
686
|
*/
|
|
746
|
-
declare function defaultPaths(repoRoot: string, pkg: WorkspacePackage, all: WorkspacePackage[]): string[];
|
|
747
|
-
//#endregion
|
|
748
|
-
//#region src/templates/configs/alexjs/create-config.d.ts
|
|
687
|
+
export declare function defaultPaths(repoRoot: string, pkg: WorkspacePackage, all: WorkspacePackage[]): string[];
|
|
749
688
|
declare function createRcConfig(): string;
|
|
750
689
|
declare function createIgnoreConfig(): string;
|
|
751
|
-
//#endregion
|
|
752
|
-
//#region src/templates/configs/commit-msg/create-config.d.ts
|
|
753
690
|
/**
|
|
754
691
|
* `.husky/commit-msg` — lints the commit message via `holocron run lint
|
|
755
692
|
* commit-msg` (holocron#789), the real programmatic replacement for
|
|
@@ -760,17 +697,9 @@ declare function createIgnoreConfig(): string;
|
|
|
760
697
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
761
698
|
*/
|
|
762
699
|
declare function createConfig(holocronScript?: string): string;
|
|
763
|
-
//#endregion
|
|
764
|
-
//#region src/templates/configs/dependabot/create-config.d.ts
|
|
765
700
|
declare function createConfig$1(): string;
|
|
766
|
-
//#endregion
|
|
767
|
-
//#region src/templates/configs/devmoji/create-config.d.ts
|
|
768
701
|
declare function createConfig$2(): string;
|
|
769
|
-
//#endregion
|
|
770
|
-
//#region src/templates/configs/editorconfig/create-config.d.ts
|
|
771
702
|
declare function createConfig$3(): string;
|
|
772
|
-
//#endregion
|
|
773
|
-
//#region src/templates/configs/editorconfig-checker/create-config.d.ts
|
|
774
703
|
/**
|
|
775
704
|
* The generated `.editorconfig-checker.json`.
|
|
776
705
|
*
|
|
@@ -783,11 +712,7 @@ declare function createConfig$3(): string;
|
|
|
783
712
|
* buys nothing.
|
|
784
713
|
*/
|
|
785
714
|
declare function createConfig$4(): string;
|
|
786
|
-
//#endregion
|
|
787
|
-
//#region src/templates/configs/labeler/create-config.d.ts
|
|
788
715
|
declare function createConfig$5(): string;
|
|
789
|
-
//#endregion
|
|
790
|
-
//#region src/templates/configs/pre-commit/create-config.d.ts
|
|
791
716
|
/**
|
|
792
717
|
* `.husky/pre-commit` — runs GitLeaks (scoped to staged changes) and
|
|
793
718
|
* lint-staged before every commit. Installed by `holocron repo setup` when hooks
|
|
@@ -801,8 +726,6 @@ declare function createConfig$5(): string;
|
|
|
801
726
|
* actually staged.
|
|
802
727
|
*/
|
|
803
728
|
declare function createConfig$6(): string;
|
|
804
|
-
//#endregion
|
|
805
|
-
//#region src/templates/configs/pre-push/create-config.d.ts
|
|
806
729
|
/**
|
|
807
730
|
* `.husky/pre-push` — runs `holocron run ci` (the merge-gating checks, in CI order)
|
|
808
731
|
* before every push. Installed by `holocron repo setup` when hooks are enabled
|
|
@@ -812,15 +735,9 @@ declare function createConfig$6(): string;
|
|
|
812
735
|
* `pnpm exec holocron`; the source repo passes `node cli/cli/dist/cli.mjs`.
|
|
813
736
|
*/
|
|
814
737
|
declare function createConfig$7(holocronScript?: string): string;
|
|
815
|
-
//#endregion
|
|
816
|
-
//#region src/templates/configs/prepare-commit-msg/create-config.d.ts
|
|
817
738
|
declare function createConfig$8(): string;
|
|
818
|
-
//#endregion
|
|
819
|
-
//#region src/templates/configs/yamllint/create-config.d.ts
|
|
820
739
|
declare function createConfig$9(): string;
|
|
821
740
|
declare function createIgnoreConfig$1(): string;
|
|
822
|
-
//#endregion
|
|
823
|
-
//#region src/workspace/workspace-globs.d.ts
|
|
824
741
|
/** The `packages:` entries of a `pnpm-workspace.yaml`, split by whether they include or exclude (`!pattern`) packages. */
|
|
825
742
|
interface WorkspaceGlobs {
|
|
826
743
|
include: string[];
|
|
@@ -835,11 +752,9 @@ interface WorkspaceGlobs {
|
|
|
835
752
|
* a missing `packages:` key, or the inline `packages: [a, b]` form, reads as no
|
|
836
753
|
* globs (callers fall back to the default roots).
|
|
837
754
|
*/
|
|
838
|
-
declare function readWorkspaceGlobs(workspaceYaml: string): WorkspaceGlobs;
|
|
839
|
-
//#endregion
|
|
840
|
-
//#region src/workspace/discover-workspace-packages.d.ts
|
|
755
|
+
export declare function readWorkspaceGlobs(workspaceYaml: string): WorkspaceGlobs;
|
|
841
756
|
/** Where packages live when there is no `pnpm-workspace.yaml` (or it lists none): the layout before globs were read. */
|
|
842
|
-
declare const DEFAULT_WORKSPACE_ROOTS: readonly string[];
|
|
757
|
+
export declare const DEFAULT_WORKSPACE_ROOTS: readonly string[];
|
|
843
758
|
interface DiscoverWorkspacePackagesOptions extends Pick<ListWorkspacePackagesOptions, "listDirs" | "readFile"> {
|
|
844
759
|
/** Replaces the read of `pnpm-workspace.yaml`. Throw (`ENOENT`) when it is absent -- or leave it out to read the real file. */
|
|
845
760
|
readText?: (path: string) => string;
|
|
@@ -873,12 +788,11 @@ interface DiscoverWorkspacePackagesOptions extends Pick<ListWorkspacePackagesOpt
|
|
|
873
788
|
* Nothing is filtered by `name`, `version` or `private`; that is the caller's
|
|
874
789
|
* call, as for `listWorkspacePackagesSync()`.
|
|
875
790
|
*/
|
|
876
|
-
declare function discoverWorkspacePackages(repoRoot: string, options?: DiscoverWorkspacePackagesOptions): WorkspacePackageEntry[];
|
|
791
|
+
export declare function discoverWorkspacePackages(repoRoot: string, options?: DiscoverWorkspacePackagesOptions): WorkspacePackageEntry[];
|
|
877
792
|
/**
|
|
878
793
|
* The globs {@link discoverWorkspacePackages} scans: the repo's
|
|
879
794
|
* `pnpm-workspace.yaml` `packages:` list, or the {@link DEFAULT_WORKSPACE_ROOTS}
|
|
880
795
|
* as `<root>/*` when there is no such file or it lists none.
|
|
881
796
|
*/
|
|
882
|
-
declare function resolveWorkspaceGlobs(repoRoot: string, options?: Pick<DiscoverWorkspacePackagesOptions, "readText">): WorkspaceGlobs;
|
|
883
|
-
|
|
884
|
-
export { type Astromech, type AstromechOptions, CI_ORDER, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, DEFAULT_WORKSPACE_ROOTS, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DiscoverWorkspacePackagesOptions, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type JobDef, KNOWN_TASKS, KNOWN_WORKFLOWS, type LocalRunner, type OrgContext, type PreviewConfig, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, TASKS, type TaskDef, type TsconfigOptions, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, type WorkflowHeaderFormat, type WorkspaceGlobs, type WorkspacePackage$1 as WorkspacePackage, codecovComponentBlock, codecovConfig, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createAstromech, createCodecovConfig, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig$1 as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, discoverWorkspacePackages, ensureIfNotFound, extractPreviewConfig, generateCombinedDeployContent, generateThinCallerContent, matchNamespace, mergeCodecovComponents, normalizeWorkflowWith, readWorkspaceGlobs, readWorkspacePackages, requiredChecks, resolveWorkspaceGlobs, reusableTemplates, runCi, runGroup, runTask, workspacePackages };
|
|
797
|
+
export declare function resolveWorkspaceGlobs(repoRoot: string, options?: Pick<DiscoverWorkspacePackagesOptions, "readText">): WorkspaceGlobs;
|
|
798
|
+
export { type Astromech, type AstromechOptions, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DiscoverWorkspacePackagesOptions, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type JobDef, type LocalRunner, type OrgContext, type PreviewConfig, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, type TaskDef, type TsconfigOptions, type WorkflowHeaderFormat, type WorkspaceGlobs, type WorkspacePackage$1 as WorkspacePackage, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createIgnoreConfig$1 as createYamlignore, createConfig$9 as createYamllint };
|