Artifact
// Runs under tsx from src/ in dev AND in the Docker image (CMD tsx src/index.ts), // so a module-relative URL resolves the committed JSON in both. Avoids both the // resolveJsonModule deep-inference typecheck cost and the missing-asset-in-dist trap. function loadCatalog(): CweCatalog { return JSON.parse( readFileSync(new URL('./data/cwe-catalog.json', import.meta.url), 'utf8'), ) as CweCatalog }
03a4cc23-d669-448d-8328-932bbdcb63e7
// Runs under tsx from src/ in dev AND in the Docker image (CMD tsx src/index.ts), // so a module-relative URL resolves the committed JSON in both. Avoids both the // resolveJsonModule deep-inference typecheck cost and the missing-asset-in-dist trap. function loadCatalog(): CweCatalog { return JSON.parse( readFileSync(new URL('./data/cwe-catalog.json', import.meta.url), 'utf8'), ) as CweCatalog }