feat(client): add browser host SDK
This commit is contained in:
parent
57c939f188
commit
f814e4758c
26 changed files with 3503 additions and 29 deletions
|
|
@ -1,2 +1,2 @@
|
|||
export { ClientError } from "./client-error"
|
||||
export * as OpenCode from "./client"
|
||||
export { ClientError } from "./client-error.js"
|
||||
export * as OpenCode from "./client.js"
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ describe("HttpApiCodegen.write", () => {
|
|||
const writes: Array<{ readonly path: string; readonly content: string }> = []
|
||||
const output: Output = {
|
||||
operations: [],
|
||||
files: [{ path: "session.ts", content: "export const session = {}" }],
|
||||
files: [{ path: "session.ts", content: 'export { session } from "../../session-data"' }],
|
||||
}
|
||||
|
||||
return Effect.gen(function* () {
|
||||
yield* write(output, "/generated")
|
||||
|
||||
expect(writes).toEqual([
|
||||
{ path: "/generated/session.ts", content: "export const session = {}\n" },
|
||||
{ path: "/generated/session.ts", content: 'export { session } from "../../session-data.js"\n' },
|
||||
{ path: "/generated/.httpapi-codegen.json", content: '[\n "session.ts"\n]\n' },
|
||||
])
|
||||
}).pipe(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue