CLI utilities for installing and validating pinned @abstractplay/* package versions in Abstract Play consumer repositories.
Replaces per-repo copies of install-ap-deps.mjs and check-ci-deps.mjs. Works with the existing ci-deps relay:
-
Canonical pins:
ci-deps.dev.jsonandci-deps.prod.json -
Resolved tree:
package-lock.json -
package.jsonlists exact AP versions (synced byap-install-deps)
npm install --save-dev @abstractplay/ap-deps-tools
Requires GitHub Packages auth for @abstractplay scope (same as other AP packages).
Published from AbstractPlay/ap-deps-tools on push to main. Bump version in package.json when releasing; CI publishes to GitHub Packages if that version is not already on the registry.
ap-install-deps --stage dev|prod [--renderer-only] [--for-tests]
Resolution order (per package):
-
AP_GAMESLIB_VERSION/AP_RENDERER_VERSION/AP_RECRANKS_VERSIONenv (fromrepository_dispatch) -
ci-deps.<stage>.json -
@development(dev) or@latest(prod) fallback
Writes exact versions to package.json, updates the lockfile via npm install --save-exact, writes ci-deps.<stage>.json, and sets GITHUB_OUTPUT when running in GitHub Actions.
ap-check-ci-deps
ap-check-ci-deps --stage dev --strict
Validates both ci-deps manifests exist. With --strict, compares lockfile resolved versions to the stage manifest.
{
"scripts": {
"sync-deps": "ap-install-deps --stage dev",
"sync-deps:prod": "ap-install-deps --stage prod"
}
}
Auto-detected from package.json:
| Profile | Repo examples | Packages pinned |
|---------|---------------|-----------------|
| consumer | front, node-backend | gameslib, renderer |
| crons | backend-crons | gameslib, renderer, recranks |
| hub | gameslib | renderer, recranks |
| renderer-only | designer | renderer |
Recranks is not pinned for front/node-backend (transitive via gameslib).
npm ci
ap-check-ci-deps
ap-install-deps --stage dev|prod
ap-check-ci-deps --stage dev|prod --strict
npm test / build / deploy
import { getResolvedApVersions, getLockfileVersions } from "@abstractplay/ap-deps-tools";
const versions = getResolvedApVersions(process.cwd(), [
"@abstractplay/gameslib",
"@abstractplay/renderer",
]);| Source | Purpose |
|--------|---------|
| ci-deps.dev.json / ci-deps.prod.json | Canonical pin per stage |
| package.json | Exact version strings (synced on dispatch) |
| package-lock.json | Full resolved tree for npm ci |
| npm ls @abstractplay/gameslib | Local inspection after sync-deps |
MIT — see LICENSE.