* docs(pnpr): remove stale duplicated docs and fix drifted claims The crate README and OIDC.md under pnpr/crates/pnpr duplicated the website docs and had drifted: a compilerCaches key that no longer exists, hardcoded quota numbers, the old registry/ path. The pnpr.client README used the pre-rename remoteSideEffectsCache spellings and claimed the artifact owner must equal the username. Point both at pnpr/docs instead. Also fix claims the code contradicts: the handshake is served when any surface is enabled and advertises ecosystems, publish, and pipeline; the resolve request field is registries, not namedRegistries; pnpm does not call the handshake before an npm resolve; there is no config reload; the packument TTL has no config key; and the --config help still described a verdaccio-shaped file. Install instructions now name the next dist-tag, because latest still points at a July 2026 pre-alpha snapshot. * docs(pnpr): address review on handshake, verify order, and root-mounted endpoints * docs(pnpr): document the /npm/ registry bases on multi-ecosystem servers
1.6 KiB
1.6 KiB
@pnpm/pnpr.client
Client library for the pnpr server. pnpm uses it when
the pnprServer setting is set. It covers two pnpr protocols:
- Install acceleration. Sends
POST /-/pnpr/v0/resolvewith the projects and the existing lockfile, and returns the resolved lockfile for pnpm's headless install, which fetches the tarballs itself. See Install acceleration. - Shared side-effects cache. Looks up, verifies, restores, and publishes
signed build artifacts through the
/-/pnpr/v0/artifactsendpoints. See Shared side-effects cache.
Usage
import { resolveViaPnprServer } from '@pnpm/pnpr.client'
const { lockfile, stats } = await resolveViaPnprServer({
registryUrl: 'http://localhost:7677',
dependencies: { react: '^19.0.0' },
})
console.log(`Resolved ${stats.totalPackages} packages`)
// lockfile is ready for headless install
Configuration
Add to pnpm-workspace.yaml to offload resolution during pnpm install:
pnprServer: http://localhost:7677
The shared side-effects cache is configured under sideEffectsCache.remote.
The workspace names the organization and the eligible packages; the trust
material comes from the global config file or the environment:
pnprServer: http://localhost:7677
sideEffectsCache:
remote:
org: acme
packages:
- native-addon
The server side of both protocols, including the artifacts.orgs access
rules, the signed-envelope format, and the platform compatibility tags, is
documented with pnpr.
License
MIT