cabloy 5.1.97 → 5.1.99
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/.cabloy-version +1 -1
- package/.claude/hooks/contract-loop-gate.ts +151 -44
- package/CHANGELOG.md +48 -0
- package/CLAUDE.md +2 -0
- package/cabloy-docs/.vitepress/config.mjs +11 -0
- package/cabloy-docs/backend/controller-aop-guide.md +0 -1
- package/cabloy-docs/backend/image-guide.md +544 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +1 -1
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +1 -1
- package/cabloy-docs/frontend/image-guide.md +512 -0
- package/cabloy-docs/frontend/introduction.md +2 -0
- package/cabloy-docs/frontend/ioc-and-beans.md +34 -3
- package/cabloy-docs/frontend/model-architecture.md +2 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +3 -1
- package/cabloy-docs/frontend/model-state-guide.md +5 -1
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +10 -8
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +2 -2
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +1 -1
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +2 -2
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +4 -4
- package/cabloy-docs/frontend/server-data.md +2 -0
- package/cabloy-docs/frontend/state-architecture-for-vue-developers.md +218 -0
- package/cabloy-docs/frontend/system-startup-guide.md +2 -0
- package/cabloy-docs/frontend/use-state-data-best-practices.md +384 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +11 -10
- package/cabloy-docs/fullstack/image-workflow.md +403 -0
- package/cabloy-docs/fullstack/introduction.md +1 -0
- package/package.json +1 -1
- package/scripts/upgrade.ts +2 -0
- package/vona/package.original.json +0 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/bean/beanBase.ts +9 -9
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +424 -47
- package/vona/src/suite/a-training/modules/training-record/src/bean/fileScene.dossierFile.ts +22 -0
- package/vona/src/suite/a-training/modules/training-record/src/bean/meta.version.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordDossierFileView.ts +47 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordSelectResItem.tsx +13 -0
- package/vona/src/suite/a-training/modules/training-record/src/dto/recordView.tsx +13 -0
- package/vona/src/suite/a-training/modules/training-record/src/entity/record.tsx +16 -5
- package/vona/src/suite/a-training/modules/training-record/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-record/src/lib/index.ts +1 -0
- package/vona/src/suite/a-training/modules/training-record/src/lib/resolveDossierFiles.ts +34 -0
- package/vona/src/suite/a-training/modules/training-record/test/record.test.ts +209 -123
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/detailRecordBase.tsx +18 -1
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +0 -2
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +1 -0
- package/vona/src/suite/cabloy-basic/modules/basic-siteadmin/src/bean/ssrSite.admin.ts +4 -0
- package/vona/src/suite/cabloy-basic/modules/basic-siteweb/src/bean/ssrSite.web.ts +4 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/cli/ssrSite/boilerplate/{{sceneName}}.{{beanName}}.ts_ +3 -0
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/service/ssrHandler.ts +11 -2
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/types/ssrSite.ts +6 -0
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
- package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileProvider/boilerplate/{{sceneName}}.{{beanName}}.ts_ +23 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/cli/fileScene/boilerplate/{{sceneName}}.{{beanName}}.ts_ +5 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/package.json +68 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/index.ts +425 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/locales.ts +18 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.file.ts +322 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileProvider.ts +62 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/bean.fileUploadPolicy.ts +224 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.redlock.ts +11 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/bean/meta.version.ts +38 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/config.ts +16 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/en-us.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/config/locale/zh-cn.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/controller/file.ts +175 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadRequest.ts +33 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDirectUploadResponse.ts +41 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileDownloadRequest.ts +12 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyRequest.ts +15 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadPolicyResponse.ts +30 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadResponse.ts +59 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenRequest.ts +24 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadTokenResponse.ts +16 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/dto/fileUploadUrlRequest.ts +33 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/file.ts +55 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/entity/fileProvider.ts +24 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/index.ts +4 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileProvider.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileScene.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/fileUploadValidation.ts +15 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/lib/index.ts +3 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/model/file.ts +10 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/model/fileProvider.ts +10 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/file.ts +144 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileProvider.ts +111 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/fileScene.ts +53 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/src/types/index.ts +3 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/a-file/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/package.json +53 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/index.ts +104 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/bean/fileProvider.cloudflare.ts +123 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/src/service/fileCloudflare.ts +245 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/file-cloudflare/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/package.json +50 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/index.ts +111 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/.metadata/this.ts +2 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/bean/fileProvider.native.ts +125 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/config/config.ts +7 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/index.ts +1 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/src/service/fileNative.ts +125 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.build.json +11 -0
- package/vona/src/suite-vendor/a-file/modules/file-native/tsconfig.json +7 -0
- package/vona/src/suite-vendor/a-file/package.json +14 -0
- package/vona/src/suite-vendor/a-file/tsconfig.base.json +4 -0
- package/vona/src/suite-vendor/a-file/tsconfig.json +16 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/package.json +4 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/.metadata/index.ts +61 -3
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.image.ts +336 -152
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageProvider.ts +21 -14
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/bean.imageUploadPolicy.ts +86 -11
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.index.ts +12 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.redlock.ts +1 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/meta.version.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/bean/schedule.imageDraftPrune.ts +29 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/config/config.ts +3 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/controller/image.ts +32 -54
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeRequest.ts +13 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadFinalizeResponse.ts +10 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageDirectUploadResponse.ts +10 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyRequest.ts +15 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadPolicyResponse.ts +27 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageUploadResponse.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/dto/imageView.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/entity/image.ts +10 -1
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/imageUploadValidation.ts +15 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/lib/index.ts +1 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/image.ts +18 -0
- package/vona/src/suite-vendor/a-image/modules/a-image/src/types/imageProvider.ts +28 -2
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/package.json +1 -1
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/bean/imageProvider.cloudflare.ts +13 -1
- package/vona/src/suite-vendor/a-image/modules/image-cloudflare/src/service/imageCloudflare.ts +26 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/package.json +6 -2
- package/vona/src/suite-vendor/a-image/modules/image-native/src/.metadata/index.ts +37 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/bean/imageProvider.native.ts +21 -1
- package/vona/src/suite-vendor/a-image/modules/image-native/src/controller/image.ts +57 -0
- package/vona/src/suite-vendor/a-image/modules/image-native/src/service/imageNative.ts +142 -34
- package/vona/src/suite-vendor/a-image/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/entity.ts +2 -4
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormutils/src/lib/columns.ts +7 -3
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/.metadata/index.ts +24 -9
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +87 -73
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionActionByRoles.ts +27 -0
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permissionUser.ts +20 -0
- package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/src/service/startup.ts +4 -3
- package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-upload/src/bean/interceptor.upload.ts +5 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/.metadata/index.ts +0 -13
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/lib/passport.ts +0 -7
- package/vona/src/suite-vendor/a-vona/modules/a-version/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-version/src/bean/meta.version.ts +2 -24
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +1 -1
- package/zova/packages-zova/zova-core/src/bean/beanBase.ts +9 -13
- package/zova/pnpm-lock.yaml +418 -411
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolOne/controller.tsx +2 -2
- package/zova/src/suite/a-demo/modules/demo-todo/src/page/todo/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-layoutadmin/src/component/layoutAdmin/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/controller.tsx +2 -2
- package/zova/src/suite/a-home/modules/home-login/src/page/login/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockDetails/controller.tsx +5 -1
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/component/blockTable/controller.tsx +20 -15
- package/zova/src/suite/cabloy-basic/modules/basic-details/src/service/detail.tsx +6 -1
- package/zova/src/suite/cabloy-basic/modules/basic-file/cli/openapi.config.ts +9 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/package.json +58 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/component/formFieldFile.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/index.ts +222 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/.metadata/this.ts +2 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/file.ts +121 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/schemas.ts +306 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/api/openapi/types.ts +5718 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/apiSchema/file.ts +40 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/bean/tableCell.file.tsx +187 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/component/formFieldFile/controller.tsx +534 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/en-us.ts +15 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/config/locale/zh-cn.ts +15 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/index.ts +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/file.ts +74 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/lib/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/model/file.ts +23 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/file.ts +12 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/src/types/index.ts +1 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.build.json +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-file/tsconfig.json +5 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/.metadata/index.ts +61 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/image.ts +38 -1
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/imageNativeImage.ts +31 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/schemas.ts +52 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/api/openapi/types.ts +614 -1
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/image.ts +10 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/apiSchema/imageNativeImage.ts +13 -0
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/component/formFieldImage/controller.tsx +126 -62
- package/zova/src/suite/cabloy-basic/modules/basic-image/src/model/image.ts +23 -0
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockPage/controller.tsx +44 -4
- package/zova/src/suite/cabloy-basic/modules/basic-page/src/component/blockTable/controller.tsx +17 -12
- package/zova/src/suite/cabloy-basic/modules/basic-pageentry/src/component/blockPageEntry/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-resource/src/component/formFieldResourcePicker/controller.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/controller.tsx +7 -2
- package/zova/src/suite/cabloy-basic/modules/basic-table/src/component/table/render.tsx +34 -33
- package/zova/src/suite/cabloy-basic/package.json +1 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +5 -3
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/entry/controller.tsx +2 -2
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/page/resource/controller.tsx +2 -2
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-model/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/lib/utils.ts +17 -17
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +8 -3
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +0 -17
- package/vona/src/suite-vendor/a-vona/modules/a-user/src/bean/guard.userName.ts +0 -35
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.99
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFileSync, statSync, writeFileSync
|
|
2
|
+
import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { spawnSync, type SpawnSyncReturns } from 'node:child_process';
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import path from 'node:path';
|
|
@@ -21,6 +21,25 @@ interface SyncStateEntry {
|
|
|
21
21
|
timestamp: number;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
interface CommandPlan {
|
|
25
|
+
args: readonly string[];
|
|
26
|
+
display: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface EditionConfig {
|
|
30
|
+
id: 'basic' | 'start';
|
|
31
|
+
label: string;
|
|
32
|
+
reverseVonaContentMarkers: readonly string[];
|
|
33
|
+
reverseAutoSyncCommands: readonly CommandPlan[];
|
|
34
|
+
reverseWebBuildCommand: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type ReverseSyncOutcome =
|
|
38
|
+
| { kind: 'not-applicable'; message: string }
|
|
39
|
+
| { kind: 'skipped'; message: string }
|
|
40
|
+
| { kind: 'success'; message: string }
|
|
41
|
+
| { kind: 'failure'; message: string };
|
|
42
|
+
|
|
24
43
|
type SyncState = Record<string, SyncStateEntry>;
|
|
25
44
|
|
|
26
45
|
const SCRIPT_FILE = fileURLToPath(import.meta.url);
|
|
@@ -45,13 +64,10 @@ const FORWARD_PATH_MARKERS = ['/controller/', '/dto/', '/entity/'];
|
|
|
45
64
|
|
|
46
65
|
const FORWARD_CONTENT_MARKERS = ['@Web.', '@Api.field', '@Api.body', 'v.openapi(', '@Dto<'];
|
|
47
66
|
|
|
48
|
-
const
|
|
49
|
-
'zova-rest-cabloy-basic-admin',
|
|
67
|
+
const SHARED_REVERSE_VONA_CONTENT_MARKERS = [
|
|
50
68
|
'ZovaRender.',
|
|
51
69
|
'tableActionRow(',
|
|
52
70
|
'tableActionBulk(',
|
|
53
|
-
'ZovaRender.field(',
|
|
54
|
-
'ZovaRender.cell(',
|
|
55
71
|
];
|
|
56
72
|
|
|
57
73
|
const REVERSE_ZOVA_PATH_MARKERS = ['/src/bean/', '/src/component/', '/src/.metadata/'];
|
|
@@ -64,6 +80,35 @@ const REVERSE_ZOVA_CONTENT_MARKERS = [
|
|
|
64
80
|
'@Component<',
|
|
65
81
|
];
|
|
66
82
|
|
|
83
|
+
const REVERSE_AUTO_SYNC_COMMANDS: readonly CommandPlan[] = [
|
|
84
|
+
{ args: ['run', 'build:zova:admin'], display: 'npm run build:zova:admin' },
|
|
85
|
+
{ args: ['run', 'deps:vona'], display: 'npm run deps:vona' },
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
const EDITION_CONFIGS: Record<'basic' | 'start', EditionConfig> = {
|
|
89
|
+
basic: {
|
|
90
|
+
id: 'basic',
|
|
91
|
+
label: 'Cabloy Basic',
|
|
92
|
+
reverseVonaContentMarkers: ['zova-rest-cabloy-basic-admin'],
|
|
93
|
+
reverseAutoSyncCommands: REVERSE_AUTO_SYNC_COMMANDS,
|
|
94
|
+
reverseWebBuildCommand: 'npm run build:zova:web',
|
|
95
|
+
},
|
|
96
|
+
start: {
|
|
97
|
+
id: 'start',
|
|
98
|
+
label: 'Cabloy Start',
|
|
99
|
+
reverseVonaContentMarkers: ['zova-rest-cabloy-start-admin'],
|
|
100
|
+
reverseAutoSyncCommands: REVERSE_AUTO_SYNC_COMMANDS,
|
|
101
|
+
reverseWebBuildCommand: 'npm run build:zova:web',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const ACTIVE_EDITION = resolveEdition();
|
|
106
|
+
const FALLBACK_REVERSE_VONA_CONTENT_MARKERS = [
|
|
107
|
+
...SHARED_REVERSE_VONA_CONTENT_MARKERS,
|
|
108
|
+
...EDITION_CONFIGS.basic.reverseVonaContentMarkers,
|
|
109
|
+
...EDITION_CONFIGS.start.reverseVonaContentMarkers,
|
|
110
|
+
];
|
|
111
|
+
|
|
67
112
|
function toPosixPath(value: string): string {
|
|
68
113
|
return value.split(path.sep).join('/');
|
|
69
114
|
}
|
|
@@ -78,6 +123,21 @@ function normalizePath(value?: string): string | null {
|
|
|
78
123
|
}
|
|
79
124
|
}
|
|
80
125
|
|
|
126
|
+
function resolveEdition(): EditionConfig | null {
|
|
127
|
+
if (existsSync(path.resolve(ROOT, '__CABLOY_BASIC__'))) {
|
|
128
|
+
return EDITION_CONFIGS.basic;
|
|
129
|
+
}
|
|
130
|
+
if (existsSync(path.resolve(ROOT, '__CABLOY_START__'))) {
|
|
131
|
+
return EDITION_CONFIGS.start;
|
|
132
|
+
}
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function getReverseVonaContentMarkers(edition: EditionConfig | null): readonly string[] {
|
|
137
|
+
if (!edition) return FALLBACK_REVERSE_VONA_CONTENT_MARKERS;
|
|
138
|
+
return [...SHARED_REVERSE_VONA_CONTENT_MARKERS, ...edition.reverseVonaContentMarkers];
|
|
139
|
+
}
|
|
140
|
+
|
|
81
141
|
function isCodeFile(filePath: string): boolean {
|
|
82
142
|
return TARGET_PATTERNS.some(([prefix, suffix]) => filePath.includes(prefix) && filePath.endsWith(suffix));
|
|
83
143
|
}
|
|
@@ -98,8 +158,12 @@ function detectForward(filePath: string, content: string): string | null {
|
|
|
98
158
|
return null;
|
|
99
159
|
}
|
|
100
160
|
|
|
101
|
-
function detectReverse(
|
|
102
|
-
|
|
161
|
+
function detectReverse(
|
|
162
|
+
filePath: string,
|
|
163
|
+
content: string,
|
|
164
|
+
reverseVonaContentMarkers: readonly string[],
|
|
165
|
+
): string | null {
|
|
166
|
+
if (filePath.includes('/vona/src/') && containsAny(content, reverseVonaContentMarkers)) {
|
|
103
167
|
return 'Vona code is consuming frontend metadata or render resources.';
|
|
104
168
|
}
|
|
105
169
|
if (
|
|
@@ -112,10 +176,10 @@ function detectReverse(filePath: string, content: string): string | null {
|
|
|
112
176
|
return null;
|
|
113
177
|
}
|
|
114
178
|
|
|
115
|
-
function analyze(filePath: string, content: string): AnalysisResult {
|
|
179
|
+
function analyze(filePath: string, content: string, edition: EditionConfig | null): AnalysisResult {
|
|
116
180
|
return {
|
|
117
181
|
forwardReason: detectForward(filePath, content),
|
|
118
|
-
reverseReason: detectReverse(filePath, content),
|
|
182
|
+
reverseReason: detectReverse(filePath, content, getReverseVonaContentMarkers(edition)),
|
|
119
183
|
};
|
|
120
184
|
}
|
|
121
185
|
|
|
@@ -180,9 +244,9 @@ function markAutoSync(filePath: string): void {
|
|
|
180
244
|
saveState(state);
|
|
181
245
|
}
|
|
182
246
|
|
|
183
|
-
function runNpm(args: string[]): SpawnSyncReturns<string> {
|
|
247
|
+
function runNpm(args: readonly string[]): SpawnSyncReturns<string> {
|
|
184
248
|
const command = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
185
|
-
return spawnSync(command, args, {
|
|
249
|
+
return spawnSync(command, [...args], {
|
|
186
250
|
cwd: ROOT,
|
|
187
251
|
encoding: 'utf8',
|
|
188
252
|
});
|
|
@@ -205,22 +269,79 @@ function summarizeProcess(result: SpawnSyncReturns<string>): string {
|
|
|
205
269
|
return `exit ${exitCode}: ${tail}`;
|
|
206
270
|
}
|
|
207
271
|
|
|
208
|
-
function autoSyncReverse(filePath: string):
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
|
|
272
|
+
function autoSyncReverse(filePath: string, edition: EditionConfig): ReverseSyncOutcome {
|
|
273
|
+
for (const command of edition.reverseAutoSyncCommands) {
|
|
274
|
+
const result = runNpm(command.args);
|
|
275
|
+
if (result.status !== 0) {
|
|
276
|
+
return {
|
|
277
|
+
kind: 'failure',
|
|
278
|
+
message: `Auto-sync failed during \`${command.display}\`: ${summarizeProcess(result)}`,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
markAutoSync(filePath);
|
|
284
|
+
const commands = edition.reverseAutoSyncCommands.map(command => `\`${command.display}\``).join(' and ');
|
|
285
|
+
return {
|
|
286
|
+
kind: 'success',
|
|
287
|
+
message: `Auto-sync ran ${commands} for this ${edition.label} reverse-chain edit.`,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function buildReverseGuidance(edition: EditionConfig | null): string {
|
|
292
|
+
if (!edition) {
|
|
293
|
+
return 'If backend tooling or backend metadata will consume this handoff, refresh generated metadata when applicable, resolve the active Cabloy edition marker before choosing the relevant Zova build and generated-output path, and then run `npm run deps:vona`.';
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const autoSyncCommands = edition.reverseAutoSyncCommands
|
|
297
|
+
.map(command => `\`${command.display}\``)
|
|
298
|
+
.join(', then ');
|
|
299
|
+
return `If backend tooling or backend metadata will consume this handoff, refresh generated metadata when applicable, run ${autoSyncCommands}, and also run \`${edition.reverseWebBuildCommand}\` when the Web flavor is affected in this ${edition.label} repo.`;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function resolveReverseSyncOutcome(
|
|
303
|
+
filePath: string,
|
|
304
|
+
result: AnalysisResult,
|
|
305
|
+
edition: EditionConfig | null,
|
|
306
|
+
): ReverseSyncOutcome {
|
|
307
|
+
if (!result.reverseReason) {
|
|
308
|
+
return {
|
|
309
|
+
kind: 'not-applicable',
|
|
310
|
+
message: '',
|
|
311
|
+
};
|
|
212
312
|
}
|
|
213
313
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
314
|
+
if (!isHighConfidenceReverseSource(filePath)) {
|
|
315
|
+
return {
|
|
316
|
+
kind: 'not-applicable',
|
|
317
|
+
message:
|
|
318
|
+
'Auto-sync did not run because this reverse-chain signal came from the consumer side rather than a high-confidence frontend source edit.',
|
|
319
|
+
};
|
|
217
320
|
}
|
|
218
321
|
|
|
219
|
-
|
|
220
|
-
|
|
322
|
+
if (shouldSkipAutoSync(filePath)) {
|
|
323
|
+
return {
|
|
324
|
+
kind: 'skipped',
|
|
325
|
+
message: 'Auto-sync skipped because the same reverse-source edit was already synced recently in this repo.',
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (!edition) {
|
|
330
|
+
return {
|
|
331
|
+
kind: 'not-applicable',
|
|
332
|
+
message:
|
|
333
|
+
'Auto-sync did not run because the active Cabloy edition marker could not be resolved for this repo.',
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return autoSyncReverse(filePath, edition);
|
|
221
338
|
}
|
|
222
339
|
|
|
223
|
-
function buildMessages(
|
|
340
|
+
function buildMessages(
|
|
341
|
+
result: AnalysisResult,
|
|
342
|
+
edition: EditionConfig | null,
|
|
343
|
+
reverseSyncOutcome: ReverseSyncOutcome,
|
|
344
|
+
): string {
|
|
224
345
|
const messages = ["Contract-loop gate: this change may affect Cabloy's bidirectional contract loop."];
|
|
225
346
|
|
|
226
347
|
if (result.forwardReason) {
|
|
@@ -233,30 +354,15 @@ function buildMessages(filePath: string, result: AnalysisResult): string {
|
|
|
233
354
|
}
|
|
234
355
|
|
|
235
356
|
if (result.reverseReason) {
|
|
236
|
-
messages.push(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
messages.push('Auto-sync skipped because the same reverse-source edit was already synced recently in this repo.');
|
|
242
|
-
} else {
|
|
243
|
-
const [ok, detail] = autoSyncReverse(filePath);
|
|
244
|
-
messages.push(detail);
|
|
245
|
-
if (!ok) {
|
|
246
|
-
messages.push(
|
|
247
|
-
'Please review the failure before continuing. If generated artifacts already contain the expected changes but consumers still behave stale, suspect local dependency drift before making more source edits.',
|
|
248
|
-
);
|
|
249
|
-
return messages.join(' ');
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
357
|
+
messages.push(`Reverse chain: ${result.reverseReason} ${buildReverseGuidance(edition)}`);
|
|
358
|
+
if (reverseSyncOutcome.message) {
|
|
359
|
+
messages.push(reverseSyncOutcome.message);
|
|
360
|
+
}
|
|
361
|
+
if (reverseSyncOutcome.kind === 'failure') {
|
|
253
362
|
messages.push(
|
|
254
|
-
'
|
|
363
|
+
'Please review the failure before continuing. If generated artifacts already contain the expected changes but consumers still behave stale, suspect local dependency drift before making more source edits.',
|
|
255
364
|
);
|
|
256
365
|
}
|
|
257
|
-
messages.push(
|
|
258
|
-
'For Cabloy Start, apply the same reverse-chain logic but resolve the Start-specific flavor names and generated-output paths from the active Start repo before executing edition-specific steps.',
|
|
259
|
-
);
|
|
260
366
|
}
|
|
261
367
|
|
|
262
368
|
return messages.join(' ');
|
|
@@ -277,10 +383,11 @@ function runClaudeHook(): number {
|
|
|
277
383
|
const content = readText(filePath);
|
|
278
384
|
if (content === null) return 0;
|
|
279
385
|
|
|
280
|
-
const result = analyze(filePath, content);
|
|
386
|
+
const result = analyze(filePath, content, ACTIVE_EDITION);
|
|
281
387
|
if (!hasSignal(result)) return 0;
|
|
282
388
|
|
|
283
|
-
const
|
|
389
|
+
const reverseSyncOutcome = resolveReverseSyncOutcome(filePath, result, ACTIVE_EDITION);
|
|
390
|
+
const message = buildMessages(result, ACTIVE_EDITION, reverseSyncOutcome);
|
|
284
391
|
console.log(
|
|
285
392
|
JSON.stringify({
|
|
286
393
|
hookSpecificOutput: {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.99
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Add dossier files to training records.
|
|
8
|
+
- Derive dossier file policy from the file scene.
|
|
9
|
+
|
|
10
|
+
### Improvements
|
|
11
|
+
|
|
12
|
+
- Rename and standardize `QueryAutoLoad` helpers.
|
|
13
|
+
- Use `QueryAutoLoad` for upload policy handling.
|
|
14
|
+
- Simplify the contract loop hook.
|
|
15
|
+
- Share Claude assets across editions.
|
|
16
|
+
- Split permission cache beans for clearer responsibility.
|
|
17
|
+
- Clarify permission action method names.
|
|
18
|
+
- Align default permission guard evaluation.
|
|
19
|
+
- Reuse derived upload policy state.
|
|
20
|
+
- Streamline upload policy queries.
|
|
21
|
+
- Derive image policy from the image scene.
|
|
22
|
+
- Generate the file SDK and move policy state into the model.
|
|
23
|
+
|
|
24
|
+
## 5.1.98
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
- Add `a-file` support.
|
|
29
|
+
- Add CLI templates for `a-file`.
|
|
30
|
+
- Add draft finalize flow for `a-image` direct uploads.
|
|
31
|
+
- Add native direct-upload finalize flow.
|
|
32
|
+
- Update the package with the latest feature enhancements.
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- Repair `a-image` type safety.
|
|
37
|
+
- Support image delivery tokens.
|
|
38
|
+
- Support private file download tokens.
|
|
39
|
+
|
|
40
|
+
### Improvements
|
|
41
|
+
|
|
42
|
+
- Clarify SSR bundle build hints.
|
|
43
|
+
- Tighten SSR bundle error wording.
|
|
44
|
+
- Simplify `a-file` upload and direct-upload contracts.
|
|
45
|
+
- Simplify `a-image` upload flows and native variants.
|
|
46
|
+
- Simplify the `a-image` resolve-view flow.
|
|
47
|
+
- Tighten `a-image` provider option typing.
|
|
48
|
+
- Remove the unused `a-image` failed status.
|
|
49
|
+
- Optimize `a-image` draft pruning and response URL resolution.
|
|
50
|
+
|
|
3
51
|
## 5.1.97
|
|
4
52
|
|
|
5
53
|
### Improvements
|
package/CLAUDE.md
CHANGED
|
@@ -53,6 +53,8 @@ Before inventing a custom implementation path:
|
|
|
53
53
|
- For frontend work, assume Cabloy Basic and Cabloy Start share a frontend engineering layer but may diverge in UI layer, frontend flavors, suite/module availability, SSR site baselines, project assets, and generated outputs.
|
|
54
54
|
- For Zova frontend analysis, do not default to generic Vue reinterpretation first. Read the code through Zova’s controller / bean / IoC architecture before mapping it to Vue concepts.
|
|
55
55
|
- For Zova source-reading or Vue-vs-Zova explanation tasks, start from the frontend reading guides and source-reading map in `cabloy-docs/frontend/` before doing framework-neutral reinterpretation.
|
|
56
|
+
- For frontend async state that affects rendering or interaction across consumers, prefer model-owned `$useStateData(...)` over controller-managed fetch/cache state.
|
|
57
|
+
- Default to establishing such query state during render. Use `disableSuspenseOnInit: true` only for relatively stable query-backed state when you want to skip the init-time `query.suspense()` kick; if strict readiness is needed later, wait explicitly at the interaction boundary.
|
|
56
58
|
- Keep repo-wide AI rules in `CLAUDE.md` short and durable; put branching Zova analysis workflows in `.claude/skills/`.
|
|
57
59
|
- For SSR theme-sensitive frontend work, detect the active edition marker and UI library before making assumptions. Cabloy Basic currently means DaisyUI + Tailwind CSS assumptions; Cabloy Start currently means Vuetify assumptions.
|
|
58
60
|
- In Web SSR without cookie-backed theme resolution, do not treat server reads of `$theme.dark`, `$theme.darkMode`, or `$token` as final browser truth. Keep theme-sensitive SSR branching hydration-tolerant or defer final theme-sensitive decisions to the client.
|
|
@@ -98,6 +98,7 @@ const fullstackGroups = [
|
|
|
98
98
|
text: 'Backend Metadata to Frontend Table Actions Source Reading Map',
|
|
99
99
|
link: '/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map',
|
|
100
100
|
},
|
|
101
|
+
{ text: 'Fullstack Image Workflow', link: '/fullstack/image-workflow' },
|
|
101
102
|
{ text: 'Backend OpenAPI to Frontend SDK', link: '/fullstack/openapi-to-sdk' },
|
|
102
103
|
{
|
|
103
104
|
text: 'Frontend Metadata Back to Backend',
|
|
@@ -231,6 +232,7 @@ export default defineConfig({
|
|
|
231
232
|
{ text: 'Event Guide', link: '/backend/event-guide' },
|
|
232
233
|
{ text: 'Logger Guide', link: '/backend/logger-guide' },
|
|
233
234
|
{ text: 'Upload Guide', link: '/backend/upload-guide' },
|
|
235
|
+
{ text: 'Image Guide', link: '/backend/image-guide' },
|
|
234
236
|
{ text: 'Mail Guide', link: '/backend/mail-guide' },
|
|
235
237
|
{ text: 'Serialization Guide', link: '/backend/serialization-guide' },
|
|
236
238
|
],
|
|
@@ -330,6 +332,10 @@ export default defineConfig({
|
|
|
330
332
|
text: 'Reading Zova for Vue Developers',
|
|
331
333
|
link: '/frontend/reading-zova-for-vue-developers',
|
|
332
334
|
},
|
|
335
|
+
{
|
|
336
|
+
text: 'State Architecture for Vue Developers',
|
|
337
|
+
link: '/frontend/state-architecture-for-vue-developers',
|
|
338
|
+
},
|
|
333
339
|
{
|
|
334
340
|
text: 'Zova vs Vue 3 Comparison',
|
|
335
341
|
link: '/frontend/zova-vs-vue3-comparison',
|
|
@@ -415,6 +421,7 @@ export default defineConfig({
|
|
|
415
421
|
items: [
|
|
416
422
|
{ text: 'Component Guide', link: '/frontend/component-guide' },
|
|
417
423
|
{ text: 'Form Guide', link: '/frontend/form-guide' },
|
|
424
|
+
{ text: 'Image Guide', link: '/frontend/image-guide' },
|
|
418
425
|
{
|
|
419
426
|
text: 'Zova Form Under the Hood',
|
|
420
427
|
link: '/frontend/zova-form-under-the-hood',
|
|
@@ -478,6 +485,10 @@ export default defineConfig({
|
|
|
478
485
|
text: 'Resource Models & CRUD',
|
|
479
486
|
items: [
|
|
480
487
|
{ text: 'Model State Guide', link: '/frontend/model-state-guide' },
|
|
488
|
+
{
|
|
489
|
+
text: '`$useStateData` Best Practices',
|
|
490
|
+
link: '/frontend/use-state-data-best-practices',
|
|
491
|
+
},
|
|
481
492
|
{
|
|
482
493
|
text: 'Model Resource Owner Pattern',
|
|
483
494
|
link: '/frontend/model-resource-owner-pattern',
|