@slabcode/kiosks-core
v5.0.0
Published
Core Library for KIOSKS project
Readme
kiosks-core
Shared core library for the KIOSKS project's backend services: TypeORM entities, DI-registered services/clients, Express middlewares, DTOs, enums, and OpenTelemetry helpers. Consumed by kiosks (and other kiosks backend services) as @slabcode/kiosks-core.
Scripts
npm run build— format (prettier) +tsc+tsc-alias. Compiles todist/(JS) andtypes/(declarations), both gitignored.npm run pack— cleansdist//types/, builds, and runsnpm packto produce a local.tgz. Use this to test a change in a consumer (e.g.kiosks) before publishing anything, without touching the registry at all:
This adds a temporarynpm run pack cd ../kiosks && npm install ../kiosks-core/slabcode-kiosks-core-<version>.tgz"file:../kiosks-core/<tarball>.tgz"dependency in the consumer'spackage.json— swap it back to a real registry version once you actually publish.npm run deploy— build +npm publish. Publishes a normal stable release under thelatestdist-tag. Use this for changes that are ready for production.npm run deploy:preview— build +npm publish --tag preview. Publishes under thepreviewdist-tag instead oflatest, so existing consumers'^x.y.zranges (and a barenpm install @slabcode/kiosks-core) never resolve to it. Use this while a change (e.g. a new pinpad brand integration, seekiosks/README.md) is still being validated and shouldn't reach other services through a routine deploy.
Publishing a change
- Bump
versioninpackage.json:- Stable change, ready for production: a normal semver bump (e.g.
3.1.0→3.1.1). - Change still under validation / not production-ready yet: a prerelease version (e.g.
3.1.1-<feature>.0).
- Stable change, ready for production: a normal semver bump (e.g.
- Make sure you have a
.npmrc(gitignored, not in the repo) configured with the private registry credentials. Ask a teammate who has published before if you don't have one set up. - Run
npm run deployfor a stable release, ornpm run deploy:previewfor a preview/prerelease. - Verify with
npm dist-tag ls @slabcode/kiosks-corethatlatestonly moved if you intended it to. - In each consumer repo (
kiosks, etc.), update the@slabcode/kiosks-coredependency inpackage.json:- Stable release: bump to a normal
^x.y.zrange. - Preview release: pin the exact version, no
^(e.g."3.1.1-<feature>.0"), so it doesn't move on its own with a routinenpm installand only the repo/branch that needs it uses it. Once the change is validated, re-publish as a stable release and switch the consumer back to a^range.
- Stable release: bump to a normal
- Run
npm installin the consumer to pick up the change.
