Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions packages/mcp-server/build
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,7 @@ node scripts/postprocess-dist-package-json.cjs

# build to .js/.mjs/.d.ts files
npm exec tsc-multi
# we need to add exports = module.exports = Anthropic TypeScript to index.js;
# No way to get that from index.ts because it would cause compile errors
# when building .mjs
DIST_PATH=./dist node ../../scripts/utils/fix-index-exports.cjs

# with "moduleResolution": "nodenext", if ESM resolves to index.d.ts,
# it'll have TS errors on the default import. But if it resolves to
# index.d.mts the default import will work (even though both files have
# the same export default statement)
cp dist/index.d.ts dist/index.d.mts

cp tsconfig.dist-src.json dist/src/tsconfig.json

# Add proper Node.js shebang to the top of the file
Expand Down
19 changes: 4 additions & 15 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"ts-jest": "^29.1.0",
"ts-morph": "^19.0.0",
"ts-node": "^10.5.0",
"tsc-multi": "^1.1.0",
"tsc-multi": "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.3/tsc-multi.tgz",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.8.2"
},
Expand All @@ -51,23 +51,12 @@
},
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"types": "./dist/index.d.mts",
"require": "./dist/index.js",
"default": "./dist/index.mjs"
},
"./*.mjs": {
"types": "./dist/*.d.ts",
"default": "./dist/*.mjs"
},
"./*.js": {
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
},
"./*.mjs": "./dist/*.mjs",
"./*.js": "./dist/*.js",
"./*": {
"types": "./dist/*.d.ts",
"require": "./dist/*.js",
"default": "./dist/*.mjs"
}
Expand Down
1 change: 1 addition & 0 deletions packages/mcp-server/src/tools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './tools/index';
4 changes: 2 additions & 2 deletions packages/mcp-server/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"compilerOptions": {
"rootDir": "./dist/src",
"paths": {
"isaacus-mcp/*": ["src/*"],
"isaacus-mcp": ["src/index.ts"]
"isaacus-mcp/*": ["dist/src/*"],
"isaacus-mcp": ["dist/src/index.ts"]
},
"noEmit": false,
"declaration": true,
Expand Down