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,39 +0,0 @@
1
- import type { IDecoratorDtoOptions } from 'vona-module-a-web';
2
-
3
- import { Api, v } from 'vona-module-a-openapiutils';
4
- import { $Dto } from 'vona-module-a-orm';
5
- import { Dto } from 'vona-module-a-web';
6
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
7
-
8
- import { $locale } from '../.metadata/locales.ts';
9
- import { ModelProduct } from '../model/product.ts';
10
-
11
- export interface IDtoOptionsProductSelectResItem extends IDecoratorDtoOptions {}
12
-
13
- @Dto<IDtoOptionsProductSelectResItem>({
14
- blocks: [
15
- ZovaRender.block('basic-page:blockPage', {
16
- blocks: [
17
- ZovaRender.block('basic-page:blockFilter'),
18
- ZovaRender.block('basic-page:blockToolbarBulk', {
19
- actions: [ZovaRender.tableActionBulk('basic-table:actionCreate')],
20
- }),
21
- ZovaRender.block('basic-page:blockTable'),
22
- ZovaRender.block('basic-page:blockPager'),
23
- ],
24
- }),
25
- ],
26
- })
27
- export class DtoProductSelectResItem extends $Dto.get(() => ModelProduct) {
28
- @Api.field(
29
- v.title($locale('Operations')),
30
- ZovaRender.order(1, 'max'),
31
- ZovaRender.cell('basic-table:actionOperationsRow', {
32
- actions: [
33
- ZovaRender.tableActionRow('basic-table:actionUpdate'),
34
- ZovaRender.tableActionRow('basic-table:actionDelete'),
35
- ],
36
- }),
37
- )
38
- _operationsRow?: unknown;
39
- }
@@ -1,30 +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
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
6
-
7
- import { $locale } from '../.metadata/locales.ts';
8
- import { ModelProduct } from '../model/product.ts';
9
-
10
- export interface IDtoOptionsProductUpdate extends IDecoratorDtoOptions {}
11
-
12
- @Dto<IDtoOptionsProductUpdate>({
13
- openapi: { title: $locale('UpdateProduct') },
14
- blocks: [
15
- ZovaRender.block('basic-pageentry:blockPageEntry', {
16
- blocks: [
17
- ZovaRender.block('basic-pageentry:blockForm'),
18
- ZovaRender.block('basic-pageentry:blockToolbarRow', {
19
- actions: [
20
- ZovaRender.formActionRow('basic-form:actionSubmit', {
21
- permission: { actionInherit: 'update', formScene: ['create', 'edit'] },
22
- }),
23
- ZovaRender.formActionRow('basic-form:actionBack', { permission: { public: true } }),
24
- ],
25
- }),
26
- ],
27
- }),
28
- ],
29
- })
30
- export class DtoProductUpdate extends $Dto.update(() => ModelProduct) {}
@@ -1,25 +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
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
6
-
7
- import { ModelProduct } from '../model/product.ts';
8
-
9
- export interface IDtoOptionsProductView extends IDecoratorDtoOptions {}
10
-
11
- @Dto<IDtoOptionsProductView>({
12
- blocks: [
13
- ZovaRender.block('basic-pageentry:blockPageEntry', {
14
- blocks: [
15
- ZovaRender.block('basic-pageentry:blockForm'),
16
- ZovaRender.block('basic-pageentry:blockToolbarRow', {
17
- actions: [
18
- ZovaRender.formActionRow('basic-form:actionBack', { permission: { public: true } }),
19
- ],
20
- }),
21
- ],
22
- }),
23
- ],
24
- })
25
- export class DtoProductView extends $Dto.get(() => ModelProduct) {}
@@ -1,65 +0,0 @@
1
- import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
2
-
3
- import { $makeMetadata, $makeSchema, Api, v } from 'vona-module-a-openapiutils';
4
- import { Entity, EntityBase } from 'vona-module-a-orm';
5
- import z from 'zod';
6
- import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
7
-
8
- import { $locale } from '../.metadata/locales.ts';
9
-
10
- export interface IEntityOptionsProduct extends IDecoratorEntityOptions<'_custom'> {}
11
-
12
- @Entity<IEntityOptionsProduct>('testRestProduct', {
13
- openapi: { title: $locale('ProductInfo') },
14
- fields: {
15
- id: $makeMetadata(ZovaRender.order(1, 'core')),
16
- iid: $makeMetadata(ZovaRender.visible(false)),
17
- deleted: $makeMetadata(ZovaRender.visible(false)),
18
- createdAt: $makeMetadata(
19
- ZovaRender.order(-2, 'max'),
20
- ZovaRender.field('basic-date:formFieldDate'),
21
- ZovaRender.cell('basic-date:date'),
22
- ),
23
- updatedAt: $makeMetadata(
24
- ZovaRender.order(-1, 'max'),
25
- ZovaRender.field('basic-date:formFieldDate'),
26
- ZovaRender.cell('basic-date:date'),
27
- ),
28
- _custom: $makeSchema(v.title('Custom'), v.optional(), z.string()),
29
- },
30
- })
31
- export class EntityProduct extends EntityBase {
32
- @Api.field(
33
- v.title($locale('Name')),
34
- v.min(3, $locale('ZodErrorStringMin')),
35
- v.required(),
36
- ZovaRender.order(1),
37
- ZovaRender.cell('basic-table:actionView'),
38
- )
39
- name: string;
40
-
41
- @Api.field(v.title($locale('Description')), v.optional(), ZovaRender.order(2))
42
- description?: string;
43
-
44
- @Api.field(
45
- v.title($locale('Price')),
46
- v.min(0, $locale('ZodErrorNumberMin')),
47
- v.required(),
48
- ZovaRender.order(3),
49
- ZovaRender.field('basic-currency:formFieldCurrency'),
50
- ZovaRender.cell('basic-currency:currency'),
51
- )
52
- price: number;
53
-
54
- @Api.field(v.title($locale('Quantity')), v.required(), ZovaRender.order(4))
55
- quantity: number;
56
-
57
- @Api.field(
58
- v.title($locale('Amount')),
59
- v.required(),
60
- ZovaRender.order(5),
61
- ZovaRender.field('basic-currency:formFieldCurrency'),
62
- ZovaRender.cell('basic-currency:currency'),
63
- )
64
- amount: number;
65
- }
@@ -1,2 +0,0 @@
1
- export * from './.metadata/index.ts';
2
- export * from './.metadata/locales.ts';
@@ -1,10 +0,0 @@
1
- import type { IDecoratorModelOptions } from 'vona-module-a-orm';
2
-
3
- import { BeanModelBase, Model } from 'vona-module-a-orm';
4
-
5
- import { EntityProduct } from '../entity/product.tsx';
6
-
7
- export interface IModelOptionsProduct extends IDecoratorModelOptions<EntityProduct> {}
8
-
9
- @Model<IModelOptionsProduct>({ entity: EntityProduct })
10
- export class ModelProduct extends BeanModelBase<EntityProduct> {}
@@ -1,37 +0,0 @@
1
- import type { TableIdentity } from 'table-identity';
2
- import type { IQueryParams } from 'vona-module-a-orm';
3
-
4
- import { BeanBase } from 'vona';
5
- import { Service } from 'vona-module-a-bean';
6
-
7
- import type { DtoProductCreate } from '../dto/productCreate.tsx';
8
- import type { DtoProductSelectRes } from '../dto/productSelectRes.tsx';
9
- import type { DtoProductUpdate } from '../dto/productUpdate.tsx';
10
- import type { DtoProductView } from '../dto/productView.tsx';
11
- import type { EntityProduct } from '../entity/product.tsx';
12
- import type { ModelProduct } from '../model/product.ts';
13
-
14
- @Service()
15
- export class ServiceProduct extends BeanBase {
16
- async create(product: DtoProductCreate): Promise<EntityProduct> {
17
- return await this.scope.model.product.insert(product);
18
- }
19
-
20
- async select(params?: IQueryParams<ModelProduct>): Promise<DtoProductSelectRes> {
21
- return await this.scope.model.product.selectAndCount({
22
- ...params,
23
- });
24
- }
25
-
26
- async view(id: TableIdentity): Promise<DtoProductView | undefined> {
27
- return await this.scope.model.product.getById(id);
28
- }
29
-
30
- async update(id: TableIdentity, product: DtoProductUpdate) {
31
- return await this.scope.model.product.updateById(id, product);
32
- }
33
-
34
- async delete(id: TableIdentity) {
35
- return await this.scope.model.product.deleteById(id);
36
- }
37
- }
@@ -1,19 +0,0 @@
1
- import assert from 'node:assert';
2
- import { describe, it } from 'node:test';
3
- import { app } from 'vona-mock';
4
-
5
- describe('permission.test.ts', () => {
6
- it('action:permission:anonymous', async () => {
7
- await app.bean.executor.mockCtx(async () => {
8
- const permissions = await app.bean.permission.getPermissionsDefault('test-rest:product');
9
- assert.equal(permissions?.actions?.create, false);
10
- });
11
- });
12
- it('action:permission:admin', async () => {
13
- await app.bean.executor.mockCtx(async () => {
14
- await app.bean.passport.signinMock();
15
- const permissions = await app.bean.permission.getPermissionsDefault('test-rest:product');
16
- assert.equal(permissions?.actions?.create, true);
17
- });
18
- });
19
- });
@@ -1,65 +0,0 @@
1
- import type {
2
- DtoProductCreate,
3
- DtoProductSelectRes,
4
- DtoProductUpdate,
5
- EntityProduct,
6
- } from 'vona-module-test-rest';
7
-
8
- import assert from 'node:assert';
9
- import { describe, it } from 'node:test';
10
- import { app } from 'vona-mock';
11
-
12
- describe('product.test.ts', () => {
13
- it('action:product', async () => {
14
- await app.bean.executor.mockCtx(async () => {
15
- // data
16
- const data: DtoProductCreate = {
17
- name: '__Tom__',
18
- description: 'This is a test',
19
- price: 0,
20
- quantity: 0,
21
- amount: 0,
22
- };
23
- const dataUpdate: DtoProductUpdate = {
24
- ...data,
25
- name: '__TomNew__',
26
- };
27
- // login
28
- await app.bean.passport.signinMock();
29
- // create
30
- const productId = await app.bean.executor.performAction('post', '/test/rest/product', {
31
- body: data,
32
- });
33
- assert.equal(!!productId, true);
34
- // findMany
35
- const queryRes: DtoProductSelectRes = await app.bean.executor.performAction(
36
- 'get',
37
- '/test/rest/product',
38
- );
39
- assert.equal(queryRes.list.findIndex(item => item.name === data.name) > -1, true);
40
- // update
41
- await app.bean.executor.performAction('patch', '/test/rest/product/:id', {
42
- params: { id: productId },
43
- body: dataUpdate,
44
- });
45
- // findOne
46
- let product: EntityProduct = await app.bean.executor.performAction(
47
- 'get',
48
- '/test/rest/product/:id',
49
- { params: { id: productId } },
50
- );
51
- assert.equal(product.name, dataUpdate.name);
52
- // delete
53
- await app.bean.executor.performAction('delete', '/test/rest/product/:id', {
54
- params: { id: product.id },
55
- });
56
- // findOne
57
- product = await app.bean.executor.performAction('get', '/test/rest/product/:id', {
58
- params: { id: product.id },
59
- });
60
- assert.equal(product, undefined);
61
- // logout
62
- await app.bean.passport.signout();
63
- });
64
- });
65
- });
@@ -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,60 +0,0 @@
1
- {
2
- "name": "vona-module-test-ssr",
3
- "version": "5.1.16",
4
- "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
- "description": "",
6
- "keywords": [
7
- "Vona Module"
8
- ],
9
- "author": "",
10
- "files": [
11
- "assets",
12
- "dist",
13
- "src",
14
- "zovaRest"
15
- ],
16
- "type": "module",
17
- "exports": {
18
- ".": {
19
- "types": [
20
- "./src/index.ts",
21
- "./dist/index.d.ts"
22
- ],
23
- "import": "./src/index.ts",
24
- "default": "./dist/index.js"
25
- },
26
- "./package.json": "./package.json"
27
- },
28
- "scripts": {
29
- "clean": "rimraf dist tsconfig.build.tsbuildinfo",
30
- "tsc:publish": "npm run clean && vona :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
31
- "prepublishOnly": "npm run tsc:publish",
32
- "prepack": "clean-package",
33
- "postpack": "clean-package restore && npm run clean"
34
- },
35
- "devDependencies": {
36
- "clean-package": "^2.2.0",
37
- "rimraf": "^6.1.3"
38
- },
39
- "clean-package": {
40
- "indent": 2,
41
- "remove": [
42
- "clean-package",
43
- "exports.\\..import"
44
- ]
45
- },
46
- "title": "test-ssr",
47
- "vonaModule": {
48
- "dependencies": {
49
- "a-cabloy": "5.0.0"
50
- },
51
- "capabilities": {
52
- "meta": {
53
- "mode": [
54
- "dev",
55
- "test"
56
- ]
57
- }
58
- }
59
- }
60
- }
@@ -1,161 +0,0 @@
1
- // eslint-disable
2
- import type { TypeSymbolKeyFieldsMore } from 'vona-module-a-orm';
3
- import type { TypeEntityOptionsFields,TypeControllerOptionsActions } from 'vona-module-a-openapi';
4
- /** dto: begin */
5
- export * from '../dto/testBody.ts';
6
- export * from '../dto/testDetail.ts';
7
- export * from '../dto/testParams.ts';
8
- export * from '../dto/testQuery.ts';
9
- export * from '../dto/testResult.tsx';
10
- import type { IDtoOptionsTestBody } from '../dto/testBody.ts';
11
- import type { IDtoOptionsTestDetail } from '../dto/testDetail.ts';
12
- import type { IDtoOptionsTestParams } from '../dto/testParams.ts';
13
- import type { IDtoOptionsTestQuery } from '../dto/testQuery.ts';
14
- import type { IDtoOptionsTestResult } from '../dto/testResult.tsx';
15
- import 'vona-module-a-web';
16
- declare module 'vona-module-a-web' {
17
-
18
- export interface IDtoRecord {
19
- 'test-ssr:testBody': IDtoOptionsTestBody;
20
- 'test-ssr:testDetail': IDtoOptionsTestDetail;
21
- 'test-ssr:testParams': IDtoOptionsTestParams;
22
- 'test-ssr:testQuery': IDtoOptionsTestQuery;
23
- 'test-ssr:testResult': IDtoOptionsTestResult;
24
- }
25
-
26
-
27
- }
28
- declare module 'vona-module-test-ssr' {
29
-
30
- }
31
- /** dto: end */
32
- /** dto: begin */
33
- import type { DtoTestBody } from '../dto/testBody.ts';
34
- import type { DtoTestDetail } from '../dto/testDetail.ts';
35
- import type { DtoTestParams } from '../dto/testParams.ts';
36
- import type { DtoTestQuery } from '../dto/testQuery.ts';
37
- import type { DtoTestResult } from '../dto/testResult.tsx';
38
- declare module 'vona-module-test-ssr' {
39
-
40
- export interface IDtoOptionsTestBody {
41
- fields?: TypeEntityOptionsFields<DtoTestBody, IDtoOptionsTestBody[TypeSymbolKeyFieldsMore]>;
42
- }
43
-
44
- export interface IDtoOptionsTestDetail {
45
- fields?: TypeEntityOptionsFields<DtoTestDetail, IDtoOptionsTestDetail[TypeSymbolKeyFieldsMore]>;
46
- }
47
-
48
- export interface IDtoOptionsTestParams {
49
- fields?: TypeEntityOptionsFields<DtoTestParams, IDtoOptionsTestParams[TypeSymbolKeyFieldsMore]>;
50
- }
51
-
52
- export interface IDtoOptionsTestQuery {
53
- fields?: TypeEntityOptionsFields<DtoTestQuery, IDtoOptionsTestQuery[TypeSymbolKeyFieldsMore]>;
54
- }
55
-
56
- export interface IDtoOptionsTestResult {
57
- fields?: TypeEntityOptionsFields<DtoTestResult, IDtoOptionsTestResult[TypeSymbolKeyFieldsMore]>;
58
- }
59
- }
60
- /** dto: end */
61
- /** controller: begin */
62
- export * from '../controller/toolOne.ts';
63
- export * from '../controller/toolTwo.ts';
64
- import type { IControllerOptionsToolOne } from '../controller/toolOne.ts';
65
- import type { IControllerOptionsToolTwo } from '../controller/toolTwo.ts';
66
- import 'vona-module-a-web';
67
- declare module 'vona-module-a-web' {
68
-
69
- export interface IControllerRecord {
70
- 'test-ssr:toolOne': IControllerOptionsToolOne;
71
- 'test-ssr:toolTwo': IControllerOptionsToolTwo;
72
- }
73
-
74
-
75
- }
76
- declare module 'vona-module-test-ssr' {
77
-
78
- export interface ControllerToolOne {
79
- /** @internal */
80
- get scope(): ScopeModuleTestSsr;
81
- }
82
-
83
- export interface ControllerToolOne {
84
- get $beanFullName(): 'test-ssr.controller.toolOne';
85
- get $onionName(): 'test-ssr:toolOne';
86
- get $onionOptions(): IControllerOptionsToolOne;
87
- }
88
-
89
- export interface ControllerToolTwo {
90
- /** @internal */
91
- get scope(): ScopeModuleTestSsr;
92
- }
93
-
94
- export interface ControllerToolTwo {
95
- get $beanFullName(): 'test-ssr.controller.toolTwo';
96
- get $onionName(): 'test-ssr:toolTwo';
97
- get $onionOptions(): IControllerOptionsToolTwo;
98
- }
99
- }
100
- /** controller: end */
101
- /** controller: begin */
102
- // @ts-ignore ignore
103
- import type { ControllerToolOne } from '../controller/toolOne.ts';
104
- // @ts-ignore ignore
105
- import type { ControllerToolTwo } from '../controller/toolTwo.ts';
106
- declare module 'vona-module-test-ssr' {
107
-
108
- export interface IControllerOptionsToolOne {
109
- actions?: TypeControllerOptionsActions<ControllerToolOne>;
110
- }
111
-
112
- export interface IControllerOptionsToolTwo {
113
- actions?: TypeControllerOptionsActions<ControllerToolTwo>;
114
- }
115
- }
116
- declare module 'vona-module-a-web' {
117
- export interface IApiPathGetRecord{
118
- '/test/ssr/toolOne/test/:id?': undefined;
119
- '/test/ssr/toolTwo/test/:id?': undefined;
120
- }
121
- export interface IApiPathPostRecord{
122
- '/test/ssr/toolOne/test/:id?': undefined;
123
- }
124
-
125
- }
126
-
127
- /** controller: end */
128
- /** locale: begin */
129
- import { locales } from './locales.ts';
130
- /** locale: end */
131
- /** scope: begin */
132
- import { BeanScopeBase, type BeanScopeUtil, type TypeModuleLocales, type TypeLocaleBase } from 'vona';
133
- import { Scope } from 'vona-module-a-bean';
134
-
135
- @Scope()
136
- export class ScopeModuleTestSsr extends BeanScopeBase {}
137
-
138
- export interface ScopeModuleTestSsr {
139
- util: BeanScopeUtil;
140
- locale: TypeModuleLocales<(typeof locales)[TypeLocaleBase]>;
141
- }
142
-
143
- import 'vona';
144
- declare module 'vona' {
145
- export interface IBeanScopeRecord {
146
- 'test-ssr': ScopeModuleTestSsr;
147
- }
148
-
149
- export interface IBeanScopeContainer {
150
- testSsr: ScopeModuleTestSsr;
151
- }
152
-
153
-
154
-
155
- export interface IBeanScopeLocale {
156
- 'test-ssr': (typeof locales)[TypeLocaleBase];
157
- }
158
-
159
-
160
- }
161
- /** 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-ssr::${key}`, ...args);
18
- }
@@ -1,2 +0,0 @@
1
- export const __ThisModule__ = 'test-ssr';
2
- export { ScopeModuleTestSsr as ScopeModule } from './index.ts';
@@ -1,13 +0,0 @@
1
- export default {
2
- Name: 'Name',
3
- Tools: 'Tools',
4
- ToolOne: 'ToolOne',
5
- ChildOne: 'Child One',
6
- ChildTwo: 'Child Two',
7
- TestApples_: '%d apples',
8
- TestApples_0: 'no apples',
9
- TestApples_1: 'one apple',
10
- TestNameApples_: '%s has %d apples',
11
- TestNameApples_0_1: '%s has no apples',
12
- TestNameApples_1_1: '%s has one apple',
13
- };
@@ -1,11 +0,0 @@
1
- export default {
2
- Name: '名称',
3
- Tools: '工具',
4
- ToolOne: '工具1',
5
- ChildOne: '子组件1',
6
- ChildTwo: '子组件2',
7
- TestApples_: '%d个苹果',
8
- TestApples_0: '没有苹果',
9
- TestNameApples_: '%s有%d个苹果',
10
- TestNameApples_0_1: '%s没有苹果',
11
- };
@@ -1,43 +0,0 @@
1
- import type { IDecoratorControllerOptions } from 'vona-module-a-web';
2
-
3
- import { BeanBase } from 'vona';
4
- import { Api, v } from 'vona-module-a-openapiutils';
5
- import { Ssr } from 'vona-module-a-ssr';
6
- import { Arg, Controller, Web } from 'vona-module-a-web';
7
-
8
- import { DtoTestBody } from '../dto/testBody.ts';
9
- import { DtoTestParams } from '../dto/testParams.ts';
10
- import { DtoTestQuery } from '../dto/testQuery.ts';
11
- import { DtoTestResult } from '../dto/testResult.tsx';
12
-
13
- export interface IControllerOptionsToolOne extends IDecoratorControllerOptions {}
14
-
15
- @Controller<IControllerOptionsToolOne>('toolOne')
16
- export class ControllerToolOne extends BeanBase {
17
- // http://localhost:7102/api/test/ssr/toolOne/test/12
18
- // for dev: http://localhost:9000/demo/basic/toolOne/12?api=/api/test/ssr/toolOne/test/:id?&apiMethod=post
19
- @Web.get('test/:id?')
20
- @Ssr.redirect('basic-siteadmin:admin', '/demo/basic/toolOne/:id?', undefined, {
21
- redirectOnly: true,
22
- })
23
- async testGet(
24
- @Arg.param(v.object(DtoTestParams)) _params: DtoTestParams,
25
- @Arg.query(v.object(DtoTestQuery)) _query: DtoTestQuery,
26
- ) {}
27
-
28
- @Web.post('test/:id?')
29
- @Api.body(v.object(DtoTestResult))
30
- async test(
31
- @Arg.param(v.object(DtoTestParams)) params: DtoTestParams,
32
- @Arg.query(v.object(DtoTestQuery)) query: DtoTestQuery,
33
- @Arg.body(v.object(DtoTestBody)) body: DtoTestBody,
34
- ) {
35
- const testResult: DtoTestResult = {
36
- id: params.id || 1,
37
- name: query.name,
38
- married: body.married,
39
- details: [],
40
- };
41
- return testResult;
42
- }
43
- }
@@ -1,37 +0,0 @@
1
- import type { IDecoratorControllerOptions } from 'vona-module-a-web';
2
-
3
- import { BeanBase } from 'vona';
4
- import { Api, v } from 'vona-module-a-openapiutils';
5
- import { Ssr } from 'vona-module-a-ssr';
6
- import { Passport } from 'vona-module-a-user';
7
- import { Arg, Controller, Web } from 'vona-module-a-web';
8
-
9
- import { DtoTestParams } from '../dto/testParams.ts';
10
- import { DtoTestQuery } from '../dto/testQuery.ts';
11
- import { DtoTestResult } from '../dto/testResult.tsx';
12
-
13
- // http://localhost:7102/api/test/ssr/toolTwo/test/2?name=kevin
14
-
15
- export interface IControllerOptionsToolTwo extends IDecoratorControllerOptions {}
16
-
17
- @Controller<IControllerOptionsToolTwo>('toolTwo')
18
- export class ControllerToolTwo extends BeanBase {
19
- @Web.get('test/:id?')
20
- @Api.body(v.object(DtoTestResult))
21
- @Passport.public()
22
- @Ssr.render('basic-siteadmin:admin', '/demo/basic/toolTwo/:id?', undefined, {
23
- renderType: 'auto',
24
- })
25
- async test(
26
- @Arg.param(v.object(DtoTestParams)) params: DtoTestParams,
27
- @Arg.query(v.object(DtoTestQuery)) query: DtoTestQuery,
28
- ) {
29
- const testResult: DtoTestResult = {
30
- id: params.id || 1,
31
- name: query.name,
32
- married: true,
33
- details: [],
34
- };
35
- return testResult;
36
- }
37
- }