[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
README.md

@monochromatic-dev/config-pnpr #

Deployment of the private pnpr npm registry at https://pnpr.c.aquati.cat/, which serves @monochromatic-dev workspace packages that are not public-release quality. Design and rationale: doc/decision/private-npm-registry.md.

Install from the registry #

Reads are anonymous. Route only the scope to pnpr; every other package keeps coming from npmjs, because pnpr proxies nothing.

# .npmrc
@monochromatic-dev:registry=https://pnpr.c.aquati.cat/~monochromatic-dev/

pnpm 11 and later hold back versions younger than minimumReleaseAge, so exclude the scope or a fresh publish stays uninstallable for a day:

# pnpm-workspace.yaml
minimumReleaseAgeExclude:
  - '@monochromatic-dev/*'

@monochromatic-dev/config-typescript sets types: ["node"], so a project extending it also installs @types/node; without it tsc stops with TS2688: Cannot find type definition file for 'node'.

Through this route, versions that exist only on npmjs (older module-logger and module-fs-path releases, @monochromatic-dev/mcp-nvim) are not installable.

Files #

  • Containerfile: starts from the digest-pinned ghcr.io/aquaticat/pnpr image, bakes in config.yaml, and disables the install-accelerator surface. That image is pnpr 0.1.0-alpha.11 with a fix for GitHub Actions OIDC publishes (doc/troubleshooting/pnpr-oidc-github-actions-discovery.md), published by .github/workflows/pnpr-patched-image.yml on branch pnpr-oidc-workload-discovery of Aquaticat/pnpm.
  • compose.yaml: the Coolify Docker Compose resource. It publishes 127.0.0.1:7677 for the host's Caddy, requires PNPR_SECRET from Coolify, and keeps storage in the unbacked pnpr-registry-storage volume.
  • config.yaml: generated by generatePnprConfig in the root file-enforcer.config.ts; run mise run sync:files after adding, removing, or changing the entry points of a workspace package. Never edit it by hand.

Which packages publish #

generatePnprConfig lists every workspace package that:

  • is outside package/test-fixture/,
  • still declares exports, main, module, or bin after ./ts export subpaths are stripped,
  • and is not in PNPR_EXCLUDED_PACKAGES, the reviewed exclusion list with one reason per package.

The list doubles as pnpr's OIDC trust list, because pnpr accepts only exact package names for workload publishing. This package has no entry points, so it never publishes itself.

Publishing #

.github/workflows/pnpr-publish.yml runs mise run //package/config/pnpr:publish on pushes to main that change a manifest, config.yaml, the script, or the workflow. src/publish-missing-versions.ts then:

  1. reads the trusted names from config.yaml,
  2. reads each package's published versions anonymously,
  3. builds (mise run //<dir>:build when declared), packs with pnpm, and rewrites the packed manifest for every missing version in dependency order,
  4. publishes each tarball with a fresh OIDC workload token, moving latest only forward (older versions get backfill).

A failed package fails the run and blocks its dependents. The job sets pnpm_config_dedupe_direct_deps=false, because pnpm 12.3.4 ignores the --config. form (doc/troubleshooting/pnpm-pack-dedupe-direct-deps.md).

Run a named subset from Actions, pnpr-publish, Run workflow, with a comma-separated only input. Locally, PNPR_REGISTRY_ORIGIN, PNPR_PUBLISH_TOKEN, and PNPR_PUBLISH_ONLY point the same script at a test registry; mise run //package/config/pnpr:publish:dry-run builds and packs without publishing.

Deploy and operate #

Deployment steps live in doc/runbook/deploy-pnpr-registry.md. Coolify redeploys only when files under package/config/pnpr/ change, through its Watch Paths setting.

To move to a newer pnpr, rebase pnpr-oidc-workload-discovery in Aquaticat/pnpm onto upstream and push it, then copy the tag@digest from that run's pnpr image notice into the Containerfile FROM line. Once an upstream release verifies GitHub workload tokens, return to the upstream image instead.

Local check #

# package/config/pnpr
mise run //package/config/pnpr:start:image
curl http://127.0.0.1:17677/-/ping

A local container cannot complete an OIDC publish, because GitHub issues workload tokens only inside Actions; unauthenticated and malformed-token publishes return HTTP 401.