From b32d638c878e50689f2da4e48ffdc8aa75e36e3c Mon Sep 17 00:00:00 2001 From: Basil Hosmer Date: Mon, 15 Sep 2025 02:10:52 -0400 Subject: [PATCH] Consolidate TypeScript build configuration Use single tsconfig.json for both main server and auth-server to avoid nested directory issues during build. Update e2e test scripts to run directly instead of using concurrently. --- auth-server/index.ts | 2 +- auth-server/tsconfig.json | 9 --------- package.json | 12 ++++++------ tsconfig.json | 2 +- 4 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 auth-server/tsconfig.json diff --git a/auth-server/index.ts b/auth-server/index.ts index 7671832..e32debe 100644 --- a/auth-server/index.ts +++ b/auth-server/index.ts @@ -153,7 +153,7 @@ app.listen(AUTH_SERVER_PORT, () => { introspect: `${AUTH_SERVER_URL}/introspect` } }); - + console.log(''); console.log('🚀 Auth server ready! Test with:'); console.log(` curl ${AUTH_SERVER_URL}/health`); diff --git a/auth-server/tsconfig.json b/auth-server/tsconfig.json deleted file mode 100644 index c9033fa..0000000 --- a/auth-server/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../dist/auth-server", - "rootDir": "../" - }, - "include": ["index.ts", "../src/**/*.ts", "../shared/**/*.ts"], - "exclude": ["../dist", "../node_modules", "../**/*.test.ts"] -} \ No newline at end of file diff --git a/package.json b/package.json index eb59e6f..6ce81f3 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.1.0", "description": "Example MCP Server", "type": "module", - "main": "dist/index.js", + "main": "dist/src/index.js", "scripts": { - "start": "node dist/index.js", + "start": "node dist/src/index.js", "start:auth-server": "node dist/auth-server/index.js", "dev": "tsx watch --inspect src/index.ts", "dev:break": "tsx --inspect-brk watch src/index.ts", @@ -13,14 +13,14 @@ "dev:separate": "AUTH_MODE=separate AUTH_SERVER_URL=http://localhost:3001 npm run dev", "dev:auth-server": "AUTH_SERVER_PORT=3001 tsx watch --inspect auth-server/index.ts", "dev:with-separate-auth": "concurrently -n \"AUTH,MCP\" -c \"yellow,cyan\" \"npm run dev:auth-server\" \"npm run dev:separate\"", - "build": "tsc && tsc -p auth-server/tsconfig.json && npm run copy-static", - "copy-static": "mkdir -p dist/static && cp -r src/static/* dist/static/", + "build": "tsc && npm run copy-static", + "copy-static": "mkdir -p dist/src/static && cp -r src/static/* dist/src/static/", "lint": "eslint src/ auth-server/", "test": "NODE_OPTIONS=--experimental-vm-modules jest", "test:integrated": "AUTH_MODE=integrated npm test", "test:separate": "AUTH_MODE=separate npm test", - "test:e2e:integrated": "concurrently --kill-others --success first \"npm run dev:integrated\" \"sleep 4 && ./scripts/test-integrated-e2e.sh\"", - "test:e2e:separate": "concurrently --kill-others --success first \"npm run dev:with-separate-auth\" \"sleep 6 && ./scripts/test-separate-e2e.sh\"" + "test:e2e:integrated": "./scripts/test-integrated-e2e.sh", + "test:e2e:separate": "./scripts/test-separate-e2e.sh" }, "devDependencies": { "@eslint/js": "^9.15.0", diff --git a/tsconfig.json b/tsconfig.json index fee103a..4c27ee1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,6 @@ "isolatedModules": true, "skipLibCheck": true }, - "include": ["src/**/*"], + "include": ["src/**/*", "shared/**/*", "auth-server/**/*"], "exclude": ["node_modules", "dist"] }