cabloy 5.1.50 → 5.1.52
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/.claude/skills/cabloy-backend-scaffold/SKILL.md +207 -0
- package/.claude/skills/cabloy-backend-scaffold/evals/evals.json +29 -0
- package/.claude/skills/cabloy-backend-scaffold/references/backend-thread-map.md +52 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +39 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +201 -0
- package/.claude/skills/cabloy-contract-loop/evals/evals.json +29 -0
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +47 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +230 -0
- package/.claude/skills/cabloy-frontend-scaffold/evals/evals.json +35 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +41 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/frontend-thread-map.md +54 -0
- package/.claude/skills/cabloy-workflow/SKILL.md +292 -0
- package/.claude/skills/cabloy-workflow/evals/evals.json +35 -0
- package/.claude/skills/cabloy-workflow/references/cli-strategy.md +39 -0
- package/.claude/skills/cabloy-workflow/references/edition-detection.md +30 -0
- package/.github/workflows/docs-pages.yml +56 -0
- package/.gitignore +1 -0
- package/CHANGELOG.md +54 -0
- package/CLAUDE.md +59 -0
- package/README.md +152 -0
- package/cabloy-docs/.vitepress/config.mjs +255 -0
- package/cabloy-docs/.vitepress/public/CNAME +1 -0
- package/cabloy-docs/.vitepress/theme/custom.css +64 -0
- package/cabloy-docs/.vitepress/theme/edition-badges.md +5 -0
- package/cabloy-docs/.vitepress/theme/index.js +5 -0
- package/cabloy-docs/ai/class-placement-rule.md +139 -0
- package/cabloy-docs/ai/cli-for-agents.md +56 -0
- package/cabloy-docs/ai/cli-to-skill-map.md +165 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +168 -0
- package/cabloy-docs/ai/edition-consistency-checklist.md +150 -0
- package/cabloy-docs/ai/edition-detection.md +30 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +135 -0
- package/cabloy-docs/ai/global-bean-lookup.md +158 -0
- package/cabloy-docs/ai/introduction.md +62 -0
- package/cabloy-docs/ai/playbook-backend-module.md +111 -0
- package/cabloy-docs/ai/playbook-contract-regeneration.md +100 -0
- package/cabloy-docs/ai/playbook-frontend-page.md +99 -0
- package/cabloy-docs/ai/playbook-metadata-refresh.md +67 -0
- package/cabloy-docs/ai/repo-guidance.md +58 -0
- package/cabloy-docs/ai/rules-and-config.md +29 -0
- package/cabloy-docs/ai/skills.md +37 -0
- package/cabloy-docs/ai/verification.md +31 -0
- package/cabloy-docs/ai/virtual-decorator-guidance.md +206 -0
- package/cabloy-docs/backend/aop-overview.md +128 -0
- package/cabloy-docs/backend/auth-guide.md +151 -0
- package/cabloy-docs/backend/backend-essentials.md +128 -0
- package/cabloy-docs/backend/broadcast-guide.md +138 -0
- package/cabloy-docs/backend/cache-guide.md +70 -0
- package/cabloy-docs/backend/captcha-guide.md +162 -0
- package/cabloy-docs/backend/cli.md +173 -0
- package/cabloy-docs/backend/config-guide.md +249 -0
- package/cabloy-docs/backend/controller-aop-guide.md +270 -0
- package/cabloy-docs/backend/controller-guide.md +347 -0
- package/cabloy-docs/backend/crud-workflow.md +118 -0
- package/cabloy-docs/backend/dto-guide.md +161 -0
- package/cabloy-docs/backend/dto-infer-generation.md +153 -0
- package/cabloy-docs/backend/dynamic-datasource-guide.md +70 -0
- package/cabloy-docs/backend/election-guide.md +141 -0
- package/cabloy-docs/backend/entity-guide.md +150 -0
- package/cabloy-docs/backend/error-guide.md +108 -0
- package/cabloy-docs/backend/event-guide.md +183 -0
- package/cabloy-docs/backend/external-aop-guide.md +149 -0
- package/cabloy-docs/backend/field-indexes.md +79 -0
- package/cabloy-docs/backend/foundation.md +281 -0
- package/cabloy-docs/backend/i18n-guide.md +211 -0
- package/cabloy-docs/backend/internal-aop-guide.md +181 -0
- package/cabloy-docs/backend/introduction.md +95 -0
- package/cabloy-docs/backend/jwt-guide.md +276 -0
- package/cabloy-docs/backend/logger-guide.md +223 -0
- package/cabloy-docs/backend/mail-guide.md +189 -0
- package/cabloy-docs/backend/menu-guide.md +80 -0
- package/cabloy-docs/backend/migration-and-changes.md +192 -0
- package/cabloy-docs/backend/model-guide.md +274 -0
- package/cabloy-docs/backend/multi-database-datasource.md +171 -0
- package/cabloy-docs/backend/multi-instance-and-instance-resolution.md +196 -0
- package/cabloy-docs/backend/openapi-guide.md +118 -0
- package/cabloy-docs/backend/orm-aggregate-group-guide.md +210 -0
- package/cabloy-docs/backend/orm-configuration-guide.md +165 -0
- package/cabloy-docs/backend/orm-guide.md +109 -0
- package/cabloy-docs/backend/orm-mutation-guide.md +195 -0
- package/cabloy-docs/backend/orm-select-guide.md +243 -0
- package/cabloy-docs/backend/queue-guide.md +271 -0
- package/cabloy-docs/backend/quickstart.md +141 -0
- package/cabloy-docs/backend/redis-guide.md +70 -0
- package/cabloy-docs/backend/redlock-guide.md +60 -0
- package/cabloy-docs/backend/relations-guide.md +250 -0
- package/cabloy-docs/backend/runtime-and-flavors.md +304 -0
- package/cabloy-docs/backend/schedule-guide.md +81 -0
- package/cabloy-docs/backend/scripts.md +116 -0
- package/cabloy-docs/backend/serialization-guide.md +192 -0
- package/cabloy-docs/backend/service-guide.md +166 -0
- package/cabloy-docs/backend/sharding-guide.md +49 -0
- package/cabloy-docs/backend/startup-guide.md +326 -0
- package/cabloy-docs/backend/transaction-guide.md +82 -0
- package/cabloy-docs/backend/unit-testing.md +209 -0
- package/cabloy-docs/backend/upload-guide.md +160 -0
- package/cabloy-docs/backend/user-access-guide.md +157 -0
- package/cabloy-docs/backend/validation-guide.md +80 -0
- package/cabloy-docs/backend/worker-guide.md +59 -0
- package/cabloy-docs/editions/cabloy-basic.md +26 -0
- package/cabloy-docs/editions/cabloy-start.md +55 -0
- package/cabloy-docs/editions/choosing-between-basic-and-start.md +84 -0
- package/cabloy-docs/editions/detection.md +31 -0
- package/cabloy-docs/editions/overview.md +107 -0
- package/cabloy-docs/frontend/api-guide.md +93 -0
- package/cabloy-docs/frontend/api-schema-guide.md +43 -0
- package/cabloy-docs/frontend/app-startup-guide.md +185 -0
- package/cabloy-docs/frontend/cli.md +78 -0
- package/cabloy-docs/frontend/component-guide.md +105 -0
- package/cabloy-docs/frontend/component-props-guide.md +97 -0
- package/cabloy-docs/frontend/component-v-model-guide.md +110 -0
- package/cabloy-docs/frontend/css-in-js-guide.md +151 -0
- package/cabloy-docs/frontend/design-principles.md +55 -0
- package/cabloy-docs/frontend/environment-config-guide.md +250 -0
- package/cabloy-docs/frontend/foundation.md +58 -0
- package/cabloy-docs/frontend/generic-component-guide.md +35 -0
- package/cabloy-docs/frontend/icon-engine-guide.md +88 -0
- package/cabloy-docs/frontend/introduction.md +33 -0
- package/cabloy-docs/frontend/ioc-and-beans.md +211 -0
- package/cabloy-docs/frontend/mock-guide.md +109 -0
- package/cabloy-docs/frontend/model-architecture.md +87 -0
- package/cabloy-docs/frontend/model-state-guide.md +70 -0
- package/cabloy-docs/frontend/module-scope.md +168 -0
- package/cabloy-docs/frontend/modules-and-suites.md +179 -0
- package/cabloy-docs/frontend/navigation-guards-guide.md +68 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +102 -0
- package/cabloy-docs/frontend/page-guide.md +223 -0
- package/cabloy-docs/frontend/page-params-guide.md +87 -0
- package/cabloy-docs/frontend/page-query-guide.md +96 -0
- package/cabloy-docs/frontend/page-route-guide.md +147 -0
- package/cabloy-docs/frontend/quickstart.md +202 -0
- package/cabloy-docs/frontend/route-alias-guide.md +61 -0
- package/cabloy-docs/frontend/scripts.md +86 -0
- package/cabloy-docs/frontend/sdk-guide.md +45 -0
- package/cabloy-docs/frontend/server-data.md +74 -0
- package/cabloy-docs/frontend/ssr-client-only.md +40 -0
- package/cabloy-docs/frontend/ssr-env.md +51 -0
- package/cabloy-docs/frontend/ssr-init-data.md +46 -0
- package/cabloy-docs/frontend/ssr-overview.md +48 -0
- package/cabloy-docs/frontend/ssr-seo-meta.md +52 -0
- package/cabloy-docs/frontend/system-startup-guide.md +186 -0
- package/cabloy-docs/frontend/theme-guide.md +154 -0
- package/cabloy-docs/frontend/zod-guide.md +161 -0
- package/cabloy-docs/fullstack/cli.md +118 -0
- package/cabloy-docs/fullstack/comparison-with-other-frameworks.md +117 -0
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +62 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +64 -0
- package/cabloy-docs/fullstack/introduction.md +81 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -0
- package/cabloy-docs/fullstack/quickstart.md +89 -0
- package/cabloy-docs/fullstack/vona-zova-integration.md +86 -0
- package/cabloy-docs/fullstack/vscode-extensions.md +126 -0
- package/cabloy-docs/index.md +72 -0
- package/cabloy-docs/package.json +16 -0
- package/cabloy-docs/pnpm-lock.yaml +1607 -0
- package/cabloy-docs/reference/backend-directory-structure.md +88 -0
- package/cabloy-docs/reference/cli-reference.md +49 -0
- package/cabloy-docs/reference/glossary.md +38 -0
- package/cabloy-docs/reference/package-map.md +105 -0
- package/cabloy-docs/reference/repo-scripts.md +36 -0
- package/package.json +4 -1
- package/scripts/init.ts +12 -0
- package/scripts/upgrade.ts +31 -3
- package/vona/README.md +4 -4
- package/vona/README.zh-CN.md +4 -4
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/pnpm-lock.yaml +383 -38
- package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-datasharding/src/bean/summerCache.datasourceWrite.ts +2 -2
- 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/.metadata/index.ts +49 -1
- package/vona/src/suite-vendor/a-cabloy/modules/a-ssr/src/controller/memoryDiag.ts +97 -0
- package/vona/src/suite-vendor/a-cabloy/package.json +1 -1
- package/vona/src/suite-vendor/a-captcha/modules/a-captcha/package.json +1 -1
- package/vona/src/suite-vendor/a-captcha/modules/a-captcha/src/bean/cacheRedis.captcha.ts +2 -2
- package/vona/src/suite-vendor/a-captcha/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-bean/cli/bean/metadata/generate.ts +5 -6
- package/vona/src/suite-vendor/a-vona/modules/a-bean/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheMem/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/cli/cacheRedis/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/.metadata/index.ts +13 -2
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/bean/bean.cache.ts +6 -7
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheMemBase.ts → service/cacheMemBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-cache/src/{bean/bean.cacheRedisBase.ts → service/cacheRedisBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.emailConfirm.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-mailconfirm/src/bean/cacheRedis.passwordReset.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/bean/summerCache.json.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/cli/databaseDialect/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- 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/.metadata/index.ts +4 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.database.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/bean.model.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/bean/schedule.softDeletionPrune.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/index.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_cache.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_meta.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.modelBase.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoAggregate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoCreate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGet.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoGroup.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoSelectAndCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/dto/dtoUpdate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/index.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/modelCacheBase.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relations.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsDynamic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/lib/relationsStatic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheEntity_.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/cacheQuery_.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/database.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean/bean.databaseDialectBase.ts → service/databaseDialectBase_.ts} +38 -41
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/db_.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/service/relations_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/database.ts +0 -5
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoGet.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/dto/dtoSelectAndCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/model.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelAggr.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelCount.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGeneral.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelGroup.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/modelIncrement.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relations.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsColumns.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDef.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefDynamic.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsDefMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsMutate.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/types/relationsTables.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.betterSqlite3.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.mysql.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-ormdialect/src/bean/databaseDialect.pg.ts +2 -2
- 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/bean/bean.permission.ts +109 -40
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/summerCache.permission.ts +2 -2
- 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/bean/cacheRedis.startupDebounce.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-summer/cli/boilerplate/{{sceneName}}.{{beanName}}.ts_ +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-summer/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/.metadata/index.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/bean/bean.summer.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localMem_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/service/localRedis_.ts +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-summer/src/{bean/bean.summerCacheBase.ts → service/summerCacheBase_.ts} +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.rapidoc.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-swagger/src/bean/summerCache.swagger.ts +2 -2
- 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/bean/cacheRedis.authToken.ts +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-worker/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-worker/src/bean/cacheRedis.workerAlive.ts +2 -2
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/README.md +5 -5
- package/zova/README.zh-CN.md +4 -4
- package/zova/package.original.json +4 -4
- package/zova/packages-cli/cli/package.json +2 -2
- package/zova/packages-cli/cli-set-front/package.json +2 -2
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-utils/zova-vite/package.json +2 -2
- package/zova/packages-utils/zova-vite/templates/app/controller.tsx_ +3 -3
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +2 -2
- package/zova/packages-zova/zova-core/src/bean/beanContainer.ts +3 -3
- package/zova/packages-zova/zova-core/src/bean/beanControllerPageBase.ts +1 -0
- package/zova/packages-zova/zova-core/src/core/component/module.ts +16 -16
- package/zova/packages-zova/zova-core/src/core/context/component.ts +35 -3
- package/zova/packages-zova/zova-core/src/core/context/util.ts +15 -11
- package/zova/pnpm-lock.yaml +1596 -1679
- package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/index.ts +11 -0
- package/zova/src/suite/a-demo/modules/demo-basic/src/.metadata/page/toolMinimal.ts +9 -0
- package/zova/src/suite/a-demo/modules/demo-basic/src/page/toolMinimal/controller.tsx +11 -0
- package/zova/src/suite/a-demo/modules/demo-basic/src/routes.ts +10 -0
- 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/service/storage.ts +4 -5
- 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/monkey.ts +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssr.ts +36 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssrMetaStore.ts +7 -2
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/monkey.ts +3 -0
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssrserver/src/service/ssrHandler.ts +70 -29
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +6 -6
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_inner.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_crud_table.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_knex.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_utils.ts +0 -0
- /package/vona/src/suite-vendor/a-vona/modules/a-orm/src/{bean → lib}/bean.model/bean.model_view.ts +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# OpenAPI SDK Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how the Zova OpenAPI SDK workflow fits into the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why OpenAPI SDK matters
|
|
6
|
+
|
|
7
|
+
Zova can generate frontend client SDKs from backend Swagger/OpenAPI metadata.
|
|
8
|
+
|
|
9
|
+
This is one of the most important fullstack links in Cabloy, because it lets backend contracts drive frontend integration more directly and reduces redundant hand-written API code.
|
|
10
|
+
|
|
11
|
+
## This page’s role in the contract loop
|
|
12
|
+
|
|
13
|
+
A practical split is:
|
|
14
|
+
|
|
15
|
+
- backend docs explain contract authoring and OpenAPI emission
|
|
16
|
+
- the fullstack bridge doc explains how emitted OpenAPI becomes generated frontend SDKs
|
|
17
|
+
- this page explains frontend configuration, generation, and usage choices after that contract reaches Zova
|
|
18
|
+
|
|
19
|
+
For the bridge view, also see [Backend OpenAPI to Frontend SDK](/fullstack/openapi-to-sdk).
|
|
20
|
+
|
|
21
|
+
For the broader frontend contract-consumption ladder, also see [Server Data](/frontend/server-data), [API Schema Guide](/frontend/api-schema-guide), and [SDK Guide](/frontend/sdk-guide).
|
|
22
|
+
|
|
23
|
+
## Initialize OpenAPI config
|
|
24
|
+
|
|
25
|
+
Example: initialize OpenAPI config for module `demo-student`.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run zova :openapi:config demo-student
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Module-level config
|
|
32
|
+
|
|
33
|
+
Each module can control which backend operations belong to it.
|
|
34
|
+
|
|
35
|
+
Representative idea:
|
|
36
|
+
|
|
37
|
+
- configure matching rules in the module OpenAPI config
|
|
38
|
+
- keep API ownership aligned with the module boundary
|
|
39
|
+
|
|
40
|
+
This modular split matters because Cabloy does not treat the frontend as one flat API client surface.
|
|
41
|
+
|
|
42
|
+
## Project-level config
|
|
43
|
+
|
|
44
|
+
The project-level OpenAPI config defines where Swagger/OpenAPI metadata is downloaded from.
|
|
45
|
+
|
|
46
|
+
Representative use case:
|
|
47
|
+
|
|
48
|
+
- point the frontend project at the correct backend Swagger JSON source
|
|
49
|
+
- then generate only the SDK slices needed by the current module
|
|
50
|
+
|
|
51
|
+
## Generate the SDK
|
|
52
|
+
|
|
53
|
+
Example: generate OpenAPI-based frontend services for module `demo-student`.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run zova :openapi:generate demo-student
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Build the rest-contract output
|
|
60
|
+
|
|
61
|
+
For Cabloy Basic, representative contract-build commands include:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cd zova && npm run build:rest:cabloyBasicAdmin
|
|
65
|
+
cd zova && npm run build:rest:cabloyBasicWeb
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This matters because SDK generation and rest-contract build steps are related, but not identical.
|
|
69
|
+
|
|
70
|
+
## Important convention
|
|
71
|
+
|
|
72
|
+
One important rule is that a module should usually standardize on one API-service creation style.
|
|
73
|
+
|
|
74
|
+
That means a module should generally choose between:
|
|
75
|
+
|
|
76
|
+
- manually authored API services
|
|
77
|
+
- OpenAPI-generated API services
|
|
78
|
+
|
|
79
|
+
Mixing both styles carelessly inside one module makes the codebase harder to reason about.
|
|
80
|
+
|
|
81
|
+
## Relationship to backend authoring
|
|
82
|
+
|
|
83
|
+
This page is about frontend consumption and generation, not backend contract authoring.
|
|
84
|
+
|
|
85
|
+
If the backend contract itself changes, first inspect or update the backend contract pages such as:
|
|
86
|
+
|
|
87
|
+
- [Controller Guide](/backend/controller-guide)
|
|
88
|
+
- [OpenAPI Guide](/backend/openapi-guide)
|
|
89
|
+
- [DTO Guide](/backend/dto-guide)
|
|
90
|
+
|
|
91
|
+
Then return to this page for the frontend regeneration step.
|
|
92
|
+
|
|
93
|
+
## Implementation checks for SDK regeneration decisions
|
|
94
|
+
|
|
95
|
+
When evaluating a request that depends on backend contracts, ask:
|
|
96
|
+
|
|
97
|
+
1. is this module already using generated OpenAPI services?
|
|
98
|
+
2. should the SDK be regenerated instead of hand-writing a new frontend service?
|
|
99
|
+
3. is the real source of truth the backend OpenAPI metadata rather than the current frontend code?
|
|
100
|
+
4. is the current task backend authoring, bridge regeneration, or frontend consumption?
|
|
101
|
+
|
|
102
|
+
That helps keep frontend integration aligned with the backend contract.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Page Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how pages work in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## What a page means in Zova
|
|
6
|
+
|
|
7
|
+
A Zova page is not just a route target with a template attached.
|
|
8
|
+
|
|
9
|
+
The page model is built around a controller-oriented structure that combines:
|
|
10
|
+
|
|
11
|
+
- reactive state
|
|
12
|
+
- TSX-based render logic
|
|
13
|
+
- IOC-friendly composition
|
|
14
|
+
- CSS-in-JS styling
|
|
15
|
+
|
|
16
|
+
That combination is one of the clearest examples of Zova’s overall design philosophy.
|
|
17
|
+
|
|
18
|
+
## Create a page
|
|
19
|
+
|
|
20
|
+
Example: create a page named `counter` in module `demo-student`.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run zova :create:page counter -- --module=demo-student
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Route path generation
|
|
27
|
+
|
|
28
|
+
Zova automatically derives the page path from the module and page names.
|
|
29
|
+
|
|
30
|
+
Representative example:
|
|
31
|
+
|
|
32
|
+
- module: `demo-student`
|
|
33
|
+
- page: `counter`
|
|
34
|
+
- generated page path: `/demo/student/counter`
|
|
35
|
+
|
|
36
|
+
This matters because the framework already has conventions for route structure. AI should reuse those conventions rather than inventing unrelated paths.
|
|
37
|
+
|
|
38
|
+
## Controller definition
|
|
39
|
+
|
|
40
|
+
Representative page controller shape:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
@Controller()
|
|
44
|
+
class ControllerPageCounter extends BeanControllerPageBase {
|
|
45
|
+
protected render() {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Add state
|
|
52
|
+
|
|
53
|
+
Representative reactive state pattern:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
class ControllerPageCounter {
|
|
57
|
+
count: number = 0;
|
|
58
|
+
|
|
59
|
+
increment() {
|
|
60
|
+
this.count++;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
decrement() {
|
|
64
|
+
this.count--;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Add render logic
|
|
70
|
+
|
|
71
|
+
Representative TSX render pattern:
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
class ControllerPageCounter {
|
|
75
|
+
protected render() {
|
|
76
|
+
return (
|
|
77
|
+
<div>
|
|
78
|
+
<div>count: {this.count}</div>
|
|
79
|
+
<button onClick={() => this.increment()}>Increment</button>
|
|
80
|
+
<button onClick={() => this.decrement()}>Decrement</button>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Add style
|
|
88
|
+
|
|
89
|
+
Zova pages can also attach style through built-in CSS-in-JS support.
|
|
90
|
+
|
|
91
|
+
For choosing among local `$style`, dedicated style beans, shared/global styles, and token/theme surfaces, also see [CSS-in-JS Guide](/frontend/css-in-js-guide).
|
|
92
|
+
|
|
93
|
+
Representative pattern:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
class ControllerPageCounter {
|
|
97
|
+
cTextCenter: string;
|
|
98
|
+
|
|
99
|
+
protected async __init__() {
|
|
100
|
+
this.cTextCenter = this.$style({
|
|
101
|
+
textAlign: 'center',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Progressive code splitting
|
|
108
|
+
|
|
109
|
+
As page complexity grows, Zova supports progressively splitting page logic into more files instead of forcing everything to remain in one controller file forever.
|
|
110
|
+
|
|
111
|
+
A useful progression is:
|
|
112
|
+
|
|
113
|
+
- **single-file** page structure for early-stage pages
|
|
114
|
+
- **three-file** structure with controller, render, and style split out
|
|
115
|
+
- **more-file** structure when additional render, style, or service beans are needed
|
|
116
|
+
|
|
117
|
+
This matters because Zova encourages pages to start simple and then evolve into richer structures only when the business complexity justifies it.
|
|
118
|
+
|
|
119
|
+
### Single-file to three-file
|
|
120
|
+
|
|
121
|
+
A typical first step is keeping the page controller responsible for state while moving render and style into dedicated beans.
|
|
122
|
+
|
|
123
|
+
#### Create the first render bean
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run zova :refactor:firstRender page/counter -- --module=demo-student
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Representative render bean shape:
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
@Render()
|
|
133
|
+
class RenderPageCounter extends BeanRenderBase {
|
|
134
|
+
public render() {
|
|
135
|
+
return (
|
|
136
|
+
<div class={this.cTextCenter}>
|
|
137
|
+
<div>count: {this.count}</div>
|
|
138
|
+
<button onClick={() => this.increment()}>Increment</button>
|
|
139
|
+
<button onClick={() => this.decrement()}>Decrement</button>
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Create the first style bean
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
npm run zova :refactor:firstStyle page/counter -- --module=demo-student
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Representative style bean shape:
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
@Style()
|
|
156
|
+
class StylePageCounter extends BeanStyleBase {
|
|
157
|
+
cTextCenter: string;
|
|
158
|
+
|
|
159
|
+
protected async __init__() {
|
|
160
|
+
this.cTextCenter = this.$style({
|
|
161
|
+
textAlign: 'center',
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### More-file growth
|
|
168
|
+
|
|
169
|
+
When the page continues to grow, you can keep splitting responsibilities instead of forcing one large controller or render bean to absorb everything.
|
|
170
|
+
|
|
171
|
+
Representative refactors include:
|
|
172
|
+
|
|
173
|
+
- additional render beans for larger UI regions
|
|
174
|
+
- additional style beans for more isolated styling concerns
|
|
175
|
+
- dedicated service beans when business state and behavior should move out of the page controller
|
|
176
|
+
|
|
177
|
+
#### Create another render bean
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm run zova :refactor:anotherRender page/counter another -- --module=demo-student
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
#### Create another style bean
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npm run zova :refactor:anotherStyle page/counter another -- --module=demo-student
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### Create a service bean for state management
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npm run zova :create:bean service page/counter/counter -- --module=demo-student
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Representative service bean shape:
|
|
196
|
+
|
|
197
|
+
```typescript
|
|
198
|
+
@Service()
|
|
199
|
+
class ServiceCounter extends BeanBase {
|
|
200
|
+
count: number = 0;
|
|
201
|
+
|
|
202
|
+
increment() {
|
|
203
|
+
this.count++;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
decrement() {
|
|
207
|
+
this.count--;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
These refactors are supported by Zova CLI commands rather than requiring a fully manual restructuring from scratch.
|
|
213
|
+
|
|
214
|
+
## Practical implications for page implementation
|
|
215
|
+
|
|
216
|
+
When generating or editing a Zova page, preserve the page/controller mental model instead of rewriting the code into a generic Vue single-file-component pattern.
|
|
217
|
+
|
|
218
|
+
A better default is:
|
|
219
|
+
|
|
220
|
+
1. use the Zova page generator
|
|
221
|
+
2. keep state, render, and style inside the intended controller-oriented structure
|
|
222
|
+
3. reuse existing routing and styling conventions
|
|
223
|
+
4. verify whether the active edition changes page-level UI assumptions
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Page Params Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how typed page params work in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why page params support matters
|
|
6
|
+
|
|
7
|
+
Zova enhances route params handling with typed support so page controllers can work with route parameters through a structured schema instead of ad hoc string access.
|
|
8
|
+
|
|
9
|
+
## Add params support to a page
|
|
10
|
+
|
|
11
|
+
Example: add params support for page `counter`.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm run zova :refactor:pageParams counter -- --module=demo-student
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Add params schema
|
|
18
|
+
|
|
19
|
+
Representative pattern:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
export const ControllerPageCounterSchemaParams = z.object({
|
|
23
|
+
id: z.number().optional().default(0),
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This is more than a type annotation.
|
|
28
|
+
|
|
29
|
+
Because route params arrive as strings at the URL level, the schema is also where Zova’s `z` wrapper can coerce the route value into the typed value that the page controller wants to consume.
|
|
30
|
+
|
|
31
|
+
## Route record requirements
|
|
32
|
+
|
|
33
|
+
One important rule is that if a page supports params, the route should expose the proper route structure and route name.
|
|
34
|
+
|
|
35
|
+
Representative route idea:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
{
|
|
39
|
+
name: 'counter',
|
|
40
|
+
path: 'counter/:id?',
|
|
41
|
+
component: ZPageCounter,
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Regenerate metadata
|
|
46
|
+
|
|
47
|
+
When the route definition changes, regenerate module metadata so the framework’s typed route information stays aligned.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run zova :tools:metadata demo-student
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For the broader schema model behind `z`, coercion, defaults, and nested structures, see [Zod Guide](/frontend/zod-guide).
|
|
54
|
+
|
|
55
|
+
## Use params in a page
|
|
56
|
+
|
|
57
|
+
Representative pattern:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
class ControllerPageCounter {
|
|
61
|
+
render() {
|
|
62
|
+
return <div>{this.$params.id}</div>;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Pass params during navigation
|
|
68
|
+
|
|
69
|
+
Representative pattern:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const url = this.$router.getPagePath('/demo/student/counter/:id?', {
|
|
73
|
+
params: {
|
|
74
|
+
id: 1,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
this.$router.push(url);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Implementation checks for param-driven page changes
|
|
81
|
+
|
|
82
|
+
When adding or editing param-driven page behavior:
|
|
83
|
+
|
|
84
|
+
1. use the Zova refactor command when possible
|
|
85
|
+
2. update the route record and route name deliberately
|
|
86
|
+
3. regenerate metadata when route typing depends on it
|
|
87
|
+
4. use `this.$params` and typed router helpers instead of manual parsing
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Page Query Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how typed page query handling works in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why page query support matters
|
|
6
|
+
|
|
7
|
+
Zova enhances page query handling with type-aware support so routing data can be read and passed in a more structured way.
|
|
8
|
+
|
|
9
|
+
That is important because query values are part of page behavior, not just incidental URL text.
|
|
10
|
+
|
|
11
|
+
## Add query support to a page
|
|
12
|
+
|
|
13
|
+
Example: add query support for page `counter`.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm run zova :refactor:pageQuery counter -- --module=demo-student
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Add query schema
|
|
20
|
+
|
|
21
|
+
Query support becomes explicit through a Zod schema.
|
|
22
|
+
|
|
23
|
+
Representative pattern:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
export const ControllerPageCounterSchemaQuery = z.object({
|
|
27
|
+
name: z.string().optional(),
|
|
28
|
+
age: z.number().optional(),
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This matters because query parsing becomes typed and framework-aware instead of stringly-typed ad hoc access.
|
|
33
|
+
|
|
34
|
+
## Use query values
|
|
35
|
+
|
|
36
|
+
Representative pattern:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
class ControllerPageCounter {
|
|
40
|
+
render() {
|
|
41
|
+
return (
|
|
42
|
+
<div>
|
|
43
|
+
<div>{this.$query.name}</div>
|
|
44
|
+
<div>{this.$query.age}</div>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Pass query values during navigation
|
|
52
|
+
|
|
53
|
+
Representative pattern:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const url = this.$router.getPagePath('/demo/student/counter', {
|
|
57
|
+
query: {
|
|
58
|
+
name: 'tom',
|
|
59
|
+
age: 18,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
this.$router.push(url);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## More complex query shapes
|
|
66
|
+
|
|
67
|
+
Query schemas do not have to stop at flat primitives.
|
|
68
|
+
|
|
69
|
+
Representative patterns include nested objects and arrays:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
export const ControllerPageCounterSchemaQuery = z.object({
|
|
73
|
+
user: z
|
|
74
|
+
.object({
|
|
75
|
+
name: z.string(),
|
|
76
|
+
age: z.number(),
|
|
77
|
+
})
|
|
78
|
+
.optional(),
|
|
79
|
+
colors: z.array(z.string()).optional(),
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
That lets page code consume richer route-driven state such as filter collections or nested search payloads without dropping back to manual string parsing.
|
|
84
|
+
|
|
85
|
+
## Implementation checks for page-query changes
|
|
86
|
+
|
|
87
|
+
When adding page query behavior, do not fall back to raw string parsing.
|
|
88
|
+
|
|
89
|
+
A better default is:
|
|
90
|
+
|
|
91
|
+
1. add the query skeleton with the Zova refactor command
|
|
92
|
+
2. define the schema explicitly
|
|
93
|
+
3. use `this.$query` and typed navigation helpers
|
|
94
|
+
4. keep query behavior aligned with the page controller model
|
|
95
|
+
|
|
96
|
+
For the broader schema model behind `z`, coercion, nested objects, and array support, see [Zod Guide](/frontend/zod-guide).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Page Route Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how page route records work in Zova within the Cabloy monorepo.
|
|
4
|
+
|
|
5
|
+
## Why route records matter
|
|
6
|
+
|
|
7
|
+
When a page is created, Zova automatically creates a route record.
|
|
8
|
+
|
|
9
|
+
That route record is the framework-level description of how the page is reached, loaded, authenticated, and rendered within the broader application model and app shell.
|
|
10
|
+
|
|
11
|
+
## Representative route record
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ZPageCounter } from './.metadata/page/counter.js';
|
|
15
|
+
|
|
16
|
+
export const routes: IModuleRoute[] = [
|
|
17
|
+
{
|
|
18
|
+
name: 'counter',
|
|
19
|
+
path: 'counter/:id?',
|
|
20
|
+
component: ZPageCounter,
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Core route fields
|
|
26
|
+
|
|
27
|
+
These route fields are the most important:
|
|
28
|
+
|
|
29
|
+
- `path`
|
|
30
|
+
- `name`
|
|
31
|
+
- `component`
|
|
32
|
+
- `alias`
|
|
33
|
+
- `meta`
|
|
34
|
+
|
|
35
|
+
These are the main surface area for page routing behavior.
|
|
36
|
+
|
|
37
|
+
## `path`
|
|
38
|
+
|
|
39
|
+
`path` defines the route path relative to the module. The framework then combines it with the module prefix to form the absolute route path.
|
|
40
|
+
|
|
41
|
+
This matters because path generation is modular by default.
|
|
42
|
+
|
|
43
|
+
## `name`
|
|
44
|
+
|
|
45
|
+
If a page uses params, the route name becomes especially important because typed param-aware routing depends on it.
|
|
46
|
+
|
|
47
|
+
## `component`
|
|
48
|
+
|
|
49
|
+
`component` points to the generated page wrapper such as `ZPageCounter`.
|
|
50
|
+
|
|
51
|
+
## `alias`
|
|
52
|
+
|
|
53
|
+
Aliases are supported, but alias handling belongs in the broader routing configuration rather than being treated as an isolated route-local trick.
|
|
54
|
+
|
|
55
|
+
## `meta`
|
|
56
|
+
|
|
57
|
+
The route meta surface includes important behavior such as:
|
|
58
|
+
|
|
59
|
+
- absolute-path behavior
|
|
60
|
+
- layout choice
|
|
61
|
+
- authentication requirement
|
|
62
|
+
- locale handling
|
|
63
|
+
- component key behavior
|
|
64
|
+
- keepAlive behavior
|
|
65
|
+
- SSR transfer-cache behavior
|
|
66
|
+
|
|
67
|
+
This is one reason route records matter so much: they are not just URL declarations. They are an application-behavior surface.
|
|
68
|
+
|
|
69
|
+
## Route -> shell -> routed page
|
|
70
|
+
|
|
71
|
+
A useful frontend mental model is:
|
|
72
|
+
|
|
73
|
+
1. the route record identifies the page
|
|
74
|
+
2. route metadata chooses the logical shell/layout
|
|
75
|
+
3. the resolved shell hosts the routed page
|
|
76
|
+
4. guards and aliases can still affect how the page is reached
|
|
77
|
+
|
|
78
|
+
That is why routing in Zova is not only about URLs. It is also about how the app shell and navigation policy shape the visible screen.
|
|
79
|
+
|
|
80
|
+
### Layout selection
|
|
81
|
+
|
|
82
|
+
If a page route does not specify a layout, Zova uses the default layout.
|
|
83
|
+
|
|
84
|
+
Representative route shape:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
export const routes: IModuleRoute[] = [
|
|
88
|
+
{
|
|
89
|
+
path: 'counter',
|
|
90
|
+
component: ZPageCounter,
|
|
91
|
+
meta: {
|
|
92
|
+
layout: 'default',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The system also distinguishes common built-in layout placeholders such as:
|
|
99
|
+
|
|
100
|
+
- `empty`
|
|
101
|
+
- `default`
|
|
102
|
+
|
|
103
|
+
These names act as logical layout choices rather than hard-coded component filenames.
|
|
104
|
+
|
|
105
|
+
A representative env mapping looks like this:
|
|
106
|
+
|
|
107
|
+
```txt
|
|
108
|
+
env/.env
|
|
109
|
+
LAYOUT_COMPONENT_EMPTY = home-layout:layoutEmpty
|
|
110
|
+
LAYOUT_COMPONENT_DEFAULT = home-layout:layoutTabs
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
That means route metadata chooses the logical layout, while env/config decides which actual layout component should back that choice for the active runtime variant.
|
|
114
|
+
|
|
115
|
+
This is the practical app-shell boundary in Zova: routed pages do not appear alone. They appear inside the resolved layout shell for the current runtime variant.
|
|
116
|
+
|
|
117
|
+
In the current Basic source, that shell is represented concretely by admin-style, web-style, and empty/minimal layout implementations.
|
|
118
|
+
|
|
119
|
+
For the broader runtime-selection model behind env and flavor-aware configuration, see [Environment and Config Guide](/frontend/environment-config-guide).
|
|
120
|
+
For the onboarding path that leads into shell selection, also see [Frontend Quickstart](/frontend/quickstart).
|
|
121
|
+
|
|
122
|
+
## Relationship to guards and aliases
|
|
123
|
+
|
|
124
|
+
Layout selection, navigation guards, and aliases are closely related but they solve different problems:
|
|
125
|
+
|
|
126
|
+
- route metadata chooses the logical shell and route behavior
|
|
127
|
+
- guards decide whether navigation should continue, redirect, or enrich route state
|
|
128
|
+
- aliases provide alternate entry paths without changing the main route identity model
|
|
129
|
+
|
|
130
|
+
Read together with:
|
|
131
|
+
|
|
132
|
+
- [Navigation Guards Guide](/frontend/navigation-guards-guide)
|
|
133
|
+
- [Route Alias Guide](/frontend/route-alias-guide)
|
|
134
|
+
- [Frontend Quickstart](/frontend/quickstart)
|
|
135
|
+
|
|
136
|
+
## Implementation checks for page-routing changes
|
|
137
|
+
|
|
138
|
+
When editing page routing, do not only change the URL string.
|
|
139
|
+
|
|
140
|
+
It should also check whether the route change affects:
|
|
141
|
+
|
|
142
|
+
- params typing
|
|
143
|
+
- auth behavior
|
|
144
|
+
- layout behavior
|
|
145
|
+
- locale behavior
|
|
146
|
+
- SSR behavior
|
|
147
|
+
- metadata regeneration
|