🐛 fix(cors): compile shared-nestjs-cors to JavaScript for production

The shared-nestjs-cors package was exporting raw TypeScript files, which caused
runtime errors in production Docker containers:
  SyntaxError: Unexpected token 'export'

Changes:
- Add build script to compile TypeScript to JavaScript
- Update package.json to export compiled dist files instead of src
- Add build step to all backend Dockerfiles that use this package
- Package now builds to CommonJS in dist/ folder

Fixes staging deployment failures for mana-core-auth and other backends.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-17 18:42:47 +01:00
parent 47881ae410
commit 74654e652a
7 changed files with 26 additions and 6 deletions

View file

@ -2,15 +2,16 @@
"name": "@manacore/shared-nestjs-cors",
"version": "0.0.1",
"private": true,
"main": "./src/index.ts",
"types": "./src/index.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./src/index.ts",
"default": "./src/index.ts"
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "tsc",
"type-check": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",