refactor(opencode): improve startup time by 38% (#30453)

Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>
This commit is contained in:
Dustin Deus
2026-06-02 21:20:25 +02:00
committed by GitHub
parent 83c12f334e
commit 7dd2306dad
20 changed files with 1878 additions and 1851 deletions

View File

@@ -1,4 +1,3 @@
import { Server } from "../../server/server"
import type { CommandModule } from "yargs"
type Args = {}
@@ -7,7 +6,10 @@ export const GenerateCommand = {
command: "generate",
builder: (yargs) => yargs,
handler: async () => {
const specs = (await Server.openapi()) as { paths: Record<string, Record<string, any>> }
const { Server } = await import("../../server/server")
const specs = (await Server.openapi()) as {
paths: Record<string, Record<string, any>>
}
for (const item of Object.values(specs.paths)) {
for (const method of ["get", "post", "put", "delete", "patch"] as const) {
const operation = item[method]