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
23 changes: 18 additions & 5 deletions scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,31 @@ async function main() {
const zodSrc = await fs.readFile(zodPath, "utf8");
await fs.writeFile(
zodPath,
updateDocs(zodSrc.replace(`from "zod"`, `from "zod/v4"`)),
updateDocs(
zodSrc
.replace(`from "zod"`, `from "zod/v4"`)
// Weird type issue
.replaceAll(`"McpServerStdio"`, `"stdio"`)
.replaceAll(
"_meta: z.unknown().optional()",
"_meta: z.object().optional()",
),
),
);

const tsPath = "./src/schema/types.gen.ts";
const tsSrc = await fs.readFile(tsPath, "utf8");
await fs.writeFile(
tsPath,
updateDocs(
tsSrc.replace(
`export type ClientOptions`,
`// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype ClientOptions`,
),
tsSrc
.replace(
`export type ClientOptions`,
`// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype ClientOptions`,
)
// Weird type issue
.replaceAll(`"McpServerStdio"`, `"stdio"`)
.replaceAll(`_meta?: unknown`, `_meta?: { [key: string]: unknown }`),
),
);

Expand Down
5 changes: 3 additions & 2 deletions src/acp.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { z } from "zod";
import * as schema from "./schema";
import * as schema from "./schema/index.js";
import * as validate from "./schema/zod.gen.js";
export * from "./schema";
export type * from "./schema/types.gen.js";
export * from "./schema/index.js";
export * from "./stream.js";

import type { Stream } from "./stream.js";
Expand Down
Loading