learning_ai_common_plat/dashboards/tracker-web/src/instrumentation.ts
Saravana Kumar 67104b8ebc
Some checks failed
Publish @bytelyst/* packages / publish (push) Failing after 12s
CI — Common Platform / Build, Test & Typecheck (push) Successful in 48s
test(tracker-web): isolate e2e dev server
2026-05-30 19:36:07 +00:00

16 lines
557 B
TypeScript

/**
* Next.js instrumentation hook — runs once at server startup.
* Resolves secrets from configured provider into process.env BEFORE
* any route handlers or Cosmos client initialization.
*
* Product-agnostic: uses LYSNR_SECRETS mapping which points to the
* shared Key Vault (kv-mywisprai) used by all ByteLyst products.
*/
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const { resolveSecrets, LYSNR_SECRETS } = await import('@bytelyst/config');
await resolveSecrets([LYSNR_SECRETS.JWT_SECRET]);
}
}