refactor(httpapi): fork server startup by flag (#24799)
This commit is contained in:
parent
3fa78a8b01
commit
7739cc53b4
23 changed files with 190 additions and 371 deletions
|
|
@ -9,7 +9,14 @@ import path from "path"
|
|||
|
||||
import { createClient } from "@hey-api/openapi-ts"
|
||||
|
||||
await $`bun dev generate > ${dir}/openapi.json`.cwd(path.resolve(dir, "../../opencode"))
|
||||
const openapiSource = process.env.OPENCODE_SDK_OPENAPI === "httpapi" ? "httpapi" : "hono"
|
||||
const opencode = path.resolve(dir, "../../opencode")
|
||||
|
||||
if (openapiSource === "httpapi") {
|
||||
await $`bun dev generate --httpapi > ${dir}/openapi.json`.cwd(opencode)
|
||||
} else {
|
||||
await $`bun dev generate > ${dir}/openapi.json`.cwd(opencode)
|
||||
}
|
||||
|
||||
await createClient({
|
||||
input: "./openapi.json",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue