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.
- package/package.json +1 -1
- package/scripts/upgrade.ts +13 -4
- package/vona/pnpm-lock.yaml +60 -58
- package/vona/src/suite-vendor/a-auth/tsconfig.json +0 -3
- package/vona/src/suite-vendor/a-cabloy/tsconfig.json +0 -9
- package/vona/src/suite-vendor/a-captcha/tsconfig.json +0 -3
- package/vona/src/suite-vendor/a-vona/tsconfig.json +0 -3
- package/vona/src/suite-vendor/a-auth/modules/test-auth/package.json +0 -52
- package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/index.ts +0 -74
- package/vona/src/suite-vendor/a-auth/modules/test-auth/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-auth/modules/test-auth/src/controller/passport.ts +0 -19
- package/vona/src/suite-vendor/a-auth/modules/test-auth/src/index.ts +0 -1
- package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authOauth.test.ts +0 -55
- package/vona/src/suite-vendor/a-auth/modules/test-auth/test/authSimple.test.ts +0 -52
- package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-auth/modules/test-auth/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/package.json +0 -60
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/index.ts +0 -103
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/bean/meta.status.ts +0 -15
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/controller/status.ts +0 -44
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/src/index.ts +0 -1
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/datasource.test.ts +0 -51
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/socket.test.ts +0 -48
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/test/status.test.ts +0 -10
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-cabloy/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/package.json +0 -63
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/index.ts +0 -377
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/locales.ts +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/meta.version.ts +0 -49
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/bean/ssrMenu.product.ts +0 -26
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/en-us.ts +0 -15
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/config/locale/zh-cn.ts +0 -15
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/controller/product.tsx +0 -64
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productCreate.tsx +0 -40
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectReq.tsx +0 -25
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectRes.tsx +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productSelectResItem.tsx +0 -39
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productUpdate.tsx +0 -30
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/dto/productView.tsx +0 -25
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/entity/product.tsx +0 -65
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/index.ts +0 -2
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/model/product.ts +0 -10
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/src/service/product.ts +0 -37
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/permission.test.ts +0 -19
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/test/product.test.ts +0 -65
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-rest/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/package.json +0 -60
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/index.ts +0 -161
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/locales.ts +0 -18
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/en-us.ts +0 -13
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/config/locale/zh-cn.ts +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolOne.ts +0 -43
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/controller/toolTwo.ts +0 -37
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testBody.ts +0 -10
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testDetail.ts +0 -21
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testParams.ts +0 -13
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testQuery.ts +0 -12
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/dto/testResult.tsx +0 -159
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/src/index.ts +0 -2
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-cabloy/modules/test-ssr/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/package.json +0 -52
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/index.ts +0 -99
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/controller/captcha.ts +0 -18
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/dto/signin.ts +0 -20
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/src/index.ts +0 -1
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/test/captcha.test.ts +0 -148
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-captcha/modules/test-captcha/tsconfig.json +0 -7
- package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/img/vona.png +0 -0
- package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.png +0 -0
- package/vona/src/suite-vendor/a-vona/modules/test-vona/assets/static/img/vona.svg +0 -3
- package/vona/src/suite-vendor/a-vona/modules/test-vona/package.json +0 -61
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/index.ts +0 -2181
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/locales.ts +0 -18
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/.metadata/this.ts +0 -2
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.regExp.ts +0 -34
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aop.simple.ts +0 -80
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/aopMethod.test.ts +0 -63
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/bean.testCtx.ts +0 -59
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/broadcast.test.ts +0 -24
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheMem.test.ts +0 -7
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.post.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/cacheRedis.test.ts +0 -7
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/event.helloEcho.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/eventListener.helloEcho.ts +0 -24
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.asset.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.static.ts +0 -7
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/meta.version.ts +0 -108
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/queue.test.ts +0 -25
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/schedule.test3.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/serializerTransform.email.ts +0 -35
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.caching.ts +0 -36
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/bean/summerCache.test.ts +0 -36
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/config.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/en-us.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/config/locale/zh-cn.ts +0 -19
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/bean.ts +0 -103
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheMem.ts +0 -64
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/cacheRedis.ts +0 -56
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/dtoTest.ts +0 -61
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/guardPassport.ts +0 -26
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/onion.ts +0 -103
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/order.ts +0 -56
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/passport.ts +0 -49
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/performAction.ts +0 -19
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/post.ts +0 -59
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/queue.ts +0 -27
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/serializer.ts +0 -40
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/summer.ts +0 -130
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/tail.ts +0 -33
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/transaction.ts +0 -30
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/controller/upload.ts +0 -61
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/categoryTree.ts +0 -9
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderCreate.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQuery.ts +0 -25
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderQueryPage.ts +0 -24
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectRes.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderSelectResItem.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/orderUpdate.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postAggregate.ts +0 -17
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postCreate.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postGroup.ts +0 -14
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectReq.ts +0 -36
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectRes.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/postSelectResItem.tsx +0 -28
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/profile.ts +0 -15
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/roleLazy.ts +0 -17
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerArray.ts +0 -39
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerLazy.ts +0 -31
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/serializerSimple.ts +0 -112
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/user.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userCreate.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userLazy.ts +0 -20
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/dto/userUpdate.ts +0 -9
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/category.ts +0 -16
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/order.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/post.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/postContent.ts +0 -16
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/product.ts +0 -27
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/role.ts +0 -12
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/roleUser.ts +0 -16
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/test.ts +0 -24
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/entity/user.ts +0 -18
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/index.ts +0 -4
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/index.ts +0 -1
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/lib/serializer.ts +0 -9
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/category.ts +0 -22
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/categoryChain.ts +0 -23
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/order.ts +0 -33
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/orderStats.ts +0 -29
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/post.ts +0 -23
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/postContent.ts +0 -23
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/product.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/role.ts +0 -23
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/roleUser.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/test.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/testDynamicTable.ts +0 -23
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/user.ts +0 -30
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStats.ts +0 -22
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/model/userStatsGroup.ts +0 -36
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/aopMethod.ts +0 -38
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/caching.ts +0 -89
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/category.ts +0 -153
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/order.ts +0 -67
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/post.ts +0 -280
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/product.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/test.ts +0 -9
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testApp.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testClass.ts +0 -15
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/testData.ts +0 -71
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/transaction.ts +0 -20
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/service/user.ts +0 -124
- package/vona/src/suite-vendor/a-vona/modules/test-vona/src/types/index.ts +0 -6
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/aopMethod.test.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/bean.test.ts +0 -16
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/broadcast.test.ts +0 -17
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheMem.test.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/cacheRedis.test.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/caching.test.ts +0 -61
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/cache/summer.test.ts +0 -10
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/database.test.ts +0 -132
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoAggregate.test.ts +0 -44
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGet.test.ts +0 -82
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoGroup.test.ts +0 -44
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoLazy.test.ts +0 -53
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoMutate.test.ts +0 -56
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/dtoQuery.test.ts +0 -70
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelAggregate.test.ts +0 -222
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelCache.test.ts +0 -37
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGeneral.test.ts +0 -18
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelGroup.test.ts +0 -248
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelMagic.test.ts +0 -37
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelations.test.ts +0 -215
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsJoins.test.ts +0 -58
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelRelationsMutate.test.ts +0 -436
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/modelWhere.test.ts +0 -173
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/orm.test.ts +0 -22
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/database/transaction.test.ts +0 -142
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/event.test.ts +0 -14
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/guardPassport.test.ts +0 -48
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/instance.test.ts +0 -35
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/jwt.test.ts +0 -28
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/locale.test.ts +0 -64
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/mail.test.ts +0 -14
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/passport.test.ts +0 -69
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/queue.test.ts +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/runtime.test.ts +0 -24
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/serializer.test.ts +0 -82
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/static.test.ts +0 -22
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/tail.test.ts +0 -21
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/upload.test.ts +0 -75
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/cabloyUtils.test.ts +0 -19
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/celjs.test.ts +0 -64
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/mappedTypes.test.ts +0 -73
- package/vona/src/suite-vendor/a-vona/modules/test-vona/test/utils/performAction.test.ts +0 -28
- package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.build.json +0 -11
- package/vona/src/suite-vendor/a-vona/modules/test-vona/tsconfig.json +0 -7
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import { BeanBase } from 'vona';
|
|
4
|
-
import { Core } from 'vona-module-a-core';
|
|
5
|
-
import { Api, v } from 'vona-module-a-openapiutils';
|
|
6
|
-
import { Passport } from 'vona-module-a-user';
|
|
7
|
-
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
8
|
-
|
|
9
|
-
import { DtoSerializerArray } from '../dto/serializerArray.ts';
|
|
10
|
-
import { DtoSerializerLazy } from '../dto/serializerLazy.ts';
|
|
11
|
-
import { DtoSerializerSimple } from '../dto/serializerSimple.ts';
|
|
12
|
-
|
|
13
|
-
export interface IControllerOptionsSerializer extends IDecoratorControllerOptions {}
|
|
14
|
-
|
|
15
|
-
@Controller<IControllerOptionsSerializer>({ path: 'serializer', meta: { mode: ['test', 'dev'] } })
|
|
16
|
-
export class ControllerSerializer extends BeanBase {
|
|
17
|
-
@Web.post('echoSimple')
|
|
18
|
-
@Api.body(DtoSerializerSimple)
|
|
19
|
-
@Passport.public()
|
|
20
|
-
@Core.serializer()
|
|
21
|
-
echoSimple(@Arg.body() data: DtoSerializerSimple) {
|
|
22
|
-
return data;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@Web.post('echoArray')
|
|
26
|
-
@Api.body(v.array(DtoSerializerArray))
|
|
27
|
-
@Passport.public()
|
|
28
|
-
@Core.serializer()
|
|
29
|
-
echoArray(@Arg.body(v.array(DtoSerializerArray)) data: DtoSerializerArray[]) {
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Web.post('echoLazy')
|
|
34
|
-
@Api.body(DtoSerializerLazy)
|
|
35
|
-
@Passport.public()
|
|
36
|
-
@Core.serializer()
|
|
37
|
-
echoLazy(@Arg.body(DtoSerializerLazy) data: DtoSerializerLazy) {
|
|
38
|
-
return data;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import { sleep } from '@cabloy/utils';
|
|
4
|
-
import assert from 'node:assert';
|
|
5
|
-
import { BeanBase, retry } from 'vona';
|
|
6
|
-
import { Api } from 'vona-module-a-openapiutils';
|
|
7
|
-
import { Passport } from 'vona-module-a-user';
|
|
8
|
-
import { Controller, Web } from 'vona-module-a-web';
|
|
9
|
-
|
|
10
|
-
import type { SummerCacheTest, TSummerCacheTestData } from '../bean/summerCache.test.ts';
|
|
11
|
-
|
|
12
|
-
import { __ThisModule__ } from '../.metadata/this.ts';
|
|
13
|
-
|
|
14
|
-
export interface IControllerOptionsSummer extends IDecoratorControllerOptions {}
|
|
15
|
-
|
|
16
|
-
@Controller<IControllerOptionsSummer>({ path: 'summer', meta: { mode: 'test' } })
|
|
17
|
-
@Api.exclude()
|
|
18
|
-
export class ControllerSummer extends BeanBase {
|
|
19
|
-
@Web.post()
|
|
20
|
-
@Passport.public()
|
|
21
|
-
async test() {
|
|
22
|
-
// name
|
|
23
|
-
const name = 'test';
|
|
24
|
-
const key1 = { id: 1 };
|
|
25
|
-
const key2 = { id: 2 };
|
|
26
|
-
const key3 = { id: 3 };
|
|
27
|
-
|
|
28
|
-
// getCache
|
|
29
|
-
const cache = this.scope.summerCache.test;
|
|
30
|
-
assert.equal(!!cache, true);
|
|
31
|
-
let cacheOtherModule = this.$scope.testVona.summerCache.test;
|
|
32
|
-
assert.equal(cache, cacheOtherModule);
|
|
33
|
-
cacheOtherModule = this.bean.summer.cache(
|
|
34
|
-
`${__ThisModule__}.summerCache.${name}`,
|
|
35
|
-
) as SummerCacheTest;
|
|
36
|
-
assert.equal(cache, cacheOtherModule);
|
|
37
|
-
|
|
38
|
-
let value: TSummerCacheTestData | undefined;
|
|
39
|
-
let values: Array<TSummerCacheTestData | undefined>;
|
|
40
|
-
|
|
41
|
-
// get: peek
|
|
42
|
-
value = await cache.peek(key1);
|
|
43
|
-
assert.equal(value, undefined);
|
|
44
|
-
|
|
45
|
-
// get
|
|
46
|
-
value = await cache.get(key1);
|
|
47
|
-
assert.equal(value?.id, key1.id);
|
|
48
|
-
|
|
49
|
-
// get: peek
|
|
50
|
-
value = await cache.peek(key1);
|
|
51
|
-
assert.equal(value?.id, key1.id);
|
|
52
|
-
value = await cache.peek(key1, { mode: 'mem' });
|
|
53
|
-
assert.equal(value?.id, key1.id);
|
|
54
|
-
value = await cache.peek(key1, { mode: 'redis' });
|
|
55
|
-
assert.equal(value?.id, key1.id);
|
|
56
|
-
|
|
57
|
-
// get: peek sleep for mem stale
|
|
58
|
-
await sleep(900);
|
|
59
|
-
|
|
60
|
-
// get: peek again
|
|
61
|
-
value = await cache.peek(key1, { mode: 'redis' });
|
|
62
|
-
assert.equal(value?.id, key1.id);
|
|
63
|
-
await retry({ retries: 3 }, async () => {
|
|
64
|
-
await sleep(100);
|
|
65
|
-
value = await cache.peek(key1, { mode: 'mem' });
|
|
66
|
-
assert.equal(value, undefined);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// get: peek sleep for redis stale
|
|
70
|
-
await sleep(1900);
|
|
71
|
-
|
|
72
|
-
// get: peek again
|
|
73
|
-
await retry({ retries: 3 }, async () => {
|
|
74
|
-
await sleep(100);
|
|
75
|
-
value = await cache.peek(key1, { mode: 'redis' });
|
|
76
|
-
assert.equal(value, undefined);
|
|
77
|
-
});
|
|
78
|
-
value = await cache.peek(key1, { mode: 'mem' });
|
|
79
|
-
assert.equal(value, undefined);
|
|
80
|
-
|
|
81
|
-
// mget
|
|
82
|
-
// mem cache graph: key1
|
|
83
|
-
value = await cache.get(key1);
|
|
84
|
-
assert.equal(value?.id, key1.id);
|
|
85
|
-
// mem cache graph: key2 key3
|
|
86
|
-
values = await cache.mget([key1, key2, key3]); // todo: maybe has bug
|
|
87
|
-
assert.equal(values[0]?.id, key1.id); // todo: maybe has bug
|
|
88
|
-
assert.equal(values[1]?.id, key2.id);
|
|
89
|
-
assert.equal(values[2]?.id, key3.id);
|
|
90
|
-
// mem cache graph: key3 key1
|
|
91
|
-
values = await cache.mget([key1, key2, key3]);
|
|
92
|
-
assert.equal(values[0]?.id, key1.id);
|
|
93
|
-
assert.equal(values[1]?.id, key2.id);
|
|
94
|
-
assert.equal(values[2]?.id, key3.id);
|
|
95
|
-
|
|
96
|
-
// mget: peek
|
|
97
|
-
value = await cache.peek(key2, { mode: 'redis' });
|
|
98
|
-
assert.equal(value?.id, key2.id);
|
|
99
|
-
value = await cache.peek(key2, { mode: 'mem' });
|
|
100
|
-
assert.equal(value, undefined);
|
|
101
|
-
|
|
102
|
-
// del
|
|
103
|
-
await cache.del(key1);
|
|
104
|
-
await cache.del(key2);
|
|
105
|
-
|
|
106
|
-
// mdel
|
|
107
|
-
await cache.mdel([key1, key2, key3]);
|
|
108
|
-
|
|
109
|
-
// mdel: peek
|
|
110
|
-
value = await cache.peek(key3, { mode: 'redis' });
|
|
111
|
-
assert.equal(value, undefined);
|
|
112
|
-
value = await cache.peek(key3, { mode: 'mem' });
|
|
113
|
-
assert.equal(value, undefined);
|
|
114
|
-
|
|
115
|
-
// clear
|
|
116
|
-
values = await cache.mget([key1, key2, key3]);
|
|
117
|
-
assert.equal(values[2]?.id, key3.id);
|
|
118
|
-
value = await cache.peek(key3, { mode: 'redis' });
|
|
119
|
-
assert.equal(value?.id, key3.id);
|
|
120
|
-
value = await cache.peek(key3, { mode: 'mem' });
|
|
121
|
-
assert.equal(value?.id, key3.id);
|
|
122
|
-
|
|
123
|
-
await cache.clear();
|
|
124
|
-
|
|
125
|
-
value = await cache.peek(key3, { mode: 'redis' });
|
|
126
|
-
assert.equal(value, undefined);
|
|
127
|
-
value = await cache.peek(key3, { mode: 'mem' });
|
|
128
|
-
assert.equal(value, undefined);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import assert from 'node:assert';
|
|
4
|
-
import { BeanBase, cast } from 'vona';
|
|
5
|
-
import { Api } from 'vona-module-a-openapiutils';
|
|
6
|
-
import { Passport } from 'vona-module-a-user';
|
|
7
|
-
import { Controller, Web } from 'vona-module-a-web';
|
|
8
|
-
|
|
9
|
-
export interface IControllerOptionsTail extends IDecoratorControllerOptions {}
|
|
10
|
-
|
|
11
|
-
@Controller<IControllerOptionsTail>({ path: 'tail', meta: { mode: 'test' } })
|
|
12
|
-
@Api.exclude()
|
|
13
|
-
export class ControllerTail extends BeanBase {
|
|
14
|
-
@Web.post()
|
|
15
|
-
@Passport.public()
|
|
16
|
-
tail() {
|
|
17
|
-
// 1
|
|
18
|
-
cast(this.ctx)._tail_test = 1;
|
|
19
|
-
|
|
20
|
-
// tail
|
|
21
|
-
this.ctx.commit(() => {
|
|
22
|
-
assert.equal(cast(this.ctx)._tail_test_als_caller, undefined);
|
|
23
|
-
assert.equal(cast(this.ctx)._tail_test, 2);
|
|
24
|
-
this.ctx.commit(() => {
|
|
25
|
-
assert.equal(cast(this.ctx)._tail_test, 3);
|
|
26
|
-
});
|
|
27
|
-
cast(this.ctx)._tail_test = 3;
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// 2
|
|
31
|
-
cast(this.ctx)._tail_test = 2;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import { BeanBase } from 'vona';
|
|
4
|
-
import { Core } from 'vona-module-a-core';
|
|
5
|
-
import { Api } from 'vona-module-a-openapiutils';
|
|
6
|
-
import { Passport } from 'vona-module-a-user';
|
|
7
|
-
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
8
|
-
|
|
9
|
-
const tableNameFail = '__tempTransactionFail';
|
|
10
|
-
const tableNameSuccess = '__tempTransactionSuccess';
|
|
11
|
-
export interface IControllerOptionsTransaction extends IDecoratorControllerOptions {}
|
|
12
|
-
|
|
13
|
-
@Controller<IControllerOptionsTransaction>({ path: 'transaction', meta: { mode: 'test' } })
|
|
14
|
-
@Api.exclude()
|
|
15
|
-
export class ControllerTransaction extends BeanBase {
|
|
16
|
-
@Web.post('fail')
|
|
17
|
-
@Core.transaction()
|
|
18
|
-
@Passport.public()
|
|
19
|
-
async fail(@Arg.body() item: object) {
|
|
20
|
-
await this.bean.model.update(`${tableNameFail}` as any, item);
|
|
21
|
-
await this.bean.model.update(`${tableNameFail}error` as any, item);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@Web.post('success')
|
|
25
|
-
@Core.transaction()
|
|
26
|
-
@Passport.public()
|
|
27
|
-
async success(@Arg.body() item: object) {
|
|
28
|
-
await this.bean.model.update(tableNameSuccess as any, item);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { IUploadField, IUploadFile } from 'vona-module-a-upload';
|
|
2
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
3
|
-
|
|
4
|
-
import assert from 'node:assert';
|
|
5
|
-
import { BeanBase } from 'vona';
|
|
6
|
-
import { Core } from 'vona-module-a-core';
|
|
7
|
-
import { Api, v } from 'vona-module-a-openapiutils';
|
|
8
|
-
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
9
|
-
import { Passport } from 'vona-module-a-user';
|
|
10
|
-
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
11
|
-
import { z } from 'zod';
|
|
12
|
-
|
|
13
|
-
export interface IControllerOptionsUpload extends IDecoratorControllerOptions {}
|
|
14
|
-
|
|
15
|
-
@Controller<IControllerOptionsUpload>({ path: 'upload', meta: { mode: ['test', 'dev'] } })
|
|
16
|
-
export class ControllerUpload extends BeanBase {
|
|
17
|
-
@Web.post('fields')
|
|
18
|
-
@Passport.public()
|
|
19
|
-
@Core.fileUpload()
|
|
20
|
-
@Api.contentType('application/json')
|
|
21
|
-
fields(
|
|
22
|
-
@Arg.fields() fields: IUploadField[],
|
|
23
|
-
@Arg.fields('checkes', v.array(z.string())) checkes: string[],
|
|
24
|
-
@Arg.field('name', v.default('zhennann'), v.title('your name')) name: string,
|
|
25
|
-
) {
|
|
26
|
-
assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
|
|
27
|
-
assert.equal(checkes.length > 0, true);
|
|
28
|
-
assert.equal(name, 'zhennann');
|
|
29
|
-
return this.ctx[SymbolUploadValue];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@Web.post('file')
|
|
33
|
-
@Passport.public()
|
|
34
|
-
@Core.fileUpload()
|
|
35
|
-
@Api.contentType('application/json')
|
|
36
|
-
file(
|
|
37
|
-
@Arg.field('name', v.default('zhennann')) name: string,
|
|
38
|
-
@Arg.file('welcome') file: IUploadFile,
|
|
39
|
-
) {
|
|
40
|
-
assert.equal(name, 'zhennann');
|
|
41
|
-
assert.equal(file.name, 'welcome');
|
|
42
|
-
return this.ctx[SymbolUploadValue];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Web.post('files')
|
|
46
|
-
@Passport.public()
|
|
47
|
-
@Core.fileUpload()
|
|
48
|
-
@Api.contentType('application/json')
|
|
49
|
-
files(
|
|
50
|
-
@Arg.files(v.title('more files')) files: IUploadFile[],
|
|
51
|
-
@Arg.files('images', v.title('images')) images: IUploadFile[],
|
|
52
|
-
@Arg.file('welcome1', v.title('single file')) file1: IUploadFile,
|
|
53
|
-
@Arg.file('welcome2') file2: IUploadFile,
|
|
54
|
-
) {
|
|
55
|
-
assert.equal(files.find(item => item.name === 'welcome1')?.name, 'welcome1');
|
|
56
|
-
assert.equal(images.find(item => item.name === 'images')?.name, 'images');
|
|
57
|
-
assert.equal(file1.name, 'welcome1');
|
|
58
|
-
assert.equal(file2.name, 'welcome2');
|
|
59
|
-
return this.ctx[SymbolUploadValue];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,9 +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
|
-
export interface IDtoOptionsCategoryTree extends IDecoratorDtoOptions {}
|
|
7
|
-
|
|
8
|
-
@Dto<IDtoOptionsCategoryTree>()
|
|
9
|
-
export class DtoCategoryTree extends $Dto.get('test-vona:category', { columns: ['id', 'name'] }) {}
|
|
@@ -1,13 +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 { ModelOrder } from '../model/order.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsOrderCreate extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsOrderCreate>()
|
|
11
|
-
export class DtoOrderCreate extends $Dto.create(() => ModelOrder, {
|
|
12
|
-
columns: ['orderNo', 'remark'],
|
|
13
|
-
}) {}
|
|
@@ -1,25 +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
|
-
|
|
7
|
-
import { EntityOrder } from '../entity/order.ts';
|
|
8
|
-
|
|
9
|
-
export interface IDtoOptionsOrderQuery extends IDecoratorDtoOptions {}
|
|
10
|
-
|
|
11
|
-
@Dto<IDtoOptionsOrderQuery>({
|
|
12
|
-
openapi: { filter: { table: 'testVonaOrder' } },
|
|
13
|
-
})
|
|
14
|
-
export class DtoOrderQuery extends $Dto.query(EntityOrder, ['orderNo', 'remark']) {
|
|
15
|
-
@Api.field(
|
|
16
|
-
v.filter({
|
|
17
|
-
table: 'testVonaUser',
|
|
18
|
-
joinType: 'innerJoin',
|
|
19
|
-
joinOn: ['userId', 'testVonaUser.id'],
|
|
20
|
-
originalName: 'name',
|
|
21
|
-
}),
|
|
22
|
-
v.optional(),
|
|
23
|
-
)
|
|
24
|
-
userName?: string;
|
|
25
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import { $Class } from 'vona';
|
|
4
|
-
import { Api } from 'vona-module-a-openapiutils';
|
|
5
|
-
import { $Dto } from 'vona-module-a-orm';
|
|
6
|
-
import { Dto } from 'vona-module-a-web';
|
|
7
|
-
import z from 'zod';
|
|
8
|
-
|
|
9
|
-
import { EntityOrder } from '../entity/order.ts';
|
|
10
|
-
|
|
11
|
-
export interface IDtoOptionsOrderQueryPage extends IDecoratorDtoOptions {}
|
|
12
|
-
|
|
13
|
-
@Dto<IDtoOptionsOrderQueryPage>({
|
|
14
|
-
fields: {
|
|
15
|
-
pageSize: z.number().min(1).max(300).default(30),
|
|
16
|
-
},
|
|
17
|
-
})
|
|
18
|
-
export class DtoOrderQueryPage extends $Class.omit(
|
|
19
|
-
$Dto.queryPage(EntityOrder, ['orderNo', 'remark']),
|
|
20
|
-
['pageSize'],
|
|
21
|
-
) {
|
|
22
|
-
@Api.field(z.number().min(1).max(300).default(30))
|
|
23
|
-
pageSize: number;
|
|
24
|
-
}
|
|
@@ -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 { DtoOrderSelectResItem } from './orderSelectResItem.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsOrderSelectRes extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsOrderSelectRes>()
|
|
11
|
-
export class DtoOrderSelectRes extends $Dto.listAndCount(DtoOrderSelectResItem) {}
|
|
@@ -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 { ModelOrder } from '../model/order.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsOrderSelectResItem extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsOrderSelectResItem>()
|
|
11
|
-
export class DtoOrderSelectResItem extends $Dto.get(() => ModelOrder) {}
|
|
@@ -1,13 +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 { ModelOrder } from '../model/order.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsOrderUpdate extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsOrderUpdate>()
|
|
11
|
-
export class DtoOrderUpdate extends $Dto.update(() => ModelOrder, {
|
|
12
|
-
columns: ['orderNo', 'remark'],
|
|
13
|
-
}) {}
|
|
@@ -1,17 +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 { ModelPost } from '../model/post.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsPostAggregate extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsPostAggregate>()
|
|
11
|
-
export class DtoPostAggregate extends $Dto.aggregate(() => ModelPost, {
|
|
12
|
-
count: ['*', 'stars'],
|
|
13
|
-
sum: 'stars',
|
|
14
|
-
avg: 'stars',
|
|
15
|
-
min: 'stars',
|
|
16
|
-
max: 'stars',
|
|
17
|
-
}) {}
|
|
@@ -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 { ModelPost } from '../model/post.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsPostCreate extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsPostCreate>({ independent: true })
|
|
11
|
-
export class DtoPostCreate extends $Dto.create(() => ModelPost) {}
|
|
@@ -1,14 +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 { ModelPost } from '../model/post.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsPostGroup extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsPostGroup>()
|
|
11
|
-
export class DtoPostGroup extends $Dto.group(() => ModelPost, 'userId', {
|
|
12
|
-
count: '*',
|
|
13
|
-
sum: 'stars',
|
|
14
|
-
}) {}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
-
|
|
3
|
-
import { $makeSchema, 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 z from 'zod';
|
|
7
|
-
import { ZovaRender } from 'zova-rest-cabloy-basic-admin';
|
|
8
|
-
|
|
9
|
-
import { EntityPost } from '../entity/post.ts';
|
|
10
|
-
|
|
11
|
-
export interface IDtoOptionsPostSelectReq extends IDecoratorDtoOptions {}
|
|
12
|
-
|
|
13
|
-
@Dto<IDtoOptionsPostSelectReq>({
|
|
14
|
-
openapi: { filter: { table: 'testVonaPost' } },
|
|
15
|
-
fields: {
|
|
16
|
-
title: $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 DtoPostSelectReq extends $Dto.queryPage(EntityPost, ['title', 'createdAt']) {
|
|
26
|
-
@Api.field(
|
|
27
|
-
v.filter({
|
|
28
|
-
table: 'testVonaUser',
|
|
29
|
-
joinOn: ['userId', 'testVonaUser.id'],
|
|
30
|
-
originalName: 'name',
|
|
31
|
-
op: '_eqI_',
|
|
32
|
-
}),
|
|
33
|
-
v.optional(),
|
|
34
|
-
)
|
|
35
|
-
userName?: string;
|
|
36
|
-
}
|
|
@@ -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 { DtoPostSelectResItem } from './postSelectResItem.tsx';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsPostSelectRes extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsPostSelectRes>()
|
|
11
|
-
export class DtoPostSelectRes extends $Dto.listAndCount(DtoPostSelectResItem) {}
|
|
@@ -1,28 +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 { ModelPost } from '../model/post.ts';
|
|
10
|
-
|
|
11
|
-
export interface IDtoOptionsPostSelectResItem extends IDecoratorDtoOptions {}
|
|
12
|
-
|
|
13
|
-
@Dto<IDtoOptionsPostSelectResItem>({})
|
|
14
|
-
export class DtoPostSelectResItem extends $Dto.get(() => ModelPost, {
|
|
15
|
-
include: { postContent: true },
|
|
16
|
-
}) {
|
|
17
|
-
@Api.field(
|
|
18
|
-
v.title($locale('Operations')),
|
|
19
|
-
ZovaRender.order(1, 'max'),
|
|
20
|
-
ZovaRender.cell('basic-table:actionOperationsRow', {
|
|
21
|
-
actions: [
|
|
22
|
-
ZovaRender.tableActionRow('basic-table:actionUpdate'),
|
|
23
|
-
ZovaRender.tableActionRow('basic-table:actionDelete'),
|
|
24
|
-
],
|
|
25
|
-
}),
|
|
26
|
-
)
|
|
27
|
-
_operationsRow?: unknown;
|
|
28
|
-
}
|
|
@@ -1,15 +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-web';
|
|
5
|
-
|
|
6
|
-
export interface IDtoOptionsProfile extends IDecoratorDtoOptions {}
|
|
7
|
-
|
|
8
|
-
@Dto<IDtoOptionsProfile>()
|
|
9
|
-
export class DtoProfile {
|
|
10
|
-
@Api.field()
|
|
11
|
-
id: number;
|
|
12
|
-
|
|
13
|
-
@Api.field(v.email())
|
|
14
|
-
email: string;
|
|
15
|
-
}
|
|
@@ -1,17 +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-web';
|
|
5
|
-
|
|
6
|
-
import { DtoUserLazy } from './userLazy.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsRoleLazy extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsRoleLazy>()
|
|
11
|
-
export class DtoRoleLazy {
|
|
12
|
-
@Api.field()
|
|
13
|
-
name: string;
|
|
14
|
-
|
|
15
|
-
@Api.field(v.optional(), v.array(v.lazy(() => DtoUserLazy)))
|
|
16
|
-
users?: DtoUserLazy[];
|
|
17
|
-
}
|
|
@@ -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-web';
|
|
5
|
-
|
|
6
|
-
import { DtoSerializerSimple } from './serializerSimple.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsSerializerArray extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsSerializerArray>()
|
|
11
|
-
export class DtoSerializerArray {
|
|
12
|
-
@Api.field(
|
|
13
|
-
v.serializerGetter((_data: DtoSerializerArray, value: DtoSerializerSimple[]) => {
|
|
14
|
-
return value.map(item => {
|
|
15
|
-
return {
|
|
16
|
-
...item,
|
|
17
|
-
password: '111111',
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
}),
|
|
21
|
-
v.title('Simple'),
|
|
22
|
-
v.array(DtoSerializerSimple),
|
|
23
|
-
)
|
|
24
|
-
simples: DtoSerializerSimple[];
|
|
25
|
-
|
|
26
|
-
@Api.field(
|
|
27
|
-
v.serializerGetter((_data: DtoSerializerArray, value: DtoSerializerSimple[]) => {
|
|
28
|
-
return value.map(item => {
|
|
29
|
-
return {
|
|
30
|
-
...item,
|
|
31
|
-
password: '111111',
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
}),
|
|
35
|
-
v.title('Simple'),
|
|
36
|
-
v.array(v.lazy(() => DtoSerializerSimple)),
|
|
37
|
-
)
|
|
38
|
-
simplesLazy: DtoSerializerSimple[];
|
|
39
|
-
}
|
|
@@ -1,31 +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-web';
|
|
5
|
-
|
|
6
|
-
import { DtoSerializerSimple } from './serializerSimple.ts';
|
|
7
|
-
|
|
8
|
-
export interface IDtoOptionsSerializerLazy extends IDecoratorDtoOptions {}
|
|
9
|
-
|
|
10
|
-
@Dto<IDtoOptionsSerializerLazy>()
|
|
11
|
-
export class DtoSerializerLazy {
|
|
12
|
-
@Api.field(
|
|
13
|
-
v.serializerGetter((value: DtoSerializerSimple) => {
|
|
14
|
-
return { ...value, password: '111111' };
|
|
15
|
-
}),
|
|
16
|
-
v.object(DtoSerializerSimple),
|
|
17
|
-
)
|
|
18
|
-
simple: DtoSerializerSimple;
|
|
19
|
-
|
|
20
|
-
@Api.field(
|
|
21
|
-
v.serializerGetter((value: DtoSerializerSimple) => {
|
|
22
|
-
return { ...value, password: '111111' };
|
|
23
|
-
}),
|
|
24
|
-
v.title('title'),
|
|
25
|
-
v.optional(),
|
|
26
|
-
v.lazy(v.description('description'), () => {
|
|
27
|
-
return DtoSerializerSimple;
|
|
28
|
-
}),
|
|
29
|
-
)
|
|
30
|
-
simpleLazy: DtoSerializerSimple;
|
|
31
|
-
}
|