cabloy 5.1.50 → 5.1.52

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 (300) hide show
  1. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +207 -0
  2. package/.claude/skills/cabloy-backend-scaffold/evals/evals.json +29 -0
  3. package/.claude/skills/cabloy-backend-scaffold/references/backend-thread-map.md +52 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +39 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +201 -0
  6. package/.claude/skills/cabloy-contract-loop/evals/evals.json +29 -0
  7. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +47 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -0
  9. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +230 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/evals/evals.json +35 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +41 -0
  12. package/.claude/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +54 -0
  13. package/.claude/skills/cabloy-workflow/SKILL.md +292 -0
  14. package/.claude/skills/cabloy-workflow/evals/evals.json +35 -0
  15. package/.claude/skills/cabloy-workflow/references/cli-strategy.md +39 -0
  16. package/.claude/skills/cabloy-workflow/references/edition-detection.md +30 -0
  17. package/.github/workflows/docs-pages.yml +56 -0
  18. package/.gitignore +1 -0
  19. package/CHANGELOG.md +54 -0
  20. package/CLAUDE.md +59 -0
  21. package/README.md +152 -0
  22. package/cabloy-docs/.vitepress/config.mjs +255 -0
  23. package/cabloy-docs/.vitepress/public/CNAME +1 -0
  24. package/cabloy-docs/.vitepress/theme/custom.css +64 -0
  25. package/cabloy-docs/.vitepress/theme/edition-badges.md +5 -0
  26. package/cabloy-docs/.vitepress/theme/index.js +5 -0
  27. package/cabloy-docs/ai/class-placement-rule.md +139 -0
  28. package/cabloy-docs/ai/cli-for-agents.md +56 -0
  29. package/cabloy-docs/ai/cli-to-skill-map.md +165 -0
  30. package/cabloy-docs/ai/docs-skills-rules-mapping.md +168 -0
  31. package/cabloy-docs/ai/edition-consistency-checklist.md +150 -0
  32. package/cabloy-docs/ai/edition-detection.md +30 -0
  33. package/cabloy-docs/ai/future-skill-roadmap.md +135 -0
  34. package/cabloy-docs/ai/global-bean-lookup.md +158 -0
  35. package/cabloy-docs/ai/introduction.md +62 -0
  36. package/cabloy-docs/ai/playbook-backend-module.md +111 -0
  37. package/cabloy-docs/ai/playbook-contract-regeneration.md +100 -0
  38. package/cabloy-docs/ai/playbook-frontend-page.md +99 -0
  39. package/cabloy-docs/ai/playbook-metadata-refresh.md +67 -0
  40. package/cabloy-docs/ai/repo-guidance.md +58 -0
  41. package/cabloy-docs/ai/rules-and-config.md +29 -0
  42. package/cabloy-docs/ai/skills.md +37 -0
  43. package/cabloy-docs/ai/verification.md +31 -0
  44. package/cabloy-docs/ai/virtual-decorator-guidance.md +206 -0
  45. package/cabloy-docs/backend/aop-overview.md +128 -0
  46. package/cabloy-docs/backend/auth-guide.md +151 -0
  47. package/cabloy-docs/backend/backend-essentials.md +128 -0
  48. package/cabloy-docs/backend/broadcast-guide.md +138 -0
  49. package/cabloy-docs/backend/cache-guide.md +70 -0
  50. package/cabloy-docs/backend/captcha-guide.md +162 -0
  51. package/cabloy-docs/backend/cli.md +173 -0
  52. package/cabloy-docs/backend/config-guide.md +249 -0
  53. package/cabloy-docs/backend/controller-aop-guide.md +270 -0
  54. package/cabloy-docs/backend/controller-guide.md +347 -0
  55. package/cabloy-docs/backend/crud-workflow.md +118 -0
  56. package/cabloy-docs/backend/dto-guide.md +161 -0
  57. package/cabloy-docs/backend/dto-infer-generation.md +153 -0
  58. package/cabloy-docs/backend/dynamic-datasource-guide.md +70 -0
  59. package/cabloy-docs/backend/election-guide.md +141 -0
  60. package/cabloy-docs/backend/entity-guide.md +150 -0
  61. package/cabloy-docs/backend/error-guide.md +108 -0
  62. package/cabloy-docs/backend/event-guide.md +183 -0
  63. package/cabloy-docs/backend/external-aop-guide.md +149 -0
  64. package/cabloy-docs/backend/field-indexes.md +79 -0
  65. package/cabloy-docs/backend/foundation.md +281 -0
  66. package/cabloy-docs/backend/i18n-guide.md +211 -0
  67. package/cabloy-docs/backend/internal-aop-guide.md +181 -0
  68. package/cabloy-docs/backend/introduction.md +95 -0
  69. package/cabloy-docs/backend/jwt-guide.md +276 -0
  70. package/cabloy-docs/backend/logger-guide.md +223 -0
  71. package/cabloy-docs/backend/mail-guide.md +189 -0
  72. package/cabloy-docs/backend/menu-guide.md +80 -0
  73. package/cabloy-docs/backend/migration-and-changes.md +192 -0
  74. package/cabloy-docs/backend/model-guide.md +274 -0
  75. package/cabloy-docs/backend/multi-database-datasource.md +171 -0
  76. package/cabloy-docs/backend/multi-instance-and-instance-resolution.md +196 -0
  77. package/cabloy-docs/backend/openapi-guide.md +118 -0
  78. package/cabloy-docs/backend/orm-aggregate-group-guide.md +210 -0
  79. package/cabloy-docs/backend/orm-configuration-guide.md +165 -0
  80. package/cabloy-docs/backend/orm-guide.md +109 -0
  81. package/cabloy-docs/backend/orm-mutation-guide.md +195 -0
  82. package/cabloy-docs/backend/orm-select-guide.md +243 -0
  83. package/cabloy-docs/backend/queue-guide.md +271 -0
  84. package/cabloy-docs/backend/quickstart.md +141 -0
  85. package/cabloy-docs/backend/redis-guide.md +70 -0
  86. package/cabloy-docs/backend/redlock-guide.md +60 -0
  87. package/cabloy-docs/backend/relations-guide.md +250 -0
  88. package/cabloy-docs/backend/runtime-and-flavors.md +304 -0
  89. package/cabloy-docs/backend/schedule-guide.md +81 -0
  90. package/cabloy-docs/backend/scripts.md +116 -0
  91. package/cabloy-docs/backend/serialization-guide.md +192 -0
  92. package/cabloy-docs/backend/service-guide.md +166 -0
  93. package/cabloy-docs/backend/sharding-guide.md +49 -0
  94. package/cabloy-docs/backend/startup-guide.md +326 -0
  95. package/cabloy-docs/backend/transaction-guide.md +82 -0
  96. package/cabloy-docs/backend/unit-testing.md +209 -0
  97. package/cabloy-docs/backend/upload-guide.md +160 -0
  98. package/cabloy-docs/backend/user-access-guide.md +157 -0
  99. package/cabloy-docs/backend/validation-guide.md +80 -0
  100. package/cabloy-docs/backend/worker-guide.md +59 -0
  101. package/cabloy-docs/editions/cabloy-basic.md +26 -0
  102. package/cabloy-docs/editions/cabloy-start.md +55 -0
  103. package/cabloy-docs/editions/choosing-between-basic-and-start.md +84 -0
  104. package/cabloy-docs/editions/detection.md +31 -0
  105. package/cabloy-docs/editions/overview.md +107 -0
  106. package/cabloy-docs/frontend/api-guide.md +93 -0
  107. package/cabloy-docs/frontend/api-schema-guide.md +43 -0
  108. package/cabloy-docs/frontend/app-startup-guide.md +185 -0
  109. package/cabloy-docs/frontend/cli.md +78 -0
  110. package/cabloy-docs/frontend/component-guide.md +105 -0
  111. package/cabloy-docs/frontend/component-props-guide.md +97 -0
  112. package/cabloy-docs/frontend/component-v-model-guide.md +110 -0
  113. package/cabloy-docs/frontend/css-in-js-guide.md +151 -0
  114. package/cabloy-docs/frontend/design-principles.md +55 -0
  115. package/cabloy-docs/frontend/environment-config-guide.md +250 -0
  116. package/cabloy-docs/frontend/foundation.md +58 -0
  117. package/cabloy-docs/frontend/generic-component-guide.md +35 -0
  118. package/cabloy-docs/frontend/icon-engine-guide.md +88 -0
  119. package/cabloy-docs/frontend/introduction.md +33 -0
  120. package/cabloy-docs/frontend/ioc-and-beans.md +211 -0
  121. package/cabloy-docs/frontend/mock-guide.md +109 -0
  122. package/cabloy-docs/frontend/model-architecture.md +87 -0
  123. package/cabloy-docs/frontend/model-state-guide.md +70 -0
  124. package/cabloy-docs/frontend/module-scope.md +168 -0
  125. package/cabloy-docs/frontend/modules-and-suites.md +179 -0
  126. package/cabloy-docs/frontend/navigation-guards-guide.md +68 -0
  127. package/cabloy-docs/frontend/openapi-sdk-guide.md +102 -0
  128. package/cabloy-docs/frontend/page-guide.md +223 -0
  129. package/cabloy-docs/frontend/page-params-guide.md +87 -0
  130. package/cabloy-docs/frontend/page-query-guide.md +96 -0
  131. package/cabloy-docs/frontend/page-route-guide.md +147 -0
  132. package/cabloy-docs/frontend/quickstart.md +202 -0
  133. package/cabloy-docs/frontend/route-alias-guide.md +61 -0
  134. package/cabloy-docs/frontend/scripts.md +86 -0
  135. package/cabloy-docs/frontend/sdk-guide.md +45 -0
  136. package/cabloy-docs/frontend/server-data.md +74 -0
  137. package/cabloy-docs/frontend/ssr-client-only.md +40 -0
  138. package/cabloy-docs/frontend/ssr-env.md +51 -0
  139. package/cabloy-docs/frontend/ssr-init-data.md +46 -0
  140. package/cabloy-docs/frontend/ssr-overview.md +48 -0
  141. package/cabloy-docs/frontend/ssr-seo-meta.md +52 -0
  142. package/cabloy-docs/frontend/system-startup-guide.md +186 -0
  143. package/cabloy-docs/frontend/theme-guide.md +154 -0
  144. package/cabloy-docs/frontend/zod-guide.md +161 -0
  145. package/cabloy-docs/fullstack/cli.md +118 -0
  146. package/cabloy-docs/fullstack/comparison-with-other-frameworks.md +117 -0
  147. package/cabloy-docs/fullstack/edition-collaboration-differences.md +62 -0
  148. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +64 -0
  149. package/cabloy-docs/fullstack/introduction.md +81 -0
  150. package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -0
  151. package/cabloy-docs/fullstack/quickstart.md +89 -0
  152. package/cabloy-docs/fullstack/vona-zova-integration.md +86 -0
  153. package/cabloy-docs/fullstack/vscode-extensions.md +126 -0
  154. package/cabloy-docs/index.md +72 -0
  155. package/cabloy-docs/package.json +16 -0
  156. package/cabloy-docs/pnpm-lock.yaml +1607 -0
  157. package/cabloy-docs/reference/backend-directory-structure.md +88 -0
  158. package/cabloy-docs/reference/cli-reference.md +49 -0
  159. package/cabloy-docs/reference/glossary.md +38 -0
  160. package/cabloy-docs/reference/package-map.md +105 -0
  161. package/cabloy-docs/reference/repo-scripts.md +36 -0
  162. package/package.json +4 -1
  163. package/scripts/init.ts +12 -0
  164. package/scripts/upgrade.ts +31 -3
  165. package/vona/README.md +4 -4
  166. package/vona/README.zh-CN.md +4 -4
  167. package/vona/packages-vona/vona/package.json +1 -1
  168. package/vona/pnpm-lock.yaml +383 -38
  169. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/package.json +1 -1
  170. package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/src/bean/summerCache.datasourceWrite.ts +2 -2
  171. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
  172. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/.metadata/index.ts +49 -1
  173. package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/controller/memoryDiag.ts +97 -0
  174. package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
  175. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/package.json +1 -1
  176. package/vona/src/suite-vendor/a-captcha/modules/a-captcha/src/bean/cacheRedis.captcha.ts +2 -2
  177. package/vona/src/suite-vendor/a-captcha/package.json +1 -1
  178. package/vona/src/suite-vendor/a-vona/modules/a-bean/cli/bean/metadata/generate.ts +5 -6
  179. package/vona/src/suite-vendor/a-vona/modules/a-bean/package.json +1 -1
  180. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheMem/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  181. package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheRedis/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  182. package/vona/src/suite-vendor/a-vona/modules/a-cache/package.json +1 -1
  183. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/.metadata/index.ts +13 -2
  184. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/bean/bean.cache.ts +6 -7
  185. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheMemBase.ts → service/cacheMemBase_.ts} +3 -3
  186. package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheRedisBase.ts → service/cacheRedisBase_.ts} +3 -3
  187. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/package.json +1 -1
  188. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.emailConfirm.ts +2 -2
  189. package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.passwordReset.ts +2 -2
  190. package/vona/src/suite-vendor/a-vona/modules/a-openapi/package.json +1 -1
  191. package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/bean/summerCache.json.ts +2 -2
  192. package/vona/src/suite-vendor/a-vona/modules/a-orm/cli/databaseDialect/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  193. package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
  194. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/.metadata/index.ts +4 -3
  195. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.database.ts +3 -3
  196. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts +1 -1
  197. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/schedule.softDeletionPrune.ts +1 -1
  198. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +1 -1
  199. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/index.ts +1 -1
  200. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_cache.ts +1 -1
  201. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_meta.ts +1 -1
  202. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.modelBase.ts +0 -5
  203. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoAggregate.ts +1 -1
  204. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoCreate.ts +1 -1
  205. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +1 -1
  206. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGroup.ts +1 -1
  207. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +1 -1
  208. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoSelectAndCount.ts +1 -1
  209. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoUpdate.ts +1 -1
  210. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/index.ts +1 -0
  211. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/modelCacheBase.ts +3 -3
  212. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relations.ts +1 -1
  213. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsDynamic.ts +1 -1
  214. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsMutate.ts +1 -1
  215. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsStatic.ts +1 -1
  216. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheEntity_.ts +1 -1
  217. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheQuery_.ts +1 -1
  218. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/database.ts +2 -2
  219. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean/bean.databaseDialectBase.ts → service/databaseDialectBase_.ts} +38 -41
  220. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/db_.ts +2 -2
  221. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +3 -3
  222. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -5
  223. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +1 -1
  224. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +1 -1
  225. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoSelectAndCount.ts +1 -1
  226. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/model.ts +1 -1
  227. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelAggr.ts +1 -1
  228. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelCount.ts +1 -1
  229. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +1 -1
  230. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGroup.ts +1 -1
  231. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelIncrement.ts +1 -1
  232. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relations.ts +1 -1
  233. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsColumns.ts +1 -1
  234. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDef.ts +1 -1
  235. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefDynamic.ts +1 -1
  236. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefMutate.ts +1 -1
  237. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsMutate.ts +1 -1
  238. package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsTables.ts +1 -1
  239. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
  240. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.betterSqlite3.ts +2 -2
  241. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql.ts +2 -2
  242. package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.pg.ts +2 -2
  243. package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
  244. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +109 -40
  245. package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +2 -2
  246. package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
  247. package/vona/src/suite-vendor/a-vona/modules/a-startup/src/bean/cacheRedis.startupDebounce.ts +2 -2
  248. package/vona/src/suite-vendor/a-vona/modules/a-summer/cli/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
  249. package/vona/src/suite-vendor/a-vona/modules/a-summer/package.json +1 -1
  250. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/.metadata/index.ts +1 -1
  251. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/bean/bean.summer.ts +3 -3
  252. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localMem_.ts +3 -3
  253. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localRedis_.ts +3 -3
  254. package/vona/src/suite-vendor/a-vona/modules/a-summer/src/{bean/bean.summerCacheBase.ts → service/summerCacheBase_.ts} +3 -3
  255. package/vona/src/suite-vendor/a-vona/modules/a-swagger/package.json +1 -1
  256. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.rapidoc.ts +2 -2
  257. package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.swagger.ts +2 -2
  258. package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
  259. package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/cacheRedis.authToken.ts +2 -2
  260. package/vona/src/suite-vendor/a-vona/modules/a-worker/package.json +1 -1
  261. package/vona/src/suite-vendor/a-vona/modules/a-worker/src/bean/cacheRedis.workerAlive.ts +2 -2
  262. package/vona/src/suite-vendor/a-vona/package.json +1 -1
  263. package/zova/README.md +5 -5
  264. package/zova/README.zh-CN.md +4 -4
  265. package/zova/package.original.json +4 -4
  266. package/zova/packages-cli/cli/package.json +2 -2
  267. package/zova/packages-cli/cli-set-front/package.json +2 -2
  268. package/zova/packages-utils/zova-jsx/package.json +2 -2
  269. package/zova/packages-utils/zova-vite/package.json +2 -2
  270. package/zova/packages-utils/zova-vite/templates/app/controller.tsx_ +3 -3
  271. package/zova/packages-zova/zova/package.json +3 -3
  272. package/zova/packages-zova/zova-core/package.json +2 -2
  273. package/zova/packages-zova/zova-core/src/bean/beanContainer.ts +3 -3
  274. package/zova/packages-zova/zova-core/src/bean/beanControllerPageBase.ts +1 -0
  275. package/zova/packages-zova/zova-core/src/core/component/module.ts +16 -16
  276. package/zova/packages-zova/zova-core/src/core/context/component.ts +35 -3
  277. package/zova/packages-zova/zova-core/src/core/context/util.ts +15 -11
  278. package/zova/pnpm-lock.yaml +1596 -1679
  279. package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/index.ts +11 -0
  280. package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/page/toolMinimal.ts +9 -0
  281. package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolMinimal/controller.tsx +11 -0
  282. package/zova/src/suite/a-demo/modules/demo-basic/src/routes.ts +10 -0
  283. package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
  284. package/zova/src/suite-vendor/a-zova/modules/a-model/src/service/storage.ts +4 -5
  285. package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
  286. package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/monkey.ts +1 -1
  287. package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
  288. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssr.ts +36 -1
  289. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssrMetaStore.ts +7 -2
  290. package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/monkey.ts +3 -0
  291. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
  292. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +70 -29
  293. package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
  294. package/zova/src/suite-vendor/a-zova/package.json +6 -6
  295. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud.ts +0 -0
  296. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_inner.ts +0 -0
  297. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_table.ts +0 -0
  298. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_knex.ts +0 -0
  299. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_utils.ts +0 -0
  300. /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_view.ts +0 -0
