cabloy 5.1.20 → 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 (225) hide show
  1. package/package.json +1 -1
  2. package/scripts/upgrade.ts +13 -4
  3. package/vona/pnpm-lock.yaml +60 -58
  4. package/vona/src/suite-vendor/a-auth/tsconfig.json +0 -3
  5. package/vona/src/suite-vendor/a-cabloy/tsconfig.json +0 -9
  6. package/vona/src/suite-vendor/a-captcha/tsconfig.json +0 -3
  7. package/vona/src/suite-vendor/a-vona/tsconfig.json +0 -3
  8. package/vona/src/suite-vendor/a-auth/modules/test-auth/package.json +0 -52
  9. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/index.ts +0 -74
  10. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/this.ts +0 -2
  11. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/controller/passport.ts +0 -19
  12. package/vona/src/suite-vendor/a-auth/modules/test-auth/src/index.ts +0 -1
  13. package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authOauth.test.ts +0 -55
  14. package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authSimple.test.ts +0 -52
  15. package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.build.json +0 -11
  16. package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.json +0 -7
  17. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/package.json +0 -60
  18. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/index.ts +0 -103
  19. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/this.ts +0 -2
  20. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/bean/meta.status.ts +0 -15
  21. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/controller/status.ts +0 -44
  22. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/index.ts +0 -1
  23. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/datasource.test.ts +0 -51
  24. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/socket.test.ts +0 -48
  25. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/status.test.ts +0 -10
  26. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.build.json +0 -11
  27. package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.json +0 -7
  28. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/package.json +0 -63
  29. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/index.ts +0 -377
  30. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/locales.ts +0 -18
  31. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/this.ts +0 -2
  32. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/meta.version.ts +0 -49
  33. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/ssrMenu.product.ts +0 -26
  34. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/en-us.ts +0 -15
  35. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/zh-cn.ts +0 -15
  36. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/controller/product.tsx +0 -64
  37. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productCreate.tsx +0 -40
  38. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectReq.tsx +0 -25
  39. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectRes.tsx +0 -11
  40. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectResItem.tsx +0 -39
  41. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productUpdate.tsx +0 -30
  42. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productView.tsx +0 -25
  43. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/entity/product.tsx +0 -65
  44. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/index.ts +0 -2
  45. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/model/product.ts +0 -10
  46. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/service/product.ts +0 -37
  47. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/permission.test.ts +0 -19
  48. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/product.test.ts +0 -65
  49. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.build.json +0 -11
  50. package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.json +0 -7
  51. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/package.json +0 -60
  52. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/index.ts +0 -161
  53. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/locales.ts +0 -18
  54. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/this.ts +0 -2
  55. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/en-us.ts +0 -13
  56. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/zh-cn.ts +0 -11
  57. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolOne.ts +0 -43
  58. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolTwo.ts +0 -37
  59. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testBody.ts +0 -10
  60. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testDetail.ts +0 -21
  61. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testParams.ts +0 -13
  62. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testQuery.ts +0 -12
  63. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testResult.tsx +0 -159
  64. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/index.ts +0 -2
  65. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.build.json +0 -11
  66. package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.json +0 -7
  67. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/package.json +0 -52
  68. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/index.ts +0 -99
  69. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/this.ts +0 -2
  70. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/controller/captcha.ts +0 -18
  71. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/dto/signin.ts +0 -20
  72. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/index.ts +0 -1
  73. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/test/captcha.test.ts +0 -148
  74. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.build.json +0 -11
  75. package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.json +0 -7
  76. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/img/vona.png +0 -0
  77. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.png +0 -0
  78. package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.svg +0 -3
  79. package/vona/src/suite-vendor/a-vona/modules/test-vona/package.json +0 -61
  80. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/index.ts +0 -2181
  81. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/locales.ts +0 -18
  82. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/this.ts +0 -2
  83. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.regExp.ts +0 -34
  84. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.simple.ts +0 -80
  85. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aopMethod.test.ts +0 -63
  86. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/bean.testCtx.ts +0 -59
  87. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/broadcast.test.ts +0 -24
  88. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheMem.test.ts +0 -7
  89. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.post.ts +0 -11
  90. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.test.ts +0 -7
  91. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/event.helloEcho.ts +0 -13
  92. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/eventListener.helloEcho.ts +0 -24
  93. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.asset.ts +0 -10
  94. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.static.ts +0 -7
  95. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.version.ts +0 -108
  96. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/queue.test.ts +0 -25
  97. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test.ts +0 -13
  98. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test3.ts +0 -13
  99. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/serializerTransform.email.ts +0 -35
  100. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.caching.ts +0 -36
  101. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.test.ts +0 -36
  102. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/config.ts +0 -5
  103. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/en-us.ts +0 -21
  104. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/zh-cn.ts +0 -19
  105. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/bean.ts +0 -103
  106. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheMem.ts +0 -64
  107. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheRedis.ts +0 -56
  108. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/dtoTest.ts +0 -61
  109. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/guardPassport.ts +0 -26
  110. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/onion.ts +0 -103
  111. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/order.ts +0 -56
  112. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/passport.ts +0 -49
  113. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/performAction.ts +0 -19
  114. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/post.ts +0 -59
  115. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/queue.ts +0 -27
  116. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/serializer.ts +0 -40
  117. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/summer.ts +0 -130
  118. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/tail.ts +0 -33
  119. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/transaction.ts +0 -30
  120. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/upload.ts +0 -61
  121. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/categoryTree.ts +0 -9
  122. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderCreate.ts +0 -13
  123. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQuery.ts +0 -25
  124. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQueryPage.ts +0 -24
  125. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectRes.ts +0 -11
  126. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectResItem.ts +0 -11
  127. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderUpdate.ts +0 -13
  128. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postAggregate.ts +0 -17
  129. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postCreate.ts +0 -11
  130. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postGroup.ts +0 -14
  131. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectReq.ts +0 -36
  132. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectRes.ts +0 -11
  133. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectResItem.tsx +0 -28
  134. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/profile.ts +0 -15
  135. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/roleLazy.ts +0 -17
  136. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerArray.ts +0 -39
  137. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerLazy.ts +0 -31
  138. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerSimple.ts +0 -112
  139. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/user.ts +0 -21
  140. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userCreate.ts +0 -11
  141. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userLazy.ts +0 -20
  142. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userUpdate.ts +0 -9
  143. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/category.ts +0 -16
  144. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/order.ts +0 -21
  145. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/post.ts +0 -21
  146. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/postContent.ts +0 -16
  147. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/product.ts +0 -27
  148. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/role.ts +0 -12
  149. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/roleUser.ts +0 -16
  150. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/test.ts +0 -24
  151. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/user.ts +0 -18
  152. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/index.ts +0 -4
  153. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/index.ts +0 -1
  154. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/serializer.ts +0 -9
  155. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/category.ts +0 -22
  156. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/categoryChain.ts +0 -23
  157. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/order.ts +0 -33
  158. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/orderStats.ts +0 -29
  159. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/post.ts +0 -23
  160. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/postContent.ts +0 -23
  161. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/product.ts +0 -10
  162. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/role.ts +0 -23
  163. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/roleUser.ts +0 -10
  164. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/test.ts +0 -10
  165. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/testDynamicTable.ts +0 -23
  166. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/user.ts +0 -30
  167. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStats.ts +0 -22
  168. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStatsGroup.ts +0 -36
  169. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/aopMethod.ts +0 -38
  170. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/caching.ts +0 -89
  171. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/category.ts +0 -153
  172. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/order.ts +0 -67
  173. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/post.ts +0 -280
  174. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/product.ts +0 -5
  175. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/test.ts +0 -9
  176. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testApp.ts +0 -13
  177. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testClass.ts +0 -15
  178. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testData.ts +0 -71
  179. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/transaction.ts +0 -20
  180. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/user.ts +0 -124
  181. package/vona/src/suite-vendor/a-vona/modules/test-vona/src/types/index.ts +0 -6
  182. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/aopMethod.test.ts +0 -21
  183. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/bean.test.ts +0 -16
  184. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/broadcast.test.ts +0 -17
  185. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheMem.test.ts +0 -10
  186. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheRedis.test.ts +0 -10
  187. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/caching.test.ts +0 -61
  188. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/summer.test.ts +0 -10
  189. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/database.test.ts +0 -132
  190. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoAggregate.test.ts +0 -44
  191. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGet.test.ts +0 -82
  192. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGroup.test.ts +0 -44
  193. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoLazy.test.ts +0 -53
  194. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoMutate.test.ts +0 -56
  195. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoQuery.test.ts +0 -70
  196. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelAggregate.test.ts +0 -222
  197. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelCache.test.ts +0 -37
  198. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGeneral.test.ts +0 -18
  199. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGroup.test.ts +0 -248
  200. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelMagic.test.ts +0 -37
  201. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelations.test.ts +0 -215
  202. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsJoins.test.ts +0 -58
  203. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsMutate.test.ts +0 -436
  204. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelWhere.test.ts +0 -173
  205. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/orm.test.ts +0 -22
  206. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/transaction.test.ts +0 -142
  207. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/event.test.ts +0 -14
  208. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/guardPassport.test.ts +0 -48
  209. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/instance.test.ts +0 -35
  210. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/jwt.test.ts +0 -28
  211. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/locale.test.ts +0 -64
  212. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/mail.test.ts +0 -14
  213. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/passport.test.ts +0 -69
  214. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/queue.test.ts +0 -11
  215. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/runtime.test.ts +0 -24
  216. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/serializer.test.ts +0 -82
  217. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/static.test.ts +0 -22
  218. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/tail.test.ts +0 -21
  219. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/upload.test.ts +0 -75
  220. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/cabloyUtils.test.ts +0 -19
  221. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/celjs.test.ts +0 -64
  222. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/mappedTypes.test.ts +0 -73
  223. package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/performAction.test.ts +0 -28
  224. package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.build.json +0 -11
  225. package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.json +0 -7
@@ -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 {}
@@ -1,15 +0,0 @@
1
- export default {
2
- CreateProduct: 'Create Product',
3
- UpdateProduct: 'Update Product',
4
- ProductInfo: 'Product Info',
5
- Name: 'Name',
6
- Description: 'Description',
7
- Operations: 'Operations',
8
- Product: 'Product',
9
- Admin: 'Admin',
10
- Price: 'Price',
11
- Quantity: 'Quantity',
12
- Amount: 'Amount',
13
- ZodErrorStringMin: 'Minimum {{minimum}} characters',
14
- ZodErrorNumberMin: 'Cannot be less than {{minimum}}',
15
- };
@@ -1,15 +0,0 @@
1
- export default {
2
- CreateProduct: '创建产品',
3
- UpdateProduct: '更新产品',
4
- ProductInfo: '产品信息',
5
- Name: '名称',
6
- Description: '描述',
7
- Operations: '操作',
8
- Product: '产品',
9
- Admin: '管理',
10
- Price: '价格',
11
- Quantity: '数量',
12
- Amount: '金额',
13
- ZodErrorStringMin: '最少{{minimum}}个字符',
14
- ZodErrorNumberMin: '不能小于{{minimum}}',
15
- };
@@ -1,64 +0,0 @@
1
- import type { TableIdentity } from 'table-identity';
2
- import type { IQueryParams } from 'vona-module-a-orm';
3
- import type { IDecoratorControllerOptions } from 'vona-module-a-web';
4
-
5
- // import React from 'react';
6
- import { BeanBase } from 'vona';
7
- import { Api, Resource, v } from 'vona-module-a-openapiutils';
8
- import { Ssr } from 'vona-module-a-ssr';
9
- import { Passport } from 'vona-module-a-user';
10
- import { Arg, Controller, Web } from 'vona-module-a-web';
11
-
12
- import type { ModelProduct } from '../model/product.ts';
13
-
14
- // import { PPDevuiRestpage, PPDevuiRestpageEntry } from 'zova-rest-cabloy-basic-admin';
15
- import { DtoProductCreate } from '../dto/productCreate.tsx';
16
- import { DtoProductSelectReq } from '../dto/productSelectReq.tsx';
17
- import { DtoProductSelectRes } from '../dto/productSelectRes.tsx';
18
- import { DtoProductUpdate } from '../dto/productUpdate.tsx';
19
- import { DtoProductView } from '../dto/productView.tsx';
20
-
21
- export interface IControllerOptionsProduct extends IDecoratorControllerOptions {}
22
-
23
- @Controller<IControllerOptionsProduct>('product')
24
- @Resource()
25
- export class ControllerProduct extends BeanBase {
26
- @Web.post()
27
- @Api.body(v.tableIdentity())
28
- @Passport.roleName({ name: 'admin' })
29
- async create(@Arg.body() product: DtoProductCreate): Promise<TableIdentity> {
30
- return (await this.scope.service.product.create(product)).id;
31
- }
32
-
33
- @Web.get()
34
- @Api.body(DtoProductSelectRes)
35
- @Ssr.redirect('basic-siteadmin:admin', '/rest/resource/:resource', {
36
- params: { resource: 'test-rest:product' },
37
- })
38
- async select(
39
- @Arg.filter(DtoProductSelectReq) params: IQueryParams<ModelProduct>,
40
- ): Promise<DtoProductSelectRes> {
41
- return await this.scope.service.product.select(params);
42
- }
43
-
44
- @Web.get(':id')
45
- @Api.body(v.optional(), v.object(DtoProductView))
46
- async view(
47
- @Arg.param('id', v.tableIdentity()) id: TableIdentity,
48
- ): Promise<DtoProductView | undefined> {
49
- return await this.scope.service.product.view(id);
50
- }
51
-
52
- @Web.patch(':id')
53
- async update(
54
- @Arg.param('id', v.tableIdentity()) id: TableIdentity,
55
- @Arg.body() product: DtoProductUpdate,
56
- ) {
57
- return await this.scope.service.product.update(id, product);
58
- }
59
-
60
- @Web.delete(':id')
61
- async delete(@Arg.param('id', v.tableIdentity()) id: TableIdentity) {
62
- return await this.scope.service.product.delete(id);
63
- }
64
- }
@@ -1,40 +0,0 @@
1
- import type { IDecoratorDtoOptions } from 'vona-module-a-web';
2
-
3
- import { $makeSchema, v } from 'vona-module-a-openapiutils';
4
- import { $Dto } from 'vona-module-a-orm';
5
- import { Dto } from 'vona-module-a-web';
6
- import z from 'zod';
7
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
8
-
9
- import { $locale } from '../.metadata/locales.ts';
10
- import { ModelProduct } from '../model/product.ts';
11
-
12
- export interface IDtoOptionsProductCreate extends IDecoratorDtoOptions<'_test'> {}
13
-
14
- @Dto<IDtoOptionsProductCreate>({
15
- openapi: { title: $locale('CreateProduct') },
16
- fields: {
17
- _test: $makeSchema(
18
- v.title('Test'),
19
- ZovaRender.field('basic-input:formFieldInput'),
20
- v.optional(),
21
- z.string(),
22
- ),
23
- },
24
- blocks: [
25
- ZovaRender.block('basic-pageentry:blockPageEntry', {
26
- blocks: [
27
- ZovaRender.block('basic-pageentry:blockForm'),
28
- ZovaRender.block('basic-pageentry:blockToolbarRow', {
29
- actions: [
30
- ZovaRender.formActionRow('basic-form:actionSubmit', {
31
- permission: { actionInherit: 'update', formScene: ['create', 'edit'] },
32
- }),
33
- ZovaRender.formActionRow('basic-form:actionBack', { permission: { public: true } }),
34
- ],
35
- }),
36
- ],
37
- }),
38
- ],
39
- })
40
- export class DtoProductCreate extends $Dto.create(() => ModelProduct) {}
@@ -1,25 +0,0 @@
1
- import type { IDecoratorDtoOptions } from 'vona-module-a-web';
2
-
3
- import { $makeSchema, v } from 'vona-module-a-openapiutils';
4
- import { $Dto } from 'vona-module-a-orm';
5
- import { Dto } from 'vona-module-a-web';
6
- import z from 'zod';
7
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
8
-
9
- import { EntityProduct } from '../entity/product.tsx';
10
-
11
- export interface IDtoOptionsProductSelectReq extends IDecoratorDtoOptions {}
12
-
13
- @Dto<IDtoOptionsProductSelectReq>({
14
- openapi: { filter: { table: 'testRestProduct' } },
15
- fields: {
16
- name: $makeSchema(v.optional(), z.string()),
17
- createdAt: $makeSchema(
18
- ZovaRender.field('basic-date:formFieldDateRange'),
19
- v.filterTransform('a-web:dateRange'),
20
- v.optional(),
21
- z.string(),
22
- ),
23
- },
24
- })
25
- export class DtoProductSelectReq extends $Dto.queryPage(EntityProduct, ['name', 'createdAt']) {}
@@ -1,11 +0,0 @@
1
- import type { IDecoratorDtoOptions } from 'vona-module-a-web';
2
-
3
- import { $Dto } from 'vona-module-a-orm';
4
- import { Dto } from 'vona-module-a-web';
5
-
6
- import { DtoProductSelectResItem } from './productSelectResItem.tsx';
7
-
8
- export interface IDtoOptionsProductSelectRes extends IDecoratorDtoOptions {}
9
-
10
- @Dto<IDtoOptionsProductSelectRes>()
11
- export class DtoProductSelectRes extends $Dto.listAndCount(DtoProductSelectResItem) {}