fix: install shared packages over git, unbreaking CI
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
The Verdaccio registry introduced earlier is unreachable from CI (listens on 127.0.0.1:4873 behind a firewall allowing only 80/443/SSH), which broke the architecture-governance workflow - its npm ci step could no longer resolve @marketplaces/auth. Packages are now published to git release branches (release/auth, release/payment in vitanovaPackages) whose root is the package itself, and installed with git+<repo>#release/auth. No registry, token, tunnel, or CI secret - anonymous git read is enough. - package.json: git dependency; .npmrc removed (no scope mapping needed) - vitanovaPackages release.yml rebuilt to force-push release branches - ADR-0001 amended with the distribution change and why the registry lost - BACKEND-HANDOFF: added the multi-tenancy section (hostname -> tenantKey -> per-tenant bootstrap config), corrected the install and deploy notes, and recorded that no CD pipeline exists - PACKAGE-EXTRACTION / PACKAGES-USAGE rewritten for the git-branch flow Verified: npm ci, arch:check:boundaries, ng build, 103/103 tests, all with no credentials configured. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,17 @@ Each package:
|
||||
|
||||
Rollout order: scaffold packages and CI in this repo first (reversible, local-only) → hand over target git repo → publish → migrate `marketplaces` call sites to import from the package → delete the in-repo originals only after the app builds and passes tests against the package.
|
||||
|
||||
## Amendment 2026-08-18 — distribution mechanism
|
||||
|
||||
The original decision left distribution open ("private registry ... or installed straight from git"). A private Verdaccio registry was stood up on the dev server and both packages published to it. **That approach was then abandoned**: the registry listens on `127.0.0.1:4873` behind a firewall allowing only 80/443/SSH, so neither CI runners nor developers could install without an SSH tunnel. That broke `marketplaces`' existing `architecture-governance` workflow, whose `npm ci` step could no longer resolve `@marketplaces/auth`.
|
||||
|
||||
Distribution is now **git release branches**: `release/auth` and `release/payment` in vitanovaPackages, each an orphan branch whose root *is* the package (`package.json` + built `dist/`), force-pushed by CI on every release. Consumers install with `git+<repo>#release/auth` — no registry, no token, no tunnel, no CI secret; anonymous git read suffices.
|
||||
|
||||
The Verdaccio instance still runs but nothing depends on it. Making a registry the primary path again would require a reverse proxy plus TLS on the dev server, which buys nothing over the current approach at this scale.
|
||||
|
||||
## Consequences
|
||||
|
||||
- `marketplaces` loses direct edit access to auth/payment source — changes go through the package's own repo/PR/release cycle. Slower iteration, but consistent behavior across all consuming projects.
|
||||
- ~30 call sites in `marketplaces` (see `core/auth`, `core/admin-auth`, `services/auth.service.ts`, interceptors) need import rewiring during migration — tracked as follow-up work, not done in this ADR.
|
||||
- New failure mode: package registry/CI outage blocks `marketplaces` builds if a version bump lands mid-incident. Pin exact versions, do not use floating ranges, to keep this bounded.
|
||||
- New failure mode: `marketplaces` builds now depend on `sources.vitanova.network` being reachable. A branch ref also tracks its tip, so an install can pick up a new build — acceptable while the package churns, but pin to a commit SHA once it stabilises.
|
||||
- [TRACK-S-SECURITY-RBAC-CONTRACT.md](../../backend/TRACK-S-SECURITY-RBAC-CONTRACT.md) §8 (admin provisioning) becomes package-owned behavior once migrated — that doc's endpoint contracts stay backend-side and unaffected, only the frontend client implementation moves.
|
||||
|
||||
Reference in New Issue
Block a user