@theholocron/astromech 5.0.0-alpha.280 → 5.0.0-alpha.282
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 +1 -1
- package/dist/index.mjs +39 -14
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ documents, not a naming convention repos need to follow.
|
|
|
74
74
|
| `platform.notifyCheck` | _(none — manual workflow)_ | posts a labelled test message to every notification channel; fails per channel that does not work |
|
|
75
75
|
| `platform.repoSync` | `holocron repo sync` | keeps generated files current |
|
|
76
76
|
| `platform.commitStandards` | commitlint | no local equivalent — enforced by the `commit-msg` hook locally, over the PR's commit range in CI |
|
|
77
|
-
| `platform.repoValidation` | `scripts/validate-adrs.mjs`, `
|
|
77
|
+
| `platform.repoValidation` | `scripts/validate-adrs.mjs`, `holocron probe docs presence` | a job-bearing task — spec/ADR frontmatter and docs-presence, not linters |
|
|
78
78
|
| `knowledge.wiki` | Fern | publishes `docs/wiki/*.md` — not a sync, a publish; carries `preview` |
|
|
79
79
|
| `knowledge.docs` | Astro build | the docs site itself; carries `preview` (defaults on) |
|
|
80
80
|
| `knowledge.components` | Storybook build | a browsable component catalog — "Storybook" is the tool, not the intent; carries `preview` (defaults on) |
|
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,29 @@ import { stringifyJson } from "@theholocron/json-utils";
|
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
8
8
|
import { join, relative } from "node:path";
|
|
9
9
|
import { findExecutableSync } from "@theholocron/fs-utils";
|
|
10
|
+
/**
|
|
11
|
+
* Where generated workflows call the hosted files today. No change from the templates' own spelling until the files
|
|
12
|
+
* move (#1475, #1480); the target is `theholocron/holocron/.github/workflows` and `theholocron/holocron/ci/actions` at
|
|
13
|
+
* `ci-v1`.
|
|
14
|
+
*/
|
|
15
|
+
const CI_HOME = {
|
|
16
|
+
workflows: "theholocron/.github/.github/workflows",
|
|
17
|
+
actions: "theholocron/.github/.github/actions",
|
|
18
|
+
ref: "main"
|
|
19
|
+
};
|
|
20
|
+
const REFERENCE = /theholocron\/\.github\/\.github\/(workflows|actions)\/([\w.-]+)@main/g;
|
|
21
|
+
/** `text` with every hosted-workflow and hosted-action reference moved from the templates' spelling to `home`. */
|
|
22
|
+
function rehome(text, home = CI_HOME) {
|
|
23
|
+
return text.replace(REFERENCE, (_all, kind, name) => `${home[kind]}/${name}@${home.ref}`);
|
|
24
|
+
}
|
|
25
|
+
/** {@link rehome} applied to every value of a map of templates. */
|
|
26
|
+
function rehomeAll(templates, home = CI_HOME) {
|
|
27
|
+
return Object.fromEntries(Object.entries(templates).map(([name, text]) => [name, rehome(text, home)]));
|
|
28
|
+
}
|
|
29
|
+
/** A `uses:` value for a hosted reusable workflow, for generated YAML that is not written in a template. */
|
|
30
|
+
function reusableWorkflowRef(file, home = CI_HOME) {
|
|
31
|
+
return `${home.workflows}/${file}@${home.ref}`;
|
|
32
|
+
}
|
|
10
33
|
// src/templates/codecov/codecov.yml
|
|
11
34
|
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";
|
|
12
35
|
// src/generators/codecov/codecov.ts
|
|
@@ -375,7 +398,7 @@ var platform_notifyCheck_default$1 = "name: Notify Check\n\n# Proves the notific
|
|
|
375
398
|
// src/templates/reusable/platform.repoSync.yml
|
|
376
399
|
var platform_repoSync_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 notifications setup`; 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 repo 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 || vars.AXIOM_DATASET }}\n 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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 repo 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: repo 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 repo 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 theholocron/.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 }}: repo 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";
|
|
377
400
|
// src/templates/reusable/platform.repoValidation.yml
|
|
378
|
-
var platform_repoValidation_default$1 = "name: Repo Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n TURBO_TOKEN:\n required: false\n\njobs:\n adrs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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: Validate ADR and spec frontmatter\n with:\n task: platform.repoValidation\n job: adrs\n\n docs-presence:\n name: Validate docs presence\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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: Validate docs presence for new packages\n with:\n task: platform.repoValidation\n job: docsPresence\n env:\n BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [adrs, docs-presence]\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";
|
|
401
|
+
var platform_repoValidation_default$1 = "name: Repo Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n TURBO_TOKEN:\n required: false\n\njobs:\n adrs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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: Validate ADR and spec frontmatter\n with:\n task: platform.repoValidation\n job: adrs\n\n docs-presence:\n name: Validate docs presence\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\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: Validate docs presence for new packages\n with:\n task: platform.repoValidation\n job: docsPresence\n env:\n BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n # The PR title and description, read by the script for a `feat` and a `[skip docs] <reason>` marker. They\n # reach the script through the environment, never inline in a command.\n PR_TITLE: ${{ github.event.pull_request.title }}\n PR_BODY: ${{ github.event.pull_request.body }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [adrs, docs-presence]\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";
|
|
379
402
|
// src/templates/reusable/platform.syncTemplates.yml
|
|
380
403
|
var platform_syncTemplates_default$1 = "name: Sync Templates\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_SYNC_TOKEN:\n description: >\n Fine-grained PAT (resource owner org) with BOTH contents:write and\n workflows:write on theholocron/.github — contents:write alone is\n rejected for anything under .github/workflows/, a GitHub\n fine-grained-PAT restriction independent of repo permissions.\n required: false\n GH_TOKEN:\n description: >\n Fallback PAT with the same two permissions, used only when\n HOLOCRON_SYNC_TOKEN is not set. The default GITHUB_TOKEN is never\n an acceptable fallback here — it cannot write to a different repo\n no matter what this job's own `permissions:` block grants, so it\n is deliberately not offered as a third fallback; the CLI's own\n token resolver already fails with a clear, actionable message\n when both secrets above are unset.\n required: false\n\njobs:\n sync-templates:\n name: Run holocron sync github\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync github\n # No local commit, no branch, no PR — pushes directly to\n # theholocron/.github's own default branch.\n #\n # HOLOCRON_SYNC_TOKEN is scoped to ONLY this step, not the job —\n # \"Setup\" (above) runs this ref's own pnpm install, and the\n # \"Build the workspace\" step this composite action may run (an\n # unbuilt workspace checkout — the holocron repo itself) runs this\n # ref's own build, including any postinstall/build-time script a\n # malicious push could carry. Neither sees a write credential.\n uses: theholocron/.github/.github/actions/holocron@main\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n with:\n command: sync github\n";
|
|
381
404
|
// src/templates/reusable/preview.yml
|
|
@@ -579,7 +602,7 @@ function groupedPublishCaller(base, groups, shared, ungrouped = false) {
|
|
|
579
602
|
})
|
|
580
603
|
];
|
|
581
604
|
const matrixJson = JSON.stringify(entries).replaceAll("'", "''");
|
|
582
|
-
const uses =
|
|
605
|
+
const uses = ` uses: ${reusableWorkflowRef("delivery.publish.yml")}`;
|
|
583
606
|
const ungroupedJob = ungroupedInputs ? [
|
|
584
607
|
" release:",
|
|
585
608
|
" name: Release",
|
|
@@ -648,7 +671,7 @@ function groupedPublishCaller(base, groups, shared, ungrouped = false) {
|
|
|
648
671
|
* into the thin caller `holocron repo setup` / `holocron repo sync` write locally.
|
|
649
672
|
*/
|
|
650
673
|
/** The reusable-workflow thin-caller templates, by task name. */
|
|
651
|
-
const WORKFLOW_TEMPLATES = {
|
|
674
|
+
const WORKFLOW_TEMPLATES = rehomeAll({
|
|
652
675
|
"verification.unitTests": verification_unitTests_default,
|
|
653
676
|
"verification.visualRegression": verification_visualRegression_default,
|
|
654
677
|
"verification.typeSafety": verification_typeSafety_default,
|
|
@@ -678,7 +701,7 @@ const WORKFLOW_TEMPLATES = {
|
|
|
678
701
|
greetings: greetings_default,
|
|
679
702
|
dependencies: dependencies_default,
|
|
680
703
|
bookkeeping: bookkeeping_default
|
|
681
|
-
};
|
|
704
|
+
});
|
|
682
705
|
/** The task names that have a thin-caller workflow template. */
|
|
683
706
|
const KNOWN_WORKFLOWS = new Set(Object.keys(WORKFLOW_TEMPLATES));
|
|
684
707
|
/**
|
|
@@ -888,14 +911,14 @@ function generateCombinedDeployContent(deployWith, paths, preview) {
|
|
|
888
911
|
` deploy:`,
|
|
889
912
|
` name: Deploy`,
|
|
890
913
|
` if: \${{ github.event_name != 'pull_request' }}`,
|
|
891
|
-
` uses:
|
|
914
|
+
` uses: ${reusableWorkflowRef("delivery.deploy.yml")}`,
|
|
892
915
|
...deployWithBlock ? [deployWithBlock.trimEnd()] : [],
|
|
893
916
|
` secrets: inherit`,
|
|
894
917
|
``,
|
|
895
918
|
` preview:`,
|
|
896
919
|
` name: Preview`,
|
|
897
920
|
` if: \${{ github.event_name == 'pull_request' }}`,
|
|
898
|
-
` uses:
|
|
921
|
+
` uses: ${reusableWorkflowRef("preview.yml")}`,
|
|
899
922
|
previewWithBlock.trimEnd(),
|
|
900
923
|
` secrets: inherit`,
|
|
901
924
|
``
|
|
@@ -977,7 +1000,7 @@ function deriveDeployPaths(raw) {
|
|
|
977
1000
|
* the *thin-caller bases* written into each consumer repo's `.github/workflows/`.
|
|
978
1001
|
*/
|
|
979
1002
|
/** `workflow_call` implementations → `.github/workflows/<name>.yml`. */
|
|
980
|
-
const REUSABLE_WORKFLOWS = {
|
|
1003
|
+
const REUSABLE_WORKFLOWS = rehomeAll({
|
|
981
1004
|
"verification.unitTests": verification_unitTests_default$1,
|
|
982
1005
|
"verification.visualRegression": verification_visualRegression_default$1,
|
|
983
1006
|
"verification.typeSafety": verification_typeSafety_default$1,
|
|
@@ -1011,9 +1034,9 @@ const REUSABLE_WORKFLOWS = {
|
|
|
1011
1034
|
"sync-dispatch": sync_dispatch_default,
|
|
1012
1035
|
tag: tag_default,
|
|
1013
1036
|
"sync-github": sync_github_default
|
|
1014
|
-
};
|
|
1037
|
+
});
|
|
1015
1038
|
/** Composite actions → `.github/actions/<name>/action.yml` (key includes `/action`). */
|
|
1016
|
-
const REUSABLE_ACTIONS = {
|
|
1039
|
+
const REUSABLE_ACTIONS = rehomeAll({
|
|
1017
1040
|
"auto-commit/action": auto_commit_default,
|
|
1018
1041
|
"codecov-upload/action": codecov_upload_default,
|
|
1019
1042
|
"holocron/action": holocron_default,
|
|
@@ -1021,7 +1044,7 @@ const REUSABLE_ACTIONS = {
|
|
|
1021
1044
|
"notify/action": notify_default,
|
|
1022
1045
|
"setup/action": setup_default,
|
|
1023
1046
|
"setup-node/action": setup_node_default
|
|
1024
|
-
};
|
|
1047
|
+
});
|
|
1025
1048
|
/** GitHub starter-workflow metadata → `workflow-templates/<name>.properties.json`. */
|
|
1026
1049
|
const WORKFLOW_TEMPLATE_PROPERTIES = { bookkeeping: JSON.stringify({
|
|
1027
1050
|
name: "Bookkeeping",
|
|
@@ -1239,10 +1262,7 @@ const TASKS = {
|
|
|
1239
1262
|
checkContext: "platform.repoValidation / Validate ADRs and specs"
|
|
1240
1263
|
},
|
|
1241
1264
|
docsPresence: {
|
|
1242
|
-
local: {
|
|
1243
|
-
tool: "node",
|
|
1244
|
-
args: ["scripts/validate-docs-presence.mjs"]
|
|
1245
|
-
},
|
|
1265
|
+
local: { command: "probe docs presence" },
|
|
1246
1266
|
checkContext: "platform.repoValidation / Validate docs presence",
|
|
1247
1267
|
alias: "docsEnforcement"
|
|
1248
1268
|
}
|
|
@@ -2371,6 +2391,11 @@ function runUnit(input, label, local, run, passthrough) {
|
|
|
2371
2391
|
message: msg
|
|
2372
2392
|
};
|
|
2373
2393
|
};
|
|
2394
|
+
if (local?.command) return run(process.execPath, [
|
|
2395
|
+
process.argv[1],
|
|
2396
|
+
...local.command.split(" "),
|
|
2397
|
+
...passthrough
|
|
2398
|
+
]);
|
|
2374
2399
|
if (local) {
|
|
2375
2400
|
const runner = resolveRunner(local, cwd, listDir, readFile);
|
|
2376
2401
|
if (!runner) return skip(`no ${label} runner for this repo`);
|
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.282",
|
|
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",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@commitlint/lint": "^21.2.3",
|
|
51
51
|
"@commitlint/load": "^21.2.3",
|
|
52
52
|
"@commitlint/types": "^21.2.3",
|
|
53
|
+
"@theholocron/datapad": "5.0.0-alpha.282",
|
|
53
54
|
"@theholocron/fs-utils": "^1.16.1-alpha.3",
|
|
54
55
|
"@theholocron/json-utils": "^1.16.1-alpha.3",
|
|
55
|
-
"@theholocron/datapad": "5.0.0-alpha.280",
|
|
56
56
|
"@theholocron/pkg-utils": "^1.16.1-alpha.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"tsdown": "^0.23.3",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
71
|
"vitest": "^5.0.5",
|
|
72
|
-
"@theholocron/
|
|
73
|
-
"@theholocron/
|
|
74
|
-
"@theholocron/
|
|
75
|
-
"@theholocron/semantic-release-config": "^8.9.0-alpha.
|
|
76
|
-
"@theholocron/
|
|
77
|
-
"@theholocron/
|
|
78
|
-
"@theholocron/vitest-config": "^8.9.0-alpha.
|
|
72
|
+
"@theholocron/eslint-config": "^8.9.0-alpha.5",
|
|
73
|
+
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.5",
|
|
74
|
+
"@theholocron/commitlint-config": "^8.9.0-alpha.5",
|
|
75
|
+
"@theholocron/semantic-release-config": "^8.9.0-alpha.5",
|
|
76
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.5",
|
|
77
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.5",
|
|
78
|
+
"@theholocron/vitest-config": "^8.9.0-alpha.5"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@semantic-release/commit-analyzer": "^13",
|