@@ -0,0 +1,95 @@
1
+ # Backend (Vona)
2
+
3
+ This page is the backend hub for Cabloy users, contributors, and AI vibe coding workflows that need the backend side of the framework.
4
+
5
+ Vona is the backend half of Cabloy’s one-framework-system fullstack architecture.
6
+
7
+ ## What Vona is responsible for
8
+
9
+ - application startup and runtime composition
10
+ - IOC and AOP infrastructure
11
+ - controller, service, model, entity, DTO, and AOP workflows
12
+ - authentication, captcha, user access, menus, events, logging, upload, mail, serialization, ORM, caching, startup, election, queues, workers, schedules, broadcast, redlock, and other backend infrastructure
13
+ - OpenAPI output used by frontend SDK-related workflows
14
+
15
+ ## How to approach backend work
16
+
17
+ For contributor and automation workflows in this repository, prefer this order:
18
+
19
+ 1. inspect the root `package.json` and `npm run vona` entrypoint
20
+ 2. inspect Vona CLI command families such as `create:*`, `init:*`, `tools:*`, and `bin:*`
21
+ 3. inspect the current module or suite layout before creating new files manually
22
+ 4. use public docs for user-facing guidance and `.docs-internal/` for maintainer rationale
23
+
24
+ ## Backend reading paths
25
+
26
+ Use this page as the main backend hub, then choose the family that matches your task.
27
+
28
+ ### Architecture spine
29
+
30
+ Start here when you need the core backend mental model first:
31
+
32
+ - [Backend Foundation](/backend/foundation)
33
+ - [Backend Essentials](/backend/backend-essentials)
34
+ - [Backend CLI](/backend/cli)
35
+ - [Service Guide](/backend/service-guide)
36
+ - [Package Map](/reference/package-map)
37
+
38
+ This gives the architectural vocabulary for concepts such as bean, scope, suite, module, package, and backend access patterns.
39
+
40
+ ### Contract and data family
41
+
42
+ Use this path when the task is about the backend contract loop or ORM-backed backend data design:
43
+
44
+ - [Controller Guide](/backend/controller-guide)
45
+ - [Validation Guide](/backend/validation-guide)
46
+ - [DTO Guide](/backend/dto-guide)
47
+ - [Entity Guide](/backend/entity-guide)
48
+ - [Model Guide](/backend/model-guide)
49
+ - [OpenAPI Guide](/backend/openapi-guide)
50
+ - [ORM Guide](/backend/orm-guide)
51
+
52
+ ### Runtime and distributed family
53
+
54
+ Use this path when the task is about runtime shape, startup, instances, workers, or distributed execution:
55
+
56
+ - [Runtime and Flavors](/backend/runtime-and-flavors)
57
+ - [Config Guide](/backend/config-guide)
58
+ - [Backend Startup Guide](/backend/startup-guide)
59
+ - [Multi-Instance and Instance Resolution](/backend/multi-instance-and-instance-resolution)
60
+ - [Worker Guide](/backend/worker-guide)
61
+ - [Election Guide](/backend/election-guide)
62
+ - [Queue Guide](/backend/queue-guide)
63
+ - [Broadcast Guide](/backend/broadcast-guide)
64
+ - [Schedule Guide](/backend/schedule-guide)
65
+ - [Redlock Guide](/backend/redlock-guide)
66
+
67
+ ### Reference and support pages
68
+
69
+ Use these when you need repo structure, scripts, or command context around the backend families:
70
+
71
+ - [Backend Quickstart](/backend/quickstart)
72
+ - [Backend Scripts](/backend/scripts)
73
+ - [Package Map](/reference/package-map)
74
+ - [Backend Directory Structure](/reference/backend-directory-structure)
75
+
76
+ ## Edition impact
77
+
78
+ Most Vona concepts are shared between Cabloy Basic and Cabloy Start.
79
+
80
+ Differences usually appear when backend modules integrate with edition-specific frontend modules, assets, routes, or generated outputs. When that happens, explain the backend concept once and annotate the edition-specific integration points explicitly.
81
+
82
+ ## Suggested next runtime topics
83
+
84
+ If your task is already inside the runtime and distributed family, read these guides together in roughly this order:
85
+
86
+ - [Runtime and Flavors](/backend/runtime-and-flavors)
87
+ - [Config Guide](/backend/config-guide)
88
+ - [Backend Startup Guide](/backend/startup-guide)
89
+ - [Multi-Instance and Instance Resolution](/backend/multi-instance-and-instance-resolution)
90
+ - [Worker Guide](/backend/worker-guide)
91
+ - [Election Guide](/backend/election-guide)
92
+ - [Queue Guide](/backend/queue-guide)
93
+ - [Broadcast Guide](/backend/broadcast-guide)
94
+ - [Schedule Guide](/backend/schedule-guide)
95
+ - [Redlock Guide](/backend/redlock-guide)
@@ -0,0 +1,276 @@
1
+ # JWT Guide
2
+
3
+ ## Why JWT matters in Vona
4
+
5
+ Vona treats JWT as a framework capability rather than a raw token-library wrapper.
6
+
7
+ That matters because backend auth flows usually need more than one token type, more than one verification path, and more than one lifecycle strategy for access, refresh, OAuth, or temporary tokens.
8
+
9
+ ## Core JWT model
10
+
11
+ The `a-jwt` module provides JWT capabilities on top of `jsonwebtoken`.
12
+
13
+ The most important framework-level pieces are:
14
+
15
+ - **JWT clients**
16
+ - a shared **base** configuration
17
+ - helper methods for paired token creation
18
+ - temporary-token support
19
+ - integration with the passport/auth flow
20
+
21
+ ## JWT configuration
22
+
23
+ JWT behavior is configured under `config.modules['a-jwt']`.
24
+
25
+ Representative pattern:
26
+
27
+ ```typescript
28
+ config.modules = {
29
+ 'a-jwt': {
30
+ tempAuthToken: {
31
+ signOptions: { expiresIn: 5 * 60 },
32
+ },
33
+ base: {
34
+ secret: undefined,
35
+ signOptions: { issuer: env.APP_NAME },
36
+ verifyOptions: { issuer: env.APP_NAME },
37
+ },
38
+ clients: {
39
+ access: {
40
+ signOptions: { expiresIn: 2 * 60 * 60 },
41
+ },
42
+ refresh: {
43
+ signOptions: { expiresIn: 7 * 24 * 60 * 60 },
44
+ },
45
+ },
46
+ },
47
+ };
48
+ ```
49
+
50
+ The main configuration layers are:
51
+
52
+ - `tempAuthToken`
53
+ - `base`
54
+ - `clients`
55
+
56
+ A useful ownership rule is:
57
+
58
+ - `base` defines common signing and verification defaults
59
+ - `clients` specialize token behavior by scenario
60
+ - `tempAuthToken` shortens the lifecycle for query-oriented or temporary access flows
61
+
62
+ ## Built-in JWT clients
63
+
64
+ Vona ships with built-in JWT clients including:
65
+
66
+ - `access`
67
+ - `refresh`
68
+ - `oauth`
69
+ - `oauthstate`
70
+ - `code`
71
+
72
+ This is one of the reasons JWT should be understood as part of the broader auth/passport architecture rather than as only one access token string.
73
+
74
+ ## Secret fallback model
75
+
76
+ A client can provide its own `secret`.
77
+
78
+ If a client secret is absent, Vona falls back to:
79
+
80
+ 1. the client-specific secret
81
+ 2. `base.secret`
82
+ 3. `config.server.keys[0]`
83
+
84
+ That means JWT signing can stay centrally configured even when most clients share the same secret source.
85
+
86
+ ## Adding a new JWT client
87
+
88
+ Projects can add additional JWT clients for custom scenarios.
89
+
90
+ Representative type extension:
91
+
92
+ ```typescript
93
+ declare module 'vona-module-a-jwt' {
94
+ export interface IJwtClientRecord {
95
+ test: never;
96
+ }
97
+ }
98
+ ```
99
+
100
+ In the VSCode workflow, the `recordjwtclient` snippet can generate the augmentation skeleton.
101
+
102
+ Representative client config:
103
+
104
+ ```typescript
105
+ config.modules = {
106
+ 'a-jwt': {
107
+ clients: {
108
+ test: {
109
+ secret: 'xxxx',
110
+ signOptions: { expiresIn: 2 * 60 * 60 },
111
+ },
112
+ },
113
+ },
114
+ };
115
+ ```
116
+
117
+ ## `bean.jwt`
118
+
119
+ Vona exposes a global bean `bean.jwt` for working with JWT clients.
120
+
121
+ Representative client retrieval:
122
+
123
+ ```typescript
124
+ const jwtAccess = this.bean.jwt.get('access');
125
+ const jwtRefresh = this.bean.jwt.get('refresh');
126
+ const jwtTest = this.bean.jwt.get('test');
127
+ ```
128
+
129
+ This lets business code stay explicit about which token lifecycle it is using.
130
+
131
+ ## Generate an access token directly
132
+
133
+ Representative pattern:
134
+
135
+ ```typescript
136
+ const jwtAccess = this.bean.jwt.get('access');
137
+ const accessToken = await jwtAccess.sign({ userId: '1' });
138
+ ```
139
+
140
+ This is useful when a flow needs one specific client rather than the paired access/refresh helper.
141
+
142
+ ## Generate paired JWT tokens
143
+
144
+ Vona can generate `accessToken` and `refreshToken` together:
145
+
146
+ ```typescript
147
+ const jwtTokens = await this.bean.jwt.create({ userId: '1' });
148
+ ```
149
+
150
+ The returned shape is `IJwtToken`:
151
+
152
+ ```typescript
153
+ export interface IJwtToken {
154
+ accessToken: string;
155
+ refreshToken: string;
156
+ expiresIn: number;
157
+ }
158
+ ```
159
+
160
+ That paired helper is the normal fit for sign-in flows.
161
+
162
+ ## Temporary auth tokens
163
+
164
+ Some flows need an access token in a URL query or similarly constrained transport.
165
+
166
+ For those cases, Vona supports shorter-lived temporary access tokens.
167
+
168
+ ### Method 1: temporary sign on the access client
169
+
170
+ ```typescript
171
+ const jwtAccess = this.bean.jwt.get('access');
172
+ const accessToken = await jwtAccess.sign({ userId: '1' }, { temp: true });
173
+ ```
174
+
175
+ ### Method 2: dedicated helper
176
+
177
+ ```typescript
178
+ const accessToken = await this.bean.jwt.createTempAuthToken({ userId: '1' });
179
+ ```
180
+
181
+ This is useful when a token should remain valid only briefly, for example for URL-bound handoff flows.
182
+
183
+ ## Verification
184
+
185
+ JWT verification can happen directly through a client:
186
+
187
+ ```typescript
188
+ const jwtAccess = this.bean.jwt.get('access');
189
+ const accessToken = await jwtAccess.sign({ userId: '1' });
190
+ const payload = await jwtAccess.verify(accessToken);
191
+ ```
192
+
193
+ Direct verification is useful when the business flow really needs raw payload verification.
194
+
195
+ In ordinary request-path auth flows, the more important layer is usually the passport guard, not manual verification.
196
+
197
+ ## Relationship to passport
198
+
199
+ In most application flows, JWT is consumed through `bean.passport` rather than through raw token handling in every controller.
200
+
201
+ Representative passport-facing capabilities include:
202
+
203
+ - `signin(...)`
204
+ - `signout()`
205
+ - `checkAuthToken(...)`
206
+ - `refreshAuthToken(...)`
207
+ - `createTempAuthToken(...)`
208
+ - `createAuthTokenFromOauthCode(...)`
209
+
210
+ This is the key architectural point:
211
+
212
+ - `bean.jwt` owns token creation and verification mechanics
213
+ - `bean.passport` owns identity-bearing flows built on top of those mechanics
214
+
215
+ For example, the out-of-the-box Passport controller in `home-user` uses:
216
+
217
+ - `refreshAuthToken` for refresh-token exchange
218
+ - `createPassportJwtFromOauthCode` for finishing OAuth login
219
+ - `createTempAuthToken` for temporary URL-bound auth scenarios
220
+
221
+ ## Relationship to guards and request-path auth
222
+
223
+ The built-in global passport guard uses JWT checking as part of request authentication.
224
+
225
+ That means request-path authorization usually works like this:
226
+
227
+ 1. the guard checks whether an auth token should be verified
228
+ 2. `bean.passport.checkAuthToken()` verifies and deserializes token state
229
+ 3. the current passport is attached to request context
230
+ 4. later guards or business logic use current user / roles / passport state
231
+
232
+ So JWT is a foundational mechanism, but request-path access control should still be understood through the passport and guard layers.
233
+
234
+ Read this guide together with:
235
+
236
+ - [Auth Guide](/backend/auth-guide)
237
+ - [User Access Guide](/backend/user-access-guide)
238
+ - [Controller AOP Guide](/backend/controller-aop-guide)
239
+
240
+ ## OAuth-specific JWT flows
241
+
242
+ Vona also uses JWT-backed flows for OAuth-oriented state and code handling.
243
+
244
+ Representative passport methods include:
245
+
246
+ - `createOauthAuthToken(...)`
247
+ - `createOauthCode(...)`
248
+ - `createOauthCodeFromOauthAuthToken(...)`
249
+ - `createAuthTokenFromOauthCode(...)`
250
+
251
+ This is why JWT is not only about access/refresh tokens. It is also part of the framework’s OAuth handoff model.
252
+
253
+ ## When to use `bean.jwt` directly
254
+
255
+ Use `bean.jwt` directly when:
256
+
257
+ - the business flow needs a specific client instance
258
+ - the flow needs direct sign/verify control
259
+ - the token use case is infrastructural rather than ordinary login/logout controller behavior
260
+
261
+ Use `bean.passport` when:
262
+
263
+ - the flow is really about user sign-in/out
264
+ - refresh-token behavior should reuse framework defaults
265
+ - token handling should remain tied to current passport lifecycle behavior
266
+
267
+ ## Implementation checks for JWT-sensitive changes
268
+
269
+ When editing JWT-sensitive backend behavior, ask:
270
+
271
+ 1. is this really a raw JWT concern, or should it stay at the passport/auth layer?
272
+ 2. does the flow need `access`, `refresh`, `oauth`, `code`, or a custom client?
273
+ 3. should this token be temporary rather than normal-lived?
274
+ 4. does the request path already rely on the passport guard instead of manual verification?
275
+
276
+ That helps AI keep token handling aligned with Vona’s real auth architecture instead of scattering raw JWT logic through unrelated controllers and services.
@@ -0,0 +1,223 @@
1
+ # Logger Guide
2
+
3
+ ## Why logging matters in Vona
4
+
5
+ Vona provides a structured logging system so backend logs can stay typed, environment-aware, and operationally useful instead of becoming ad hoc console output.
6
+
7
+ That matters because production systems need different log clients, different retention behavior, different levels, and different context metadata.
8
+
9
+ ## Core logger model
10
+
11
+ Vona’s logging system is built around:
12
+
13
+ - **clients**
14
+ - **children**
15
+ - **rotation**
16
+ - **levels**
17
+
18
+ The system is based on Winston, but the important point in Cabloy is the framework-level model rather than the raw logger library itself.
19
+
20
+ ## Log directory behavior
21
+
22
+ By default, the log directory changes by runtime environment.
23
+
24
+ Representative defaults are:
25
+
26
+ - test/development → `{project path}/.app/logs`
27
+ - production → `{home}/.vona/{project name}/logs`
28
+
29
+ This can be configured through app config or environment variables such as `LOGGER_DIR`.
30
+
31
+ ## Logger configuration
32
+
33
+ Logger behavior is configured through `config.logger`.
34
+
35
+ Representative areas include:
36
+
37
+ - `baseDir`
38
+ - `rotate(...)`
39
+ - `base`
40
+ - `clients`
41
+
42
+ This means log behavior is part of the app configuration model, not a hardcoded utility.
43
+
44
+ ## Rotation
45
+
46
+ Vona supports rotating log files by configuration.
47
+
48
+ Representative rotate options include:
49
+
50
+ - `enable`
51
+ - `filename`
52
+ - `datePattern`
53
+ - `maxSize`
54
+ - `maxFiles`
55
+
56
+ These can be configured through app config or environment variables.
57
+
58
+ ## Logger clients
59
+
60
+ The system provides a built-in `default` client and supports adding additional clients for scenario-specific logging.
61
+
62
+ For example, a project can add an `order` client to separate order-related logs.
63
+
64
+ A client can define its own transports while still inheriting common logger behavior.
65
+
66
+ Representative type extension and client configuration patterns include:
67
+
68
+ ```typescript
69
+ declare module 'vona' {
70
+ export interface ILoggerClientRecord {
71
+ order: never;
72
+ }
73
+ }
74
+ ```
75
+
76
+ ```typescript
77
+ config.logger = {
78
+ clients: {
79
+ order(this: VonaApplication, clientInfo) {
80
+ const transports = [
81
+ this.bean.logger.makeTransportFile(clientInfo, 'order'),
82
+ this.bean.logger.makeTransportConsole(clientInfo),
83
+ ];
84
+ return { transports };
85
+ },
86
+ },
87
+ };
88
+ ```
89
+
90
+ In the VSCode workflow, the `recordloggerclient` snippet can generate the client-type augmentation skeleton.
91
+
92
+ ## Getting a logger client
93
+
94
+ There are two common access styles.
95
+
96
+ ### Via bean logger
97
+
98
+ ```typescript
99
+ const loggerDefault = this.bean.logger.default;
100
+ const loggerOrder = this.bean.logger.get('order');
101
+ ```
102
+
103
+ ### Via shorthand helpers
104
+
105
+ ```typescript
106
+ this.$logger.info('test');
107
+ this.$loggerClient('order').info('test');
108
+ ```
109
+
110
+ The shorthand helpers are especially useful because they automatically include the current bean identity in the log context.
111
+
112
+ ## Child loggers
113
+
114
+ For the same client, Vona can create child loggers for scenario-level context.
115
+
116
+ Representative pattern:
117
+
118
+ ```typescript
119
+ this.$loggerChild('pay').info('$50');
120
+ this.$loggerChild('pay', 'order').info('$50');
121
+ ```
122
+
123
+ That keeps business-specific log context explicit without requiring a whole new logger client every time.
124
+
125
+ As with clients, child names can also be formalized through interface merging so logger usage stays type-safe at the project level.
126
+
127
+ ## Log levels
128
+
129
+ Vona uses standard npm/RFC5424-style levels such as:
130
+
131
+ - `error`
132
+ - `warn`
133
+ - `info`
134
+ - `http`
135
+ - `verbose`
136
+ - `debug`
137
+ - `silly`
138
+
139
+ These levels map directly to logger methods such as:
140
+
141
+ ```typescript
142
+ this.$logger.error('test');
143
+ this.$logger.warn('test');
144
+ this.$logger.info('test');
145
+ this.$logger.debug('test');
146
+ ```
147
+
148
+ ## Level control and transport behavior
149
+
150
+ Logger level controls what gets written where.
151
+
152
+ Representative patterns include:
153
+
154
+ - file transport at the normal level threshold
155
+ - a second file transport for a more verbose level such as `debug`
156
+ - console transport behavior for operational visibility
157
+
158
+ Representative transport patterns:
159
+
160
+ ```typescript
161
+ this.bean.logger.makeTransportFile(clientInfo, 'order');
162
+ this.bean.logger.makeTransportFile(clientInfo, 'order-debug', 'debug');
163
+ this.bean.logger.makeTransportConsole(clientInfo);
164
+ ```
165
+
166
+ Default level behavior can also be configured through environment variables such as:
167
+
168
+ - `LOGGER_CLIENT_DEFAULT`
169
+ - `LOGGER_CLIENT_ORDER`
170
+
171
+ ## Reading and changing levels at runtime
172
+
173
+ Vona can inspect or change active logger levels while the system is running.
174
+
175
+ Representative methods include:
176
+
177
+ - `getFilterLevel()`
178
+ - `setFilterLevel(...)`
179
+
180
+ Representative patterns:
181
+
182
+ ```typescript
183
+ const levelDefault = this.bean.logger.getFilterLevel();
184
+ const levelOrder = this.bean.logger.getFilterLevel('order');
185
+
186
+ this.bean.logger.setFilterLevel('debug');
187
+ this.bean.logger.setFilterLevel(false);
188
+ this.bean.logger.setFilterLevel(true);
189
+ ```
190
+
191
+ When level changes are applied, Vona can propagate them across workers, which is especially useful for live diagnostics.
192
+
193
+ ## Delayed log messages
194
+
195
+ When expensive log-message construction would be wasted at a disabled level, Vona supports delayed message generation through callbacks.
196
+
197
+ Representative pattern:
198
+
199
+ ```typescript
200
+ this.$logger.debug(() => {
201
+ return JSON.stringify(obj);
202
+ });
203
+ ```
204
+
205
+ That avoids unnecessary work when the current level would drop the message anyway.
206
+
207
+ ## Relationship to internal AOP and runtime behavior
208
+
209
+ Logging is closely connected to:
210
+
211
+ - [Internal AOP Guide](/backend/internal-aop-guide) through built-in AOP helpers such as `@Core.log(...)`
212
+ - [Runtime and Flavors](/backend/runtime-and-flavors) because log location, level, and operational behavior often vary by environment
213
+
214
+ ## Implementation checks for backend logging changes
215
+
216
+ When editing backend logging behavior, ask:
217
+
218
+ 1. does this belong in the default client, a dedicated client, or a child logger?
219
+ 2. should the behavior be implemented through normal logger usage or an AOP-style logging decorator?
220
+ 3. does the current runtime environment or flavor affect where or how logs should be written?
221
+ 4. should expensive log-message construction be delayed behind a callback?
222
+
223
+ That helps AI keep logging aligned with Vona’s operational model instead of scattering raw console output through the codebase.