@theholocron/astromech 5.0.0-alpha.259 → 5.0.0-alpha.260

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -263,7 +263,7 @@ function codecovConfig(repoRoot, existing) {
263
263
  // src/templates/reusable/actions/auto-commit.yml
264
264
  var auto_commit_default = "name: Auto Commit\ndescription: >\n Commit and push any file changes using stefanzweifel/git-auto-commit-action.\n If a branch name is provided and differs from the current branch, a new branch\n is created automatically.\n\ninputs:\n token:\n description: >\n GitHub token with push access to the target branch. Used to authenticate\n the git remote so the commit can be pushed.\n required: true\n branch:\n description: >\n Branch to commit to. Leave empty to commit to the current branch (useful\n in PR contexts). Provide an explicit name (e.g. chore/auto-sync-<sha>) to push\n to a separate branch.\n required: false\n default: \"\"\n commit-message:\n description: Commit message.\n required: true\n commit-options:\n description: >\n Additional options passed to git commit (e.g. --no-verify).\n required: false\n default: \"\"\n commit-user-name:\n description: Git user.name for the commit.\n required: false\n default: \"github-actions[bot]\"\n commit-user-email:\n description: Git user.email for the commit.\n required: false\n default: \"41898282+github-actions[bot]@users.noreply.github.com\"\n commit-author:\n description: >\n Git author string in \"Name <email>\" format.\n required: false\n default: \"github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>\"\n\noutputs:\n changes-detected:\n description: \"'true' if any files were committed, 'false' otherwise.\"\n value: ${{ steps.commit.outputs.changes_detected }}\n\nruns:\n using: composite\n steps:\n - name: Configure git remote with token\n shell: bash\n run: |\n REMOTE_URL=$(git remote get-url origin)\n AUTHED_URL=$(echo \"$REMOTE_URL\" | sed \"s|https://|https://x-access-token:${TOKEN}@|\")\n git remote set-url origin \"$AUTHED_URL\"\n env:\n TOKEN: ${{ inputs.token }}\n\n - name: Reset branch to current HEAD\n if: ${{ inputs.branch != '' }}\n shell: bash\n run: git checkout -B \"$BRANCH\"\n env:\n BRANCH: ${{ inputs.branch }}\n\n - name: Build signed commit message\n id: msg\n shell: bash\n run: |\n TRAILER=\"Signed-off-by: ${COMMIT_USER_NAME} <${COMMIT_USER_EMAIL}>\"\n if echo \"$COMMIT_MESSAGE\" | grep -qF \"$TRAILER\"; then\n FINAL=\"$COMMIT_MESSAGE\"\n else\n FINAL=\"${COMMIT_MESSAGE}\"$'\\n\\n'\"${TRAILER}\"\n fi\n {\n echo \"value<<EOF_TRAILER\"\n printf '%s' \"$FINAL\"\n echo \"\"\n echo \"EOF_TRAILER\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n COMMIT_MESSAGE: ${{ inputs.commit-message }}\n COMMIT_USER_NAME: ${{ inputs.commit-user-name }}\n COMMIT_USER_EMAIL: ${{ inputs.commit-user-email }}\n\n - uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0\n id: commit\n with:\n branch: ${{ inputs.branch }}\n commit_message: ${{ steps.msg.outputs.value }}\n commit_options: ${{ inputs.commit-options }}\n commit_user_name: ${{ inputs.commit-user-name }}\n commit_user_email: ${{ inputs.commit-user-email }}\n commit_author: ${{ inputs.commit-author }}\n";
265
265
  // src/templates/reusable/actions/codecov-upload.yml
266
- var codecov_upload_default = "name: Codecov upload\ndescription: >\n Upload coverage to Codecov with one flag per group, authenticated with the job's OIDC token (the job\n needs `id-token: write`). Downloads the Codecov CLI and verifies its GPG signature and checksum first,\n as `codecov/codecov-action` does. `codecov-action` takes one `flags:` value per step and a job cannot\n generate steps, so a list of groups needs this loop.\n\ninputs:\n uploads:\n description: >\n JSON list of `{\"flag\": \"utils\", \"files\": \"utils/*/coverage/lcov.info\"}`. `files` is a glob relative to\n the workspace. A group whose glob matches nothing is skipped with a note, not an error.\n required: true\n allow-empty:\n description: >\n `\"true\"` lets a run with no coverage file in any group finish quietly (an affected run that selected\n nothing). Otherwise that is an error, so a missing report is not mistaken for a pass.\n required: false\n default: \"false\"\n\noutputs:\n uploaded:\n description: How many flags were uploaded (0 when no group had a coverage file).\n value: ${{ steps.upload.outputs.uploaded }}\n\nruns:\n using: composite\n\n steps:\n - name: Download the Codecov CLI\n shell: bash\n run: |\n set -euo pipefail\n dir=\"$RUNNER_TEMP/codecov-cli\"\n mkdir -p \"$dir\" && cd \"$dir\"\n base=https://cli.codecov.io/latest/linux\n curl -sSf --retry 3 -o codecov \"$base/codecov\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM.sig\"\n export GNUPGHOME=\"$dir/gnupg\" && mkdir -m 700 \"$GNUPGHOME\"\n curl -sSf --retry 3 https://keybase.io/codecovsecops/pgp_keys.asc | gpg --batch --import\n gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM\n sha256sum -c codecov.SHA256SUM\n chmod +x codecov\n echo \"CODECOV_CLI=$dir/codecov\" >> \"$GITHUB_ENV\"\n\n - name: Upload each flag\n id: upload\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.allow-empty }}\n run: |\n set -euo pipefail\n if [ -z \"${ACTIONS_ID_TOKEN_REQUEST_URL:-}\" ]; then\n echo \"::error::No OIDC token available: give the job \\`permissions: id-token: write\\`.\"\n exit 1\n fi\n if ! jq -e 'type == \"array\" and all(.[]; (.flag // \"\") != \"\" and (.files // \"\") != \"\")' <<<\"$UPLOADS\" >/dev/null; then\n echo \"::error::uploads must be a JSON list of {\\\"flag\\\", \\\"files\\\"} with both set.\"\n exit 1\n fi\n # The token codecov-action asks for with `use_oidc: true`.\n token=\"$(curl -sSf -H \"Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN\" \\\n \"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io\" | jq -r .value)\"\n if [ -z \"$token\" ] || [ \"$token\" = null ]; then\n echo \"::error::Could not get an OIDC token.\"\n exit 1\n fi\n echo \"::add-mask::$token\"\n uploaded=0\n # Read the list on fd 3: the loop body must not share stdin with the CLI, which could swallow the\n # remaining entries. A process substitution (not a pipe) keeps `uploaded` in this shell.\n while read -r entry <&3; do\n flag=\"$(jq -r .flag <<<\"$entry\")\"\n mapfile -t files < <(compgen -G \"$(jq -r .files <<<\"$entry\")\" || true)\n if [ \"${#files[@]}\" -eq 0 ]; then\n echo \"· $flag: no coverage files\"\n continue\n fi\n args=()\n for f in \"${files[@]}\"; do args+=(--file \"$f\"); done\n echo \"→ $flag: ${#files[@]} file(s)\"\n \"$CODECOV_CLI\" do-upload -t \"$token\" --flag \"$flag\" --disable-search --fail-on-error --git-service github \"${args[@]}\"\n uploaded=$((uploaded + 1))\n done 3< <(jq -c '.[]' <<<\"$UPLOADS\")\n echo \"uploaded=$uploaded\" >> \"$GITHUB_OUTPUT\"\n if [ \"$uploaded\" -eq 0 ] && [ \"$ALLOW_EMPTY\" != \"true\" ]; then\n echo \"::error::No group has a coverage file, so nothing was uploaded.\"\n exit 1\n fi\n";
266
+ var codecov_upload_default = "name: Codecov upload\ndescription: >\n Upload coverage to Codecov with one flag per group, authenticated with the job's OIDC token (the job\n needs `id-token: write`). Downloads the Codecov CLI and verifies its GPG signature and checksum first,\n as `codecov/codecov-action` does. `codecov-action` takes one `flags:` value per step and a job cannot\n generate steps, so a list of groups needs this loop.\n\ninputs:\n uploads:\n description: >\n JSON list of `{\"flag\": \"utils\", \"files\": \"utils/*/coverage/lcov.info\"}`. `files` is a glob relative to\n the workspace. A group whose glob matches nothing is skipped with a note, not an error.\n required: true\n allow-empty:\n description: >\n `\"true\"` lets a run with no coverage file in any group finish quietly (an affected run that selected\n nothing). Otherwise that is an error, so a missing report is not mistaken for a pass.\n required: false\n default: \"false\"\n\noutputs:\n uploaded:\n description: How many flags were uploaded (0 when no group had a coverage file).\n value: ${{ steps.upload.outputs.uploaded }}\n\nruns:\n using: composite\n\n steps:\n - name: Download the Codecov CLI\n shell: bash\n run: |\n set -euo pipefail\n dir=\"$RUNNER_TEMP/codecov-cli\"\n mkdir -p \"$dir\" && cd \"$dir\"\n base=https://cli.codecov.io/latest/linux\n curl -sSf --retry 3 -o codecov \"$base/codecov\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM.sig\"\n export GNUPGHOME=\"$dir/gnupg\" && mkdir -m 700 \"$GNUPGHOME\"\n curl -sSf --retry 3 https://keybase.io/codecovsecops/pgp_keys.asc | gpg --batch --import\n gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM\n sha256sum -c codecov.SHA256SUM\n chmod +x codecov\n echo \"CODECOV_CLI=$dir/codecov\" >> \"$GITHUB_ENV\"\n\n - name: Upload each flag\n id: upload\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.allow-empty }}\n run: |\n set -euo pipefail\n if [ -z \"${ACTIONS_ID_TOKEN_REQUEST_URL:-}\" ]; then\n echo \"::error::No OIDC token available: give the job \\`permissions: id-token: write\\`.\"\n exit 1\n fi\n if ! jq -e 'type == \"array\" and all(.[]; (.flag // \"\") != \"\" and (.files // \"\") != \"\")' <<<\"$UPLOADS\" >/dev/null; then\n echo \"::error::uploads must be a JSON list of {\\\"flag\\\", \\\"files\\\"} with both set.\"\n exit 1\n fi\n # The token codecov-action asks for with `use_oidc: true`.\n token=\"$(curl -sSf -H \"Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN\" \\\n \"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io\" | jq -r .value)\"\n if [ -z \"$token\" ] || [ \"$token\" = null ]; then\n echo \"::error::Could not get an OIDC token.\"\n exit 1\n fi\n echo \"::add-mask::$token\"\n # What codecov-action does before it uploads: tell Codecov about the commit and open the report that\n # the per-flag uploads attach to. Uploading alone leaves the report unprocessed and posts no status.\n \"$CODECOV_CLI\" create-commit -t \"$token\" --fail-on-error --git-service github\n \"$CODECOV_CLI\" create-report -t \"$token\" --fail-on-error --git-service github\n uploaded=0\n # Read the list on fd 3: the loop body must not share stdin with the CLI, which could swallow the\n # remaining entries. A process substitution (not a pipe) keeps `uploaded` in this shell.\n while read -r entry <&3; do\n flag=\"$(jq -r .flag <<<\"$entry\")\"\n mapfile -t files < <(compgen -G \"$(jq -r .files <<<\"$entry\")\" || true)\n if [ \"${#files[@]}\" -eq 0 ]; then\n echo \"· $flag: no coverage files\"\n continue\n fi\n args=()\n for f in \"${files[@]}\"; do args+=(--file \"$f\"); done\n echo \"→ $flag: ${#files[@]} file(s)\"\n \"$CODECOV_CLI\" do-upload -t \"$token\" --flag \"$flag\" --disable-search --fail-on-error --git-service github \"${args[@]}\"\n uploaded=$((uploaded + 1))\n done 3< <(jq -c '.[]' <<<\"$UPLOADS\")\n echo \"uploaded=$uploaded\" >> \"$GITHUB_OUTPUT\"\n if [ \"$uploaded\" -eq 0 ] && [ \"$ALLOW_EMPTY\" != \"true\" ]; then\n echo \"::error::No group has a coverage file, so nothing was uploaded.\"\n exit 1\n fi\n";
267
267
  // src/templates/reusable/actions/holocron.yml
268
268
  var holocron_default = "name: Holocron\ndescription: >\n Run the Holocron CLI — `holocron run <task> [job]` by default, or any other\n subcommand via `command:` (`repo sync`, `sync github`, …). Resolves\n `@theholocron/cli` from `node_modules` (published tarball) or builds it from\n source when it resolves to an unbuilt workspace checkout (the holocron repo\n itself). Requires dependencies to be installed already (run the setup action\n first).\n\ninputs:\n command:\n description: >\n Holocron subcommand. Default `run` — then `task` (and optional `job`)\n name the manifest task. Set to `repo sync` / `sync github` / … to run that\n subcommand directly; `args` becomes everything after it.\n required: false\n default: run\n task:\n description: >\n Manifest task to run when command is run — typecheck, test, build, audit.\n required: false\n default: \"\"\n job:\n description: Optional sub-job within the task (e.g. knip, performance for audit).\n required: false\n default: \"\"\n affected:\n description: >\n For `command: run`, only run the packages changed since the PR base (or the\n merge-base with the default branch), plus their dependents: `--affected`.\n Needs a checkout with enough history to reach the base (`fetch-depth: 0`);\n without it holocron logs a warning and runs everything.\n required: false\n default: \"false\"\n args:\n description: >\n For `command: run`, extra arguments forwarded to the tool after `--`.\n For any other command, the arguments passed straight to it.\n required: false\n default: \"\"\n\noutputs:\n log-file:\n description: >\n Path to a file holding the full captured stdout+stderr of this\n invocation — the same text the live Actions log shows, saved for a\n caller that wants to ship it elsewhere (e.g. Sentinel's dispatched\n checks shipping it to Axiom, holocron#769/#794).\n value: ${{ steps.run.outputs.log-file }}\n\nruns:\n using: composite\n\n steps:\n - name: Build the workspace when the CLI resolves to an unbuilt checkout\n shell: bash\n # The holocron repo carries @theholocron/cli as `workspace:*`; its bin\n # (dist/cli.mjs) does not exist on a fresh checkout. `pnpm build` is a\n # turbo run — cached and cheap once warm. A no-op everywhere else, where\n # the published tarball already ships dist/.\n #\n # pnpm creates every workspace package's node_modules/.bin/holocron shim\n # once, during the setup action's earlier `pnpm install` — before this\n # build has run, so every one of them is silently skipped (\"Failed to\n # create bin ... ENOENT\"), not just @theholocron/cli's own. That's a\n # one-time decision: a later build doesn't retroactively fix a shim that\n # was never created. Re-running `pnpm install` here (fast — the lockfile\n # hasn't changed, so it only re-links `.bin`) is what actually fixes it,\n # confirmed against a real cold install: `holocron` stays unresolvable\n # from inside any package until this second install runs.\n run: |\n if [ ! -f node_modules/@theholocron/cli/dist/cli.mjs ]; then\n echo \"→ @theholocron/cli dist/ missing — building the workspace from source\" >&2\n pnpm build\n echo \"→ re-linking node_modules/.bin — pnpm skipped it pre-build\" >&2\n pnpm install --frozen-lockfile\n fi\n\n - name: holocron ${{ inputs.command }} ${{ inputs.task }}\n id: run\n shell: bash\n env:\n HOLOCRON_COMMAND: ${{ inputs.command }}\n HOLOCRON_TASK: ${{ inputs.task }}\n HOLOCRON_JOB: ${{ inputs.job }}\n HOLOCRON_ARGS: ${{ inputs.args }}\n HOLOCRON_AFFECTED: ${{ inputs.affected }}\n HOLOCRON_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}\n HOLOCRON_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}\n run: |\n if [ \"$HOLOCRON_COMMAND\" = \"run\" ]; then\n set -- run \"$HOLOCRON_TASK\"\n [ -n \"$HOLOCRON_JOB\" ] && set -- \"$@\" \"$HOLOCRON_JOB\"\n if [ \"$HOLOCRON_AFFECTED\" = \"true\" ]; then\n # A pull request compares against its base commit. Any other trigger\n # (a push to a PR branch) compares against where the branch left the\n # default branch. If neither resolves, no --base is passed and holocron\n # runs everything.\n base=\"$HOLOCRON_PR_BASE_SHA\"\n if [ -z \"$base\" ] && [ -n \"$HOLOCRON_DEFAULT_BRANCH\" ]; then\n git fetch --no-tags --quiet origin \"$HOLOCRON_DEFAULT_BRANCH\" || true\n base=\"$(git merge-base HEAD \"origin/$HOLOCRON_DEFAULT_BRANCH\" 2>/dev/null || true)\"\n fi\n set -- \"$@\" --affected\n [ -n \"$base\" ] && set -- \"$@\" --base \"$base\"\n fi\n # shellcheck disable=SC2086\n [ -n \"$HOLOCRON_ARGS\" ] && set -- \"$@\" -- $HOLOCRON_ARGS\n else\n # `command` may be a multi-word path (`repo sync`, `deploy on-release`):\n # word-split it so each token is its own argument.\n # shellcheck disable=SC2086\n set -- $HOLOCRON_COMMAND $HOLOCRON_ARGS\n fi\n # Invoke the built entry directly. `pnpm exec holocron` relies on a\n # node_modules/.bin/holocron shim that pnpm does not create for a\n # workspace package whose dist/ was absent at install time (the holocron\n # repo itself). Resolving the package's main export gives dist/index.mjs;\n # the bin sits next to it as dist/cli.mjs. This is `require.resolve` from\n # node_modules — it works in the holocron monorepo AND in every consumer\n # repo (theholocron/holocron#655), unlike a hard-coded `cli/cli/…`.\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n if [ ! -f \"$cli\" ]; then\n echo \"::error::@theholocron/cli entry not found at $cli — is the workspace built?\" >&2\n exit 1\n fi\n echo \"→ $cli $*\" >&2\n # `tee` keeps the live Actions log streaming exactly as before while\n # also capturing it to a file callers can ship elsewhere (log-file\n # output, above). PIPESTATUS[0] -- not $? -- is `node`'s own exit\n # code; $? after a pipe is tee's, which succeeds even when node fails.\n log_file=\"${RUNNER_TEMP}/holocron-output.log\"\n node \"$cli\" \"$@\" 2>&1 | tee \"$log_file\"\n exit_code=${PIPESTATUS[0]}\n echo \"log-file=$log_file\" >> \"$GITHUB_OUTPUT\"\n exit \"$exit_code\"\n";
269
269
  // src/templates/reusable/actions/install.yml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/astromech",
3
- "version": "5.0.0-alpha.259",
3
+ "version": "5.0.0-alpha.260",
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,7 +50,7 @@
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.259",
53
+ "@theholocron/datapad": "5.0.0-alpha.260",
54
54
  "@theholocron/fs-utils": "^1.16.1-alpha.1",
55
55
  "@theholocron/json-utils": "^1.16.1-alpha.1",
56
56
  "@theholocron/pkg-utils": "^1.16.1-alpha.1"
@@ -70,12 +70,12 @@
70
70
  "typescript": "^5.9.3",
71
71
  "vitest": "^5.0.5",
72
72
  "@theholocron/commitlint-config": "^8.9.0-alpha.3",
73
- "@theholocron/eslint-config": "^8.9.0-alpha.3",
74
- "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
75
73
  "@theholocron/semantic-release-config": "^8.9.0-alpha.3",
76
- "@theholocron/tsconfig": "^8.9.0-alpha.3",
74
+ "@theholocron/eslint-config": "^8.9.0-alpha.3",
77
75
  "@theholocron/tsdown-config": "^8.9.0-alpha.3",
78
- "@theholocron/vitest-config": "^8.9.0-alpha.3"
76
+ "@theholocron/rollup-plugin-transform-template": "^8.9.0-alpha.3",
77
+ "@theholocron/vitest-config": "^8.9.0-alpha.3",
78
+ "@theholocron/tsconfig": "^8.9.0-alpha.3"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@semantic-release/commit-analyzer": "^13",