cabloy 5.1.97 → 5.1.99

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.
Files changed (240) hide show
  1. package/.cabloy-version +1 -1
  2. package/.claude/hooks/contract-loop-gate.ts +151 -44
  3. package/CHANGELOG.md +48 -0
  4. package/CLAUDE.md +2 -0
  5. package/cabloy-docs/.vitepress/config.mjs +11 -0
  6. package/cabloy-docs/backend/controller-aop-guide.md +0 -1
  7. package/cabloy-docs/backend/image-guide.md +544 -0
  8. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +1 -1
  9. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +1 -1
  10. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +1 -1
  11. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +1 -1
  12. package/cabloy-docs/frontend/image-guide.md +512 -0
  13. package/cabloy-docs/frontend/introduction.md +2 -0
  14. package/cabloy-docs/frontend/ioc-and-beans.md +34 -3
  15. package/cabloy-docs/frontend/model-architecture.md +2 -0
  16. package/cabloy-docs/frontend/model-resource-owner-pattern.md +3 -1
  17. package/cabloy-docs/frontend/model-state-guide.md +5 -1
  18. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +10 -8
  19. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +2 -2
  20. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +1 -1
  21. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +2 -2
  22. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +4 -4
  23. package/cabloy-docs/frontend/server-data.md +2 -0
  24. package/cabloy-docs/frontend/state-architecture-for-vue-developers.md +218 -0
  25. package/cabloy-docs/frontend/system-startup-guide.md +2 -0
  26. package/cabloy-docs/frontend/use-state-data-best-practices.md +384 -0
  27. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +11 -10
  28. package/cabloy-docs/fullstack/image-workflow.md +403 -0
  29. package/cabloy-docs/fullstack/introduction.md +1 -0
  30. package/package.json +1 -1
  31. package/scripts/upgrade.ts +2 -0
  32. package/vona/package.original.json +0 -1
  33. package/vona/packages-cli/cli/package.json +1 -1
  34. package/vona/packages-cli/cli-set-api/package.json +1 -1
  35. package/vona/packages-vona/vona/package.json +1 -1
  36. package/vona/packages-vona/vona-core/package.json +1 -1
  37. package/vona/packages-vona/vona-core/src/lib/bean/beanBase.ts +9 -9
  38. package/vona/packages-vona/vona-mock/package.json +1 -1
  39. package/vona/pnpm-lock.yaml +424 -47
  40. package/vona/src/suite/a-training/modules/training-record/src/bean/fileScene.dossierFile.ts +22 -0
  41. package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +1 -0
  42. package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +1 -0
  43. package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +1 -0
  44. package/vona/src/suite/a-training/modules/training-record/src/dto/recordDossierFileView.ts +47 -0
  45. package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +13 -0
  46. package/vona/src/suite/a-training/modules/training-record/src/dto/recordView.tsx +13 -0
  47. package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +16 -5
  48. package/vona/src/suite/a-training/modules/training-record/src/index.ts +2 -0
  49. package/vona/src/suite/a-training/modules/training-record/src/lib/index.ts +1 -0
  50. package/vona/src/suite/a-training/modules/training-record/src/lib/resolveDossierFiles.ts +34 -0
  51. package/vona/src/suite/a-training/modules/training-record/test/record.test.ts +209 -123
  52. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +1 -0
  53. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +1 -0
  54. package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +18 -1
  55. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +0 -2
  56. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +1 -0
  57. package/vona/src/suite/cabloy-basic/modules/basic-siteadmin/src/bean/ssrSite.admin.ts +4 -0
  58. package/vona/src/suite/cabloy-basic/modules/basic-siteweb/src/bean/ssrSite.web.ts +4 -0
  59. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/cli/ssrSite/boilerplate/{{sceneName}}.{{beanName}}.ts_ +3 -0
  60. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
  61. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/service/ssrHandler.ts +11 -2
  62. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/ssrSite.ts +6 -0
  63. package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
  64. package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileProvider/boilerplate/{{sceneName}}.{{beanName}}.ts_ +23 -0
  65. package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileScene/boilerplate/{{sceneName}}.{{beanName}}.ts_ +5 -0
  66. package/vona/src/suite-vendor/a-file/modules/a-file/package.json +68 -0
  67. package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/index.ts +425 -0
  68. package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/locales.ts +18 -0
  69. package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/this.ts +2 -0
  70. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.file.ts +322 -0
  71. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileProvider.ts +62 -0
  72. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileUploadPolicy.ts +224 -0
  73. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.redlock.ts +11 -0
  74. package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.version.ts +38 -0
  75. package/vona/src/suite-vendor/a-file/modules/a-file/src/config/config.ts +16 -0
  76. package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/en-us.ts +1 -0
  77. package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/zh-cn.ts +1 -0
  78. package/vona/src/suite-vendor/a-file/modules/a-file/src/controller/file.ts +175 -0
  79. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadRequest.ts +33 -0
  80. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadResponse.ts +41 -0
  81. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDownloadRequest.ts +12 -0
  82. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyRequest.ts +15 -0
  83. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyResponse.ts +30 -0
  84. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadResponse.ts +59 -0
  85. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenRequest.ts +24 -0
  86. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenResponse.ts +16 -0
  87. package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadUrlRequest.ts +33 -0
  88. package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/file.ts +55 -0
  89. package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/fileProvider.ts +24 -0
  90. package/vona/src/suite-vendor/a-file/modules/a-file/src/index.ts +4 -0
  91. package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileProvider.ts +7 -0
  92. package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileScene.ts +7 -0
  93. package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileUploadValidation.ts +15 -0
  94. package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/index.ts +3 -0
  95. package/vona/src/suite-vendor/a-file/modules/a-file/src/model/file.ts +10 -0
  96. package/vona/src/suite-vendor/a-file/modules/a-file/src/model/fileProvider.ts +10 -0
  97. package/vona/src/suite-vendor/a-file/modules/a-file/src/types/file.ts +144 -0
  98. package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileProvider.ts +111 -0
  99. package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileScene.ts +53 -0
  100. package/vona/src/suite-vendor/a-file/modules/a-file/src/types/index.ts +3 -0
  101. package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.build.json +11 -0
  102. package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.json +7 -0
  103. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/package.json +53 -0
  104. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/index.ts +104 -0
  105. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/this.ts +2 -0
  106. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/bean/fileProvider.cloudflare.ts +123 -0
  107. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/index.ts +1 -0
  108. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/service/fileCloudflare.ts +245 -0
  109. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.build.json +11 -0
  110. package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.json +7 -0
  111. package/vona/src/suite-vendor/a-file/modules/file-native/package.json +50 -0
  112. package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/index.ts +111 -0
  113. package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/this.ts +2 -0
  114. package/vona/src/suite-vendor/a-file/modules/file-native/src/bean/fileProvider.native.ts +125 -0
  115. package/vona/src/suite-vendor/a-file/modules/file-native/src/config/config.ts +7 -0
  116. package/vona/src/suite-vendor/a-file/modules/file-native/src/index.ts +1 -0
  117. package/vona/src/suite-vendor/a-file/modules/file-native/src/service/fileNative.ts +125 -0
  118. package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.build.json +11 -0
  119. package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.json +7 -0
  120. package/vona/src/suite-vendor/a-file/package.json +14 -0
  121. package/vona/src/suite-vendor/a-file/tsconfig.base.json +4 -0
  122. package/vona/src/suite-vendor/a-file/tsconfig.json +16 -0
  123. package/vona/src/suite-vendor/a-image/modules/a-image/package.json +4 -1
  124. package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/index.ts +61 -3
  125. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.image.ts +336 -152
  126. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageProvider.ts +21 -14
  127. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +86 -11
  128. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.index.ts +12 -0
  129. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.redlock.ts +1 -1
  130. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.version.ts +3 -0
  131. package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/schedule.imageDraftPrune.ts +29 -0
  132. package/vona/src/suite-vendor/a-image/modules/a-image/src/config/config.ts +3 -0
  133. package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +32 -54
  134. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeRequest.ts +13 -0
  135. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeResponse.ts +10 -0
  136. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadResponse.ts +10 -0
  137. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyRequest.ts +15 -0
  138. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyResponse.ts +27 -0
  139. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadResponse.ts +10 -1
  140. package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageView.ts +10 -1
  141. package/vona/src/suite-vendor/a-image/modules/a-image/src/entity/image.ts +10 -1
  142. package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageUploadValidation.ts +15 -0
  143. package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/index.ts +1 -0
  144. package/vona/src/suite-vendor/a-image/modules/a-image/src/types/image.ts +18 -0
  145. package/vona/src/suite-vendor/a-image/modules/a-image/src/types/imageProvider.ts +28 -2
  146. package/vona/src/suite-vendor/a-image/modules/image-cloudflare/package.json +1 -1
  147. package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/bean/imageProvider.cloudflare.ts +13 -1
  148. package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/service/imageCloudflare.ts +26 -0
  149. package/vona/src/suite-vendor/a-image/modules/image-native/package.json +6 -2
  150. package/vona/src/suite-vendor/a-image/modules/image-native/src/.metadata/index.ts +37 -0
  151. package/vona/src/suite-vendor/a-image/modules/image-native/src/bean/imageProvider.native.ts +21 -1
  152. package/vona/src/suite-vendor/a-image/modules/image-native/src/controller/image.ts +57 -0
  153. package/vona/src/suite-vendor/a-image/modules/image-native/src/service/imageNative.ts +142 -34
  154. package/vona/src/suite-vendor/a-image/package.json +1 -1
  155. package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
  156. package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
  157. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/entity.ts +2 -4
  158. package/vona/src/suite-vendor/a-vona/modules/a-ormutils/package.json +1 -1
  159. package/vona/src/suite-vendor/a-vona/modules/a-ormutils/src/lib/columns.ts +7 -3
  160. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  161. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/.metadata/index.ts +24 -9
  162. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +87 -73
  163. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionActionByRoles.ts +27 -0
  164. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionUser.ts +20 -0
  165. package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
  166. package/vona/src/suite-vendor/a-vona/modules/a-startup/src/service/startup.ts +4 -3
  167. package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +1 -1
  168. package/vona/src/suite-vendor/a-vona/modules/a-upload/src/bean/interceptor.upload.ts +5 -1
  169. package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
  170. package/vona/src/suite-vendor/a-vona/modules/a-user/src/.metadata/index.ts +0 -13
  171. package/vona/src/suite-vendor/a-vona/modules/a-user/src/lib/passport.ts +0 -7
  172. package/vona/src/suite-vendor/a-vona/modules/a-version/package.json +1 -1
  173. package/vona/src/suite-vendor/a-vona/modules/a-version/src/bean/meta.version.ts +2 -24
  174. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  175. package/zova/packages-utils/zova-jsx/package.json +2 -2
  176. package/zova/packages-zova/zova/package.json +3 -3
  177. package/zova/packages-zova/zova-core/package.json +1 -1
  178. package/zova/packages-zova/zova-core/src/bean/beanBase.ts +9 -13
  179. package/zova/pnpm-lock.yaml +418 -411
  180. package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/controller.tsx +2 -2
  181. package/zova/src/suite/a-demo/modules/demo-todo/src/page/todo/controller.tsx +2 -2
  182. package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +2 -2
  183. package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +2 -2
  184. package/zova/src/suite/a-home/modules/home-login/src/page/login/controller.tsx +2 -2
  185. package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +5 -1
  186. package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +20 -15
  187. package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +6 -1
  188. package/zova/src/suite/cabloy-basic/modules/basic-file/cli/openapi.config.ts +9 -0
  189. package/zova/src/suite/cabloy-basic/modules/basic-file/package.json +58 -0
  190. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/component/formFieldFile.ts +31 -0
  191. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/index.ts +222 -0
  192. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/locales.ts +7 -0
  193. package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/this.ts +2 -0
  194. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/file.ts +121 -0
  195. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/baseURL.ts +5 -0
  196. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/index.ts +3 -0
  197. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +306 -0
  198. package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +5718 -0
  199. package/zova/src/suite/cabloy-basic/modules/basic-file/src/apiSchema/file.ts +40 -0
  200. package/zova/src/suite/cabloy-basic/modules/basic-file/src/bean/tableCell.file.tsx +187 -0
  201. package/zova/src/suite/cabloy-basic/modules/basic-file/src/component/formFieldFile/controller.tsx +534 -0
  202. package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/en-us.ts +15 -0
  203. package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/zh-cn.ts +15 -0
  204. package/zova/src/suite/cabloy-basic/modules/basic-file/src/index.ts +4 -0
  205. package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/file.ts +74 -0
  206. package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/index.ts +1 -0
  207. package/zova/src/suite/cabloy-basic/modules/basic-file/src/model/file.ts +23 -0
  208. package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/file.ts +12 -0
  209. package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/index.ts +1 -0
  210. package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.build.json +13 -0
  211. package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.json +5 -0
  212. package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/index.ts +61 -0
  213. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/image.ts +38 -1
  214. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/imageNativeImage.ts +31 -0
  215. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +52 -0
  216. package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +614 -1
  217. package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/image.ts +10 -0
  218. package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/imageNativeImage.ts +13 -0
  219. package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +126 -62
  220. package/zova/src/suite/cabloy-basic/modules/basic-image/src/model/image.ts +23 -0
  221. package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx +44 -4
  222. package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx +17 -12
  223. package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx +2 -2
  224. package/zova/src/suite/cabloy-basic/modules/basic-resource/src/component/formFieldResourcePicker/controller.tsx +2 -2
  225. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/controller.tsx +7 -2
  226. package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/render.tsx +34 -33
  227. package/zova/src/suite/cabloy-basic/package.json +1 -0
  228. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
  229. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +5 -3
  230. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx +2 -2
  231. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx +2 -2
  232. package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
  233. package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
  234. package/zova/src/suite-vendor/a-zova/modules/a-model/src/lib/utils.ts +17 -17
  235. package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
  236. package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +8 -3
  237. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  238. package/zova/src/suite-vendor/a-zova/package.json +4 -4
  239. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +0 -17
  240. package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/guard.userName.ts +0 -35
package/.cabloy-version CHANGED
@@ -1 +1 @@
1
- 5.1.97
1
+ 5.1.99
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readFileSync, statSync, writeFileSync, existsSync } from 'node:fs';
2
+ import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
3
3
  import { spawnSync, type SpawnSyncReturns } from 'node:child_process';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
@@ -21,6 +21,25 @@ interface SyncStateEntry {
21
21
  timestamp: number;
22
22
  }
23
23
 
24
+ interface CommandPlan {
25
+ args: readonly string[];
26
+ display: string;
27
+ }
28
+
29
+ interface EditionConfig {
30
+ id: 'basic' | 'start';
31
+ label: string;
32
+ reverseVonaContentMarkers: readonly string[];
33
+ reverseAutoSyncCommands: readonly CommandPlan[];
34
+ reverseWebBuildCommand: string;
35
+ }
36
+
37
+ type ReverseSyncOutcome =
38
+ | { kind: 'not-applicable'; message: string }
39
+ | { kind: 'skipped'; message: string }
40
+ | { kind: 'success'; message: string }
41
+ | { kind: 'failure'; message: string };
42
+
24
43
  type SyncState = Record<string, SyncStateEntry>;
25
44
 
26
45
  const SCRIPT_FILE = fileURLToPath(import.meta.url);
@@ -45,13 +64,10 @@ const FORWARD_PATH_MARKERS = ['/controller/', '/dto/', '/entity/'];
45
64
 
46
65
  const FORWARD_CONTENT_MARKERS = ['@Web.', '@Api.field', '@Api.body', 'v.openapi(', '@Dto<'];
47
66
 
48
- const REVERSE_VONA_CONTENT_MARKERS = [
49
- 'zova-rest-cabloy-basic-admin',
67
+ const SHARED_REVERSE_VONA_CONTENT_MARKERS = [
50
68
  'ZovaRender.',
51
69
  'tableActionRow(',
52
70
  'tableActionBulk(',
53
- 'ZovaRender.field(',
54
- 'ZovaRender.cell(',
55
71
  ];
56
72
 
57
73
  const REVERSE_ZOVA_PATH_MARKERS = ['/src/bean/', '/src/component/', '/src/.metadata/'];
@@ -64,6 +80,35 @@ const REVERSE_ZOVA_CONTENT_MARKERS = [
64
80
  '@Component<',
65
81
  ];
66
82
 
83
+ const REVERSE_AUTO_SYNC_COMMANDS: readonly CommandPlan[] = [
84
+ { args: ['run', 'build:zova:admin'], display: 'npm run build:zova:admin' },
85
+ { args: ['run', 'deps:vona'], display: 'npm run deps:vona' },
86
+ ];
87
+
88
+ const EDITION_CONFIGS: Record<'basic' | 'start', EditionConfig> = {
89
+ basic: {
90
+ id: 'basic',
91
+ label: 'Cabloy Basic',
92
+ reverseVonaContentMarkers: ['zova-rest-cabloy-basic-admin'],
93
+ reverseAutoSyncCommands: REVERSE_AUTO_SYNC_COMMANDS,
94
+ reverseWebBuildCommand: 'npm run build:zova:web',
95
+ },
96
+ start: {
97
+ id: 'start',
98
+ label: 'Cabloy Start',
99
+ reverseVonaContentMarkers: ['zova-rest-cabloy-start-admin'],
100
+ reverseAutoSyncCommands: REVERSE_AUTO_SYNC_COMMANDS,
101
+ reverseWebBuildCommand: 'npm run build:zova:web',
102
+ },
103
+ };
104
+
105
+ const ACTIVE_EDITION = resolveEdition();
106
+ const FALLBACK_REVERSE_VONA_CONTENT_MARKERS = [
107
+ ...SHARED_REVERSE_VONA_CONTENT_MARKERS,
108
+ ...EDITION_CONFIGS.basic.reverseVonaContentMarkers,
109
+ ...EDITION_CONFIGS.start.reverseVonaContentMarkers,
110
+ ];
111
+
67
112
  function toPosixPath(value: string): string {
68
113
  return value.split(path.sep).join('/');
69
114
  }
@@ -78,6 +123,21 @@ function normalizePath(value?: string): string | null {
78
123
  }
79
124
  }
