diff --git a/server/package.json b/server/package.json index bf6447ce0..f111a9837 100644 --- a/server/package.json +++ b/server/package.json @@ -9,9 +9,10 @@ "start": "tsx src/index.ts", "workers": "tsx watch src/workers.ts", "workers:start": "node --no-deprecation dist/src/workers.js", - "build": "tsc -b", - "prod": "tsc -b && tsc-alias && node dist/src/index.js", - "prod:build": "tsc -b && tsc-alias", + "build": "tsc -b tsconfig.build.json", + "prod": "tsc -b tsconfig.build.json && tsc-alias && node dist/src/index.js", + "prod:build": "tsc -b tsconfig.build.json && tsc-alias", + "prod:start": "node dist/src/index.js", "cron": "tsx src/cron.ts", "cron:start": "node --no-deprecation dist/src/cron.js", diff --git a/server/src/internal/customers/products/AttachParams.ts b/server/src/internal/customers/products/AttachParams.ts index f6ea86f2f..b39cc26ac 100644 --- a/server/src/internal/customers/products/AttachParams.ts +++ b/server/src/internal/customers/products/AttachParams.ts @@ -15,7 +15,6 @@ import { import { z } from "zod"; export type AttachParams = { - freeTrialIds: string[]; org: Organization; customer: Customer; products: FullProduct[]; diff --git a/server/tsconfig.build.json b/server/tsconfig.build.json new file mode 100644 index 000000000..c6ca30cb0 --- /dev/null +++ b/server/tsconfig.build.json @@ -0,0 +1,25 @@ +{ + "ts-node": { + "esm": true, + "experimentalSpecifier": true + }, + "compilerOptions": { + "target": "ES2020", + "moduleResolution": "NodeNext", + "module": "NodeNext", + "declaration": true, + "rootDir": ".", + "baseUrl": ".", + "outDir": "./dist", + "strict": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@/*": ["src/*"] + } + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/server/tsconfig.json b/server/tsconfig.json index 12c0fac60..c8456d24f 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -9,7 +9,6 @@ "module": "NodeNext", // or "node16"/"nodenext" "declaration": true, - // "rootDir": "../", "rootDir": ".", "baseUrl": ".", "outDir": "./dist", @@ -18,31 +17,13 @@ "allowSyntheticDefaultImports": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - // "allowImportingTsExtensions": true, - // "noEmit": true, "paths": { "@/*": ["src/*"], "@shared/*": ["../shared/*"], "@scripts/*": ["scripts/*"] } }, - "include": [ - "src", - "tests", - "scripts", - "tests-old/utils.ts", - "tests-old/global.ts", - "../shared/db/allTables.ts", - "../shared/db/apiKeysTable.ts", - "../shared/db/chatResultsTable.ts", - "../shared/db/cusTable.ts", - "../shared/db/entitlementsTable.ts", - "../shared/db/featuresTable.ts", - "../shared/db/invoicesTable.ts", - "../shared/db/orgTable.ts", - "../shared/db/pricesTable.ts", - "../shared/db/productsTable.ts" - ], + "include": ["src", "tests", "scripts"], "references": [ { "path": "../shared"