feat: migrate MCP runtime to TypeScript
This commit is contained in:
@@ -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");
|
||||
Reference in New Issue
Block a user