File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " mcp-framework" ,
3- "version" : " 0.1.15 " ,
3+ "version" : " 0.1.17 " ,
44 "description" : " Framework for building Model Context Protocol (MCP) servers in Typescript" ,
55 "type" : " module" ,
66 "author" : " Alex Andru <alex@andru.codes>" ,
Original file line number Diff line number Diff line change @@ -4,20 +4,26 @@ import { join } from "path";
44
55export async function buildFramework ( ) {
66 const projectDir = process . cwd ( ) ;
7-
7+
88 try {
9- await execa ( "npx" , [ "tsc" ] , {
9+ console . log ( `Building project in: ${ projectDir } ` ) ;
10+
11+ await execa ( "tsc" , [ ] , {
1012 stdio : "inherit" ,
1113 reject : true ,
14+ cwd : projectDir
1215 } ) ;
1316
14- const indexPath = join ( projectDir , "dist" , "index.js" ) ;
17+ const distPath = join ( projectDir , "dist" ) ;
18+ const projectIndexPath = join ( distPath , "index.js" ) ;
1519 const shebang = "#!/usr/bin/env node\n" ;
1620
17- const content = await readFile ( indexPath , "utf8" ) ;
21+ const content = await readFile ( projectIndexPath , "utf8" ) ;
1822 if ( ! content . startsWith ( shebang ) ) {
19- await writeFile ( indexPath , shebang + content ) ;
23+ await writeFile ( projectIndexPath , shebang + content ) ;
2024 }
25+
26+ console . log ( "Build complete!" ) ;
2127 } catch ( error ) {
2228 console . error ( "Build failed:" , error instanceof Error ? error . message : error ) ;
2329 process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments