summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk/js/script
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sdk/js/script')
-rwxr-xr-xpackages/sdk/js/script/build.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/sdk/js/script/build.ts b/packages/sdk/js/script/build.ts
index c1fe0f423..7a6371691 100755
--- a/packages/sdk/js/script/build.ts
+++ b/packages/sdk/js/script/build.ts
@@ -10,13 +10,12 @@ import { createClient } from "@hey-api/openapi-ts"
await $`bun dev generate > ${dir}/openapi.json`.cwd(path.resolve(dir, "../../opencode"))
-await $`rm -rf src/gen`
-
await createClient({
input: "./openapi.json",
output: {
- path: "./src/gen",
+ path: "./src/v2/gen",
tsConfigPath: path.join(dir, "tsconfig.json"),
+ clean: true,
},
plugins: [
{
@@ -28,6 +27,7 @@ await createClient({
instance: "OpencodeClient",
exportFromIndex: false,
auth: false,
+ paramsStructure: "flat",
},
{
name: "@hey-api/client-fetch",
@@ -36,6 +36,8 @@ await createClient({
},
],
})
+
await $`bun prettier --write src/gen`
+await $`bun prettier --write src/v2`
await $`rm -rf dist`
await $`bun tsc`