File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 "start" : " npm run examples:dev" ,
4949 "generate:schemas" : " tsx scripts/generate-schemas.ts && prettier --write \" src/generated/**/*\" " ,
5050 "sync:snippets" : " bun scripts/sync-snippets.ts" ,
51- "build" : " npm run generate:schemas && npm run sync:snippets && node scripts/run-bun.mjs build.bun.ts" ,
51+ "build" : " npm run generate:schemas && npm run sync:snippets && node scripts/run-bun.mjs build.bun.ts && node scripts/link-self.mjs " ,
5252 "prepack" : " npm run build" ,
5353 "build:all" : " npm run examples:build" ,
5454 "test" : " bun test src" ,
Original file line number Diff line number Diff line change 1+ /**
2+ * Workaround: npm workspaces don't symlink the root package into node_modules
3+ * when child workspaces depend on it — it installs a stale registry copy instead.
4+ * This script syncs the freshly-built dist/ and package.json into that copy
5+ * so examples always type-check against the latest local types.
6+ * See: https://github.com/npm/feedback/discussions/774
7+ */
8+ import { cpSync , existsSync } from "fs" ;
9+
10+ const target = "node_modules/@modelcontextprotocol/ext-apps" ;
11+ if ( ! existsSync ( target ) ) process . exit ( 0 ) ;
12+
13+ cpSync ( "dist" , `${ target } /dist` , { recursive : true } ) ;
14+ cpSync ( "package.json" , `${ target } /package.json` ) ;
You can’t perform that action at this time.
0 commit comments