@supacloud/compiler 0.38.1 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -355,6 +355,14 @@ export default defineSupacloudConfig({
355
355
 
356
356
  ## OpenAPI 与 Client Generator
357
357
 
358
+ 开启 `generateClient` 后,`compile` 和 `check` 会对直接引用已知应用运行时模块
359
+ (Module、Controller、Provider 所在文件)的路由 schema 报告
360
+ `client-schema-runtime-import`。普通模式为 warning,strict 模式为 error。
361
+ 请把这些 schema 提取到纯共享合同文件,再由 controller 导入;仅把生成客户端的
362
+ 引用改为 `import type` 并不能隔离浏览器 TypeScript 对服务端装饰器的检查。
363
+ 这个诊断只检查已知运行时模块的直接引用,不代表对第三方包、间接依赖或浏览器 bundle
364
+ 完成了安全审计;服务端专用的 `generateClient: false` 不受影响。
365
+
358
366
  编译器从同一份 `ApplicationGraph` 生成 `client.ts` 和 `openapi.ts`,不引入
359
367
  反射或第二套路由注册。路由装饰器中显式声明的 TypeBox `body`、`params`、
360
368
  `query`、`response` schema 会被静态导入;没有 schema 的字段保持为