cabloy 5.1.19 → 5.1.21

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 (384) hide show
  1. package/.gitignore +0 -0
  2. package/LICENSE +0 -0
  3. package/package.json +28 -24
  4. package/scripts/upgrade.ts +13 -4
  5. package/vona/README.md +0 -0
  6. package/vona/README.zh-CN.md +0 -0
  7. package/vona/packages-cli/cabloy-cli/LICENSE +0 -0
  8. package/vona/packages-cli/cabloy-cli/README.md +0 -0
  9. package/vona/packages-cli/cabloy-cli/package.json +0 -0
  10. package/vona/packages-cli/cli/LICENSE +0 -0
  11. package/vona/packages-cli/cli/README.md +0 -0
  12. package/vona/packages-cli/cli/package.json +0 -0
  13. package/vona/packages-cli/cli-set-api/LICENSE +0 -0
  14. package/vona/packages-cli/cli-set-api/README.md +0 -0
  15. package/vona/packages-cli/cli-set-api/cli/templates/create/module/boilerplate/_package.json +0 -0
  16. package/vona/packages-cli/cli-set-api/cli/templates/create/module/boilerplate/src/index.ts_ +0 -0
  17. package/vona/packages-cli/cli-set-api/cli/templates/create/suite/modules/.gitkeep +0 -0
  18. package/vona/packages-cli/cli-set-api/package.json +0 -0
  19. package/vona/packages-utils/babel-plugin-vona-bean-module/README.md +0 -0
  20. package/vona/packages-utils/babel-plugin-vona-bean-module/package.json +0 -0
  21. package/vona/packages-utils/cascade-extend/LICENSE +0 -0
  22. package/vona/packages-utils/cascade-extend/README.md +0 -0
  23. package/vona/packages-utils/cascade-extend/package.json +0 -0
  24. package/vona/packages-utils/compose/README.md +0 -0
  25. package/vona/packages-utils/compose/package.json +0 -0
  26. package/vona/packages-utils/deps/README.md +0 -0
  27. package/vona/packages-utils/deps/package.json +0 -0
  28. package/vona/packages-utils/dotenv/README.md +0 -0
  29. package/vona/packages-utils/dotenv/package.json +0 -0
  30. package/vona/packages-utils/extend/README.md +0 -0
  31. package/vona/packages-utils/extend/package.json +0 -0
  32. package/vona/packages-utils/json5/README.md +0 -0
  33. package/vona/packages-utils/json5/package.json +0 -0
  34. package/vona/packages-utils/localeutil/README.md +0 -0
  35. package/vona/packages-utils/localeutil/package.json +0 -0
  36. package/vona/packages-utils/module-glob/README.md +0 -0
  37. package/vona/packages-utils/module-glob/package.json +0 -0
  38. package/vona/packages-utils/module-info-pro/README.md +0 -0
  39. package/vona/packages-utils/module-info-pro/package.json +0 -0
  40. package/vona/packages-utils/password-hash-salt/LICENSE +0 -0
  41. package/vona/packages-utils/password-hash-salt/README.md +0 -0
  42. package/vona/packages-utils/password-hash-salt/package.json +0 -0
  43. package/vona/packages-utils/process-helper/README.md +0 -0
  44. package/vona/packages-utils/process-helper/package.json +0 -0
  45. package/vona/packages-utils/socket/package.json +0 -0
  46. package/vona/packages-utils/table-identity/LICENSE +0 -0
  47. package/vona/packages-utils/table-identity/README.md +0 -0
  48. package/vona/packages-utils/table-identity/package.json +0 -0
  49. package/vona/packages-utils/utils/README.md +0 -0
  50. package/vona/packages-utils/utils/package.json +0 -0
  51. package/vona/packages-utils/zod-errors-custom/package.json +0 -0
  52. package/vona/packages-utils/zod-openapi/package.json +0 -0
  53. package/vona/packages-utils/zod-query/package.json +0 -0
  54. package/vona/packages-vona/vona/LICENSE +0 -0
  55. package/vona/packages-vona/vona/README.md +0 -0
  56. package/vona/packages-vona/vona/README.zh-CN.md +0 -0
  57. package/vona/packages-vona/vona/package.json +0 -0
  58. package/vona/packages-vona/vona-core/package.json +0 -0
  59. package/vona/packages-vona/vona-core/src/index.ts +0 -0
  60. package/vona/packages-vona/vona-core/src/lib/bean/resource/error/errorClass.ts +0 -0
  61. package/vona/packages-vona/vona-core/src/lib/bean/resource/error/errorInternal.ts +0 -0
  62. package/vona/packages-vona/vona-core/src/lib/core/context.ts +0 -0
  63. package/vona/packages-vona/vona-core/src/lib/core/meta.ts +0 -0
  64. package/vona/packages-vona/vona-core/src/lib/locale/zh-cn.ts +0 -0
  65. package/vona/packages-vona/vona-core/src/lib/module/config.ts +0 -0
  66. package/vona/packages-vona/vona-core/src/lib/module/constant.ts +0 -0
  67. package/vona/packages-vona/vona-core/src/lib/module/errors.ts +0 -0
  68. package/vona/packages-vona/vona-core/src/lib/module/loader.ts +0 -0
  69. package/vona/packages-vona/vona-core/src/lib/module/locales.ts +0 -0
  70. package/vona/packages-vona/vona-core/src/lib/module/module.ts +0 -0
  71. package/vona/packages-vona/vona-core/src/lib/utils/util.ts +0 -0
  72. package/vona/packages-vona/vona-mock/README.md +0 -0
  73. package/vona/packages-vona/vona-mock/package.json +0 -0
  74. package/vona/packages-vona/vona-shared/LICENSE +0 -0
  75. package/vona/packages-vona/vona-shared/package.json +0 -0
  76. package/vona/pnpm-lock.yaml +60 -58
  77. package/vona/scripts/release.sh +0 -0
  78. package/vona/src/suite-vendor/a-auth/modules/a-auth/src/lib/strategyMock.ts +0 -0
  79. package/vona/src/suite-vendor/a-auth/tsconfig.json +0 -3
  80. package/vona/src/suite-vendor/a-cabloy/modules/a-status/package.json +0 -0
  81. package/vona/src/suite-vendor/a-cabloy/modules/a-status/src/model/status.ts +0 -0
  82. package/vona/src/suite-vendor/a-cabloy/tsconfig.json +0 -9
  83. package/vona/src/suite-vendor/a-captcha/tsconfig.json +0 -3
  84. package/vona/src/suite-vendor/a-vona/modules/a-instance/package.json +0 -0
  85. package/vona/src/suite-vendor/a-vona/modules/a-instance/src/index.ts +0 -0
  86. package/vona/src/suite-vendor/a-vona/modules/a-version/package.json +0 -0
  87. package/vona/src/suite-vendor/a-vona/modules/a-version/src/config/errors.ts +0 -0
  88. package/vona/src/suite-vendor/a-vona/modules/a-version/src/config/locale/zh-cn.ts +0 -0
  89. package/vona/src/suite-vendor/a-vona/modules/a-version/src/index.ts +0 -0
  90. package/vona/src/suite-vendor/a-vona/tsconfig.json +0 -3
  91. package/zova/packages-cli/cli/LICENSE +0 -0
  92. package/zova/packages-cli/cli/README.md +0 -0
  93. package/zova/packages-cli/cli/package.json +0 -0
  94. package/zova/packages-cli/cli-set-front/LICENSE +0 -0
  95. package/zova/packages-cli/cli-set-front/README.md +0 -0
  96. package/zova/packages-cli/cli-set-front/cli/templates/create/module/boilerplate/_package.json +0 -0
  97. package/zova/packages-cli/cli-set-front/cli/templates/create/module/boilerplate/src/index.ts_ +0 -0
  98. package/zova/packages-cli/cli-set-front/cli/templates/create/suite/modules/.gitkeep +0 -0
  99. package/zova/packages-cli/cli-set-front/package.json +0 -0
  100. package/zova/packages-utils/babel-plugin-zova-bean-module/LICENSE +0 -0
  101. package/zova/packages-utils/babel-plugin-zova-bean-module/README.md +0 -0
  102. package/zova/packages-utils/babel-plugin-zova-bean-module/package.json +0 -0
  103. package/zova/packages-utils/babel-plugin-zova-bean-use/LICENSE +0 -0
  104. package/zova/packages-utils/babel-plugin-zova-bean-use/README.md +0 -0
  105. package/zova/packages-utils/babel-plugin-zova-bean-use/package.json +0 -0
  106. package/zova/packages-utils/babel-plugin-zova-behavior/LICENSE +0 -0
  107. package/zova/packages-utils/babel-plugin-zova-behavior/README.md +0 -0
  108. package/zova/packages-utils/babel-plugin-zova-behavior/package.json +0 -0
  109. package/zova/packages-utils/babel-plugin-zova-component/LICENSE +0 -0
  110. package/zova/packages-utils/babel-plugin-zova-component/README.md +0 -0
  111. package/zova/packages-utils/babel-plugin-zova-component/package.json +0 -0
  112. package/zova/packages-utils/logger/LICENSE +0 -0
  113. package/zova/packages-utils/logger/README.md +0 -0
  114. package/zova/packages-utils/logger/package.json +0 -0
  115. package/zova/packages-utils/mutate-on-copy/LICENSE +0 -0
  116. package/zova/packages-utils/mutate-on-copy/README.md +0 -0
  117. package/zova/packages-utils/mutate-on-copy/package.json +0 -0
  118. package/zova/packages-utils/quasar-app-extension-zova/LICENSE +0 -0
  119. package/zova/packages-utils/word-utils/LICENSE +0 -0
  120. package/zova/packages-utils/word-utils/README.md +0 -0
  121. package/zova/packages-utils/word-utils/package.json +0 -0
  122. package/zova/packages-utils/zova-jsx/LICENSE +0 -0
  123. package/zova/packages-utils/zova-jsx/package.json +0 -0
  124. package/zova/packages-utils/zova-openapi/LICENSE +0 -0
  125. package/zova/packages-utils/zova-openapi/package.json +0 -0
  126. package/zova/packages-utils/zova-vite/LICENSE +0 -0
  127. package/zova/packages-utils/zova-vite/README.md +0 -0
  128. package/zova/packages-utils/zova-vite/package.json +0 -0
  129. package/zova/packages-zova/zova/LICENSE +0 -0
  130. package/zova/packages-zova/zova/package.json +0 -0
  131. package/zova/packages-zova/zova-core/LICENSE +0 -0
  132. package/zova/packages-zova/zova-core/README.md +0 -0
  133. package/zova/packages-zova/zova-core/package.json +0 -0
  134. package/zova/packages-zova/zova-core/src/bean/resource/error/errorClass.ts +0 -0
  135. package/zova/packages-zova/zova-core/src/bean/resource/error/errorInternal.ts +0 -0
  136. package/zova/scripts/release.sh +0 -0
  137. package/zova/src/suite/a-home/modules/home-index/package.json +0 -0
  138. package/zova/src/suite/a-home/modules/home-index/src/routes.ts +0 -0
  139. package/zova/src/suite-vendor/a-cabloy/LICENSE +0 -0
  140. package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/LICENSE +0 -0
  141. package/zova/src/suite-vendor/a-zova/LICENSE +0 -0
  142. package/zova/src/suite-vendor/a-zova/modules/a-api/LICENSE +0 -0
  143. package/zova/src/suite-vendor/a-zova/modules/a-app/LICENSE +0 -0
  144. package/zova/src/suite-vendor/a-zova/modules/a-bean/LICENSE +0 -0
  145. package/zova/src/suite-vendor/a-zova/modules/a-behavior/LICENSE +0 -0
  146. package/zova/src/suite-vendor/a-zova/modules/a-behaviors/LICENSE +0 -0
  147. package/zova/src/suite-vendor/a-zova/modules/a-boundary/LICENSE +0 -0
  148. package/zova/src/suite-vendor/a-zova/modules/a-command/LICENSE +0 -0
  149. package/zova/src/suite-vendor/a-zova/modules/a-fetch/LICENSE +0 -0
  150. package/zova/src/suite-vendor/a-zova/modules/a-form/LICENSE +0 -0
  151. package/zova/src/suite-vendor/a-zova/modules/a-icon/LICENSE +0 -0
  152. package/zova/src/suite-vendor/a-zova/modules/a-interceptor/LICENSE +0 -0
  153. package/zova/src/suite-vendor/a-zova/modules/a-logger/LICENSE +0 -0
  154. package/zova/src/suite-vendor/a-zova/modules/a-meta/LICENSE +0 -0
  155. package/zova/src/suite-vendor/a-zova/modules/a-model/LICENSE +0 -0
  156. package/zova/src/suite-vendor/a-zova/modules/a-openapi/LICENSE +0 -0
  157. package/zova/src/suite-vendor/a-zova/modules/a-router/LICENSE +0 -0
  158. package/zova/src/suite-vendor/a-zova/modules/a-routerstack/LICENSE +0 -0
  159. package/zova/src/suite-vendor/a-zova/modules/a-routertabs/LICENSE +0 -0
  160. package/zova/src/suite-vendor/a-zova/modules/a-ssr/LICENSE +0 -0
  161. package/zova/src/suite-vendor/a-zova/modules/a-ssrhmr/LICENSE +0 -0
  162. package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/LICENSE +0 -0
  163. package/zova/src/suite-vendor/a-zova/modules/a-style/LICENSE +0 -0
  164. package/zova/src/suite-vendor/a-zova/modules/a-table/LICENSE +0 -0
  165. package/zova/src/suite-vendor/a-zova/modules/a-zod/LICENSE +0 -0
  166. package/zova/src/suite-vendor/a-zova/modules/a-zova/LICENSE +0 -0
  167. package/vona/src/suite-vendor/a-auth/modules/test-auth/package.json +0 -52
  168. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/index.ts +0 -74
  169. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/this.ts +0 -2
  170. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/controller/passport.ts +0 -19
  171. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/index.ts +0 -1
  172. package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authOauth.test.ts +0 -55
  173. package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authSimple.test.ts +0 -52
  174. package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.build.json +0 -11
  175. package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.json +0 -7
  176. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/package.json +0 -60
  177. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/index.ts +0 -103
  178. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/this.ts +0 -2
  179. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/bean/meta.status.ts +0 -15
  180. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/controller/status.ts +0 -44
  181. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/index.ts +0 -1
  182. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/datasource.test.ts +0 -51
  183. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/socket.test.ts +0 -48
  184. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/status.test.ts +0 -10
  185. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.build.json +0 -11
  186. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.json +0 -7
  187. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/package.json +0 -63
  188. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/index.ts +0 -377
  189. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/locales.ts +0 -18
  190. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/this.ts +0 -2
  191. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/meta.version.ts +0 -49
  192. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/ssrMenu.product.ts +0 -26
  193. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/en-us.ts +0 -15
  194. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/zh-cn.ts +0 -15
  195. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/controller/product.tsx +0 -64
  196. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productCreate.tsx +0 -40
  197. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectReq.tsx +0 -25
  198. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectRes.tsx +0 -11
  199. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectResItem.tsx +0 -39
  200. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productUpdate.tsx +0 -30
  201. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productView.tsx +0 -25
  202. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/entity/product.tsx +0 -65
  203. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/index.ts +0 -2
  204. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/model/product.ts +0 -10
  205. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/service/product.ts +0 -37
  206. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/permission.test.ts +0 -19
  207. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/product.test.ts +0 -65
  208. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.build.json +0 -11
  209. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.json +0 -7
  210. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/package.json +0 -60
  211. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/index.ts +0 -161
  212. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/locales.ts +0 -18
  213. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/this.ts +0 -2
  214. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/en-us.ts +0 -13
  215. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/zh-cn.ts +0 -11
  216. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolOne.ts +0 -43
  217. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolTwo.ts +0 -37
  218. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testBody.ts +0 -10
  219. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testDetail.ts +0 -21
  220. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testParams.ts +0 -13
  221. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testQuery.ts +0 -12
  222. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testResult.tsx +0 -159
  223. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/index.ts +0 -2
  224. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.build.json +0 -11
  225. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.json +0 -7
  226. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/package.json +0 -52
  227. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/index.ts +0 -99
  228. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/this.ts +0 -2
  229. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/controller/captcha.ts +0 -18
  230. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/dto/signin.ts +0 -20
  231. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/index.ts +0 -1
  232. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/test/captcha.test.ts +0 -148
  233. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.build.json +0 -11
  234. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.json +0 -7
  235. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/img/vona.png +0 -0
  236. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.png +0 -0
  237. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.svg +0 -3
  238. package/vona/src/suite-vendor/a-vona/modules/test-vona/package.json +0 -61
  239. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/index.ts +0 -2181
  240. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/locales.ts +0 -18
  241. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/this.ts +0 -2
  242. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.regExp.ts +0 -34
  243. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.simple.ts +0 -80
  244. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aopMethod.test.ts +0 -63
  245. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/bean.testCtx.ts +0 -59
  246. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/broadcast.test.ts +0 -24
  247. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheMem.test.ts +0 -7
  248. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.post.ts +0 -11
  249. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.test.ts +0 -7
  250. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/event.helloEcho.ts +0 -13
  251. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/eventListener.helloEcho.ts +0 -24
  252. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.asset.ts +0 -10
  253. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.static.ts +0 -7
  254. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.version.ts +0 -108
  255. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/queue.test.ts +0 -25
  256. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test.ts +0 -13
  257. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test3.ts +0 -13
  258. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/serializerTransform.email.ts +0 -35
  259. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.caching.ts +0 -36
  260. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.test.ts +0 -36
  261. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/config.ts +0 -5
  262. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/en-us.ts +0 -21
  263. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/zh-cn.ts +0 -19
  264. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/bean.ts +0 -103
  265. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheMem.ts +0 -64
  266. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheRedis.ts +0 -56
  267. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/dtoTest.ts +0 -61
  268. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/guardPassport.ts +0 -26
  269. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/onion.ts +0 -103
  270. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/order.ts +0 -56
  271. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/passport.ts +0 -49
  272. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/performAction.ts +0 -19
  273. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/post.ts +0 -59
  274. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/queue.ts +0 -27
  275. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/serializer.ts +0 -40
  276. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/summer.ts +0 -130
  277. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/tail.ts +0 -33
  278. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/transaction.ts +0 -30
  279. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/upload.ts +0 -61
  280. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/categoryTree.ts +0 -9
  281. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderCreate.ts +0 -13
  282. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQuery.ts +0 -25
  283. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQueryPage.ts +0 -24
  284. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectRes.ts +0 -11
  285. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectResItem.ts +0 -11
  286. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderUpdate.ts +0 -13
  287. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postAggregate.ts +0 -17
  288. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postCreate.ts +0 -11
  289. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postGroup.ts +0 -14
  290. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectReq.ts +0 -36
  291. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectRes.ts +0 -11
  292. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectResItem.tsx +0 -28
  293. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/profile.ts +0 -15
  294. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/roleLazy.ts +0 -17
  295. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerArray.ts +0 -39
  296. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerLazy.ts +0 -31
  297. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerSimple.ts +0 -112
  298. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/user.ts +0 -21
  299. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userCreate.ts +0 -11
  300. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userLazy.ts +0 -20
  301. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userUpdate.ts +0 -9
  302. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/category.ts +0 -16
  303. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/order.ts +0 -21
  304. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/post.ts +0 -21
  305. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/postContent.ts +0 -16
  306. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/product.ts +0 -27
  307. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/role.ts +0 -12
  308. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/roleUser.ts +0 -16
  309. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/test.ts +0 -24
  310. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/user.ts +0 -18
  311. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/index.ts +0 -4
  312. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/index.ts +0 -1
  313. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/serializer.ts +0 -9
  314. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/category.ts +0 -22
  315. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/categoryChain.ts +0 -23
  316. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/order.ts +0 -33
  317. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/orderStats.ts +0 -29
  318. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/post.ts +0 -23
  319. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/postContent.ts +0 -23
  320. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/product.ts +0 -10
  321. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/role.ts +0 -23
  322. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/roleUser.ts +0 -10
  323. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/test.ts +0 -10
  324. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/testDynamicTable.ts +0 -23
  325. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/user.ts +0 -30
  326. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStats.ts +0 -22
  327. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStatsGroup.ts +0 -36
  328. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/aopMethod.ts +0 -38
  329. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/caching.ts +0 -89
  330. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/category.ts +0 -153
  331. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/order.ts +0 -67
  332. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/post.ts +0 -280
  333. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/product.ts +0 -5
  334. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/test.ts +0 -9
  335. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testApp.ts +0 -13
  336. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testClass.ts +0 -15
  337. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testData.ts +0 -71
  338. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/transaction.ts +0 -20
  339. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/user.ts +0 -124
  340. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/types/index.ts +0 -6
  341. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/aopMethod.test.ts +0 -21
  342. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/bean.test.ts +0 -16
  343. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/broadcast.test.ts +0 -17
  344. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheMem.test.ts +0 -10
  345. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheRedis.test.ts +0 -10
  346. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/caching.test.ts +0 -61
  347. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/summer.test.ts +0 -10
  348. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/database.test.ts +0 -132
  349. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoAggregate.test.ts +0 -44
  350. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGet.test.ts +0 -82
  351. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGroup.test.ts +0 -44
  352. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoLazy.test.ts +0 -53
  353. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoMutate.test.ts +0 -56
  354. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoQuery.test.ts +0 -70
  355. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelAggregate.test.ts +0 -222
  356. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelCache.test.ts +0 -37
  357. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGeneral.test.ts +0 -18
  358. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGroup.test.ts +0 -248
  359. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelMagic.test.ts +0 -37
  360. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelations.test.ts +0 -215
  361. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsJoins.test.ts +0 -58
  362. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsMutate.test.ts +0 -436
  363. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelWhere.test.ts +0 -173
  364. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/orm.test.ts +0 -22
  365. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/transaction.test.ts +0 -142
  366. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/event.test.ts +0 -14
  367. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/guardPassport.test.ts +0 -48
  368. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/instance.test.ts +0 -35
  369. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/jwt.test.ts +0 -28
  370. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/locale.test.ts +0 -64
  371. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/mail.test.ts +0 -14
  372. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/passport.test.ts +0 -69
  373. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/queue.test.ts +0 -11
  374. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/runtime.test.ts +0 -24
  375. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/serializer.test.ts +0 -82
  376. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/static.test.ts +0 -22
  377. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/tail.test.ts +0 -21
  378. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/upload.test.ts +0 -75
  379. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/cabloyUtils.test.ts +0 -19
  380. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/celjs.test.ts +0 -64
  381. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/mappedTypes.test.ts +0 -73
  382. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/performAction.test.ts +0 -28
  383. package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.build.json +0 -11
  384. package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.json +0 -7
