feat: migrate MCP runtime to TypeScript

This commit is contained in:
nac
2026-08-15 05:02:28 +00:00
parent 7eb416ded1
commit 27672a0940
83 changed files with 6559 additions and 12057 deletions
+19
View File
@@ -0,0 +1,19 @@
import { chmod, mkdir, writeFile } from "node:fs/promises";
import { build } from "esbuild";
await mkdir("dist", { recursive: true });
await build({
entryPoints: ["src/index.ts"],
outfile: "dist/index.js",
bundle: true,
platform: "node",
format: "esm",
target: "node20",
sourcemap: true,
legalComments: "none",
banner: { js: "#!/usr/bin/env node" },
});
await chmod("dist/index.js", 0o755);
// A legacy Python build may have left dist/.gitignore containing "*". npm uses
// this narrower file to include only the new bundled runtime in Release assets.
await writeFile("dist/.npmignore", "*\n!index.js\n!index.js.map\n", "utf8");