mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-01 10:16:37 +00:00
sdk v2
This commit is contained in:
@@ -17,6 +17,7 @@ await createClient({
|
||||
output: {
|
||||
path: "./src/gen",
|
||||
tsConfigPath: path.join(dir, "tsconfig.json"),
|
||||
clean: true,
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
@@ -36,6 +37,33 @@ await createClient({
|
||||
},
|
||||
],
|
||||
})
|
||||
await createClient({
|
||||
input: "./openapi.json",
|
||||
output: {
|
||||
path: "./src/v2/gen",
|
||||
tsConfigPath: path.join(dir, "tsconfig.json"),
|
||||
clean: true,
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
name: "@hey-api/typescript",
|
||||
exportFromIndex: false,
|
||||
},
|
||||
{
|
||||
name: "@hey-api/sdk",
|
||||
instance: "OpencodeClient",
|
||||
exportFromIndex: false,
|
||||
auth: false,
|
||||
paramsStructure: "flat",
|
||||
},
|
||||
{
|
||||
name: "@hey-api/client-fetch",
|
||||
exportFromIndex: false,
|
||||
baseUrl: "http://localhost:4096",
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
await $`bun prettier --write src/gen`
|
||||
await $`rm -rf dist`
|
||||
await $`bun tsc`
|
||||
|
||||
Reference in New Issue
Block a user