/** * 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. */ import { resolveSecrets, LYSNR_SECRETS } from '@bytelyst/config'; export async function register() { if (process.env.NEXT_RUNTIME === 'nodejs') { await resolveSecrets([LYSNR_SECRETS.JWT_SECRET]); } }