{"version":3,"file":"dev-server-middleware.cjs","names":[],"sources":["../../../src/build/rspack/dev-server-middleware.ts"],"sourcesContent":["import type { PluginInfo } from \"./utils\";\n\nconst corsHeaders = {\n  \"Access-Control-Allow-Origin\": \"*\",\n  \"Access-Control-Allow-Methods\": \"GET, POST, PUT, DELETE, PATCH, OPTIONS\",\n  \"Access-Control-Allow-Headers\": \"X-Requested-With, content-type, Authorization\",\n};\n\nconst applyCorsHeaders = (res: any) => {\n  Object.entries(corsHeaders).forEach(([key, value]) => {\n    res.setHeader(key, value);\n  });\n};\n\nconst normalizePrefix = (prefix?: string): string => {\n  if (!prefix) return \"\";\n  const cleaned = prefix.replace(/^\\/+|\\/+$/g, \"\");\n  return cleaned ? `/${cleaned}` : \"\";\n};\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\n\nconst readRuntimeConfigFromEnv = (): any => {\n  const raw = process.env.BOS_RUNTIME_CONFIG;\n  if (!raw) return null;\n  try {\n    return JSON.parse(raw);\n  } catch {\n    return null;\n  }\n};\n\nconst collectSiblingRemotes = (runtimeConfig: any, pluginId: string) => {\n  const siblings: Record<string, { remote: string }> = {};\n\n  const isApi = pluginId === \"api\" || runtimeConfig?.api?.name === pluginId;\n\n  const ownKey = runtimeConfig?.plugins?.[pluginId] ? pluginId : null;\n  let dependsOn: string[] = [];\n  if (ownKey) {\n    dependsOn = runtimeConfig.plugins[ownKey].dependsOn ?? [];\n  } else if (isApi) {\n    dependsOn = runtimeConfig?.api?.dependsOn ?? [];\n  }\n\n  for (const depId of dependsOn) {\n    const dep = runtimeConfig?.plugins?.[depId];\n    if (!dep || dep.source !== \"local\" || !dep.url) continue;\n    if (depId === pluginId) continue;\n    const base = dep.url.replace(/\\/$/, \"\");\n    siblings[depId] = { remote: `${base}/remoteEntry.js` };\n  }\n\n  return { siblings, dependsOn };\n};\n\nconst loadPluginWithRetry = async (\n  runtime: any,\n  pluginId: string,\n  timeoutMs = 90000,\n): Promise<any> => {\n  const deadline = Date.now() + timeoutMs;\n  let lastError: unknown;\n  while (Date.now() < deadline) {\n    try {\n      return await runtime.usePlugin(pluginId, { variables: {}, secrets: {} } as any);\n    } catch (error) {\n      lastError = error;\n      await sleep(500);\n    }\n  }\n  throw lastError;\n};\n\nexport function setupPluginMiddleware(\n  devServer: any,\n  pluginInfo: PluginInfo,\n  devConfig: any,\n  port: number,\n) {\n  const rpcPrefix = normalizePrefix(devConfig?.prefix);\n  const handlers: { rpc: any; api: any } = { rpc: null, api: null };\n  let cleanup: (() => Promise<void>) | null = null;\n\n  const performCleanup = async () => {\n    if (cleanup) {\n      await cleanup();\n      cleanup = null;\n    }\n  };\n\n  (async () => {\n    await performCleanup();\n\n    try {\n      const { createPluginRuntime } = await import(\"every-plugin\");\n      const { RPCHandler } = await import(\"@orpc/server/fetch\");\n      const { OpenAPIHandler } = await import(\"@orpc/openapi/fetch\");\n      const { OpenAPIReferencePlugin } = await import(\"@orpc/openapi/plugins\");\n      const { ZodToJsonSchemaConverter } = await import(\"@orpc/zod/zod4\");\n      const { onError } = await import(\"every-plugin/orpc\");\n      const { formatORPCError } = await import(\"every-plugin/errors\");\n\n      const pluginId = devConfig?.pluginId || pluginInfo.normalizedName;\n\n      const runtimeConfig = readRuntimeConfigFromEnv();\n      const { siblings, dependsOn } = collectSiblingRemotes(runtimeConfig, pluginId);\n\n      if (dependsOn.length > 0) {\n        console.log(`│  🔗 Loading sibling plugin(s) for ${pluginId}: ${dependsOn.join(\", \")}`);\n      }\n\n      const registry: Record<string, { remote: string }> = {\n        [pluginId]: {\n          remote: `http://localhost:${port}/remoteEntry.js`,\n        },\n        ...siblings,\n      };\n\n      const runtime = createPluginRuntime({\n        registry,\n      });\n\n      const defaultConfig = { variables: {}, secrets: {} };\n\n      const pluginsMap: Record<string, unknown> = {};\n      for (const depId of Object.keys(siblings)) {\n        const dep = await loadPluginWithRetry(runtime, depId);\n        pluginsMap[depId] = dep.createClient;\n        console.log(`│  ✅ Loaded dependency plugin: ${depId}`);\n      }\n\n      const loaded: any = await runtime.usePlugin<typeof pluginId>(\n        pluginId,\n        (devConfig?.config ?? defaultConfig) as any,\n        Object.keys(pluginsMap).length > 0 ? pluginsMap : undefined,\n      );\n\n      cleanup = async () => {\n        handlers.rpc = null;\n        handlers.api = null;\n        if (devServer.app.locals.handlers) {\n          devServer.app.locals.handlers = null;\n        }\n        if (runtime) await runtime.shutdown();\n      };\n\n      handlers.rpc = new RPCHandler(loaded.router, {\n        interceptors: [\n          onError((error: any) => {\n            const formatted = formatORPCError(error);\n            if (formatted) console.error(formatted);\n          }),\n        ],\n      });\n\n      handlers.api = new OpenAPIHandler(loaded.router, {\n        plugins: [\n          new OpenAPIReferencePlugin({\n            schemaConverters: [new ZodToJsonSchemaConverter()],\n          }),\n        ],\n        interceptors: [\n          onError((error: any) => {\n            const formatted = formatORPCError(error);\n            if (formatted) console.error(formatted);\n          }),\n        ],\n      });\n\n      console.log(`╭─────────────────────────────────────────────`);\n      console.log(`│  ✅ Plugin dev server ready: `);\n      console.log(`├─────────────────────────────────────────────`);\n      console.log(`│  📡 RPC:    http://localhost:${port}/api/rpc${rpcPrefix}`);\n      console.log(`│  📖 Docs:   http://localhost:${port}/api`);\n      console.log(`│  💚 Health: http://localhost:${port}/`);\n      console.log(`╰─────────────────────────────────────────────`);\n\n      devServer.app.locals.handlers = handlers;\n\n      if (devServer.server) {\n        devServer.server.once(\"close\", async () => {\n          await performCleanup();\n        });\n      }\n    } catch (error) {\n      console.error(\"❌ Failed to load plugin:\", error);\n      await performCleanup();\n    }\n  })().catch((err) => {\n    console.error(\"❌ Plugin dev server fatal error:\", err);\n  });\n\n  process.once(\"SIGINT\", async () => {\n    const timeout = setTimeout(() => process.exit(0), 3000);\n    await performCleanup();\n    clearTimeout(timeout);\n  });\n  process.once(\"SIGTERM\", async () => {\n    const timeout = setTimeout(() => process.exit(0), 3000);\n    await performCleanup();\n    clearTimeout(timeout);\n  });\n\n  devServer.app.options(\"*\", (_req: any, res: any) => {\n    applyCorsHeaders(res);\n    res.status(200).end();\n  });\n\n  devServer.app.get(\"/\", (_req: any, res: any) => {\n    applyCorsHeaders(res);\n    res.json({\n      ok: true,\n      plugin: pluginInfo.normalizedName,\n      version: pluginInfo.version,\n      status: devServer.app.locals.handlers?.rpc ? \"ready\" : \"loading\",\n      endpoints: {\n        health: \"/\",\n        docs: \"/api\",\n        rpc: `/api/rpc${rpcPrefix}`,\n      },\n    });\n  });\n\n  devServer.app.get(\"/health\", (_req: any, res: any) => {\n    applyCorsHeaders(res);\n    res.status(200).send(\"OK\");\n  });\n\n  const buildDevContext = (_req: any, webRequest: Request) => {\n    const rawClone =\n      webRequest.method === \"GET\" || webRequest.method === \"HEAD\" ? null : webRequest.clone();\n    let cachedRawBody: string | null = null;\n    return {\n      reqHeaders: webRequest.headers,\n      getRawBody: async (): Promise<string> => {\n        if (cachedRawBody !== null) return cachedRawBody;\n        if (!rawClone) {\n          cachedRawBody = \"\";\n          return cachedRawBody;\n        }\n        cachedRawBody = await rawClone.text();\n        return cachedRawBody;\n      },\n    };\n  };\n\n  const handleApiRequest = async (req: any, res: any) => {\n    applyCorsHeaders(res);\n    const apiHandler = devServer.app.locals.handlers?.api;\n    if (!apiHandler) {\n      return res.status(503).json({ error: \"Plugin still loading...\" });\n    }\n\n    try {\n      const url = `http://${req.headers.host}${req.url}`;\n      const webRequest = new Request(url, {\n        method: req.method,\n        headers: req.headers,\n        body: req.method !== \"GET\" && req.method !== \"HEAD\" ? req : undefined,\n        duplex: req.method !== \"GET\" && req.method !== \"HEAD\" ? \"half\" : undefined,\n      } as RequestInit);\n\n      const result = await apiHandler.handle(webRequest, {\n        prefix: \"/api\",\n        context: buildDevContext(req, webRequest),\n      });\n\n      if (result.response) {\n        res.status(result.response.status);\n        result.response.headers.forEach((value: string, key: string) => {\n          res.setHeader(key, value);\n        });\n        const text = await result.response.text();\n        res.send(text);\n      } else {\n        res.status(404).send(\"Not Found\");\n      }\n    } catch (error) {\n      console.error(\"OpenAPI error:\", error);\n      res.status(500).json({ error: (error as Error).message });\n    }\n  };\n\n  devServer.app.all(`/api/rpc${rpcPrefix}/*`, async (req: any, res: any) => {\n    applyCorsHeaders(res);\n    const rpcHandler = devServer.app.locals.handlers?.rpc;\n    if (!rpcHandler) {\n      return res.status(503).json({ error: \"Plugin still loading...\" });\n    }\n\n    try {\n      const url = `http://${req.headers.host}${req.url}`;\n      const webRequest = new Request(url, {\n        method: req.method,\n        headers: req.headers,\n        body: req.method !== \"GET\" && req.method !== \"HEAD\" ? req : undefined,\n        duplex: req.method !== \"GET\" && req.method !== \"HEAD\" ? \"half\" : undefined,\n      } as RequestInit);\n\n      const result = await rpcHandler.handle(webRequest, {\n        prefix: `/api/rpc${rpcPrefix}`,\n        context: buildDevContext(req, webRequest),\n      });\n\n      if (result.response) {\n        res.status(result.response.status);\n        result.response.headers.forEach((value: string, key: string) => {\n          res.setHeader(key, value);\n        });\n        const text = await result.response.text();\n        res.send(text);\n      } else {\n        res.status(404).send(\"Not Found\");\n      }\n    } catch (error) {\n      console.error(\"RPC error:\", error);\n      res.status(500).json({ error: (error as Error).message });\n    }\n  });\n\n  devServer.app.all(\"/api\", handleApiRequest);\n  devServer.app.all(\"/api/*\", handleApiRequest);\n}\n"],"mappings":";;AAEA,MAAM,cAAc;CAClB,+BAA+B;CAC/B,gCAAgC;CAChC,gCAAgC;AAClC;AAEA,MAAM,oBAAoB,QAAa;CACrC,OAAO,QAAQ,WAAW,CAAC,CAAC,SAAS,CAAC,KAAK,WAAW;EACpD,IAAI,UAAU,KAAK,KAAK;CAC1B,CAAC;AACH;AAEA,MAAM,mBAAmB,WAA4B;CACnD,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,UAAU,OAAO,QAAQ,cAAc,EAAE;CAC/C,OAAO,UAAU,IAAI,YAAY;AACnC;AAEA,MAAM,SAAS,OAAe,IAAI,SAAS,YAAY,WAAW,SAAS,EAAE,CAAC;AAE9E,MAAM,iCAAsC;CAC1C,MAAM,MAAM,QAAQ,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