@@ -1,51 +0,0 @@
1
- import { catchError } from '@cabloy/utils';
2
- import assert from 'node:assert';
3
- import { describe, it } from 'node:test';
4
- import { cast } from 'vona';
5
- import { app } from 'vona-mock';
6
-
7
- describe('datasource.test.ts', () => {
8
- it('action:datasource', async () => {
9
- await app.bean.executor.mockCtx(async () => {
10
- // scope
11
- const scopeTest = app.scope('test-vona');
12
- // insert
13
- const entityTest = await scopeTest.model.test.insert({ title: 'datasource:compensate:fail' });
14
- assert.equal(entityTest.title, 'datasource:compensate:fail');
15
- // scope
16
- const clientConfig = app
17
- .scope('a-orm')
18
- .service.database.getClientConfig(app.ctx.db.clientName);
19
- const clientConfig2 = app.ctx.db.client.clientConfig;
20
- const clientConfig3 = app.bean.database.current.client.clientConfig;
21
- assert.equal(clientConfig.client, clientConfig2.client);
22
- assert.equal(clientConfig.client, clientConfig3.client);
23
- const entityDatasource = await app.bean.datasource.create({
24
- name: '__datasource_test',
25
- config: clientConfig3,
26
- });
27
- const db = await app.bean.datasource.getDb(entityDatasource);
28
- await catchError(async () => {
29
- await db.transaction.begin(async () => {
30
- const modelTest = scopeTest.model.test.newInstance(db);
31
- assert.equal(cast(modelTest).db, db);
32
- await modelTest.update({ id: entityTest.id, title: 'datasource:compensate:fail_1' });
33
- // let cache take effect
34
- await modelTest.get({ id: entityTest.id });
35
- throw new Error('rollback');
36
- });
37
- });
38
- const entityTest2 = await scopeTest.model.test.get({ id: entityTest.id });
39
- assert.equal(entityTest2?.title, 'datasource:compensate:fail');
40
- // update client
41
- await app.bean.datasource.update(entityDatasource);
42
- const modelTest = scopeTest.model.test.newInstance(db);
43
- const entityTest3 = await modelTest.get({ id: entityTest.id });
44
- assert.equal(entityTest3?.title, 'datasource:compensate:fail');
45
- // delete
46
- await scopeTest.model.test.delete({ id: entityTest.id });
47
- // remove datasource
48
- await app.bean.datasource.remove(entityDatasource.id);
49
- });
50
- });
51
- });
@@ -1,48 +0,0 @@
1
- import type { VonaApplication } from 'vona';
2
-
3
- import { WebSocketClient } from '@cabloy/socket';
4
- import { catchError } from '@cabloy/utils';
5
- import assert from 'node:assert';
6
- import { describe, it } from 'node:test';
7
- import { $protocolKey } from 'vona';
8
- import { app } from 'vona-mock';
9
-
10
- describe('socket.test.ts', () => {
11
- it('action:socket', async () => {
12
- await app.bean.executor.mockCtx(async () => {
13
- await app.bean.passport.signinMock();
14
- await test(app);
15
- await app.bean.passport.signout();
16
- });
17
- });
18
- });
19
-
20
- async function test(app: VonaApplication) {
21
- const scopeSocket = app.scope('a-socket');
22
- const path = `${scopeSocket.config.globalPrefix}/xxx`;
23
- const code = await app.bean.passport.createTempAuthToken({ path });
24
- const url = `ws://${app.config.server.listen.hostname}:${app.config.server.listen.port}${path}?${$protocolKey('x-vona-passport-code')}=${code}`;
25
- return new Promise(resolve => {
26
- const ws = new WebSocketClient();
27
- ws.onReady = async () => {
28
- return await testReady(ws, resolve);
29
- };
30
- ws.onEvent = (_eventName, _data) => {};
31
- ws.onFallback = _event => {};
32
- ws.connect(url);
33
- });
34
- }
35
-
36
- async function testReady(ws: WebSocketClient, resolve: Function) {
37
- // performAction: success
38
- const res = await ws.performAction('get', '/api/test/auth/passport/isAuthenticated');
39
- assert.equal(res, true);
40
- // performAction: fail
41
- const [_, err] = await catchError(() => {
42
- return ws.performAction('get', '/__not_found_fail');
43
- });
44
- ws.disconnect();
45
- resolve(true);
46
- // should after resolve
47
- assert.equal(err?.code, 404);
48
- }
@@ -1,10 +0,0 @@
1
- import { describe, it } from 'node:test';
2
- import { app } from 'vona-mock';
3
-
4
- describe('status.test.ts', () => {
5
- it('action:status', async () => {
6
- await app.bean.executor.mockCtx(async () => {
7
- await app.bean.executor.performAction('post', '/test/cabloy/status');
8
- });
9
- });
10
- });
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "emitDeclarationOnly": true,
8
- "outDir": "dist"
9
- },
10
- "include": ["src", "src/.metadata/*.ts", "src/**/*.json"]
11
- }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base",
3
- "compilerOptions": {
4
- "noEmit": true
5
- },
6
- "include": ["src", "src/.metadata/*.ts", "src/**/*.json", "test"]
7
- }
@@ -1,63 +0,0 @@
1
- {
2
- "name": "vona-module-test-rest",
3
- "version": "5.1.12",
4
- "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
- "description": "",
6
- "keywords": [
7
- "Vona Module"
8
- ],
9
- "author": "",
10
- "files": [
11
- "assets",
12
- "dist",
13
- "src"
14
- ],
15
- "type": "module",
16
- "exports": {
17
- ".": {
18
- "types": [
19
- "./src/index.ts",
20
- "./dist/index.d.ts"
21
- ],
22
- "import": "./src/index.ts",
23
- "default": "./dist/index.js"
24
- },
25
- "./package.json": "./package.json"
26
- },
27
- "scripts": {
28
- "clean": "rimraf dist tsconfig.build.tsbuildinfo",
29
- "tsc:publish": "npm run clean && vona :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
30
- "prepublishOnly": "npm run tsc:publish",
31
- "prepack": "clean-package",
32
- "postpack": "clean-package restore && npm run clean"
33
- },
34
- "dependencies": {
35
- "@faker-js/faker": "^10.4.0"
36
- },
37
- "devDependencies": {
38
- "clean-package": "^2.2.0",
39
- "rimraf": "^6.1.3"
40
- },
41
- "clean-package": {
42
- "indent": 2,
43
- "remove": [
44
- "clean-package",
45
- "exports.\\..import"
46
- ]
47
- },
48
- "title": "test-rest",
49
- "vonaModule": {
50
- "fileVersion": 1,
51
- "dependencies": {
52
- "a-cabloy": "5.0.0"
53
- },
54
- "capabilities": {
55
- "meta": {
56
- "mode": [
57
- "dev",
58
- "test"
59
- ]
60
- }
61
- }
62
- }
63
- }
@@ -1,377 +0,0 @@
1
- // eslint-disable
2
- import type { TypeEntityMeta,TypeModelsClassLikeGeneral,TypeSymbolKeyFieldsMore } from 'vona-module-a-orm';
3
- import type { TypeEntityOptionsFields,TypeControllerOptionsActions } from 'vona-module-a-openapi';
4
- import type { TableIdentity } from 'table-identity';
5
- /** entity: begin */
6
- export * from '../entity/product.tsx';
7
- import type { IEntityOptionsProduct } from '../entity/product.tsx';
8
- import 'vona-module-a-orm';
9
- declare module 'vona-module-a-orm' {
10
-
11
- export interface IEntityRecord {
12
- 'test-rest:product': IEntityOptionsProduct;
13
- }
14
-
15
-
16
- }
17
- declare module 'vona-module-test-rest' {
18
-
19
- }
20
- /** entity: end */
21
- /** entity: begin */
22
- import type { EntityProduct } from '../entity/product.tsx';
23
- export interface IModuleEntity {
24
- 'product': EntityProductMeta;
25
- }
26
- /** entity: end */
27
- /** entity: begin */
28
- export type EntityProductTableName = 'testRestProduct';
29
- export type EntityProductMeta=TypeEntityMeta<EntityProduct,EntityProductTableName>;
30
- declare module 'vona-module-a-orm' {
31
- export interface ITableRecord {
32
- 'testRestProduct': EntityProductMeta;
33
- }
34
- }
35
- declare module 'vona-module-test-rest' {
36
-
37
- export interface IEntityOptionsProduct {
38
- fields?: TypeEntityOptionsFields<EntityProduct, IEntityOptionsProduct[TypeSymbolKeyFieldsMore]>;
39
- }
40
- }
41
- /** entity: end */
42
- /** model: begin */
43
- export * from '../model/product.ts';
44
- import type { IModelOptionsProduct } from '../model/product.ts';
45
- import 'vona-module-a-orm';
46
- declare module 'vona-module-a-orm' {
47
-
48
- export interface IModelRecord {
49
- 'test-rest:product': IModelOptionsProduct;
50
- }
51
-
52
-
53
- }
54
- declare module 'vona-module-test-rest' {
55
-
56
- export interface ModelProduct {
57
- /** @internal */
58
- get scope(): ScopeModuleTestRest;
59
- }
60
-
61
- export interface ModelProduct {
62
- get $beanFullName(): 'test-rest.model.product';
63
- get $onionName(): 'test-rest:product';
64
- get $onionOptions(): IModelOptionsProduct;
65
- }
66
- }
67
- /** model: end */
68
- /** model: begin */
69
- import type { ModelProduct } from '../model/product.ts';
70
- export interface IModuleModel {
71
- 'product': ModelProduct;
72
- }
73
- /** model: end */
74
- /** model: begin */
75
-
76
- import 'vona';
77
- declare module 'vona' {
78
- export interface IBeanRecordGeneral {
79
- 'test-rest.model.product': ModelProduct;
80
- }
81
- }
82
- /** model: end */
83
- /** model: begin */
84
- import type { IModelGetOptions, IModelMethodOptions, IModelSelectParams, TypeModelSelectAndCount, TypeModelRelationResult, TypeModelWhere, IModelInsertOptions, TypeModelMutateRelationData, IModelDeleteOptions, IModelUpdateOptions, IModelMutateOptions, IModelSelectCountParams, IModelIncrementParams, IModelSelectAggrParams, TypeModelAggrRelationResult, IModelSelectGroupParams, TypeModelGroupRelationResult } from 'vona-module-a-orm';
85
- import { SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyModelOptions } from 'vona-module-a-orm';
86
- declare module 'vona-module-test-rest' {
87
-
88
- export interface ModelProduct {
89
- [SymbolKeyEntity]: EntityProduct;
90
- [SymbolKeyEntityMeta]: EntityProductMeta;
91
- [SymbolKeyModelOptions]: IModelOptionsProduct;
92
- get<T extends IModelGetOptions<EntityProduct,ModelProduct>>(where: TypeModelWhere<EntityProduct>, options?: T): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T> | undefined>;
93
- mget<T extends IModelGetOptions<EntityProduct,ModelProduct>>(ids: TableIdentity[], options?: T): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T>[]>;
94
- selectAndCount<T extends IModelSelectParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelSelectAndCount<EntityProduct, ModelProduct, T>>;
95
- select<T extends IModelSelectParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T>[]>;
96
- insert<T extends IModelInsertOptions<EntityProduct,ModelProduct>>(data?: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>, options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T, true>>;
97
- insertBulk<T extends IModelInsertOptions<EntityProduct,ModelProduct>>(items: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T, true>[]>;
98
- update<T extends IModelUpdateOptions<EntityProduct,ModelProduct>>(data: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>, options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T>>;
99
- updateBulk<T extends IModelUpdateOptions<EntityProduct,ModelProduct>>(items: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T>[]>;
100
- delete<T extends IModelDeleteOptions<EntityProduct,ModelProduct>>(where?: TypeModelWhere<EntityProduct>, options?: T): Promise<void>;
101
- deleteBulk<T extends IModelDeleteOptions<EntityProduct,ModelProduct>>(ids: TableIdentity[], options?: T): Promise<void>;
102
- mutate<T extends IModelMutateOptions<EntityProduct,ModelProduct>>(data?: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>, options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T>>;
103
- mutateBulk<T extends IModelMutateOptions<EntityProduct,ModelProduct>>(items: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>[], options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T>[]>;
104
- count<T extends IModelSelectCountParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<string | undefined>;
105
- increment<T extends IModelIncrementParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<number>;
106
- decrement<T extends IModelIncrementParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<number>;
107
- aggregate<T extends IModelSelectAggrParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
108
- group<T extends IModelSelectGroupParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityProduct, T>[]>;
109
- getById<T extends IModelGetOptions<EntityProduct,ModelProduct>>(id: TableIdentity, options?: T): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T> | undefined>;
110
- updateById<T extends IModelUpdateOptions<EntityProduct,ModelProduct>>(id: TableIdentity, data: TypeModelMutateRelationData<EntityProduct,ModelProduct, T>, options?: T): Promise<TypeModelMutateRelationData<EntityProduct,ModelProduct, T>>;
111
- deleteById<T extends IModelDeleteOptions<EntityProduct,ModelProduct>>(id: TableIdentity, options?: T): Promise<void>;
112
- getByName<T extends IModelGetOptions<EntityProduct,ModelProduct>>(name?: string, options?: T): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T> | undefined>;
113
- getByNameEqI<T extends IModelGetOptions<EntityProduct,ModelProduct>>(name?: string, options?: T): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T> | undefined>;
114
- selectByName<T extends IModelSelectParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(name?: string, params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T>[]>;
115
- selectByNameEqI<T extends IModelSelectParams<EntityProduct,ModelProduct,ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(name?: string, params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelRelationResult<EntityProduct, ModelProduct, T>[]>;
116
- }
117
- }
118
- declare module 'vona-module-a-orm' {
119
- export interface IModelClassRecord {
120
- 'test-rest:product': ModelProduct;
121
- }
122
- }
123
- /** model: end */
124
- /** service: begin */
125
- export * from '../service/product.ts';
126
-
127
- import 'vona-module-a-bean';
128
- declare module 'vona-module-a-bean' {
129
-
130
- export interface IServiceRecord {
131
- 'test-rest:product': never;
132
- }
133
-
134
-
135
- }
136
- declare module 'vona-module-test-rest' {
137
-
138
- export interface ServiceProduct {
139
- /** @internal */
140
- get scope(): ScopeModuleTestRest;
141
- }
142
-
143
- export interface ServiceProduct {
144
- get $beanFullName(): 'test-rest.service.product';
145
- get $onionName(): 'test-rest:product';
146
-
147
- }
148
- }
149
- /** service: end */
150
- /** service: begin */
151
- import type { ServiceProduct } from '../service/product.ts';
152
- export interface IModuleService {
153
- 'product': ServiceProduct;
154
- }
155
- /** service: end */
156
- /** service: begin */
157
-
158
- import 'vona';
159
- declare module 'vona' {
160
- export interface IBeanRecordGeneral {
161
- 'test-rest.service.product': ServiceProduct;
162
- }
163
- }
164
- /** service: end */
165
- /** meta: begin */
166
- export * from '../bean/meta.version.ts';
167
-
168
- import 'vona-module-a-meta';
169
- declare module 'vona-module-a-meta' {
170
-
171
- export interface IMetaRecord {
172
- 'test-rest:version': never;
173
- }
174
-
175
-
176
- }
177
- declare module 'vona-module-test-rest' {
178
-
179
- export interface MetaVersion {
180
- /** @internal */
181
- get scope(): ScopeModuleTestRest;
182
- }
183
-
184
- export interface MetaVersion {
185
- get $beanFullName(): 'test-rest.meta.version';
186
- get $onionName(): 'test-rest:version';
187
-
188
- }
189
- }
190
- /** meta: end */
191
- /** dto: begin */
192
- export * from '../dto/productCreate.tsx';
193
- export * from '../dto/productSelectReq.tsx';
194
- export * from '../dto/productSelectRes.tsx';
195
- export * from '../dto/productSelectResItem.tsx';
196
- export * from '../dto/productUpdate.tsx';
197
- export * from '../dto/productView.tsx';
198
- import type { IDtoOptionsProductCreate } from '../dto/productCreate.tsx';
199
- import type { IDtoOptionsProductSelectReq } from '../dto/productSelectReq.tsx';
200
- import type { IDtoOptionsProductSelectRes } from '../dto/productSelectRes.tsx';
201
- import type { IDtoOptionsProductSelectResItem } from '../dto/productSelectResItem.tsx';
202
- import type { IDtoOptionsProductUpdate } from '../dto/productUpdate.tsx';
203
- import type { IDtoOptionsProductView } from '../dto/productView.tsx';
204
- import 'vona-module-a-web';
205
- declare module 'vona-module-a-web' {
206
-
207
- export interface IDtoRecord {
208
- 'test-rest:productCreate': IDtoOptionsProductCreate;
209
- 'test-rest:productSelectReq': IDtoOptionsProductSelectReq;
210
- 'test-rest:productSelectRes': IDtoOptionsProductSelectRes;
211
- 'test-rest:productSelectResItem': IDtoOptionsProductSelectResItem;
212
- 'test-rest:productUpdate': IDtoOptionsProductUpdate;
213
- 'test-rest:productView': IDtoOptionsProductView;
214
- }
215
-
216
-
217
- }
218
- declare module 'vona-module-test-rest' {
219
-
220
- }
221
- /** dto: end */
222
- /** dto: begin */
223
- import type { DtoProductCreate } from '../dto/productCreate.tsx';
224
- import type { DtoProductSelectReq } from '../dto/productSelectReq.tsx';
225
- import type { DtoProductSelectRes } from '../dto/productSelectRes.tsx';
226
- import type { DtoProductSelectResItem } from '../dto/productSelectResItem.tsx';
227
- import type { DtoProductUpdate } from '../dto/productUpdate.tsx';
228
- import type { DtoProductView } from '../dto/productView.tsx';
229
- declare module 'vona-module-test-rest' {
230
-
231
- export interface IDtoOptionsProductCreate {
232
- fields?: TypeEntityOptionsFields<DtoProductCreate, IDtoOptionsProductCreate[TypeSymbolKeyFieldsMore]>;
233
- }
234
-
235
- export interface IDtoOptionsProductSelectReq {
236
- fields?: TypeEntityOptionsFields<DtoProductSelectReq, IDtoOptionsProductSelectReq[TypeSymbolKeyFieldsMore]>;
237
- }
238
-
239
- export interface IDtoOptionsProductSelectRes {
240
- fields?: TypeEntityOptionsFields<DtoProductSelectRes, IDtoOptionsProductSelectRes[TypeSymbolKeyFieldsMore]>;
241
- }
242
-
243
- export interface IDtoOptionsProductSelectResItem {
244
- fields?: TypeEntityOptionsFields<DtoProductSelectResItem, IDtoOptionsProductSelectResItem[TypeSymbolKeyFieldsMore]>;
245
- }
246
-
247
- export interface IDtoOptionsProductUpdate {
248
- fields?: TypeEntityOptionsFields<DtoProductUpdate, IDtoOptionsProductUpdate[TypeSymbolKeyFieldsMore]>;
249
- }
250
-
251
- export interface IDtoOptionsProductView {
252
- fields?: TypeEntityOptionsFields<DtoProductView, IDtoOptionsProductView[TypeSymbolKeyFieldsMore]>;
253
- }
254
- }
255
- /** dto: end */
256
- /** controller: begin */
257
- export * from '../controller/product.tsx';
258
- import type { IControllerOptionsProduct } from '../controller/product.tsx';
259
- import 'vona-module-a-web';
260
- declare module 'vona-module-a-web' {
261
-
262
- export interface IControllerRecord {
263
- 'test-rest:product': IControllerOptionsProduct;
264
- }
265
-
266
-
267
- }
268
- declare module 'vona-module-test-rest' {
269
-
270
- export interface ControllerProduct {
271
- /** @internal */
272
- get scope(): ScopeModuleTestRest;
273
- }
274
-
275
- export interface ControllerProduct {
276
- get $beanFullName(): 'test-rest.controller.product';
277
- get $onionName(): 'test-rest:product';
278
- get $onionOptions(): IControllerOptionsProduct;
279
- }
280
- }
281
- /** controller: end */
282
- /** controller: begin */
283
- // @ts-ignore ignore
284
- import type { ControllerProduct } from '../controller/product.tsx';
285
- declare module 'vona-module-test-rest' {
286
-
287
- export interface IControllerOptionsProduct {
288
- actions?: TypeControllerOptionsActions<ControllerProduct>;
289
- }
290
- }
291
- declare module 'vona-module-a-web' {
292
- export interface IApiPathPostRecord{
293
- '/test/rest/product': undefined;
294
- }
295
- export interface IApiPathGetRecord{
296
- '/test/rest/product': undefined;
297
- '/test/rest/product/:id': undefined;
298
- }
299
- export interface IApiPathPatchRecord{
300
- '/test/rest/product/:id': undefined;
301
- }
302
- export interface IApiPathDeleteRecord{
303
- '/test/rest/product/:id': undefined;
304
- }
305
-
306
- }
307
- import 'vona-module-a-openapi';
308
- declare module 'vona-module-a-openapi' {
309
- export interface IResourceRecord {
310
- 'test-rest:product': never;
311
- }
312
- }
313
-
314
- /** controller: end */
315
- /** ssrMenu: begin */
316
- export * from '../bean/ssrMenu.product.ts';
317
- import type { ISsrMenuOptionsProduct } from '../bean/ssrMenu.product.ts';
318
- import 'vona-module-a-ssr';
319
- declare module 'vona-module-a-ssr' {
320
-
321
- export interface ISsrMenuRecord {
322
- 'test-rest:product': ISsrMenuOptionsProduct;
323
- }
324
-
325
-
326
- }
327
- declare module 'vona-module-test-rest' {
328
-
329
- export interface SsrMenuProduct {
330
- /** @internal */
331
- get scope(): ScopeModuleTestRest;
332
- }
333
-
334
- export interface SsrMenuProduct {
335
- get $beanFullName(): 'test-rest.ssrMenu.product';
336
- get $onionName(): 'test-rest:product';
337
- get $onionOptions(): ISsrMenuOptionsProduct;
338
- }
339
- }
340
- /** ssrMenu: end */
341
- /** locale: begin */
342
- import { locales } from './locales.ts';
343
- /** locale: end */
344
- /** scope: begin */
345
- import { BeanScopeBase, type BeanScopeUtil, type TypeModuleLocales, type TypeLocaleBase } from 'vona';
346
- import { Scope } from 'vona-module-a-bean';
347
-
348
- @Scope()
349
- export class ScopeModuleTestRest extends BeanScopeBase {}
350
-
351
- export interface ScopeModuleTestRest {
352
- util: BeanScopeUtil;
353
- locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
354
- entity: IModuleEntity;
355
- model: IModuleModel;
356
- service: IModuleService;
357
- }
358
-
359
- import 'vona';
360
- declare module 'vona' {
361
- export interface IBeanScopeRecord {
362
- 'test-rest': ScopeModuleTestRest;
363
- }
364
-
365
- export interface IBeanScopeContainer {
366
- testRest: ScopeModuleTestRest;
367
- }
368
-
369
-
370
-
371
- export interface IBeanScopeLocale {
372
- 'test-rest': (typeof locales)[TypeLocaleBase];
373
- }
374
-
375
-
376
- }
377
- /** scope: end */
@@ -1,18 +0,0 @@
1
- import type { TypeLocaleBase } from 'vona';
2
-
3
- import { $makeLocaleMagic } from 'vona';
4
-
5
- import locale_en_us from '../config/locale/en-us.ts';
6
- import locale_zh_cn from '../config/locale/zh-cn.ts';
7
-
8
- export const locales = {
9
- 'en-us': locale_en_us,
10
- 'zh-cn': locale_zh_cn,
11
- };
12
-
13
- export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(
14
- key: K,
15
- ...args: any[]
16
- ): any {
17
- return $makeLocaleMagic(`test-rest::${key}`, ...args);
18
- }
@@ -1,2 +0,0 @@
1
- export const __ThisModule__ = 'test-rest';
2
- export { ScopeModuleTestRest as ScopeModule } from './index.ts';
@@ -1,49 +0,0 @@
1
- import type {
2
- IMetaVersionTest,
3
- IMetaVersionTestOptions,
4
- IMetaVersionUpdate,
5
- IMetaVersionUpdateOptions,
6
- } from 'vona-module-a-version';
7
-
8
- import { getRandomInt } from '@cabloy/utils';
9
- import { faker } from '@faker-js/faker';
10
- import { BeanBase } from 'vona';
11
- import { Meta } from 'vona-module-a-meta';
12
-
13
- import type { EntityProduct } from '../entity/product.tsx';
14
-
15
- @Meta()
16
- export class MetaVersion extends BeanBase implements IMetaVersionUpdate, IMetaVersionTest {
17
- async update(options: IMetaVersionUpdateOptions) {
18
- if (options.version === 1) {
19
- const entityProduct = this.scope.entity.product;
20
- await this.bean.model.createTable(entityProduct.$table, table => {
21
- table.basicFields();
22
- table.string(entityProduct.name, 50);
23
- table.string(entityProduct.description, 255);
24
- table.integer(entityProduct.price);
25
- table.int0(entityProduct.quantity);
26
- table.integer(entityProduct.amount);
27
- });
28
- }
29
- }
30
-
31
- async test(_options: IMetaVersionTestOptions): Promise<void> {
32
- const items: Partial<EntityProduct>[] = [];
33
- const now = Date.now();
34
- for (let i = 0; i < 100; i++) {
35
- const price = getRandomInt(1000, 50);
36
- const quantity = getRandomInt(10, 1);
37
- const amount = price * quantity;
38
- const createdAt = new Date(now - (100 - i) * 3600 * 1000);
39
- items.push({
40
- name: faker.commerce.productName(),
41
- price,
42
- quantity,
43
- amount,
44
- createdAt,
45
- });
46
- }
47
- await this.scope.model.product.insertBulk(items);
48
- }
49
- }
@@ -1,26 +0,0 @@
1
- import type { IDecoratorSsrMenuOptions } from 'vona-module-a-ssr';
2
- import type { ISsrSiteOptionsAdmin } from 'vona-module-basic-siteadmin';
3
-
4
- import { BeanBase } from 'vona';
5
- import { SsrMenu } from 'vona-module-a-ssr';
6
-
7
- import { $locale } from '../.metadata/locales.ts';
8
-
9
- export interface ISsrMenuOptionsProduct extends IDecoratorSsrMenuOptions<ISsrSiteOptionsAdmin> {}
10
-
11
- @SsrMenu<ISsrMenuOptionsProduct>({
12
- items: {
13
- product: {
14
- title: $locale('Product'),
15
- group: 'basic-siteadmin:management',
16
- link: 'presetResource',
17
- meta: {
18
- params: {
19
- resource: 'test-rest:product',
20
- },
21
- },
22
- },
23
- },
24
- site: 'basic-siteadmin:admin',
25
- })
26
- export class SsrMenuProduct extends BeanBase {}