Changelog - 2026-09-11
A build stamps itself, and health answers twice
Feature Fix BreakingIn one line. A service can now say which commit it runs, and GET /health/stats reports it, with process and memory, behind a gate.
What changed
ignis-build-info generate. Writes the stamp at build time, as a const (--out src/_build_info.ts) or as JSON (--out public/build-info.json --format json). At your entrypoint, callBuildInfoRegistry.set({ buildInfo: BUILD_INFO })from@venizia/ignis-helpers/core. Nothing is read at run time, so it works in a compiled binary or a Distroless image.- Field sources. Each field comes from CI variables first (
APP_ENV_BUILD_VERSION,APP_BUILD_VERSION,APP_ENV_BUILD_COMMIT_TAG,APP_BUILD_COMMIT,APP_BUILD_BRANCH,APP_ENV_BUILD_DATE,APP_BUILD_DATE, plus the CI provider's own), thengit, thenpackage.json. Anything left readsunspecified.BuildInfoResolver.resolveandgenerateBuildInfoareasync. GET /health. Stays minimal and now answers{ "status": "ok", "timestamp": "..." }.GET /health/stats. Reportsbuild,processandmemory. With noenableset, it is mounted only whenNODE_ENVis one oflocal,debug,development,devorsit.staging,uat,production, an unrecognised name and an unsetNODE_ENVkeep it shut.- Gate options.
stats: { enable, secretKey }.enable: falseleaves the route unmounted. WithsecretKey, the route answers only a request carrying it inX-Health-Key; a missing or wrong key gets 404, not 401. AsecretKeythat is set but blank fails closed. With nosecretKey, the route is open to whatever can reach the port. The gate is per container, so two applications in one process keep their own. - Works without the generator.
stats.buildInfowins over the registry, andgetAppInfo()fills the rest, so a host reports its real name and version withunspecifiedfor the other fields. { options }now reaches the component (Fix).application.component(Ctor, { options })compiled butMailComponentandHealthCheckComponentignored it. Both now bind it. Options at the call site win over a key bound earlier; the component's default fills only an unbound key. A component of your own does the same withextends BaseComponent<YourOptions>and anoverride configure(opts?: YourOptions)that bindsoptsbefore callingsuper.configure(opts).- Datasource env variables removed (Breaking).
APP_ENV_APPLICATION_DS_MIGRATION,APP_ENV_APPLICATION_DS_AUTHORIZE,APP_ENV_APPLICATION_DS_OAUTH2and theAPP_ENV_DS_*spelling never selected anything. They are gone fromEnvironmentKeysand the startup banner, which no longer has a datasource line. Banner values are now read when the banner runs, so a.envloaded in your own entrypoint is honoured.
ts
application.component(HealthCheckComponent, {
options: {
restOptions: { path: '/health' },
stats: { enable: true, secretKey: process.env.APP_HEALTH_SECRET_KEY },
},
});Who is affected
- Your probe hits
GET /health. It gainstimestamp.statusis unchanged. - You pinned the exact
/healthbody in a test.toEqual({ status: 'ok' })now needstoMatchObject. - You construct or extend
HealthCheckController. Its constructor no longer takesIControllerOptions. The options and app info arrive through@inject, and the path through the@controllerdecorator.new HealthCheckController({ scope, path })is nownew HealthCheckController()after the class has been decorated. - You run a dev machine with
NODE_ENVunset.GET /health/statsis closed. SetNODE_ENV=development, orstats: { enable: true }. - You bind
MailKeys.MAIL_OPTIONSand also pass{ options }. The registration options now win. Before, they were ignored. - You set any
APP_ENV_*_DS_MIGRATION,_DS_AUTHORIZEor_DS_OAUTH2. Delete them. - Everyone else. Nothing. The generator and the stats route are opt-in.
Details
- Run the built
dist/cjsfile under plain Node and thegitfields readunspecifiedinstead of throwing. Wire the CI variables if a Node invocation has to be exact.