refactor(server): serve raw filesystem content (#31911)

This commit is contained in:
Dax
2026-06-11 11:20:11 -04:00
committed by GitHub
parent 31b233e9db
commit 31c5454ee6
12 changed files with 67 additions and 93 deletions
@@ -389,12 +389,9 @@ describe("HttpApi SDK", () => {
workspaceID,
onRequest: (value) => (request = value),
})
const file = yield* call(() => sdk.v2.fs.read({ path: "hello.txt" }))
const found = yield* call(() => sdk.v2.fs.find({ query: "hello", type: "file" }))
const url = new URL(request!.url)
expect(file.response.status).toBe(200)
expect(file.data).toMatchObject({ data: { content: "hello" } })
expect(found.response.status).toBe(200)
expect(found.data).toMatchObject({ data: [{ path: "hello.txt", type: "file" }] })
expect(url.searchParams.get("directory")).toBe(directory)