File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1818 "scripts" : {
1919 "build" : " tsc --noEmit && cross-env INPUT=mcp-app.html vite build" ,
2020 "watch" : " cross-env INPUT=mcp-app.html vite build --watch" ,
21- "serve:http" : " bun -- watch server.ts" ,
22- "serve:stdio" : " bun server.ts --stdio" ,
21+ "serve:http" : " tsx watch server.ts" ,
22+ "serve:stdio" : " tsx server.ts --stdio" ,
2323 "start" : " npm run start:http" ,
2424 "start:http" : " cross-env NODE_ENV=development npm run build && npm run serve:http" ,
2525 "start:stdio" : " cross-env NODE_ENV=development npm run build && npm run serve:stdio" ,
4646 "cors" : " ^2.8.5" ,
4747 "cross-env" : " ^10.1.0" ,
4848 "express" : " ^5.1.0" ,
49+ "tsx" : " ^4.19.2" ,
4950 "typescript" : " ^5.9.3" ,
5051 "vite" : " ^6.0.0" ,
5152 "vite-plugin-singlefile" : " ^2.3.0"
Original file line number Diff line number Diff line change @@ -13,14 +13,16 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
1313import type { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js" ;
1414import fs from "node:fs/promises" ;
1515import path from "node:path" ;
16+ import { fileURLToPath } from "node:url" ;
1617import { z } from "zod" ;
1718import { startServer } from "./server-utils.js" ;
1819
1920// =============================================================================
2021// Constants
2122// =============================================================================
2223
23- const DIST_DIR = path . join ( import . meta. dirname , "dist" ) ;
24+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
25+ const DIST_DIR = path . join ( __dirname , "dist" ) ;
2426
2527// Default code example for the Three.js widget
2628const DEFAULT_THREEJS_CODE = `const scene = new THREE.Scene();
Original file line number Diff line number Diff line change 77 "allowImportingTsExtensions" : true ,
88 "resolveJsonModule" : true ,
99 "isolatedModules" : true ,
10- "verbatimModuleSyntax" : true ,
10+ "esModuleInterop" : true ,
11+ "allowSyntheticDefaultImports" : true ,
1112 "noEmit" : true ,
1213 "jsx" : " react-jsx" ,
1314 "strict" : true ,
You can’t perform that action at this time.
0 commit comments