Vendor opencode source for docker build
This commit is contained in:
21
opencode/packages/sdk/js/src/index.ts
Normal file
21
opencode/packages/sdk/js/src/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export * from "./client.js"
|
||||
export * from "./server.js"
|
||||
|
||||
import { createOpencodeClient } from "./client.js"
|
||||
import { createOpencodeServer } from "./server.js"
|
||||
import type { ServerOptions } from "./server.js"
|
||||
|
||||
export async function createOpencode(options?: ServerOptions) {
|
||||
const server = await createOpencodeServer({
|
||||
...options,
|
||||
})
|
||||
|
||||
const client = createOpencodeClient({
|
||||
baseUrl: server.url,
|
||||
})
|
||||
|
||||
return {
|
||||
client,
|
||||
server,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user