From ff5f1095447ac2f07d6fb9c61465e08973ec704b Mon Sep 17 00:00:00 2001 From: David Arranz Date: Sun, 8 Sep 2024 21:06:05 +0200 Subject: [PATCH] . --- Dockerfile.server | 5 +--- server/tsconfig.production.json | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 server/tsconfig.production.json diff --git a/Dockerfile.server b/Dockerfile.server index 8c74f28..7c9596a 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -34,10 +34,7 @@ WORKDIR /api # Copiar los archivos del build desde la fase anterior COPY --from=builder /api/dist . COPY --from=builder /api/server/package.json . -COPY --from=builder /api/server/tsconfig.json ./server/ - -RUN pwd -RUN ls -la . +COPY --from=builder /api/server/tsconfig.production.json ./tsconfig.json # Instalar sólo las dependencias de producción en el servidor RUN yarn install --production diff --git a/server/tsconfig.production.json b/server/tsconfig.production.json new file mode 100644 index 0000000..1182a70 --- /dev/null +++ b/server/tsconfig.production.json @@ -0,0 +1,46 @@ +{ + "compilerOptions": { + /* Basic Options */ + "target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "lib": ["ES2022", "dom"] /* Specify library files to be included in the compilation. */, + "strict": true /* Enable all strict type-checking options. */, + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + //"baseUrl": "./" /* Base directory to resolve non-absolute module names. */, + "paths": { + /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "@/*": ["./server/src/*"], + "@shared/*": ["./shared/lib/*"] + }, + + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + "typeRoots": ["./node_modules/@types"] /* List of folders to include type definitions from. */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + "forceConsistentCasingInFileNames": true, + + /* Experimental Options */ + "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, + "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */, + + /* Advanced Options */ + "resolveJsonModule": true /* Include modules imported with '.json' extension */, + "suppressImplicitAnyIndexErrors": false + }, + "exclude": [ + "src/**/__tests__/*", + "src/**/*.mock.*", + "src/**/*.test.*", + "node_modules", + + "src/**/firebird/*", + + "src/**/CreateDealer.useCase.ts", + "src/**/UpdateDealer.useCase.ts", + "src/**/DeleteDealer.useCase.ts", + + "src/**/createDealer/*", + "src/**/updateDealer/*", + "src/**/deleteDealer/*" + ] +}