80
125
 
126
+ function resolveEdition(): EditionConfig | null {
127
+ if (existsSync(path.resolve(ROOT, '__CABLOY_BASIC__'))) {
128
+ return EDITION_CONFIGS.basic;
129
+ }
130
+ if (existsSync(path.resolve(ROOT, '__CABLOY_START__'))) {
131
+ return EDITION_CONFIGS.start;
132
+ }
133
+ return null;
134
+ }
135
+
136
+ function getReverseVonaContentMarkers(edition: EditionConfig | null): readonly string[] {
137
+ if (!edition) return FALLBACK_REVERSE_VONA_CONTENT_MARKERS;
138
+ return [...SHARED_REVERSE_VONA_CONTENT_MARKERS, ...edition.reverseVonaContentMarkers];
139
+ }
140
+
81
141
  function isCodeFile(filePath: string): boolean {
82
142
  return TARGET_PATTERNS.some(([prefix, suffix]) => filePath.includes(prefix) && filePath.endsWith(suffix));
83
143
  }
@@ -98,8 +158,12 @@ function detectForward(filePath: string, content: string): string | null {
98
158
  return null;
99
159
  }
100
160
 
101
- function detectReverse(filePath: string, content: string): string | null {
102
- if (filePath.includes('/vona/src/') && containsAny(content, REVERSE_VONA_CONTENT_MARKERS)) {
161
+ function detectReverse(
162
+ filePath: string,
163
+ content: string,
164
+ reverseVonaContentMarkers: readonly string[],
165
+ ): string | null {
166
+ if (filePath.includes('/vona/src/') && containsAny(content, reverseVonaContentMarkers)) {
103
167
  return 'Vona code is consuming frontend metadata or render resources.';
104
168
  }
105
169
  if (
@@ -112,10 +176,10 @@ function detectReverse(filePath: string, content: string): string | null {
112
176
  return null;
113
177
  }
114
178
 
115
- function analyze(filePath: string, content: string): AnalysisResult {
179
+ function analyze(filePath: string, content: string, edition: EditionConfig | null): AnalysisResult {
116
180
  return {
117
181
  forwardReason: detectForward(filePath, content),
118
- reverseReason: detectReverse(filePath, content),
182
+ reverseReason: detectReverse(filePath, content, getReverseVonaContentMarkers(edition)),
119
183
  };
120
184
  }
121
185
 
@@ -180,9 +244,9 @@ function markAutoSync(filePath: string): void {
180
244
  saveState(state);
181
245
  }
182
246
 
183
- function runNpm(args: string[]): SpawnSyncReturns<string> {
247
+ function runNpm(args: readonly string[]): SpawnSyncReturns<string> {
184
248
  const command = process.platform === 'win32' ? 'npm.cmd' : 'npm';
185
- return spawnSync(command, args, {
249
+ return spawnSync(command, [...args], {
186
250
  cwd: ROOT,
187
251
  encoding: 'utf8',
188
252
  });
@@ -205,22 +269,79 @@ function summarizeProcess(result: SpawnSyncReturns<string>): string {
205
269
  return `exit ${exitCode}: ${tail}`;
206
270
  }
207
271
 
208
- function autoSyncReverse(filePath: string): readonly [boolean, string] {
209
- const buildResult = runNpm(['run', 'build:zova:admin']);
210
- if (buildResult.status !== 0) {
211
- return [false, `Auto-sync failed during \`npm run build:zova:admin\`: ${summarizeProcess(buildResult)}`];
272
+ function autoSyncReverse(filePath: string, edition: EditionConfig): ReverseSyncOutcome {
273
+ for (const command of edition.reverseAutoSyncCommands) {
274
+ const result = runNpm(command.args);
275
+ if (result.status !== 0) {
276
+ return {
277
+ kind: 'failure',
278
+ message: `Auto-sync failed during \`${command.display}\`: ${summarizeProcess(result)}`,
279
+ };
280
+ }
281
+ }
282
+
283
+ markAutoSync(filePath);
284
+ const commands = edition.reverseAutoSyncCommands.map(command => `\`${command.display}\``).join(' and ');
285
+ return {
286
+ kind: 'success',
287
+ message: `Auto-sync ran ${commands} for this ${edition.label} reverse-chain edit.`,
288
+ };
289
+ }
290
+
291
+ function buildReverseGuidance(edition: EditionConfig | null): string {
292
+ if (!edition) {
293
+ return 'If backend tooling or backend metadata will consume this handoff, refresh generated metadata when applicable, resolve the active Cabloy edition marker before choosing the relevant Zova build and generated-output path, and then run `npm run deps:vona`.';
294
+ }
295
+
296
+ const autoSyncCommands = edition.reverseAutoSyncCommands
297
+ .map(command => `\`${command.display}\``)
298
+ .join(', then ');
299
+ return `If backend tooling or backend metadata will consume this handoff, refresh generated metadata when applicable, run ${autoSyncCommands}, and also run \`${edition.reverseWebBuildCommand}\` when the Web flavor is affected in this ${edition.label} repo.`;
300
+ }
301
+
302
+ function resolveReverseSyncOutcome(
303
+ filePath: string,
304
+ result: AnalysisResult,
305
+ edition: EditionConfig | null,
306
+ ): ReverseSyncOutcome {
307
+ if (!result.reverseReason) {
308
+ return {
309
+ kind: 'not-applicable',
310
+ message: '',
311
+ };
212
312
  }
213
313
 
214
- const depsResult = runNpm(['run', 'deps:vona']);
215
- if (depsResult.status !== 0) {
216
- return [false, `Auto-sync failed during \`npm run deps:vona\`: ${summarizeProcess(depsResult)}`];
314
+ if (!isHighConfidenceReverseSource(filePath)) {
315
+ return {
316
+ kind: 'not-applicable',
317
+ message:
318
+ 'Auto-sync did not run because this reverse-chain signal came from the consumer side rather than a high-confidence frontend source edit.',
319
+ };
217
320
  }
218
321
 
219
- markAutoSync(filePath);
220
- return [true, 'Auto-sync ran `npm run build:zova:admin` and `npm run deps:vona` for this reverse-chain edit.'];
322
+ if (shouldSkipAutoSync(filePath)) {
323
+ return {
324
+ kind: 'skipped',
325
+ message: 'Auto-sync skipped because the same reverse-source edit was already synced recently in this repo.',
326
+ };
327
+ }
328
+
329
+ if (!edition) {
330
+ return {
331
+ kind: 'not-applicable',
332
+ message:
333
+ 'Auto-sync did not run because the active Cabloy edition marker could not be resolved for this repo.',
334
+ };
335
+ }
336
+
337
+ return autoSyncReverse(filePath, edition);
221
338
  }
222
339
 
223
- function buildMessages(filePath: string, result: AnalysisResult): string {
340
+ function buildMessages(
341
+ result: AnalysisResult,
342
+ edition: EditionConfig | null,
343
+ reverseSyncOutcome: ReverseSyncOutcome,
344
+ ): string {
224
345
  const messages = ["Contract-loop gate: this change may affect Cabloy's bidirectional contract loop."];
225
346
 
226
347
  if (result.forwardReason) {
@@ -233,30 +354,15 @@ function buildMessages(filePath: string, result: AnalysisResult): string {
233
354
  }
234
355
 
235
356
  if (result.reverseReason) {
236
- messages.push(
237
- `Reverse chain: ${result.reverseReason} If backend tooling or backend metadata will consume this handoff, refresh generated metadata when applicable, run the relevant Zova build first, and then run \`npm run deps:vona\` for the Cabloy Basic path. Use \`npm run build:zova:admin\` for Admin changes, and also run \`npm run build:zova:web\` when the Web flavor is affected.`,
238
- );
239
- if (isHighConfidenceReverseSource(filePath)) {
240
- if (shouldSkipAutoSync(filePath)) {
241
- messages.push('Auto-sync skipped because the same reverse-source edit was already synced recently in this repo.');
242
- } else {
243
- const [ok, detail] = autoSyncReverse(filePath);
244
- messages.push(detail);
245
- if (!ok) {
246
- messages.push(
247
- 'Please review the failure before continuing. If generated artifacts already contain the expected changes but consumers still behave stale, suspect local dependency drift before making more source edits.',
248
- );
249
- return messages.join(' ');
250
- }
251
- }
252
- } else {
357
+ messages.push(`Reverse chain: ${result.reverseReason} ${buildReverseGuidance(edition)}`);
358
+ if (reverseSyncOutcome.message) {
359
+ messages.push(reverseSyncOutcome.message);
360
+ }
361
+ if (reverseSyncOutcome.kind === 'failure') {
253
362
  messages.push(
254
- 'Auto-sync did not run because this reverse-chain signal came from the consumer side rather than a high-confidence frontend source edit.',
363
+ 'Please review the failure before continuing. If generated artifacts already contain the expected changes but consumers still behave stale, suspect local dependency drift before making more source edits.',
255
364
  );
256
365
  }
257
- messages.push(
258
- 'For Cabloy Start, apply the same reverse-chain logic but resolve the Start-specific flavor names and generated-output paths from the active Start repo before executing edition-specific steps.',
259
- );
260
366
  }
261
367
 
262
368
  return messages.join(' ');
@@ -277,10 +383,11 @@ function runClaudeHook(): number {
277
383
  const content = readText(filePath);
278
384
  if (content === null) return 0;
279
385
 
280
- const result = analyze(filePath, content);
386
+ const result = analyze(filePath, content, ACTIVE_EDITION);
281
387
  if (!hasSignal(result)) return 0;
282
388
 
283
- const message = buildMessages(filePath, result);
389
+ const reverseSyncOutcome = resolveReverseSyncOutcome(filePath, result, ACTIVE_EDITION);
390
+ const message = buildMessages(result, ACTIVE_EDITION, reverseSyncOutcome);
284
391
  console.log(
285
392
  JSON.stringify({
286
393
  hookSpecificOutput: {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.99
4
+
5
+ ### Features
6
+
7
+ - Add dossier files to training records.
8
+ - Derive dossier file policy from the file scene.
9
+
10
+ ### Improvements
11
+
12
+ - Rename and standardize `QueryAutoLoad` helpers.
13
+ - Use `QueryAutoLoad` for upload policy handling.
14
+ - Simplify the contract loop hook.
15
+ - Share Claude assets across editions.
16
+ - Split permission cache beans for clearer responsibility.
17
+ - Clarify permission action method names.
18
+ - Align default permission guard evaluation.
19
+ - Reuse derived upload policy state.
20
+ - Streamline upload policy queries.
21
+ - Derive image policy from the image scene.
22
+ - Generate the file SDK and move policy state into the model.
23
+
24
+ ## 5.1.98
25
+
26
+ ### Features
27
+
28
+ - Add `a-file` support.
29
+ - Add CLI templates for `a-file`.
30
+ - Add draft finalize flow for `a-image` direct uploads.
31
+ - Add native direct-upload finalize flow.
32
+ - Update the package with the latest feature enhancements.
33
+
34
+ ### Bug Fixes
35
+
36
+ - Repair `a-image` type safety.
37
+ - Support image delivery tokens.
38
+ - Support private file download tokens.
39
+
40
+ ### Improvements
41
+
42
+ - Clarify SSR bundle build hints.
43
+ - Tighten SSR bundle error wording.
44
+ - Simplify `a-file` upload and direct-upload contracts.
45
+ - Simplify `a-image` upload flows and native variants.
46
+ - Simplify the `a-image` resolve-view flow.
47
+ - Tighten `a-image` provider option typing.
48
+ - Remove the unused `a-image` failed status.
49
+ - Optimize `a-image` draft pruning and response URL resolution.
50
+
3
51
  ## 5.1.97
4
52
 
5
53
  ### Improvements
package/CLAUDE.md CHANGED
@@ -53,6 +53,8 @@ Before inventing a custom implementation path:
53
53
  - For frontend work, assume Cabloy Basic and Cabloy Start share a frontend engineering layer but may diverge in UI layer, frontend flavors, suite/module availability, SSR site baselines, project assets, and generated outputs.
54
54
  - For Zova frontend analysis, do not default to generic Vue reinterpretation first. Read the code through Zova’s controller / bean / IoC architecture before mapping it to Vue concepts.
55
55
  - For Zova source-reading or Vue-vs-Zova explanation tasks, start from the frontend reading guides and source-reading map in `cabloy-docs/frontend/` before doing framework-neutral reinterpretation.
56
+ - For frontend async state that affects rendering or interaction across consumers, prefer model-owned `$useStateData(...)` over controller-managed fetch/cache state.
57
+ - Default to establishing such query state during render. Use `disableSuspenseOnInit: true` only for relatively stable query-backed state when you want to skip the init-time `query.suspense()` kick; if strict readiness is needed later, wait explicitly at the interaction boundary.
56
58
  - Keep repo-wide AI rules in `CLAUDE.md` short and durable; put branching Zova analysis workflows in `.claude/skills/`.
57
59
  - For SSR theme-sensitive frontend work, detect the active edition marker and UI library before making assumptions. Cabloy Basic currently means DaisyUI + Tailwind CSS assumptions; Cabloy Start currently means Vuetify assumptions.
58
60
  - In Web SSR without cookie-backed theme resolution, do not treat server reads of `$theme.dark`, `$theme.darkMode`, or `$token` as final browser truth. Keep theme-sensitive SSR branching hydration-tolerant or defer final theme-sensitive decisions to the client.
@@ -98,6 +98,7 @@ const fullstackGroups = [
98
98
  text: 'Backend Metadata to Frontend Table Actions Source Reading Map',
99
99
  link: '/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map',
100
100
  },
101
+ { text: 'Fullstack Image Workflow', link: '/fullstack/image-workflow' },
101
102
  { text: 'Backend OpenAPI to Frontend SDK', link: '/fullstack/openapi-to-sdk' },
102
103
  {
103
104
  text: 'Frontend Metadata Back to Backend',
@@ -231,6 +232,7 @@ export default defineConfig({
231
232
  { text: 'Event Guide', link: '/backend/event-guide' },
232
233
  { text: 'Logger Guide', link: '/backend/logger-guide' },
233
234
  { text: 'Upload Guide', link: '/backend/upload-guide' },
235
+ { text: 'Image Guide', link: '/backend/image-guide' },
234
236
  { text: 'Mail Guide', link: '/backend/mail-guide' },
235
237
  { text: 'Serialization Guide', link: '/backend/serialization-guide' },
236
238
  ],
@@ -330,6 +332,10 @@ export default defineConfig({
330
332
  text: 'Reading Zova for Vue Developers',
331
333
  link: '/frontend/reading-zova-for-vue-developers',
332
334
  },
335
+ {
336
+ text: 'State Architecture for Vue Developers',
337
+ link: '/frontend/state-architecture-for-vue-developers',
338
+ },
333
339
  {
334
340
  text: 'Zova vs Vue 3 Comparison',
335
341
  link: '/frontend/zova-vs-vue3-comparison',
@@ -415,6 +421,7 @@ export default defineConfig({
415
421
  items: [
416
422
  { text: 'Component Guide', link: '/frontend/component-guide' },
417
423
  { text: 'Form Guide', link: '/frontend/form-guide' },
424
+ { text: 'Image Guide', link: '/frontend/image-guide' },
418
425
  {
419
426
  text: 'Zova Form Under the Hood',
420
427
  link: '/frontend/zova-form-under-the-hood',
@@ -478,6 +485,10 @@ export default defineConfig({
478
485
  text: 'Resource Models & CRUD',
479
486
  items: [
480
487
  { text: 'Model State Guide', link: '/frontend/model-state-guide' },
488
+ {
489
+ text: '`$useStateData` Best Practices',
490
+ link: '/frontend/use-state-data-best-practices',
491
+ },
481
492
  {
482
493
  text: 'Model Resource Owner Pattern',
483
494
  link: '/frontend/model-resource-owner-pattern',
@@ -93,7 +93,6 @@ Typical jobs include:
93
93
  ```typescript
94
94
  @Passport.public()
95
95
  @Passport.activated(false)
96
- @Passport.userName({ name: 'admin' })
97
96
  @Passport.roleName({ name: 'admin' })
98
97
  @Passport.admin()
99
98
  ```