@theholocron/astromech 5.0.0-alpha.414 → 5.0.0-alpha.416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ var code_default$2 = "name: Security\n\non: # yamllint disable-line rule:truthy\
|
|
|
75
75
|
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";
|
|
76
76
|
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";
|
|
77
77
|
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 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 }}\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 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 \"$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 }}: 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";
|
|
78
|
-
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's secrets sync (holocron#781, extended per holocron#800): fans the 1Password Environment `
|
|
78
|
+
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's secrets sync (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. `secrets\n# sync`'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 SENTINEL_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.SENTINEL_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: secrets\n args: >-\n sync ${{ 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";
|
|
79
79
|
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 specs sync`, 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 specs sync --dry-run\n else\n node cli/cli/dist/cli.mjs specs sync\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 specs sync` 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";
|
|
80
80
|
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";
|
|
81
81
|
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";
|
|
@@ -888,7 +888,7 @@ var secrets_default = "name: scan:secrets\n\non: # yamllint disable-line rule:tr
|
|
|
888
888
|
// src/templates/workflows/sync-repo.yml
|
|
889
889
|
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";
|
|
890
890
|
// src/templates/workflows/sync-secrets.yml
|
|
891
|
-
var sync_secrets_default = "name: sync-secrets\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n environment:\n description:
|
|
891
|
+
var sync_secrets_default = "name: sync-secrets\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\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\npermissions:\n contents: read\n\njobs:\n sync-secrets:\n name: sync-secrets\n uses: theholocron/.github/.github/workflows/sync-secrets.yml@main\n with:\n environment: ${{ inputs.environment }}\n secrets: inherit\n";
|
|
892
892
|
// src/templates/workflows/sync-specs.yml
|
|
893
893
|
var sync_specs_default = "name: sync-specs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"17 * * * *\"\n push:\n branches: [main, alpha]\n paths:\n - \".notes/*.spec.md\"\n - \"docs/wiki/specifications/*.spec.md\"\n - \"docs/wiki/decisions/*.md\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; make and write nothing\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-specs:\n name: sync-specs\n # The sync opens its pull request against `alpha`, so only a run on `alpha` is wanted: a push to `main` (a release\n # merge) and a manual run on another branch would build a pull request from the wrong tree.\n if: github.ref == 'refs/heads/alpha'\n permissions:\n contents: write\n pull-requests: write\n uses: theholocron/.github/.github/workflows/sync-specs.yml@main\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
|
|
894
894
|
// src/templates/workflows/sync-templates.yml
|
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.416",
|
|
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,11 +55,11 @@
|
|
|
55
55
|
"@commitlint/lint": "^21.2.3",
|
|
56
56
|
"@commitlint/load": "^21.2.3",
|
|
57
57
|
"@commitlint/types": "^21.2.3",
|
|
58
|
-
"@theholocron/
|
|
58
|
+
"@theholocron/datapad": "5.0.0-alpha.416",
|
|
59
59
|
"@theholocron/json-utils": "^1.17.0-alpha.4",
|
|
60
60
|
"@theholocron/pkg-utils": "^1.17.0-alpha.4",
|
|
61
|
-
"@theholocron/
|
|
62
|
-
"@theholocron/
|
|
61
|
+
"@theholocron/fs-utils": "^1.17.0-alpha.4",
|
|
62
|
+
"@theholocron/misc-utils": "^1.17.0-alpha.4"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@commitlint/config-conventional": "^21.2.3",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"tsdown": "^0.23.5",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"vitest": "^5.1.0",
|
|
76
|
-
"@theholocron/commitlint-config": "^8.9.0-alpha.16",
|
|
77
76
|
"@theholocron/ci": "1.0.0",
|
|
78
77
|
"@theholocron/eslint-config": "^8.9.0-alpha.16",
|
|
78
|
+
"@theholocron/commitlint-config": "^8.9.0-alpha.16",
|
|
79
79
|
"@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.16",
|
|
80
|
-
"@theholocron/
|
|
80
|
+
"@theholocron/tsdown-config": "^8.9.0-alpha.16",
|
|
81
81
|
"@theholocron/vitest-config": "^8.9.0-alpha.16",
|
|
82
|
-
"@theholocron/
|
|
82
|
+
"@theholocron/tsconfig": "^8.9.0-alpha.16"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=22"
|