Skip to content

Commit 2977b3e

Browse files
committed
feat: register migrateToInterchainjs tool
1 parent 3ad8162 commit 2977b3e

19 files changed

+70
-951
lines changed

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "build/index.js",
66
"scripts": {
77
"build": "tsc && npm run copy-prompts && chmod 755 build/index.js",
8-
"copy-prompts": "mkdir -p build/starship && cp -r src/starship/prompts build/starship/",
8+
"copy-prompts": "./scripts/copy-prompts.sh",
99
"clean": "rimraf build",
1010
"test": "vitest",
1111
"test:watch": "vitest --watch",
@@ -30,19 +30,14 @@
3030
"typescript": "^5.8.2",
3131
"vitest": "^3.1.1"
3232
},
33-
"files": [
34-
"build"
35-
],
33+
"files": ["build"],
3634
"pnpm": {
37-
"onlyBuiltDependencies": [
38-
"@biomejs/biome",
39-
"esbuild"
40-
]
35+
"onlyBuiltDependencies": ["@biomejs/biome", "esbuild"]
4136
},
4237
"dependencies": {
4338
"@modelcontextprotocol/sdk": "^1.7.0",
4439
"dotenv": "^16.4.7",
4540
"js-yaml": "^4.1.0",
4641
"zod": "^3.24.2"
4742
}
48-
}
43+
}

scripts/copy-prompts.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Ensure the script fails on any error
4+
set -e
5+
6+
# Find all prompts directories under src
7+
PROMPTS_DIRS=$(find src -type d -name prompts)
8+
9+
# Process each prompts directory
10+
for PROMPT_DIR in $PROMPTS_DIRS; do
11+
# Get the relative path without 'src/'
12+
REL_PATH=$(dirname "$PROMPT_DIR" | sed 's|^src/||')
13+
14+
# Create the target directory
15+
mkdir -p "build/$REL_PATH"
16+
17+
# Copy the prompts
18+
cp -r "$PROMPT_DIR" "build/$REL_PATH/"
19+
done
20+
21+
# Copy migration-examples directory
22+
if [ -d "src/interchainjs/migration-examples" ]; then
23+
mkdir -p "build/interchainjs"
24+
cp -r "src/interchainjs/migration-examples" "build/interchainjs/"
25+
fi

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { fileURLToPath } from "node:url";
66

77
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
88
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9+
import { registerMigrateToInterchainjsTool } from "./interchainjs/tools/migrate-to-interchainjs.js";
910
import { registerStarshipConfigGenTool } from "./starship/tools/starship-config-gen.js";
1011
import { registerStarshipSetupTool } from "./starship/tools/starship-setup.js";
1112

@@ -25,8 +26,12 @@ async function main() {
2526
version: VERSION,
2627
});
2728

28-
registerStarshipConfigGenTool(server);
29+
// Starship
2930
registerStarshipSetupTool(server);
31+
registerStarshipConfigGenTool(server);
32+
33+
// InterchainJS
34+
registerMigrateToInterchainjsTool(server);
3035

3136
const transport = new StdioServerTransport();
3237
await server.connect(transport);

src/interchainjs-ast/migration/ast-utils.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/interchainjs-ast/migration/rules/client-transformer.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)