@theholocron/astromech 5.0.0-alpha.451 → 5.0.0-alpha.453
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 +9 -15
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +41 -42
- package/dist/index.mjs +52 -282
- package/dist/{load-DZJEjuTY.mjs → load-De6a7t-D.mjs} +5 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -157,7 +157,6 @@ astromech.thinCallers(); // Map<"<name>.yml", yaml> — one per templated, ci-e
|
|
|
157
157
|
astromech.packageScripts(); // single package: { holocron: "holocron", "test:unit": "holocron run test unit --", … }; workspace: { "test:unit": "turbo run test:unit", … }
|
|
158
158
|
astromech.requiredChecks(true); // ["ci / Required checks", "DCO"] — branch-protection contexts (false: "DCO", then the per-task contexts, then extras)
|
|
159
159
|
astromech.aggregateCaller(); // the thin caller of the `ci` aggregate check, or null when nothing is required
|
|
160
|
-
astromech.codecovConfig(existing); // codecov.yml content — merges into `existing`, or scaffolds fresh when null
|
|
161
160
|
astromech.ci({ scope: "required" }); // CiReport — run the gating checks locally, in CI order
|
|
162
161
|
```
|
|
163
162
|
|
|
@@ -217,26 +216,21 @@ applies the list for `protection: "strict"` repos. Policy-free — manifest only
|
|
|
217
216
|
|
|
218
217
|
### The `ci` aggregate
|
|
219
218
|
|
|
220
|
-
`aggregateChecks(config)` derives what the reusable `ci.yml` (in `ci/workflows/`) waits on, from the same list: the
|
|
219
|
+
`aggregateChecks(config, statusContexts?)` derives what the reusable `ci.yml` (in `ci/workflows/`) waits on, from the same list: the
|
|
221
220
|
`expected` ids are the part before `/` of each required task's context and of each `extraRequiredChecks` entry that
|
|
222
|
-
is not a
|
|
223
|
-
the `codecov/`
|
|
221
|
+
is not a coverage status (the hand-written `Generated files / Check` becomes `Generated files`), and `statuses` are
|
|
222
|
+
the coverage entries. Astromech imports no provider, so a `coverage` provider's contexts (`{ name, required }[]`, from the CLI) come in as the optional `statusContexts` argument (of `aggregateChecks()`, `requiredChecks()`, `taskCheckContexts()`, and `createAstromech({ statusContexts })`): a context is a status when the provider names it, and the provider's required ones are added after `extraRequiredChecks`. Without it, a context starting with `codecov/` is a status and nothing is added, which is what runs with no provider loaded do. `aggregateCaller()` renders the `pull_request` caller, whose job `ci` calls the reusable's `Required checks` job.
|
|
224
223
|
`holocron sync` writes it only in the repo that contains the reusables. The ids are today's check names; the later
|
|
225
224
|
rename changes them here and costs no ruleset edit.
|
|
226
225
|
|
|
227
226
|
### `codecov.yml`
|
|
228
227
|
|
|
229
|
-
|
|
230
|
-
`
|
|
231
|
-
|
|
232
|
-
`
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
`individual_components` list in (preserving everything else in the file —
|
|
236
|
-
thresholds, flags, custom rules) or scaffolds a fresh file from the base
|
|
237
|
-
template. `holocron setup` writes the result via the `source` capability;
|
|
238
|
-
this method never touches the filesystem beyond reading `packages/*` and
|
|
239
|
-
`apps/*` under `cwd`.
|
|
228
|
+
Astromech no longer writes `codecov.yml`: the `coverage` provider does, through its optional `Coverage.configFiles()`
|
|
229
|
+
(`@theholocron/holocron-plugin-codecov`), and astromech imports no plugin. What stayed here is what other code reads from
|
|
230
|
+
the workspace: `readWorkspacePackages()` (every package the `pnpm-workspace.yaml` declares, sorted by location, each with
|
|
231
|
+
its `slug`, `dir` or `path`), `packageLocation()` (where one lives), `codecovFlagNames()` (one flag per package, none for
|
|
232
|
+
`docs`), `codecovUploads()` (the `uploads` input of the unit-test workflow) and `DOCUMENTATION_FLAG`. The CLI turns them
|
|
233
|
+
into the provider's input; `holocron setup` writes the result and `holocron probe generated check` compares it.
|
|
240
234
|
|
|
241
235
|
## Release-time deploys — `deployOnRelease`
|
|
242
236
|
|
package/dist/config/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-
|
|
1
|
+
import { n as coerceTasks, r as isTask, t as loadTasksConfig, u as normalizeTaskEntry } from "../load-De6a7t-D.mjs";
|
|
2
2
|
import { createDefineConfig, mergeLayers } from "@theholocron/datapad";
|
|
3
3
|
// src/config/define/define.ts
|
|
4
4
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
* lives in the zero-runtime-dep `@theholocron/astromech/config` subpath.
|
|
22
22
|
*/
|
|
23
23
|
import { r as TasksConfig } from "./schema.type-DRfLKO70.mjs";
|
|
24
|
+
/** A commit status a coverage provider reports on a pull request (names only), as `Coverage.statusContexts()` returns it. */
|
|
25
|
+
interface StatusContext {
|
|
26
|
+
/** The context GitHub shows, such as `codecov/patch`. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Whether the `ci` aggregate (and a ruleset) must see it reach `success`. */
|
|
29
|
+
required: boolean;
|
|
30
|
+
}
|
|
24
31
|
/** What the `ci` aggregate check waits on, as the two inputs of its reusable workflow. */
|
|
25
32
|
interface AggregateChecks {
|
|
26
33
|
/**
|
|
@@ -35,8 +42,12 @@ interface AggregateChecks {
|
|
|
35
42
|
* The `expected` ids and `statuses` the `ci` aggregate waits on, derived from the same list `requiredChecks()` read
|
|
36
43
|
* before the aggregate: every `required: true` task, then the `extraRequiredChecks`. `DCO` is left out because it stays
|
|
37
44
|
* its own required context. The ids are the callers' job names, which GitHub puts before the " / " of each check they post.
|
|
45
|
+
*
|
|
46
|
+
* Commit statuses go to `statuses`, polled through the status API. With `statusContexts` (what a `coverage` provider
|
|
47
|
+
* reports) a context is a status when the provider names it, and the provider's required ones are added; without it, a
|
|
48
|
+
* context is a status when it starts with `codecov/`.
|
|
38
49
|
*/
|
|
39
|
-
export declare function aggregateChecks(config: TasksConfig): AggregateChecks;
|
|
50
|
+
export declare function aggregateChecks(config: TasksConfig, statusContexts?: readonly StatusContext[]): AggregateChecks;
|
|
40
51
|
/**
|
|
41
52
|
* Where the reusable workflows and composite actions that every generated workflow calls are hosted, and at which ref.
|
|
42
53
|
* This is the only place that says so: the templates are written against the spelling in {@link TEMPLATE_HOME}, and
|
|
@@ -91,12 +102,7 @@ export declare function localizeActions(text: string, names: readonly string[],
|
|
|
91
102
|
* statuses, `required` fails the check and posts statuses that are not informational.
|
|
92
103
|
*/
|
|
93
104
|
type DocsCoverageMode = "off" | "warn" | "required";
|
|
94
|
-
/**
|
|
95
|
-
interface CodecovConfigOptions {
|
|
96
|
-
/** Adds the `documentation` flag and its statuses to `codecov.yml`. Default `off`: nothing is added. */
|
|
97
|
-
docsCoverage?: DocsCoverageMode;
|
|
98
|
-
}
|
|
99
|
-
/** A workspace package as the `codecov.yml` generator sees it: the flag and component it gets, and where it lives. */
|
|
105
|
+
/** A workspace package as the flag, upload and component lists see it: the flag and component it gets, and where it lives. */
|
|
100
106
|
interface WorkspacePackage$1 {
|
|
101
107
|
/** The package's folder name, used as its Codecov flag and component id. */
|
|
102
108
|
slug: string;
|
|
@@ -110,30 +116,23 @@ interface WorkspacePackage$1 {
|
|
|
110
116
|
*/
|
|
111
117
|
path?: string;
|
|
112
118
|
}
|
|
113
|
-
/** The
|
|
114
|
-
export declare
|
|
119
|
+
/** The Codecov flag the Docs coverage workflow uploads doc-comment coverage as (`holocron probe docs --lcov`). */
|
|
120
|
+
export declare const DOCUMENTATION_FLAG = "documentation";
|
|
121
|
+
/** Where a package lives, relative to the repo root: its `path`, else `<dir>/<slug>` (`dir` defaults to `packages`). */
|
|
122
|
+
export declare function packageLocation({ slug, dir, path }: WorkspacePackage$1): string;
|
|
115
123
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* Injects the key on the line after each `target:` that sits inside a status
|
|
121
|
-
* block (`coverage.status.*.default` or a `statuses:` list item — indent ≥ 8,
|
|
122
|
-
* or ≥ 8 for a `- type:` list entry), when the immediate sibling lines do not
|
|
123
|
-
* already declare it.
|
|
124
|
+
* One Codecov flag per workspace package (its slug, the same name as its
|
|
125
|
+
* component), in package order, without `docs`. A flag per package, not per
|
|
126
|
+
* group folder: Codecov carries a flag forward whole or not at all, so a run that
|
|
127
|
+
* tests one package of a group would otherwise drop the group's other packages.
|
|
124
128
|
*/
|
|
125
|
-
export declare function
|
|
129
|
+
export declare function codecovFlagNames(packages: WorkspacePackage$1[]): string[];
|
|
126
130
|
/**
|
|
127
131
|
* The `uploads` input of the `verification.unitTests` workflow: a JSON list of `{ flag, files }`, one per package
|
|
128
132
|
* that has a flag. `files` is where the package writes its lcov report (`<location>/coverage/lcov.info`), unless
|
|
129
133
|
* `lcovPaths` names another for that slug (a package whose test runner writes it elsewhere).
|
|
130
134
|
*/
|
|
131
135
|
export declare function codecovUploads(packages: WorkspacePackage$1[], lcovPaths?: Record<string, string>): string;
|
|
132
|
-
/**
|
|
133
|
-
* Brings an existing `codecov.yml` up to date with the workspace packages (flags, components and status rules) and the
|
|
134
|
-
* repo's `options`, keeping every hand edit.
|
|
135
|
-
*/
|
|
136
|
-
export declare function mergeCodecovComponents(existing: string, packages: WorkspacePackage$1[], options?: CodecovConfigOptions): string;
|
|
137
136
|
/**
|
|
138
137
|
* Every package the repo's `pnpm-workspace.yaml` declares (the default roots
|
|
139
138
|
* when it declares none), sorted by location, so each group folder (`cli/`, `plugins/`, ...) stays together. Every one needs a
|
|
@@ -144,14 +143,6 @@ export declare function mergeCodecovComponents(existing: string, packages: Works
|
|
|
144
143
|
* path (`docs-theme`). `[]` when there are none.
|
|
145
144
|
*/
|
|
146
145
|
export declare function readWorkspacePackages(repoRoot: string): WorkspacePackage$1[];
|
|
147
|
-
/** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
|
|
148
|
-
export declare function createCodecovConfig(packages: WorkspacePackage$1[], options?: CodecovConfigOptions): string;
|
|
149
|
-
/**
|
|
150
|
-
* The full pipeline `holocron setup` needs: read this repo's public
|
|
151
|
-
* `packages/*`, then either merge them into an `existing` `codecov.yml` or
|
|
152
|
-
* scaffold a new one.
|
|
153
|
-
*/
|
|
154
|
-
export declare function codecovConfig(repoRoot: string, existing: string | null, options?: CodecovConfigOptions): string;
|
|
155
146
|
/**
|
|
156
147
|
* The **reusable** GitHub Actions surface pushed to `theholocron/.github` by
|
|
157
148
|
* `holocron sync github` — the `workflow_call` implementations and composite
|
|
@@ -317,7 +308,7 @@ export declare function deriveDeployPaths(raw: Record<string, unknown>): string[
|
|
|
317
308
|
*/
|
|
318
309
|
export declare const AGGREGATE_CHECK = "ci / Required checks";
|
|
319
310
|
/** Ordered, de-duplicated. */
|
|
320
|
-
export declare function requiredChecks(config: TasksConfig, aggregate: boolean): string[];
|
|
311
|
+
export declare function requiredChecks(config: TasksConfig, aggregate: boolean, statusContexts?: readonly StatusContext[]): string[];
|
|
321
312
|
/** Where a `package.json` sits in the repo: the root (which holds the suite scripts) or any other package. */
|
|
322
313
|
type PackageRole = "root" | "package";
|
|
323
314
|
/** One thing wrong with a script. `warn` is a deprecated spelling accepted for a window; `fail` breaks a rule. */
|
|
@@ -766,6 +757,15 @@ interface SpawnResult {
|
|
|
766
757
|
stderr: string;
|
|
767
758
|
}
|
|
768
759
|
type Run = (command: string, args: string[], options: Record<string, unknown>) => SpawnResult;
|
|
760
|
+
/**
|
|
761
|
+
* `value` as JSON laid out the way this repo's Prettier lays out a `.json` file, so a file a generator writes is
|
|
762
|
+
* already what the formatting check expects and a re-run does not change it. Objects are always expanded, one key
|
|
763
|
+
* per line; an array of plain values stays on one line when it fits in 120 columns and goes one value per line when
|
|
764
|
+
* it does not (what Prettier does for strings). Ends in a single newline.
|
|
765
|
+
*
|
|
766
|
+
* `JSON.stringify` rules apply first: `undefined`, functions and symbols are dropped from objects.
|
|
767
|
+
*/
|
|
768
|
+
export declare function formatJson(value: unknown): string;
|
|
769
769
|
/** A workspace package: absolute folder, and what its `package.json` says. */
|
|
770
770
|
interface WorkspacePackage {
|
|
771
771
|
/** The package's `name`. */
|
|
@@ -931,6 +931,13 @@ interface AstromechOptions {
|
|
|
931
931
|
* derive the Cloudflare Pages project / domain when they are not spelt out.
|
|
932
932
|
*/
|
|
933
933
|
orgContext?: OrgContext;
|
|
934
|
+
/**
|
|
935
|
+
* The commit statuses a `coverage` provider reports (`Coverage.statusContexts()`, names only), which the CLI passes
|
|
936
|
+
* in because astromech imports no provider. {@link Astromech.requiredChecks} adds the required ones and
|
|
937
|
+
* {@link Astromech.aggregateCaller} treats them as the aggregate's `statuses`. Left out, a context starting with
|
|
938
|
+
* `codecov/` is a status and nothing is added, which is what a run with no provider loaded does.
|
|
939
|
+
*/
|
|
940
|
+
statusContexts?: readonly StatusContext[];
|
|
934
941
|
/** Structured-logging sink. Defaults to a no-op. */
|
|
935
942
|
logger?: RunLogger;
|
|
936
943
|
/** User-facing line printer. Defaults to `console.log`. */
|
|
@@ -1035,18 +1042,10 @@ interface Astromech {
|
|
|
1035
1042
|
requiredChecks(aggregate: boolean): string[];
|
|
1036
1043
|
/**
|
|
1037
1044
|
* The thin caller of the `ci` aggregate check (a `pull_request` workflow whose job `ci` calls the `Required checks` job that waits on every
|
|
1038
|
-
* `required: true` task, the hand-written checks and the
|
|
1045
|
+
* `required: true` task, the hand-written checks and the coverage statuses), or `null` when the manifest has
|
|
1039
1046
|
* nothing to wait on. Only a repo that hosts the reusable `ci.yml` writes it; the others have no `ci` yet.
|
|
1040
1047
|
*/
|
|
1041
1048
|
aggregateCaller(): string | null;
|
|
1042
|
-
/**
|
|
1043
|
-
* This repo's `codecov.yml` — component `paths` derived from the workspace packages.
|
|
1044
|
-
* Pass the current file's content (`null` if none exists yet) to either
|
|
1045
|
-
* merge the component list in or scaffold a fresh file. Policy-free same
|
|
1046
|
-
* as {@link requiredChecks} — `holocron setup` owns writing the result.
|
|
1047
|
-
* `options.docsCoverage` adds the `documentation` flag and its statuses.
|
|
1048
|
-
*/
|
|
1049
|
-
codecovConfig(existing: string | null, options?: CodecovConfigOptions): string;
|
|
1050
1049
|
/**
|
|
1051
1050
|
* The generated `turbo.json` for this repo's manifest, pretty-printed —
|
|
1052
1051
|
* write directly, no merge. In a pnpm workspace it also holds the suite aggregator tasks and a `//#<id>` root task
|
|
@@ -1303,4 +1302,4 @@ declare function createConfig$9(): string;
|
|
|
1303
1302
|
declare function createConfig$10(): string;
|
|
1304
1303
|
/** The `.yamlignore` body. */
|
|
1305
1304
|
declare function createIgnoreConfig$1(): string;
|
|
1306
|
-
export { type AggregateChecks, type Astromech, type AstromechOptions, type CiJobReport, type CiOptions, type CiReport, type
|
|
1305
|
+
export { type AggregateChecks, type Astromech, type AstromechOptions, type CiJobReport, type CiOptions, type CiReport, type CreateHeaderOptions, type DependabotConfigOptions, type DeployOnReleaseOptions, type DeployOnReleaseReport, type DeployOnReleaseResult, type WorkspacePackage as DeployWorkspacePackage, type DocsCoverageMode, type ExecFn, type GroupJobReport, type GroupOptions, type GroupReport, type HeaderFunctions, type LegacyTarget, type LocalRunner, type MergedScripts, type OrgContext, type PackageRole, type PackageScriptProblem, type PlannedKind, type PlannedTask, type PreviewConfig, type RepoShape, type RunLogger, type RunOptions, type RunTaskInput, type RunTaskReport, type StatusContext, type TaskDef, type TaskGroup, type TaskScope, type TsconfigOptions, type WorkflowHeaderFormat, type WorkspacePackage$1 as WorkspacePackage, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createConfig as createCommitMsg, createConfig$1 as createDco, createConfig$2 as createDependabot, createConfig$3 as createDevmoji, createConfig$4 as createEditorconfig, createConfig$5 as createEditorconfigChecker, createConfig$6 as createLabeler, createConfig$7 as createPreCommit, createConfig$8 as createPrePush, createConfig$9 as createPrepareCommitMsg, createIgnoreConfig$1 as createYamlignore, createConfig$10 as createYamllint };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-
|
|
1
|
+
import { a as legacyName, c as CI_ORDER, i as resolveTaskName, l as TASKS, o as ownLegacyName, r as isTask, s as LEGACY_NAMES, t as loadTasksConfig, u as normalizeTaskEntry } from "./load-De6a7t-D.mjs";
|
|
2
2
|
import { n as alexrc_default, t as editorconfig_checker_default } from "./editorconfig-checker-B-hWWYHk.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative } from "node:path";
|
|
@@ -64,7 +64,7 @@ var editorconfig_default$2 = "name: lint:editorconfig\n\non: # yamllint disable-
|
|
|
64
64
|
var markdown_default$1 = "name: lint:markdown\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-markdown:\n name: Run markdownlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run markdownlint\n with:\n task: lint:markdown\n";
|
|
65
65
|
var unused_default$1 = "name: Dead Code Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n dead-code-analysis:\n name: Run knip\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run knip\n with:\n task: lint:unused\n";
|
|
66
66
|
var mark_stale_default$1 = "name: Stale\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n days-before-stale:\n description: Days of inactivity before an issue or PR is marked stale (applies to both unless type-specific value is set)\n type: number\n required: false\n default: 30\n days-before-close:\n description: Days after stale label before closing (applies to both unless type-specific value is set)\n type: number\n required: false\n default: 5\n days-before-issue-stale:\n description: Days of inactivity before an issue is marked stale; overrides days-before-stale when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-issue-close:\n description: Days after stale label before closing an issue; overrides days-before-close when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-pr-stale:\n description: Days of inactivity before a PR is marked stale; overrides days-before-stale when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-pr-close:\n description: Days after stale label before closing a PR; overrides days-before-close when set to a non-negative value\n type: number\n required: false\n default: -1\n exempt-issue-labels:\n description: Comma-separated labels that exempt an issue from being marked stale\n type: string\n required: false\n default: \"in-progress,wip\"\n exempt-pr-labels:\n description: Comma-separated labels that exempt a PR from being marked stale\n type: string\n required: false\n default: \"\"\n exempt-all-issue-milestones:\n description: Issues assigned to any milestone are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-pr-milestones:\n description: PRs assigned to any milestone are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-issue-projects:\n description: Issues assigned to any project are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-pr-projects:\n description: PRs assigned to any project are never marked stale\n type: boolean\n required: false\n default: true\n\njobs:\n stale:\n name: Mark stale issues and pull requests\n permissions:\n contents: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0\n name: Run Stale\n with:\n close-issue-message: >\n This issue was closed because it has been stalled for\n ${{ inputs.days-before-close }} days with no activity.\n days-before-close: ${{ inputs.days-before-close }}\n days-before-issue-close: ${{ inputs.days-before-issue-close }}\n days-before-issue-stale: ${{ inputs.days-before-issue-stale }}\n days-before-pr-close: ${{ inputs.days-before-pr-close }}\n days-before-pr-stale: ${{ inputs.days-before-pr-stale }}\n days-before-stale: ${{ inputs.days-before-stale }}\n exempt-all-issue-milestones: ${{ inputs.exempt-all-issue-milestones }}\n exempt-all-issue-projects: ${{ inputs.exempt-all-issue-projects }}\n exempt-all-pr-milestones: ${{ inputs.exempt-all-pr-milestones }}\n exempt-all-pr-projects: ${{ inputs.exempt-all-pr-projects }}\n exempt-issue-labels: ${{ inputs.exempt-issue-labels }}\n exempt-pr-labels: ${{ inputs.exempt-pr-labels }}\n stale-issue-label: wontfix\n stale-issue-message: >\n This issue is stale because it has been open ${{ inputs.days-before-stale }}\n days with no activity. Remove the stale label or comment, or this will be\n closed in ${{ inputs.days-before-close }} days.\n stale-pr-label: wontfix\n stale-pr-message: >\n This PR is stale because it has been open ${{ inputs.days-before-stale }}\n days with no activity. Remove the stale label or comment, or this will be\n closed in ${{ inputs.days-before-close }} days.\n";
|
|
67
|
-
var bundle_default$1 = "name: Audit the Bundle Size\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n
|
|
67
|
+
var bundle_default$1 = "name: Audit the Bundle Size\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_CODECOV_UPLOAD_TOKEN:\n description: The Codecov upload token. Read first; the CODECOV_TOKEN secret is the fallback.\n required: false\n CODECOV_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n bundle-size:\n name: Upload bundle stats to Codecov\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by the bundle-stats uploader inside `holocron run build`.\n CODECOV_TOKEN: ${{ secrets.HOLOCRON_CODECOV_UPLOAD_TOKEN || secrets.CODECOV_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Build and upload bundle stats\n with:\n task: build\n";
|
|
68
68
|
var docs_default$1$1 = "name: Measure Documentation Coverage\n\n# Doc-comment coverage of the public API (#1368), measured with the repo's TypeDoc by `holocron probe docs coverage`\n# and uploaded to Codecov as the `documentation` flag (`--lcov`). The patch and project percentages show on every PR\n# next to the test coverage as `codecov/patch/documentation` and `codecov/project/documentation`, and Codecov fails\n# the patch status when a PR adds or changes an exported function, class, interface, type, constant or member of one\n# without a doc comment; old undocumented exports do not count against a PR. Pushes to the default branch upload it\n# too, so a PR has a base report to compare against.\n#\n# The gate is Codecov's `codecov/patch/documentation` (`extraRequiredChecks` in holocron.config.ts), not this job's own\n# check, which only measures and uploads. `holocron probe docs patch` stays in the CLI to run before pushing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n measure-docs:\n name: Measure documentation coverage\n permissions:\n contents: read\n # The Codecov upload authenticates with the job's OIDC token.\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n # One TypeDoc pass over every package writes the report for the upload below. It does not fail on an\n # undocumented export: the Codecov status does.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Measure the documentation coverage\n with:\n command: probe docs coverage\n args: --lcov coverage/docs.lcov\n\n # A pull request from a fork has no OIDC token to upload with, so Codecov has nothing to gate it on.\n - name: Upload the documentation coverage to Codecov\n if: >-\n ${{ !cancelled() && hashFiles('coverage/docs.lcov') != '' &&\n (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }}\n uses: theholocron/.github/.github/actions/codecov-upload@main\n with:\n uploads: '[{\"flag\":\"documentation\",\"files\":\"coverage/docs.lcov\"}]'\n";
|
|
69
69
|
var preview_specs_default$1 = "#\n# Makes the forum post for a spec or ADR while its pull request is still open (#1600, spec\n# `tech-specs-discussion-threads`), instead of waiting for the file to land on `alpha`. It runs `holocron sync specs` with\n# `--files` (only the spec and ADR files this pull request changes, so a stale branch cannot retag the posts of files it\n# does not touch) and `--pr` (the post names this pull request). Everything the command edits stays in this checkout and\n# is thrown away: the post's address reaches the file after the merge, when the `sync-specs` task finds the post\n# by the path it records and links it through its sync pull request.\n#\n# - Only for a pull request from this repository: a post carries text the author wrote, and a fork gets no secrets.\n# - Only when the pull request changes a spec or an ADR.\n# - When the pull request is CLOSED WITHOUT MERGING, its posts are tagged `withdrawn` and closed (#1653,\n# `sync specs --withdraw`); reopening it, or the same file coming back in a new pull request, puts the file's own status\n# back on the post and reopens it. A merged pull request does nothing here. Nothing from a closed pull request's head\n# runs with the bot token: that event checks out and builds the BASE branch, and takes only the list of paths from the\n# pull request through the API.\n# - It shares the `spec-discussions` concurrency group with the `sync-specs` task, so a post is never made twice\n# by two runs at once; the post is also found by its path before it is made, so a rerun is safe.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN`; without it the job warns and does nothing.\n\nname: Preview Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n\njobs:\n preview-specs:\n name: Sync spec discussions for the pull request\n permissions:\n contents: read\n pull-requests: read\n # Shared with `sync-specs`, so a post is never made twice by two runs at once.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged == false)\n runs-on: ubuntu-latest\n timeout-minutes: 20\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n BASE_REF: ${{ github.event.pull_request.base.sha }}\n PR_NUMBER: ${{ github.event.pull_request.number }}\n WITHDRAW: ${{ github.event.action == 'closed' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussion was made for this pull request. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the pull request (the base branch, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n # A closed pull request is never checked out: its head is not needed beyond the list of paths, and the bot token\n # must not run its code. The base branch's tip is trusted code.\n ref: ${{ github.event.action == 'closed' && github.event.pull_request.base.ref || '' }}\n # The whole history: a spec is numbered by when its file was first committed, and the base is needed to see\n # which files this pull request changes.\n fetch-depth: 0\n\n - name: List the specs and ADRs this pull request changes\n id: files\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n env:\n GH_TOKEN: ${{ github.token }}\n REPO: ${{ github.repository }}\n run: |\n # Added or modified, not deleted: a file that is gone has nothing to post.\n if [ \"$WITHDRAW\" = \"true\" ]; then\n # The head is not checked out, so the pull request's paths come from the API (names only, and only those of a\n # plain shape, since the list becomes arguments).\n files=$(gh api --paginate \"repos/$REPO/pulls/$PR_NUMBER/files\" --jq '.[] | select(.status != \"removed\") | .filename' \\\n | grep -E '^(\\.notes/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/specifications/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/decisions/[A-Za-z0-9._-]+\\.md)$' \\\n | tr '\\n' ' ' || true)\n else\n files=$(git diff --name-only --diff-filter=AM \"$BASE_REF\"...HEAD -- '.notes/*.spec.md' 'docs/wiki/specifications/*.spec.md' 'docs/wiki/decisions/*.md' | tr '\\n' ' ')\n fi\n echo \"list=$files\" >> \"$GITHUB_OUTPUT\"\n if [ -z \"$files\" ]; then echo \"No spec or ADR is added or changed here.\"; fi\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions for these files (withdraw them, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n env:\n FILES: ${{ steps.files.outputs.list }}\n run: |\n # The list is file names from this repository's own pull request; word splitting is what turns it into arguments.\n # shellcheck disable=SC2086\n if [ \"$WITHDRAW\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --withdraw --files $FILES\n else\n node cli/cli/dist/cli.mjs sync specs --pr \"$PR_NUMBER\" --files $FILES\n fi\n";
|
|
70
70
|
var preview_default$1 = "name: Preview\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n name:\n description: Repo name prefix used to filter the docs site package (<name>-site); omit to run pnpm -C docs build\n required: false\n type: string\n default: \"\"\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n cloudflare-project:\n description: >\n Cloudflare Pages project name. Falls back to the CLOUDFLARE_PAGES_PROJECT\n org variable (filled from the 1Password sync) when omitted — set that variable once and all repos get previews\n without per-repo config.\n required: false\n type: string\n default: \"\"\n\njobs:\n deploy-preview:\n name: Preview\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build workspace dependencies\n # The docs site imports workspace packages (e.g. a shared theme) via\n # `workspace:*` — its exports map points at dist/, which doesn't\n # exist until something builds it. Nothing else in this job does,\n # so without this step Vite fails to resolve the import entirely.\n if: ${{ inputs.type == 'docs' }}\n run: pnpm run build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name != '' }}\n env:\n SITE_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$SITE_NAME\"-site build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name == '' }}\n run: pnpm -C docs build\n\n - name: Build Storybook projects\n if: ${{ inputs.storybook-projects != '[]' }}\n env:\n PROJECTS: ${{ inputs.storybook-projects }}\n run: |\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n pnpm -C \"$workingDir\" build:storybook\n done\n\n - name: Build Storybook\n if: ${{ inputs.type == 'storybook' && inputs.storybook-projects == '[]' }}\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n run: pnpm run \"$BUILD_SCRIPT\"\n\n - name: Assemble site\n env:\n DEPLOY_TYPE: ${{ inputs.type }}\n SITE_NAME: ${{ inputs.name }}\n PROJECTS: ${{ inputs.storybook-projects }}\n STORYBOOK_OUTPUT_DIR: ${{ inputs.output-dir }}\n run: |\n mkdir -p _site\n if [ \"$DEPLOY_TYPE\" = \"docs\" ]; then\n if [ -n \"$SITE_NAME\" ]; then\n # Site built with base: /<name>/ — nest under _site/<name>/ so asset\n # paths match (/name/_astro/... → served at /name/_astro/...).\n mkdir -p \"_site/${SITE_NAME}\"\n cp -r docs/dist/. \"_site/${SITE_NAME}/\"\n # Redirect root to the base path so the preview URL lands correctly.\n printf \"/ /%s/ 301\\n\" \"$SITE_NAME\" > _site/_redirects\n else\n cp -r docs/dist/. _site/\n fi\n fi\n if [ \"$PROJECTS\" != \"[]\" ]; then\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n name=$(echo \"$project\" | jq -r '.name // \"\"')\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n outputDir=$(echo \"$project\" | jq -r '.outputDir // \"storybook-static\"')\n if [ -n \"$name\" ]; then\n target=\"_site/sandbox/${name}\"\n else\n target=\"_site/sandbox\"\n fi\n mkdir -p \"$target\"\n cp -r \"${workingDir}/${outputDir}/.\" \"$target/\"\n done\n elif [ \"$DEPLOY_TYPE\" = \"storybook\" ]; then\n mkdir -p _site/sandbox\n cp -r \"${STORYBOOK_OUTPUT_DIR}/.\" _site/sandbox/\n fi\n\n - name: Install Wrangler\n # The action's install step runs npm/pnpm in the repo root; pnpm fails\n # because it rejects adding to a workspace root without -w, and npm fails\n # because package.json contains pnpm catalog: references it cannot parse.\n # Pre-installing from /tmp (no package.json) lets the action find wrangler\n # already on PATH and skip its own install entirely.\n working-directory: /tmp\n run: npm install -g wrangler@4\n\n - name: Warn when the Cloudflare account id is missing\n # The deploy below needs it. It is an organization variable that `holocron sync secrets` writes from\n # the 1Password Environment named by `repo.variables.sync` in .holocron/repo.ts.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The Pages deploy needs it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3\n id: deploy\n name: Deploy to Cloudflare Pages\n # Skip when neither the per-repo input nor the org variable is set.\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n with:\n apiToken: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n accountId: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n packageManager: npm\n command: >-\n pages deploy _site\n --project-name ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n --branch ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n --commit-dirty=true\n\n - name: Report preview URL\n if: ${{ steps.deploy.outputs.pages-deployment-alias-url != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n ALIAS: ${{ steps.deploy.outputs.pages-deployment-alias-url }}\n SITE_NAME: ${{ inputs.name }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n run: |\n PREVIEW_URL=\"${ALIAS%/}${SITE_NAME:+/${SITE_NAME}}/\"\n # GITHUB_HEAD_REF is the PR branch name — links the deployment to this PR's sidebar widget.\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"%s\",\"description\":\"Cloudflare Pages\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\" \"${PROJECT} (Preview)\")\n DEPLOY_ID=$(echo \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"${PREVIEW_URL}\"\n\n cleanup:\n name: Clean up Preview\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - name: Warn when the Cloudflare account id is missing\n # Without it the request below cannot find the preview deployments, so closing the PR leaves them behind.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The preview deployments cannot be deleted without it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - name: Delete Cloudflare Pages deployments for branch\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n env:\n CLOUDFLARE_API_TOKEN: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n CLOUDFLARE_ACCOUNT_ID: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n BRANCH: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n DEPLOYMENTS=$(curl -s \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n | jq -r --arg b \"$BRANCH\" \\\n '.result[] | select(.deployment_trigger.metadata.branch == $b) | .id')\n\n if [ -z \"$DEPLOYMENTS\" ]; then\n echo \"No deployments found for branch ${BRANCH} — nothing to clean up.\"\n exit 0\n fi\n\n for id in $DEPLOYMENTS; do\n echo \"Deleting CF Pages deployment: $id\"\n curl -s -X DELETE \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments/${id}?force=true\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | jq -r 'if .success then \" ✓ deleted\" else \" ✗ \\(.errors[0].message)\" end'\n done\n\n # Mark the GitHub Deployment environment as inactive.\n ENV_NAME=\"${PROJECT} (Preview)\"\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n | jq -r \".[] | select(.environment == \\\"${ENV_NAME}\\\") | .id\" \\\n | while read -r deploy_id; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive 2>/dev/null || true\n done\n";
|
|
@@ -75,13 +75,14 @@ var remind_doctor_default$1 = "name: Remind Doctor\n\n# A weekly nudge to run th
|
|
|
75
75
|
var code_default$2 = "name: Security\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n language:\n description: CodeQL language to analyze\n type: string\n required: false\n default: javascript-typescript\n\njobs:\n analyze:\n name: Analyze (${{ inputs.language }})\n permissions:\n actions: read\n contents: read\n security-events: write\n runs-on: ubuntu-latest\n timeout-minutes: 45\n # Do not cancel in-progress security scans.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3\n name: Initialize CodeQL\n with:\n languages: ${{ inputs.language }}\n\n - uses: github/codeql-action/autobuild@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3\n name: Autobuild\n\n - uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3\n name: Analyze\n with:\n category: /language:${{ inputs.language }}\n";
|
|
76
76
|
var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n secret-detection:\n name: Run gitleaks\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # gitleaks has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented install script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install gitleaks\n run: |\n curl -sSfL https://raw.githubusercontent.com/gitleaks/gitleaks/master/install.sh | sh -s -- -b /usr/local/bin\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run gitleaks\n with:\n task: scan:secrets\n";
|
|
77
77
|
var sync_dispatch_default = "name: Sync Dispatch\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n steps:\n description: >\n Sync steps to pass to each repo's sync.yml. Default is \"readme\"\n (only README marker blocks are updated).\n type: string\n required: false\n default: readme\n\npermissions:\n contents: read\n\njobs:\n broadcast:\n name: Broadcast sync to all repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Dispatch sync to all repos with sync.yml\n run: |\n gh api \"/orgs/$GITHUB_REPOSITORY_OWNER/repos\" --paginate --jq '.[].name' \\\n | while IFS= read -r repo; do\n gh api \"/repos/$GITHUB_REPOSITORY_OWNER/$repo/contents/.github/workflows/sync.yml\" --silent 2>/dev/null || continue\n echo \"Dispatching sync to $GITHUB_REPOSITORY_OWNER/$repo\"\n gh workflow run sync.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/$repo\" \\\n --field \"steps=$STEPS\" \\\n || echo \"Warning: could not dispatch to $GITHUB_REPOSITORY_OWNER/$repo — skipping\"\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n STEPS: ${{ inputs.steps }}\n";
|
|
78
|
-
var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
|
|
78
|
+
var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one tracker up to date from another (SPEC-0071 section 4, #1859, spec\n# `tech-issue-sync-schedule-and-assignees`, #2251): runs `holocron sync issues --from <from> --to <to>`, which creates what the\n# target is missing, updates what an earlier sync made and adds the comments it lacks. With `both` it then runs the swapped\n# direction, after the first and in the same job, so two runs never touch the same issue at once (each direction never\n# echoes what the other made).\n#\n# `from` and `to` are the command's endpoints: `github`, or `provider:key=value,...` (`linear:team=ENG`). Only a repo whose\n# `tasks:` lists `sync-issues` (with these inputs under `with:`) gets the caller, so a repo with one tracker is untouched.\n#\n# Tokens reach the job in its environment, never on a command line: `HOLOCRON_LINEAR_TOKEN` from the secret of that name and\n# GitHub's from `HOLOCRON_ISSUES_TOKEN` (the job's own token when that is not set). Scheduled hourly by the caller; a failed\n# run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n from:\n description: Where the issues are read from (`github`, or `provider:key=value,...`).\n type: string\n required: true\n to:\n description: Where they are written, in the same form.\n type: string\n required: true\n since:\n description: Only issues changed since this date or span back from now (2026-03-01, 7d, 12h).\n type: string\n required: false\n default: 2d\n both:\n description: Also run the swapped direction after the first.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_LINEAR_TOKEN:\n description: The Linear API key, when an endpoint is Linear.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: A GitHub token that can read and write issues; the job's own token is used when it is not set.\n required: false\n\njobs:\n sync-issues:\n name: Sync issues between trackers\n permissions:\n contents: read\n issues: write\n runs-on: ubuntu-latest\n timeout-minutes: 20\n # Two runs could each create the same issue on the target, so a second waits for the first.\n concurrency:\n group: sync-issues\n cancel-in-progress: false\n env:\n HOLOCRON_LINEAR_TOKEN: ${{ secrets.HOLOCRON_LINEAR_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN || github.token }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues\n with:\n command: sync issues --yes --from ${{ inputs.from }} --to ${{ inputs.to }} --since ${{ inputs.since }}\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync issues, the other way\n if: ${{ inputs.both }}\n with:\n command: sync issues --yes --from ${{ inputs.to }} --to ${{ inputs.from }} --since ${{ inputs.since }}\n";
|
|
79
|
+
var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR ${{ steps.pr.outputs.url }} — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
|
|
79
80
|
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061) and to the one\n# GH-Actions-consumed key at org scope (`SENTINEL_AXIOM_INGEST_TOKEN`, which `theholocron/.github`'s `platform.dispatchedCheck.yml` reads,\n# org-wide since any repo with Bucket 2 dispatch enabled needs it). apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n HOLOCRON_SECRETS_TOKEN:\n description: The GitHub token that writes the org secret, in place of a person's `gh auth token`.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel to GH org secret\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Sync secrets\n with:\n command: sync\n args: >-\n secrets --env ${{ inputs.environment }} --cwd apps/sentinel --project-id sentinel\n --target production --github-secret SENTINEL_AXIOM_INGEST_TOKEN\n --github-secret-scope org=${{ github.repository_owner }} --org ${{ github.repository_owner }}\n --token github=${{ secrets.HOLOCRON_SECRETS_TOKEN }}\n";
|
|
80
81
|
var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: ./ci/actions/git-identity\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n";
|
|
81
82
|
var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm build\n name: Build CLI\n\n # Resolve the built CLI from node_modules instead of hard-coding where it\n # lives in this repo (the same lookup the `holocron` composite action does).\n - name: Resolve CLI\n run: echo \"HOLOCRON_CLI=$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\" >> \"$GITHUB_ENV\"\n\n - name: Cache actionlint\n id: cache-actionlint\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: /tmp/actionlint\n key: actionlint-v1.7.7-linux-amd64\n\n - name: Download actionlint\n if: steps.cache-actionlint.outputs.cache-hit != 'true'\n run: |\n curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz \\\n | tar -xz -C /tmp actionlint\n\n - name: Validate generated workflows\n run: |\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --output-dir /tmp/sync-validate\n /tmp/actionlint /tmp/sync-validate/.github/workflows/*.yml\n env:\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n\n # By path: the action is new and `theholocron/.github` is frozen (see the `format` action in lint/code.yml).\n # `scope: none` leaves git's own config alone: the identity only goes into the Signed-off-by trailer below.\n - uses: ./ci/actions/git-identity\n name: Resolve git identity\n id: identity\n with:\n scope: none\n resolve: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n\n - name: Sync primary repo (PR)\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$PRIMARY_REPO\" \"$SYNC_BRANCH\" 2>/dev/null || true\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n\n - name: Sync secondary repos (PR)\n if: ${{ needs.discover-repos.outputs.secondary-repos != '' }}\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n for repo in $SECONDARY_REPOS; do\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$repo\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$repo\" \"$SYNC_BRANCH\" 2>/dev/null || true\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n SECONDARY_REPOS: ${{ needs.discover-repos.outputs.secondary-repos }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n";
|
|
82
83
|
var tag_default = "name: Tag\n\n# Release Please — fully automated tag and GitHub Release from Conventional Commits.\n# No package.json or npm publishing required. Operates in \"simple\" mode by default:\n# analyzes commits since the last tag, maintains a rolling Release PR, and creates\n# a tag + GitHub Release when that PR is merged.\n#\n# The calling repo must have two files at the root:\n# release-please-config.json — declares packages and release-type\n# .release-please-manifest.json — tracks the current version\n\non: # yamllint disable-line rule:truthy\n # Self-trigger: when this workflow lives in theholocron/.github itself,\n # push to main runs Release Please for that repo's own releases.\n push:\n branches:\n - main\n workflow_call:\n inputs:\n release-type:\n description: Release Please release type (simple, node, python, etc.)\n type: string\n required: false\n default: simple\n config-file:\n description: Path to release-please-config.json\n type: string\n required: false\n default: release-please-config.json\n manifest-file:\n description: Path to .release-please-manifest.json\n type: string\n required: false\n default: .release-please-manifest.json\n\njobs:\n tag:\n name: Tag release\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1\n name: Run Release Please\n with:\n release-type: ${{ inputs.release-type }}\n config-file: ${{ inputs.config-file }}\n manifest-file: ${{ inputs.manifest-file }}\n";
|
|
83
84
|
var perf_default$1 = "name: Audit the Performance\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n lighthouse-config:\n description: >\n Path to the Lighthouse CI config file, forwarded to `holocron run\n verification.performance -- --config`. Defaults to\n lighthouse.config.cjs (the org standard).\n type: string\n required: false\n default: lighthouse.config.cjs\n secrets:\n HOLOCRON_LIGHTHOUSE_TOKEN:\n description: The Lighthouse CI GitHub App token. Read first; the LHCI_GITHUB_APP_TOKEN secret is the fallback.\n required: false\n LHCI_GITHUB_APP_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n performance:\n name: Run Lighthouse CI\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by `lhci autorun` inside `holocron run test:perf`.\n LHCI_GITHUB_APP_TOKEN: ${{ secrets.HOLOCRON_LIGHTHOUSE_TOKEN || secrets.LHCI_GITHUB_APP_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: npm install -g @lhci/cli@0.14.x\n name: Install Lighthouse CLI\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run Lighthouse CI\n with:\n task: test:perf\n args: --config=${{ inputs.lighthouse-config }}\n";
|
|
84
|
-
var unit_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n uploads:\n description: 'JSON list of {\"flag\", \"files\"} to upload one Codecov flag per group, e.g. [{\"flag\":\"utils\",\"files\":\"utils/*/coverage/lcov.info\"}]. Empty uploads all coverage as one report, as before.'\n type: string\n required: false\n default: \"\"\n run-unit:\n description: Run unit tests with coverage (disable for UI-only repos that use Storybook testing exclusively)\n type: boolean\n required: false\n default: true\n run-storybook:\n description: Run Storybook vitest interaction tests (requires .storybook/ setup)\n type: boolean\n required: false\n default: false\n run-interaction:\n description: Run Storybook interaction and accessibility tests with Playwright\n type: boolean\n required: false\n default: false\n run-user-flow:\n description: Run Cypress E2E user-flow tests (requires cypress.config.*)\n type: boolean\n required: false\n default: false\n wait-on-url:\n description: URL to wait for before running Cypress tests (default is Vite dev server; override for non-Vite stacks e.g. http://localhost:3000 for Next.js)\n type: string\n required: false\n default: \"http://localhost:5173\"\n secrets:\n CYPRESS_RECORD_KEY:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n unit:\n name: Run unit tests and collect coverage\n if: ${{ inputs.run-unit }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run tests with coverage\n with:\n task: test:unit\n affected: ${{ inputs.affected }}\n\n # With `affected`, a run that selects nothing (a README-only PR) writes no coverage. The two\n # required Codecov statuses still have to post, so say so with an empty upload instead of\n # failing the upload. Without `affected` a missing report stays an error.\n - id: reports\n name: Look for coverage and test reports\n if: ${{ inputs.affected }}\n shell: bash\n run: |\n # find, not hashFiles('**/…'): hashFiles walks node_modules and can time out in a large workspace.\n has() { [ -n \"$(find . -path ./node_modules -prune -o -path '*/node_modules' -prune -o -name \"$1\" -print -quit)\" ]; }\n has lcov.info && echo \"coverage=true\" >> \"$GITHUB_OUTPUT\" || echo \"coverage=false\" >> \"$GITHUB_OUTPUT\"\n has test-report.junit.xml && echo \"tests=true\" >> \"$GITHUB_OUTPUT\" || echo \"tests=false\" >> \"$GITHUB_OUTPUT\"\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n if: ${{ inputs.uploads == '' && (!inputs.affected || steps.reports.outputs.coverage == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n # One upload per group, each with its own flag, so Codecov can carry the unchanged groups forward.\n - id: flags\n name: Upload coverage to Codecov, one flag per group\n if: ${{ inputs.uploads != '' }}\n uses: theholocron/.github/.github/actions/codecov-upload@main\n with:\n uploads: ${{ inputs.uploads }}\n allow-empty: ${{ inputs.affected }}\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test results are Codecov's test analytics; no required status reads them, so a failed upload is logged\n # and the job passes. Coverage above still fails the job: the required statuses depend on it.\n if: ${{ !cancelled() && (!inputs.affected || steps.reports.outputs.tests == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Post the Codecov statuses without a report\n if: ${{ inputs.affected && (inputs.uploads == '' && steps.reports.outputs.coverage != 'true' || inputs.uploads != '' && steps.flags.outputs.uploaded == '0') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n run_command: empty-upload\n\n storybook:\n name: Run Storybook interaction tests\n if: ${{ inputs.run-storybook }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install chromium --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run Storybook tests\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test analytics only, as above: a failed upload is logged, not a failed job.\n if: ${{ !cancelled() }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n interaction-and-accessibility:\n name: Run interactions and accessibility tests\n if: ${{ inputs.run-interaction }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run interaction and accessibility tests\n\n user-flow:\n name: Run user flow tests\n if: ${{ inputs.run-user-flow }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n strategy:\n fail-fast: false\n matrix:\n containers: [1, 2]\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec cypress install\n name: Install Cypress binary\n\n - uses: cypress-io/github-action@18016a55674bd02cabf197de5762a1710cb5577c # v7.4.9\n name: Cypress run\n with:\n start: pnpm dev\n wait-on: ${{ inputs.wait-on-url }}\n record: true\n parallel: true\n env:\n CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [unit, storybook, interaction-and-accessibility, user-flow]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
|
|
85
|
+
var unit_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n uploads:\n description: 'JSON list of {\"flag\", \"files\"} to upload one Codecov flag per group, e.g. [{\"flag\":\"utils\",\"files\":\"utils/*/coverage/lcov.info\"}]. Empty uploads all coverage as one report, as before.'\n type: string\n required: false\n default: \"\"\n run-unit:\n description: Run unit tests with coverage (disable for UI-only repos that use Storybook testing exclusively)\n type: boolean\n required: false\n default: true\n run-storybook:\n description: Run Storybook vitest interaction tests (requires .storybook/ setup)\n type: boolean\n required: false\n default: false\n run-interaction:\n description: Run Storybook interaction and accessibility tests with Playwright\n type: boolean\n required: false\n default: false\n run-user-flow:\n description: Run Cypress E2E user-flow tests (requires cypress.config.*)\n type: boolean\n required: false\n default: false\n wait-on-url:\n description: URL to wait for before running Cypress tests (default is Vite dev server; override for non-Vite stacks e.g. http://localhost:3000 for Next.js)\n type: string\n required: false\n default: \"http://localhost:5173\"\n secrets:\n CYPRESS_RECORD_KEY:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n unit:\n name: Run unit tests and collect coverage\n if: ${{ inputs.run-unit }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run tests with coverage\n with:\n task: test:unit\n affected: ${{ inputs.affected }}\n\n # With `affected`, a run that selects nothing (a README-only PR) writes no coverage. The two\n # required Codecov statuses still have to post, so say so with an empty upload instead of\n # failing the upload. Without `affected` a missing report stays an error.\n - id: reports\n name: Look for coverage and test reports\n if: ${{ inputs.affected }}\n shell: bash\n run: |\n # find, not hashFiles('**/…'): hashFiles walks node_modules and can time out in a large workspace.\n has() { [ -n \"$(find . -path ./node_modules -prune -o -path '*/node_modules' -prune -o -name \"$1\" -print -quit)\" ]; }\n has lcov.info && echo \"coverage=true\" >> \"$GITHUB_OUTPUT\" || echo \"coverage=false\" >> \"$GITHUB_OUTPUT\"\n has test-report.junit.xml && echo \"tests=true\" >> \"$GITHUB_OUTPUT\" || echo \"tests=false\" >> \"$GITHUB_OUTPUT\"\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n if: ${{ inputs.uploads == '' && (!inputs.affected || steps.reports.outputs.coverage == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n # One upload per group, each with its own flag, so Codecov can carry the unchanged groups forward.\n - id: flags\n name: Upload coverage to Codecov, one flag per group\n if: ${{ inputs.uploads != '' }}\n # The coverage provider's own command (`providers.coverage`), not the codecov-upload action. It is run\n # from the built CLI the test step above resolved, as the holocron action does, and not through that\n # action, so the JSON list reaches it as one argument (the action splits `args` on spaces) and the\n # `uploaded` output below stays a step output of this job. The job's OIDC token needs `id-token: write`.\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.affected }}\n run: |\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n set -- upload coverage --uploads \"$UPLOADS\"\n [ \"$ALLOW_EMPTY\" = \"true\" ] && set -- \"$@\" --allow-empty\n node \"$cli\" \"$@\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test results are Codecov's test analytics; no required status reads them, so a failed upload is logged\n # and the job passes. Coverage above still fails the job: the required statuses depend on it.\n if: ${{ !cancelled() && (!inputs.affected || steps.reports.outputs.tests == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Post the Codecov statuses without a report\n if: ${{ inputs.affected && (inputs.uploads == '' && steps.reports.outputs.coverage != 'true' || inputs.uploads != '' && steps.flags.outputs.uploaded == '0') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n run_command: empty-upload\n\n storybook:\n name: Run Storybook interaction tests\n if: ${{ inputs.run-storybook }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install chromium --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run Storybook tests\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test analytics only, as above: a failed upload is logged, not a failed job.\n if: ${{ !cancelled() }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n interaction-and-accessibility:\n name: Run interactions and accessibility tests\n if: ${{ inputs.run-interaction }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run interaction and accessibility tests\n\n user-flow:\n name: Run user flow tests\n if: ${{ inputs.run-user-flow }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n strategy:\n fail-fast: false\n matrix:\n containers: [1, 2]\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec cypress install\n name: Install Cypress binary\n\n - uses: cypress-io/github-action@18016a55674bd02cabf197de5762a1710cb5577c # v7.4.9\n name: Cypress run\n with:\n start: pnpm dev\n wait-on: ${{ inputs.wait-on-url }}\n record: true\n parallel: true\n env:\n CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [unit, storybook, interaction-and-accessibility, user-flow]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
|
|
85
86
|
var visual_default$1 = "name: Visual Regression\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n chromatic-projects:\n description: >\n JSON array of Chromatic projects to build, one matrix job per entry.\n Each entry: { \"tokenName\": \"WEB\", \"workingDir\": \"apps/web\", \"buildScript\": \"build:storybook\" }.\n tokenName maps to secret CHROMATIC_PROJECT_TOKEN_<TOKENNAME>; use \"default\"\n (or omit for the legacy empty-string form) to use the bare CHROMATIC_PROJECT_TOKEN\n secret for single-project repos.\n buildScript defaults to \"build:storybook\" when omitted.\n Required -- this task only exists in a repo's workflow list when it\n opts into Chromatic at all (holocron#394/#1062): GitHub evaluates a\n job's `if:` before expanding its `strategy.matrix`, so no default\n here (empty or otherwise) can make a *disabled* Chromatic job\n disappear from PR checks -- only not generating this job's thin\n caller in the first place can. A repo that doesn't want Chromatic\n simply omits `verification.visualRegression` from its `tasks:`.\n type: string\n required: true\n secrets:\n CHROMATIC_PROJECT_TOKEN:\n required: false\n\njobs:\n visual-and-composition:\n name: Run visual and composition tests\n strategy:\n fail-fast: false\n matrix:\n project: ${{ fromJSON(inputs.chromatic-projects) }}\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: chromaui/action@2b75e3340bcec86b4ae38c6a10f14831114e8137 # v18\n name: Publish to Chromatic\n with:\n projectToken: ${{ (matrix.project.tokenName == 'default' || matrix.project.tokenName == '') && secrets.CHROMATIC_PROJECT_TOKEN || secrets[format('CHROMATIC_PROJECT_TOKEN_{0}', matrix.project.tokenName)] }}\n token: ${{ github.token }}\n buildScriptName: ${{ matrix.project.buildScript || 'build:storybook' }}\n workingDir: ${{ matrix.project.workingDir || '.' }}\n storybookBaseDir: ${{ matrix.project.storybookBaseDir || '' }}\n untraced: ${{ matrix.project.untraced || '' }}\n onlyStoryFiles: ${{ matrix.project.onlyStoryFiles || '' }}\n exitZeroOnChanges: ${{ matrix.project.exitZeroOnChanges || false }}\n";
|
|
86
87
|
var typecheck_default$1 = "name: Typecheck\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n typecheck:\n name: Run tsc --noEmit\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Type check\n with:\n task: typecheck\n affected: ${{ inputs.affected }}\n";
|
|
87
88
|
var update_deps_default$1 = "name: Dependencies\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n merge-token:\n description: >\n Optional privileged token for auto-merge. Falls back to GITHUB_TOKEN.\n Required when branch protection enforces required reviews — GITHUB_TOKEN\n cannot approve its own PRs.\n required: false\n\njobs:\n dependabot:\n name: Update the dependencies\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n if: github.event.pull_request.user.login == 'dependabot[bot]'\n steps:\n - uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0\n name: Fetch Dependabot metadata\n id: metadata\n\n - run: gh pr merge --auto --squash \"$PR_URL\"\n # --squash is intentional: repo protection sets allow_merge_commit: false,\n # so --merge would fail on any repo using the standard preset.\n name: Enable auto-merge for Dependabot PRs\n if: steps.metadata.outputs.update-type == 'version-update:semver-patch'\n env:\n PR_URL: ${{ github.event.pull_request.html_url }}\n GH_TOKEN: ${{ secrets.merge-token || github.token }}\n";
|
|
@@ -156,6 +157,7 @@ const WORKFLOWS = Object.fromEntries(Object.entries(/* @__PURE__ */ Object.assig
|
|
|
156
157
|
"../workflows/scan/code.yml": code_default$2,
|
|
157
158
|
"../workflows/scan/secrets.yml": secrets_default$1,
|
|
158
159
|
"../workflows/sync-dispatch.yml": sync_dispatch_default,
|
|
160
|
+
"../workflows/sync-issues.yml": sync_issues_default$1,
|
|
159
161
|
"../workflows/sync-repo.yml": sync_repo_default$1,
|
|
160
162
|
"../workflows/sync-secrets.yml": sync_secrets_default$1,
|
|
161
163
|
"../workflows/sync-specs.yml": sync_specs_default$1,
|
|
@@ -427,6 +429,13 @@ const LEGACY_CALLERS = {
|
|
|
427
429
|
name: "Sync"
|
|
428
430
|
} }
|
|
429
431
|
},
|
|
432
|
+
"sync-issues": {
|
|
433
|
+
name: "Sync Issues",
|
|
434
|
+
jobs: { "sync-issues": {
|
|
435
|
+
id: "sync-issues",
|
|
436
|
+
name: "Sync Issues"
|
|
437
|
+
} }
|
|
438
|
+
},
|
|
430
439
|
"sync-specs": {
|
|
431
440
|
name: "Spec discussions",
|
|
432
441
|
jobs: { "sync-specs": {
|
|
@@ -905,6 +914,8 @@ var remind_doctor_default = "name: remind-doctor\n\non: # yamllint disable-line
|
|
|
905
914
|
var code_default = "name: scan:code\n\non: # yamllint disable-line rule:truthy\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n schedule:\n - cron: \"0 0 * * 1\"\n\npermissions:\n actions: read\n contents: read\n security-events: write\n\njobs:\n scan-code:\n name: scan:code\n uses: theholocron/.github/.github/workflows/scan-code.yml@main\n secrets: inherit\n";
|
|
906
915
|
// src/templates/workflows/scan/secrets.yml
|
|
907
916
|
var secrets_default = "name: scan:secrets\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: security-secret-detection-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n scan-secrets:\n name: scan:secrets\n uses: theholocron/.github/.github/workflows/scan-secrets.yml@main\n secrets: inherit\n";
|
|
917
|
+
// src/templates/workflows/sync-issues.yml
|
|
918
|
+
var sync_issues_default = "name: sync-issues\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"47 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n issues: write\n\njobs:\n sync-issues:\n name: sync-issues\n uses: theholocron/.github/.github/workflows/sync-issues.yml@main\n secrets: inherit\n";
|
|
908
919
|
// src/templates/workflows/sync-repo.yml
|
|
909
920
|
var sync_repo_default = "name: sync-repo\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n paths:\n - holocron.config.ts\n - package.json\n - pnpm-workspace.yaml\n workflow_dispatch:\n inputs:\n steps:\n description: \"Sync steps to run (default: all)\"\n type: string\n required: false\n\nconcurrency:\n group: sync-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n sync-repo:\n name: sync-repo\n uses: theholocron/.github/.github/workflows/sync-repo.yml@main\n with:\n steps: ${{ inputs.steps }}\n secrets: inherit\n";
|
|
910
921
|
// src/templates/workflows/sync-secrets.yml
|
|
@@ -1136,6 +1147,7 @@ const WORKFLOW_TEMPLATES = rehomeAll(Object.fromEntries(Object.entries(/* @__PUR
|
|
|
1136
1147
|
"../../templates/workflows/remind-doctor.yml": remind_doctor_default,
|
|
1137
1148
|
"../../templates/workflows/scan/code.yml": code_default,
|
|
1138
1149
|
"../../templates/workflows/scan/secrets.yml": secrets_default,
|
|
1150
|
+
"../../templates/workflows/sync-issues.yml": sync_issues_default,
|
|
1139
1151
|
"../../templates/workflows/sync-repo.yml": sync_repo_default,
|
|
1140
1152
|
"../../templates/workflows/sync-secrets.yml": sync_secrets_default,
|
|
1141
1153
|
"../../templates/workflows/sync-specs.yml": sync_specs_default,
|
|
@@ -1442,9 +1454,12 @@ function deriveDeployPaths(raw) {
|
|
|
1442
1454
|
*
|
|
1443
1455
|
* This is what the `ci` aggregate waits on (`aggregateChecks`); a ruleset lists it only in a repo that does not host
|
|
1444
1456
|
* the aggregate yet (see `requiredChecks`). Policy-free — it only knows the manifest.
|
|
1457
|
+
*
|
|
1458
|
+
* `statusContexts` are the commit statuses a coverage provider reports (`Coverage.statusContexts()`): the ones it marks
|
|
1459
|
+
* `required` follow the extras, so a repo need not spell them in `extraRequiredChecks`. Left out, nothing is added.
|
|
1445
1460
|
*/
|
|
1446
1461
|
/** Ordered (task contexts in {@link CI_ORDER}, then extras), de-duplicated. */
|
|
1447
|
-
function taskCheckContexts(config) {
|
|
1462
|
+
function taskCheckContexts(config, statusContexts) {
|
|
1448
1463
|
const entries = (config.tasks ?? []).map(normalizeTaskEntry);
|
|
1449
1464
|
const seen = /* @__PURE__ */ new Set();
|
|
1450
1465
|
const out = [];
|
|
@@ -1455,26 +1470,36 @@ function taskCheckContexts(config) {
|
|
|
1455
1470
|
out.push(context);
|
|
1456
1471
|
}
|
|
1457
1472
|
}
|
|
1458
|
-
|
|
1473
|
+
const supplied = (statusContexts ?? []).filter((status) => status.required).map((status) => status.name);
|
|
1474
|
+
for (const context of [...config.extraRequiredChecks ?? [], ...supplied]) if (!seen.has(context)) {
|
|
1459
1475
|
seen.add(context);
|
|
1460
1476
|
out.push(context);
|
|
1461
1477
|
}
|
|
1462
1478
|
return out;
|
|
1463
1479
|
}
|
|
1464
1480
|
// src/generators/aggregate-checks/aggregate-checks.ts
|
|
1465
|
-
/**
|
|
1466
|
-
|
|
1481
|
+
/**
|
|
1482
|
+
* What marks a context as a commit status (not a check run) when no provider says: the prefix Codecov's statuses
|
|
1483
|
+
* have. The default, so a run with no `coverage` provider loaded (`sync`, `setup`, Sentinel's checks) is unchanged.
|
|
1484
|
+
*/
|
|
1485
|
+
const DEFAULT_STATUS_PREFIX = "codecov/";
|
|
1467
1486
|
/**
|
|
1468
1487
|
* The `expected` ids and `statuses` the `ci` aggregate waits on, derived from the same list `requiredChecks()` read
|
|
1469
1488
|
* before the aggregate: every `required: true` task, then the `extraRequiredChecks`. `DCO` is left out because it stays
|
|
1470
1489
|
* its own required context. The ids are the callers' job names, which GitHub puts before the " / " of each check they post.
|
|
1490
|
+
*
|
|
1491
|
+
* Commit statuses go to `statuses`, polled through the status API. With `statusContexts` (what a `coverage` provider
|
|
1492
|
+
* reports) a context is a status when the provider names it, and the provider's required ones are added; without it, a
|
|
1493
|
+
* context is a status when it starts with `codecov/`.
|
|
1471
1494
|
*/
|
|
1472
|
-
function aggregateChecks(config) {
|
|
1495
|
+
function aggregateChecks(config, statusContexts) {
|
|
1496
|
+
const known = statusContexts === void 0 ? void 0 : new Set(statusContexts.map((status) => status.name));
|
|
1497
|
+
const isStatus = (context) => known === void 0 ? context.startsWith(DEFAULT_STATUS_PREFIX) : known.has(context);
|
|
1473
1498
|
const expected = /* @__PURE__ */ new Set();
|
|
1474
1499
|
const statuses = /* @__PURE__ */ new Set();
|
|
1475
|
-
for (const context of taskCheckContexts(config)) {
|
|
1500
|
+
for (const context of taskCheckContexts(config, statusContexts)) {
|
|
1476
1501
|
if (context === "DCO") continue;
|
|
1477
|
-
if (context
|
|
1502
|
+
if (isStatus(context)) statuses.add(context);
|
|
1478
1503
|
else expected.add(context.split(" / ")[0]);
|
|
1479
1504
|
}
|
|
1480
1505
|
return {
|
|
@@ -1482,82 +1507,19 @@ function aggregateChecks(config) {
|
|
|
1482
1507
|
statuses: [...statuses]
|
|
1483
1508
|
};
|
|
1484
1509
|
}
|
|
1485
|
-
// src/templates/codecov/codecov.yml
|
|
1486
|
-
var codecov_default = "codecov:\n require_ci_to_pass: true\n\ncoverage:\n precision: 2\n round: down\n status:\n project:\n default:\n target: auto\n threshold: 2%\n # Infra-only PRs (dep bumps, config, lockfile) touch no coverable code,\n # so codecov produces no report to compare. Pass instead of blocking\n # forever on a required check that will never post.\n if_not_found: success\n patch:\n default:\n target: 80%\n if_not_found: success\n\ncomment:\n layout: \"reach,diff,flags\"\n behavior: default\n require_changes: true\n\ncomponent_management:\n default_rules:\n statuses:\n - type: patch\n target: 80%\n if_not_found: success\n informational: true\n individual_components:\n";
|
|
1487
1510
|
// src/generators/codecov/codecov.ts
|
|
1488
1511
|
/**
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1493
|
-
* — `holocron setup`'s codecov step now calls {@link codecovConfig} instead
|
|
1494
|
-
* of importing this logic directly.
|
|
1512
|
+
* What the rest of Holocron reads from the workspace about Codecov: the packages, their flag names and the upload list.
|
|
1513
|
+
* The `codecov.yml` file itself is written by the `coverage` provider (`Coverage.configFiles()`, #2238 step 3), because
|
|
1514
|
+
* astromech imports no plugin; this module keeps only what other code needs (the uploads, the coverage expectations,
|
|
1515
|
+
* the status contexts).
|
|
1495
1516
|
*/
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
`# Source: theholocron/holocron · cli/astromech/src/generators/codecov/codecov.ts`,
|
|
1501
|
-
``
|
|
1502
|
-
].join("\n");
|
|
1503
|
-
}
|
|
1504
|
-
function location({ slug, dir, path }) {
|
|
1517
|
+
/** The Codecov flag the Docs coverage workflow uploads doc-comment coverage as (`holocron probe docs --lcov`). */
|
|
1518
|
+
const DOCUMENTATION_FLAG = "documentation";
|
|
1519
|
+
/** Where a package lives, relative to the repo root: its `path`, else `<dir>/<slug>` (`dir` defaults to `packages`). */
|
|
1520
|
+
function packageLocation({ slug, dir, path }) {
|
|
1505
1521
|
return path ?? `${dir ?? "packages"}/${slug}`;
|
|
1506
1522
|
}
|
|
1507
|
-
/** The YAML list of components, one per package and grouped by workspace root, that `codecov.yml` carries. */
|
|
1508
|
-
function codecovComponentBlock(packages) {
|
|
1509
|
-
if (packages.length === 0) return "\n []\n";
|
|
1510
|
-
let group;
|
|
1511
|
-
return "\n" + packages.flatMap((pkg) => {
|
|
1512
|
-
const where = location(pkg);
|
|
1513
|
-
const root = where.split("/")[0];
|
|
1514
|
-
const heading = root === group ? [] : [` # ${root}`];
|
|
1515
|
-
group = root;
|
|
1516
|
-
return [
|
|
1517
|
-
...heading,
|
|
1518
|
-
` - component_id: ${pkg.slug}`,
|
|
1519
|
-
` name: "${pkg.slug}"`,
|
|
1520
|
-
` paths:`,
|
|
1521
|
-
` - ${where}/**`,
|
|
1522
|
-
``
|
|
1523
|
-
];
|
|
1524
|
-
}).join("\n");
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Ensure every codecov status default carries `if_not_found: success`, so an
|
|
1528
|
-
* infra-only PR (dep bump, config, lockfile — no coverable change) passes
|
|
1529
|
-
* instead of hanging forever on a required check codecov never posts.
|
|
1530
|
-
*
|
|
1531
|
-
* Injects the key on the line after each `target:` that sits inside a status
|
|
1532
|
-
* block (`coverage.status.*.default` or a `statuses:` list item — indent ≥ 8,
|
|
1533
|
-
* or ≥ 8 for a `- type:` list entry), when the immediate sibling lines do not
|
|
1534
|
-
* already declare it.
|
|
1535
|
-
*/
|
|
1536
|
-
function ensureIfNotFound(yaml) {
|
|
1537
|
-
const lines = yaml.split("\n");
|
|
1538
|
-
const out = [];
|
|
1539
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1540
|
-
const line = lines[i];
|
|
1541
|
-
out.push(line);
|
|
1542
|
-
const m = /^(\s{8,})target:\s+\S+\s*$/.exec(line);
|
|
1543
|
-
if (!m) continue;
|
|
1544
|
-
const indent = m[1];
|
|
1545
|
-
let alreadySet = false;
|
|
1546
|
-
for (let j = i + 1; j < lines.length; j++) {
|
|
1547
|
-
const sib = lines[j];
|
|
1548
|
-
if (sib.trim() === "") continue;
|
|
1549
|
-
const sibIndent = sib.match(/^\s*/)[0].length;
|
|
1550
|
-
if (sibIndent < indent.length) break;
|
|
1551
|
-
if (sibIndent === indent.length && /^\s*if_not_found\s*:/.test(sib)) {
|
|
1552
|
-
alreadySet = true;
|
|
1553
|
-
break;
|
|
1554
|
-
}
|
|
1555
|
-
if (sibIndent === indent.length && /^\s*(- |\w)/.test(sib) && !/^\s*(threshold|flags|paths|branches)\s*:/.test(sib)) break;
|
|
1556
|
-
}
|
|
1557
|
-
if (!alreadySet) out.push(`${indent}if_not_found: success`);
|
|
1558
|
-
}
|
|
1559
|
-
return out.join("\n");
|
|
1560
|
-
}
|
|
1561
1523
|
/** Folders that never get a flag: `docs` coverage must not count toward the aggregate statuses. */
|
|
1562
1524
|
const FLAGLESS_FOLDERS = /* @__PURE__ */ new Set(["docs"]);
|
|
1563
1525
|
/**
|
|
@@ -1567,7 +1529,7 @@ const FLAGLESS_FOLDERS = /* @__PURE__ */ new Set(["docs"]);
|
|
|
1567
1529
|
* tests one package of a group would otherwise drop the group's other packages.
|
|
1568
1530
|
*/
|
|
1569
1531
|
function codecovFlagNames(packages) {
|
|
1570
|
-
return packages.filter((pkg) => !FLAGLESS_FOLDERS.has(
|
|
1532
|
+
return packages.filter((pkg) => !FLAGLESS_FOLDERS.has(packageLocation(pkg).split("/")[0])).map((pkg) => pkg.slug);
|
|
1571
1533
|
}
|
|
1572
1534
|
/**
|
|
1573
1535
|
* The `uploads` input of the `verification.unitTests` workflow: a JSON list of `{ flag, files }`, one per package
|
|
@@ -1578,187 +1540,10 @@ function codecovUploads(packages, lcovPaths = {}) {
|
|
|
1578
1540
|
const flags = new Set(codecovFlagNames(packages));
|
|
1579
1541
|
const entries = packages.filter((pkg) => flags.has(pkg.slug)).map((pkg) => ({
|
|
1580
1542
|
flag: pkg.slug,
|
|
1581
|
-
files: lcovPaths[pkg.slug] ?? `${
|
|
1543
|
+
files: lcovPaths[pkg.slug] ?? `${packageLocation(pkg)}/coverage/lcov.info`
|
|
1582
1544
|
}));
|
|
1583
1545
|
return JSON.stringify(entries);
|
|
1584
1546
|
}
|
|
1585
|
-
/** `[start, end)` of a top-level key's section; trailing blank lines are not part of it. `null` when absent. */
|
|
1586
|
-
function section(lines, key) {
|
|
1587
|
-
const start = lines.indexOf(`${key}:`);
|
|
1588
|
-
if (start === -1) return null;
|
|
1589
|
-
let end = lines.findIndex((line, i) => i > start && /^[A-Za-z_]/.test(line));
|
|
1590
|
-
if (end === -1) end = lines.length;
|
|
1591
|
-
while (lines[end - 1].trim() === "") end--;
|
|
1592
|
-
return [start, end];
|
|
1593
|
-
}
|
|
1594
|
-
/** Insert the entries of `wanted` that no existing list item names, after the list's last line (`listEnd`). */
|
|
1595
|
-
function appendMissingItems(lines, listStart, listEnd, wanted, itemName, render) {
|
|
1596
|
-
const have = new Set(lines.slice(listStart + 1, listEnd).map((line) => itemName.exec(line)?.[1]));
|
|
1597
|
-
lines.splice(listEnd, 0, ...wanted.filter((name) => !have.has(name)).map(render));
|
|
1598
|
-
}
|
|
1599
|
-
const FLAG_ENTRY = /^ {4}- name:\s*(\S+)/;
|
|
1600
|
-
const flagEntry = (name) => ` - name: ${name}`;
|
|
1601
|
-
/**
|
|
1602
|
-
* Ensure a top-level `flag_management:` section carries `default_rules.carryforward`
|
|
1603
|
-
* and one `individual_flags` entry per flag. A missing section is inserted before
|
|
1604
|
-
* `component_management:`; an existing one only gains the entries it lacks, so hand
|
|
1605
|
-
* edits (extra flags, per-flag `paths`/`statuses`, a different `carryforward`) survive.
|
|
1606
|
-
*/
|
|
1607
|
-
function ensureFlagManagement(yaml, flags) {
|
|
1608
|
-
const lines = yaml.split("\n");
|
|
1609
|
-
const listHead = flags.length === 0 ? " individual_flags: []" : " individual_flags:";
|
|
1610
|
-
const range = section(lines, "flag_management");
|
|
1611
|
-
if (!range) {
|
|
1612
|
-
const block = [
|
|
1613
|
-
"flag_management:",
|
|
1614
|
-
" default_rules:",
|
|
1615
|
-
" carryforward: true",
|
|
1616
|
-
listHead,
|
|
1617
|
-
...flags.map(flagEntry)
|
|
1618
|
-
];
|
|
1619
|
-
const at = lines.indexOf("component_management:");
|
|
1620
|
-
if (at === -1) lines.push("", ...block);
|
|
1621
|
-
else lines.splice(at, 0, ...block, "");
|
|
1622
|
-
return lines.join("\n");
|
|
1623
|
-
}
|
|
1624
|
-
const [start, end] = range;
|
|
1625
|
-
const list = lines.findIndex((line, i) => i > start && i < end && /^ {2}individual_flags:/.test(line));
|
|
1626
|
-
if (list === -1) lines.splice(end, 0, listHead, ...flags.map(flagEntry));
|
|
1627
|
-
else if (/\[\s*\]\s*$/.test(lines[list])) {
|
|
1628
|
-
if (flags.length > 0) lines.splice(list, 1, listHead, ...flags.map(flagEntry));
|
|
1629
|
-
} else appendMissingItems(lines, list, end, flags, FLAG_ENTRY, flagEntry);
|
|
1630
|
-
return lines.join("\n");
|
|
1631
|
-
}
|
|
1632
|
-
/**
|
|
1633
|
-
* Scope `coverage.status.project.default` and `coverage.status.patch.default` to
|
|
1634
|
-
* the flags, so the required `codecov/project` and `codecov/patch` contexts keep
|
|
1635
|
-
* their names while only counting the grouped (non-`docs`) coverage. A block that
|
|
1636
|
-
* already lists flags only gains the missing ones; an inline `flags: [...]` is left alone.
|
|
1637
|
-
*/
|
|
1638
|
-
function scopeAggregateStatuses(yaml, flags) {
|
|
1639
|
-
if (flags.length === 0) return yaml;
|
|
1640
|
-
const lines = yaml.split("\n");
|
|
1641
|
-
for (const kind of ["project", "patch"]) {
|
|
1642
|
-
const at = lines.indexOf(` ${kind}:`);
|
|
1643
|
-
if (at === -1 || lines[at + 1] !== " default:") continue;
|
|
1644
|
-
let end = at + 2;
|
|
1645
|
-
while (end < lines.length && /^ {8}/.test(lines[end])) end++;
|
|
1646
|
-
const flagsAt = lines.findIndex((line, i) => i >= at + 2 && i < end && /^ {8}flags:/.test(line));
|
|
1647
|
-
if (flagsAt === -1) lines.splice(at + 2, 0, " flags:", ...flags.map((name) => ` - ${name}`));
|
|
1648
|
-
else if (!/^ {8}flags:\s*\S/.test(lines[flagsAt])) {
|
|
1649
|
-
let listEnd = flagsAt + 1;
|
|
1650
|
-
while (listEnd < end && /^ {10}- /.test(lines[listEnd])) listEnd++;
|
|
1651
|
-
appendMissingItems(lines, flagsAt, listEnd, flags, /^ {10}- (\S+)/, (name) => ` - ${name}`);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
return lines.join("\n");
|
|
1655
|
-
}
|
|
1656
|
-
/**
|
|
1657
|
-
* Make the per-component statuses (`component_management.default_rules.statuses`)
|
|
1658
|
-
* informational, so the ~70 `codecov/patch/<component>` contexts post but never block.
|
|
1659
|
-
*/
|
|
1660
|
-
function ensureInformationalComponentStatuses(yaml) {
|
|
1661
|
-
const lines = yaml.split("\n");
|
|
1662
|
-
const range = section(lines, "component_management");
|
|
1663
|
-
if (!range) return yaml;
|
|
1664
|
-
const stop = lines.indexOf(INDIVIDUAL_COMPONENTS_MARKER);
|
|
1665
|
-
const limit = stop === -1 ? range[1] : stop;
|
|
1666
|
-
const starts = lines.flatMap((line, i) => i > range[0] && i < limit && /^ {6}- type:/.test(line) ? [i] : []);
|
|
1667
|
-
for (const first of starts.reverse()) {
|
|
1668
|
-
let last = first + 1;
|
|
1669
|
-
while (last < limit && /^ {8}\S/.test(lines[last])) last++;
|
|
1670
|
-
if (!lines.slice(first, last).some((line) => /^ {8}informational:/.test(line))) lines.splice(last, 0, " informational: true");
|
|
1671
|
-
}
|
|
1672
|
-
return lines.join("\n");
|
|
1673
|
-
}
|
|
1674
|
-
/** Documentation Codecov would otherwise count as testable code, though nothing reports coverage for it. */
|
|
1675
|
-
const IGNORED_DOCS = ["**/*.mdx"];
|
|
1676
|
-
const ignoreEntry = (glob) => ` - "${glob}"`;
|
|
1677
|
-
/**
|
|
1678
|
-
* Ensure a top-level `ignore:` list names the documentation files in {@link IGNORED_DOCS}. Without it a docs-only
|
|
1679
|
-
* PR that adds `.mdx` pages is judged to change testable files, posts no coverage and fails `codecov/patch` and
|
|
1680
|
-
* `codecov/project` ("Empty Upload", #1442). A missing list is inserted before `coverage:`; an existing one only
|
|
1681
|
-
* gains the entries it lacks, so hand-added globs survive.
|
|
1682
|
-
*/
|
|
1683
|
-
function ensureIgnore(yaml) {
|
|
1684
|
-
const lines = yaml.split("\n");
|
|
1685
|
-
const range = section(lines, "ignore");
|
|
1686
|
-
if (!range) {
|
|
1687
|
-
const block = [
|
|
1688
|
-
"ignore:",
|
|
1689
|
-
...IGNORED_DOCS.map(ignoreEntry),
|
|
1690
|
-
""
|
|
1691
|
-
];
|
|
1692
|
-
const at = lines.indexOf("coverage:");
|
|
1693
|
-
if (at === -1) {
|
|
1694
|
-
while (lines.at(-1) === "") lines.pop();
|
|
1695
|
-
lines.push("", ...block.slice(0, -1));
|
|
1696
|
-
} else lines.splice(at, 0, ...block);
|
|
1697
|
-
return lines.join("\n");
|
|
1698
|
-
}
|
|
1699
|
-
appendMissingItems(lines, range[0], range[1], IGNORED_DOCS, /^ {2}- ["']?([^"'\s]+)/, ignoreEntry);
|
|
1700
|
-
return lines.join("\n");
|
|
1701
|
-
}
|
|
1702
|
-
/** The Codecov flag the Docs coverage workflow uploads doc-comment coverage as (`holocron probe docs --lcov`). */
|
|
1703
|
-
const DOCUMENTATION_FLAG = "documentation";
|
|
1704
|
-
/** What each aggregate asks of the `documentation` flag: the patch must be fully documented, the project must not drop. */
|
|
1705
|
-
const DOCUMENTATION_TARGETS = {
|
|
1706
|
-
project: "auto",
|
|
1707
|
-
patch: "100%"
|
|
1708
|
-
};
|
|
1709
|
-
function documentationStatus(kind, mode) {
|
|
1710
|
-
return [
|
|
1711
|
-
` ${DOCUMENTATION_FLAG}:`,
|
|
1712
|
-
" flags:",
|
|
1713
|
-
` - ${DOCUMENTATION_FLAG}`,
|
|
1714
|
-
` target: ${DOCUMENTATION_TARGETS[kind]}`,
|
|
1715
|
-
" if_not_found: success",
|
|
1716
|
-
...mode === "warn" ? [" informational: true"] : []
|
|
1717
|
-
];
|
|
1718
|
-
}
|
|
1719
|
-
/**
|
|
1720
|
-
* Ensure `codecov.yml` carries the `documentation` flag and a named `documentation` status under
|
|
1721
|
-
* `coverage.status.project` and `coverage.status.patch` (spec `tech-api-docs`). They are named statuses scoped to that
|
|
1722
|
-
* flag, so the required `codecov/project` and `codecov/patch` keep counting only the tests. `warn` makes them
|
|
1723
|
-
* informational and `required` does not; an existing status only has that line brought in line, so hand edits survive.
|
|
1724
|
-
* `off` adds nothing and leaves what is there alone: setup never deletes.
|
|
1725
|
-
*/
|
|
1726
|
-
function ensureDocumentationCoverage(yaml, mode) {
|
|
1727
|
-
if (mode === "off") return yaml;
|
|
1728
|
-
const lines = ensureFlagManagement(yaml, [DOCUMENTATION_FLAG]).split("\n");
|
|
1729
|
-
for (const kind of ["project", "patch"]) {
|
|
1730
|
-
const at = lines.indexOf(` ${kind}:`);
|
|
1731
|
-
if (at === -1) continue;
|
|
1732
|
-
let end = at + 1;
|
|
1733
|
-
while (end < lines.length && (lines[end].trim() === "" || /^ {5}/.test(lines[end]))) end++;
|
|
1734
|
-
while (lines[end - 1].trim() === "") end--;
|
|
1735
|
-
const own = lines.findIndex((line, i) => i > at && i < end && line === ` documentation:`);
|
|
1736
|
-
if (own === -1) {
|
|
1737
|
-
lines.splice(end, 0, ...documentationStatus(kind, mode));
|
|
1738
|
-
continue;
|
|
1739
|
-
}
|
|
1740
|
-
let ownEnd = own + 1;
|
|
1741
|
-
while (ownEnd < end && /^ {8}/.test(lines[ownEnd])) ownEnd++;
|
|
1742
|
-
const keep = lines.slice(own, ownEnd).filter((line) => !/^ {8}informational:/.test(line));
|
|
1743
|
-
lines.splice(own, ownEnd - own, ...keep, ...mode === "warn" ? [" informational: true"] : []);
|
|
1744
|
-
}
|
|
1745
|
-
return lines.join("\n");
|
|
1746
|
-
}
|
|
1747
|
-
/** Everything `codecov.yml` needs on top of the components list: if_not_found, ignored docs, flags, scoped aggregates, informational components, and the documentation flag when the repo asks for it. */
|
|
1748
|
-
function applyStatusRules(yaml, flags, docsCoverage) {
|
|
1749
|
-
return ensureDocumentationCoverage(ensureInformationalComponentStatuses(scopeAggregateStatuses(ensureFlagManagement(ensureIgnore(ensureIfNotFound(yaml)), flags), flags)), docsCoverage);
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
1752
|
-
* Brings an existing `codecov.yml` up to date with the workspace packages (flags, components and status rules) and the
|
|
1753
|
-
* repo's `options`, keeping every hand edit.
|
|
1754
|
-
*/
|
|
1755
|
-
function mergeCodecovComponents(existing, packages, options = {}) {
|
|
1756
|
-
const flags = codecovFlagNames(packages);
|
|
1757
|
-
const docsCoverage = options.docsCoverage ?? "off";
|
|
1758
|
-
const idx = existing.indexOf(INDIVIDUAL_COMPONENTS_MARKER);
|
|
1759
|
-
if (idx === -1) return applyStatusRules(existing, flags, docsCoverage);
|
|
1760
|
-
return applyStatusRules(existing.slice(0, idx + 24), flags, docsCoverage) + codecovComponentBlock(packages);
|
|
1761
|
-
}
|
|
1762
1547
|
/**
|
|
1763
1548
|
* Every package the repo's `pnpm-workspace.yaml` declares (the default roots
|
|
1764
1549
|
* when it declares none), sorted by location, so each group folder (`cli/`, `plugins/`, ...) stays together. Every one needs a
|
|
@@ -1791,21 +1576,7 @@ function readWorkspacePackages(repoRoot) {
|
|
|
1791
1576
|
name,
|
|
1792
1577
|
path: relativeDir
|
|
1793
1578
|
};
|
|
1794
|
-
}).sort((a, b) =>
|
|
1795
|
-
}
|
|
1796
|
-
/** A brand-new `codecov.yml` — the scaffold header + the base template + this repo's component list. */
|
|
1797
|
-
function createCodecovConfig(packages, options = {}) {
|
|
1798
|
-
const base = applyStatusRules(codecov_default.trimEnd(), codecovFlagNames(packages), options.docsCoverage ?? "off");
|
|
1799
|
-
return `${scaffoldHeader()}${base}${codecovComponentBlock(packages)}`;
|
|
1800
|
-
}
|
|
1801
|
-
/**
|
|
1802
|
-
* The full pipeline `holocron setup` needs: read this repo's public
|
|
1803
|
-
* `packages/*`, then either merge them into an `existing` `codecov.yml` or
|
|
1804
|
-
* scaffold a new one.
|
|
1805
|
-
*/
|
|
1806
|
-
function codecovConfig(repoRoot, existing, options = {}) {
|
|
1807
|
-
const packages = readWorkspacePackages(repoRoot);
|
|
1808
|
-
return existing != null ? mergeCodecovComponents(existing, packages, options) : createCodecovConfig(packages, options);
|
|
1579
|
+
}).sort((a, b) => packageLocation(a).localeCompare(packageLocation(b)));
|
|
1809
1580
|
}
|
|
1810
1581
|
// src/generators/github-action-reusable-workflows/github-action-reusable-workflows.ts
|
|
1811
1582
|
/**
|
|
@@ -1939,9 +1710,9 @@ function stampDeprecated(content, path) {
|
|
|
1939
1710
|
*/
|
|
1940
1711
|
const AGGREGATE_CHECK = "ci / Required checks";
|
|
1941
1712
|
/** Ordered, de-duplicated. */
|
|
1942
|
-
function requiredChecks(config, aggregate) {
|
|
1713
|
+
function requiredChecks(config, aggregate, statusContexts) {
|
|
1943
1714
|
if (aggregate) return [AGGREGATE_CHECK, "DCO"];
|
|
1944
|
-
return [.../* @__PURE__ */ new Set(["DCO", ...taskCheckContexts(config)])];
|
|
1715
|
+
return [.../* @__PURE__ */ new Set(["DCO", ...taskCheckContexts(config, statusContexts)])];
|
|
1945
1716
|
}
|
|
1946
1717
|
// src/generators/scripts/check-package-scripts/check-package-scripts.ts
|
|
1947
1718
|
/** Variants of a script that npm and pnpm users already expect (`test:watch`, `lint:fix`); not task ids. */
|
|
@@ -3976,12 +3747,11 @@ function createAstromech(options) {
|
|
|
3976
3747
|
},
|
|
3977
3748
|
runnableTasks: () => runnableTaskNames(),
|
|
3978
3749
|
reusableTemplates: () => reusableTemplates(),
|
|
3979
|
-
requiredChecks: (aggregate) => requiredChecks(options.config ?? {}, aggregate),
|
|
3750
|
+
requiredChecks: (aggregate) => requiredChecks(options.config ?? {}, aggregate, options.statusContexts),
|
|
3980
3751
|
aggregateCaller: () => {
|
|
3981
|
-
const checks = aggregateChecks(options.config ?? {});
|
|
3752
|
+
const checks = aggregateChecks(options.config ?? {}, options.statusContexts);
|
|
3982
3753
|
return checks.expected.length === 0 && checks.statuses.length === 0 ? null : aggregateCaller(checks);
|
|
3983
3754
|
},
|
|
3984
|
-
codecovConfig: (existing, codecov) => codecovConfig(options.cwd, existing, codecov),
|
|
3985
3755
|
turboConfig: () => turboConfig(options.config ?? {}, { monorepo: hasWorkspaceFile() }),
|
|
3986
3756
|
ensureRootWorkspaceMember: (workspaceYaml, rootScripts) => {
|
|
3987
3757
|
return ensureRootWorkspaceMember(workspaceYaml, rootScripts, planTasks(options.config ?? {}, TASKS).filter((task) => task.kind === "turbo").flatMap((task) => [task.key, task.script]));
|
|
@@ -4152,4 +3922,4 @@ function createConfig$10() {
|
|
|
4152
3922
|
function createIgnoreConfig$1() {
|
|
4153
3923
|
return `${workflowHeader()}${_yamlignore_default}`;
|
|
4154
3924
|
}
|
|
4155
|
-
export { AGGREGATE_CHECK, CI_ORDER, DEFAULT_ORG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, checkPackageScripts,
|
|
3925
|
+
export { AGGREGATE_CHECK, CI_ORDER, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, TEMPLATE_HOME, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, checkPackageScripts, codecovFlagNames, codecovUploads, createIgnoreConfig as createAlexignore, createRcConfig as createAlexrc, createAstromech, createConfig as createCommitMsg, createConfig$1 as createDco, createConfig$2 as createDependabot, createConfig$3 as createDevmoji, createConfig$4 as createEditorconfig, createConfig$5 as createEditorconfigChecker, createHeader, createConfig$6 as createLabeler, createConfig$7 as createPreCommit, createConfig$8 as createPrePush, createConfig$9 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig$1 as createYamlignore, createConfig$10 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, describeTasks, extractPreviewConfig, formatJson, frozenReusablePaths, generateCombinedDeployContent, generateThinCallerContent, hostedReusableWorkflows, idFromSource, isDeprecated, isGeneratedScript, isTask, legacyCaller, legacyCallerFile, legacyFile, legacyGate, legacyName, legacyWorkflowKey, localize, localizeActions, matchNamespace, mergeScripts, normalizeWorkflowWith, packageLocation, planSuites, planTasks, readWorkspacePackages, requiredChecks, resolveTaskName, reusableTemplates, runCi, runGroup, runTask, scriptName, scriptsFor, stampDeprecated, suiteMembers, taskKey, workflowFile, workflowKey, workflowKeys, workspacePackages };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.453",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.2.3",
|
|
56
56
|
"@commitlint/load": "^21.2.3",
|
|
57
57
|
"@commitlint/types": "^21.2.3",
|
|
58
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
59
|
-
"@theholocron/json-utils": "^1.17.0-alpha.4",
|
|
60
|
-
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
58
|
+
"@theholocron/datapad": "5.0.0-alpha.453",
|
|
61
59
|
"@theholocron/misc-utils": "^1.17.0-alpha.4",
|
|
60
|
+
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
61
|
+
"@theholocron/json-utils": "^1.17.0-alpha.4",
|
|
62
62
|
"@theholocron/pkg-utils": "^1.17.0-alpha.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"tsdown": "^0.23.7",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"vitest": "^5.1.0",
|
|
76
|
+
"@theholocron/commitlint-config": "^8.9.0-alpha.18",
|
|
77
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.18",
|
|
76
78
|
"@theholocron/ci": "1.0.0",
|
|
77
|
-
"@theholocron/
|
|
78
|
-
"@theholocron/
|
|
79
|
-
"@theholocron/
|
|
80
|
-
"@theholocron/tsdown-config": "^8.9.0-alpha.
|
|
81
|
-
"@theholocron/eslint-config": "^8.9.0-alpha.17",
|
|
82
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.17"
|
|
79
|
+
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.18",
|
|
80
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.18",
|
|
81
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.18",
|
|
82
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.18"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=22"
|