mirror of
https://github.com/langchain-ai/langgraphjs-api.git
synced 2026-07-19 13:25:54 -04:00
Fix TS and build
This commit is contained in:
@@ -11,5 +11,8 @@ await $`pnpm tsc --module nodenext --outDir dist/src/cli -d src/cli/spawn.mts`;
|
||||
await $`cp src/graph/parser/schema/types.template.mts dist/src/graph/parser/schema`;
|
||||
await $`rm -rf dist/src/graph/parser/schema/types.template.mjs`;
|
||||
|
||||
await $`cp src/ui/render.mts dist/src/ui`;
|
||||
await $`rm -rf dist/src/ui/render.mjs`;
|
||||
|
||||
await $`mv dist/src/* dist`;
|
||||
await $`rm -rf dist/src dist/tests`;
|
||||
|
||||
@@ -147,8 +147,7 @@ api.get("/ui/:agent/:basename", async (c) => {
|
||||
const file = GRAPH_UI[agent]?.find((item) => item.basename === basename);
|
||||
if (!file) return c.text("File not found", 404);
|
||||
|
||||
// @ts-expect-error TODO weird TS error?
|
||||
return c.body(file.contents, {
|
||||
return c.body(file.contents as unknown as ArrayBuffer, {
|
||||
headers: { "Content-Type": getMimeType(file.basename) ?? "text/plain" },
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user