cabloy 5.1.61 → 5.1.62
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 +2 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -1
- package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +2 -0
- package/CHANGELOG.md +42 -0
- package/CLAUDE.md +1 -0
- package/cabloy-docs/.vitepress/config.mjs +158 -12
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +8 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +2 -0
- package/cabloy-docs/ai/skills.md +1 -0
- package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
- package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
- package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
- package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
- package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
- package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
- package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
- package/cabloy-docs/backend/broadcast-guide.md +3 -3
- package/cabloy-docs/backend/cli.md +20 -11
- package/cabloy-docs/backend/config-guide.md +4 -4
- package/cabloy-docs/backend/controller-aop-guide.md +10 -10
- package/cabloy-docs/backend/controller-guide.md +12 -2
- package/cabloy-docs/backend/crud-workflow.md +7 -3
- package/cabloy-docs/backend/dto-guide.md +12 -2
- package/cabloy-docs/backend/dto-infer-generation.md +201 -25
- package/cabloy-docs/backend/election-guide.md +2 -2
- package/cabloy-docs/backend/entity-guide.md +12 -3
- package/cabloy-docs/backend/error-guide.md +3 -3
- package/cabloy-docs/backend/event-guide.md +4 -4
- package/cabloy-docs/backend/external-aop-guide.md +2 -2
- package/cabloy-docs/backend/field-indexes.md +9 -3
- package/cabloy-docs/backend/foundation.md +8 -8
- package/cabloy-docs/backend/i18n-guide.md +6 -6
- package/cabloy-docs/backend/internal-aop-guide.md +2 -2
- package/cabloy-docs/backend/introduction.md +13 -0
- package/cabloy-docs/backend/migration-and-changes.md +3 -3
- package/cabloy-docs/backend/model-guide.md +16 -6
- package/cabloy-docs/backend/openapi-guide.md +3 -0
- package/cabloy-docs/backend/queue-guide.md +3 -3
- package/cabloy-docs/backend/redlock-guide.md +2 -2
- package/cabloy-docs/backend/schedule-guide.md +2 -2
- package/cabloy-docs/backend/scripts.md +8 -0
- package/cabloy-docs/backend/serialization-guide.md +2 -2
- package/cabloy-docs/backend/service-guide.md +18 -9
- package/cabloy-docs/backend/startup-guide.md +5 -5
- package/cabloy-docs/backend/status-guide.md +7 -7
- package/cabloy-docs/backend/unit-testing.md +3 -3
- package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
- package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
- package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
- package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
- package/cabloy-docs/frontend/a-router-guide.md +307 -0
- package/cabloy-docs/frontend/api-guide.md +4 -4
- package/cabloy-docs/frontend/api-schema-guide.md +1 -0
- package/cabloy-docs/frontend/app-startup-guide.md +7 -4
- package/cabloy-docs/frontend/bean-scene-authoring.md +1 -1
- package/cabloy-docs/frontend/behavior-guide.md +16 -16
- package/cabloy-docs/frontend/cli.md +5 -5
- package/cabloy-docs/frontend/command-scene-authoring.md +17 -8
- package/cabloy-docs/frontend/component-guide.md +5 -5
- package/cabloy-docs/frontend/component-props-guide.md +1 -1
- package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
- package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
- package/cabloy-docs/frontend/form-guide.md +19 -28
- package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
- package/cabloy-docs/frontend/foundation.md +10 -6
- package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
- package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
- package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
- package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
- package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
- package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
- package/cabloy-docs/frontend/generic-component-guide.md +1 -1
- package/cabloy-docs/frontend/introduction.md +29 -7
- package/cabloy-docs/frontend/model-architecture.md +38 -2
- package/cabloy-docs/frontend/model-resource-cookbook.md +11 -8
- package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +22 -2
- package/cabloy-docs/frontend/model-resource-usage-guide.md +22 -6
- package/cabloy-docs/frontend/model-state-guide.md +12 -9
- package/cabloy-docs/frontend/module-scope.md +8 -8
- package/cabloy-docs/frontend/modules-and-suites.md +2 -1
- package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
- package/cabloy-docs/frontend/openapi-sdk-guide.md +12 -4
- package/cabloy-docs/frontend/page-guide.md +9 -9
- package/cabloy-docs/frontend/page-meta-guide.md +466 -0
- package/cabloy-docs/frontend/page-params-guide.md +3 -3
- package/cabloy-docs/frontend/page-query-guide.md +2 -2
- package/cabloy-docs/frontend/page-route-guide.md +6 -0
- package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
- package/cabloy-docs/frontend/quickstart.md +14 -2
- package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
- package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
- package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
- package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
- package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
- package/cabloy-docs/frontend/route-alias-guide.md +6 -0
- package/cabloy-docs/frontend/router-stack-guide.md +229 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
- package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
- package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
- package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
- package/cabloy-docs/frontend/server-data.md +2 -1
- package/cabloy-docs/frontend/system-startup-guide.md +2 -2
- package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
- package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
- package/cabloy-docs/frontend/table-guide.md +373 -0
- package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
- package/cabloy-docs/frontend/zova-app-guide.md +251 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +7 -9
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +5 -0
- package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +101 -7
- package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
- package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
- package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
- package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +8 -2
- package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +181 -48
- package/cabloy-docs/fullstack/introduction.md +3 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +116 -2
- package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +4 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +31 -19
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +5 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +4 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +1 -1
- package/cabloy-docs/reference/bean-scene-boilerplates.md +13 -13
- package/cabloy-docs/reference/package-map.md +4 -3
- package/package.json +1 -1
- package/vona/pnpm-lock.yaml +22 -258
- package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
- package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
- package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
- package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
- package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
- package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
- package/vona/src/suite/a-training/package.json +12 -0
- package/vona/src/suite/a-training/tsconfig.base.json +4 -0
- package/vona/src/suite/a-training/tsconfig.json +10 -0
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +406 -680
- package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
- package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
- package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
- package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
- package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
- package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
- package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
- package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
- package/zova/src/suite/a-training/package.json +12 -0
- package/zova/src/suite/a-training/tsconfig.base.json +4 -0
- package/zova/src/suite/a-training/tsconfig.json +4 -0
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
- package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
|
@@ -100,6 +100,9 @@ For the downstream bridge and consumption path, also see:
|
|
|
100
100
|
A practical split is:
|
|
101
101
|
|
|
102
102
|
- this page explains backend contract authoring and emission
|
|
103
|
+
- [Backend Contract Emission Specimen](/backend/backend-contract-emission-specimen) explains one concrete emitted action thread
|
|
104
|
+
- [Backend Contract Emission Source Reading Map](/backend/backend-contract-emission-source-reading-map) explains the shortest file-order path through the emission inputs
|
|
105
|
+
- [Backend Contract Emission Output Inspection](/backend/backend-contract-emission-output-inspection) explains how to inspect the emitted output surfaces themselves
|
|
103
106
|
- the fullstack page explains the bridge from emitted OpenAPI to generated frontend SDK
|
|
104
107
|
- the frontend page explains how Zova consumes that contract in its own workflows
|
|
105
108
|
|
|
@@ -10,10 +10,10 @@ This is one of the main bridges between synchronous application code and distrib
|
|
|
10
10
|
|
|
11
11
|
## Create a queue
|
|
12
12
|
|
|
13
|
-
Example: create a queue named `add` in module `
|
|
13
|
+
Example: create a queue named `add` in module `training-student`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run vona :create:bean queue add -- --module=
|
|
16
|
+
npm run vona :create:bean queue add -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Queue definition
|
|
@@ -197,7 +197,7 @@ Representative pattern:
|
|
|
197
197
|
```typescript
|
|
198
198
|
config.onions = {
|
|
199
199
|
queue: {
|
|
200
|
-
'
|
|
200
|
+
'training-student:add': {
|
|
201
201
|
concurrency: false,
|
|
202
202
|
transaction: false,
|
|
203
203
|
options: {
|
|
@@ -10,10 +10,10 @@ Vona provides a Redlock-based distributed lock abstraction so that mutual exclus
|
|
|
10
10
|
|
|
11
11
|
## Create a redlock definition
|
|
12
12
|
|
|
13
|
-
Example: create redlock metadata in module `
|
|
13
|
+
Example: create redlock metadata in module `training-student`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run vona :create:bean meta redlock -- --module=
|
|
16
|
+
npm run vona :create:bean meta redlock -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Lock resource types
|
|
@@ -10,10 +10,10 @@ This matters because recurring work is modeled with the same broader distributed
|
|
|
10
10
|
|
|
11
11
|
## Create a schedule
|
|
12
12
|
|
|
13
|
-
Example: create a schedule named `log` in module `
|
|
13
|
+
Example: create a schedule named `log` in module `training-student`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run vona :create:bean schedule log -- --module=
|
|
16
|
+
npm run vona :create:bean schedule log -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Schedule definition
|
|
@@ -114,3 +114,11 @@ When documenting or automating backend scripts:
|
|
|
114
114
|
- prefer root scripts for normal contributor workflows
|
|
115
115
|
- drop to `vona/package.json` only when you need backend-specific detail
|
|
116
116
|
- verify commands against current scripts before publishing examples
|
|
117
|
+
|
|
118
|
+
## Where to read next
|
|
119
|
+
|
|
120
|
+
If your next question is not only how the monorepo runs backend workflows, but which source surfaces those workflows eventually enter, continue with:
|
|
121
|
+
|
|
122
|
+
- [Backend CLI](/backend/cli)
|
|
123
|
+
- [Backend Source Reading Roadmap](/backend/backend-source-reading-roadmap)
|
|
124
|
+
- [Vona Source Reading Map](/backend/vona-source-reading-map)
|
|
@@ -58,7 +58,7 @@ Vona supports custom serializer transforms through `@SerializerTransform(...)`.
|
|
|
58
58
|
Representative generation workflow:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
npm run vona :create:bean serializerTransform upper -- --module=
|
|
61
|
+
npm run vona :create:bean serializerTransform upper -- --module=training-student
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Representative pattern:
|
|
@@ -88,7 +88,7 @@ Field-level serialization is attached through `@Api.field(...)` metadata helpers
|
|
|
88
88
|
Representative pattern:
|
|
89
89
|
|
|
90
90
|
```typescript
|
|
91
|
-
@Api.field(v.serializerTransform('
|
|
91
|
+
@Api.field(v.serializerTransform('training-student:upper'))
|
|
92
92
|
name: string;
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -10,10 +10,10 @@ In practice, the service guide is also the most useful page for understanding ba
|
|
|
10
10
|
|
|
11
11
|
## Create a service
|
|
12
12
|
|
|
13
|
-
Example: create a service named `student` in module `
|
|
13
|
+
Example: create a service named `student` in module `training-student`.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm run vona :create:bean service student -- --module=
|
|
16
|
+
npm run vona :create:bean service student -- --module=training-student
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Service definition
|
|
@@ -58,7 +58,7 @@ class ControllerStudent {
|
|
|
58
58
|
import type { ServiceStudent } from '../service/student.ts';
|
|
59
59
|
|
|
60
60
|
class ControllerStudent {
|
|
61
|
-
@Use('
|
|
61
|
+
@Use('training-student.service.student')
|
|
62
62
|
serviceStudent: ServiceStudent;
|
|
63
63
|
}
|
|
64
64
|
```
|
|
@@ -84,7 +84,7 @@ class ControllerStudent {
|
|
|
84
84
|
```typescript
|
|
85
85
|
class ControllerStudent {
|
|
86
86
|
findOne() {
|
|
87
|
-
return this.$scope.
|
|
87
|
+
return this.$scope.trainingStudent.service.student.findOne();
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
```
|
|
@@ -103,19 +103,19 @@ Direct bean access patterns are also available.
|
|
|
103
103
|
### Global container access: `_getBean`
|
|
104
104
|
|
|
105
105
|
```typescript
|
|
106
|
-
const serviceStudent = this.bean._getBean('
|
|
106
|
+
const serviceStudent = this.bean._getBean('training-student.service.student');
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
### Request-scoped access
|
|
110
110
|
|
|
111
111
|
```typescript
|
|
112
|
-
const serviceStudent = this.ctx.bean._getBean('
|
|
112
|
+
const serviceStudent = this.ctx.bean._getBean('training-student.service.student');
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
### Fresh bean creation: `_newBean`
|
|
116
116
|
|
|
117
117
|
```typescript
|
|
118
|
-
const serviceStudent = this.bean._newBean('
|
|
118
|
+
const serviceStudent = this.bean._newBean('training-student.service.student');
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
A practical split is:
|
|
@@ -127,7 +127,7 @@ A practical split is:
|
|
|
127
127
|
A practical “when to use which” rule is:
|
|
128
128
|
|
|
129
129
|
- use `this.scope.service.student` when the dependency belongs to the current module and ordinary business code is enough
|
|
130
|
-
- use `this.$scope.
|
|
130
|
+
- use `this.$scope.trainingStudent.service.student` when the dependency clearly belongs to another module
|
|
131
131
|
- use `this.bean._getBean(...)` when you need explicit app-container access by bean identifier
|
|
132
132
|
- use `this.ctx.bean._getBean(...)` when the workflow should resolve through request-scoped access
|
|
133
133
|
- use `this.bean._newBean(...)` when you need a fresh bean instance instead of the ordinary resolved one
|
|
@@ -138,7 +138,7 @@ Services are one bean scene inside the larger backend essentials model.
|
|
|
138
138
|
|
|
139
139
|
That means service access should be understood together with:
|
|
140
140
|
|
|
141
|
-
- bean identifiers such as `
|
|
141
|
+
- bean identifiers such as `training-student.service.student`
|
|
142
142
|
- local module scope vs cross-module scope
|
|
143
143
|
- other scope resource categories such as model and entity
|
|
144
144
|
|
|
@@ -166,3 +166,12 @@ A better default is:
|
|
|
166
166
|
4. choose deliberately among local scope, cross-module scope, injection, and direct bean access
|
|
167
167
|
|
|
168
168
|
That keeps backend access patterns aligned with Vona’s actual architecture instead of using one access style everywhere by habit.
|
|
169
|
+
|
|
170
|
+
## Where to read next
|
|
171
|
+
|
|
172
|
+
If your next question is how service orchestration hands off to the persistence and contract layers in one real module, continue with:
|
|
173
|
+
|
|
174
|
+
- [Model Guide](/backend/model-guide)
|
|
175
|
+
- [Entity Guide](/backend/entity-guide)
|
|
176
|
+
- [Vona Source Reading Map](/backend/vona-source-reading-map)
|
|
177
|
+
- [Backend Resource/Module Contract Chain](/backend/backend-resource-module-contract-chain)
|
|
@@ -42,10 +42,10 @@ This is one of the reasons backend startup belongs in the backend docs, not in t
|
|
|
42
42
|
|
|
43
43
|
## Create a startup bean
|
|
44
44
|
|
|
45
|
-
Example: create a startup named `log` in module `
|
|
45
|
+
Example: create a startup named `log` in module `training-student`.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
npm run vona :create:bean startup log -- --module=
|
|
48
|
+
npm run vona :create:bean startup log -- --module=training-student
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Representative shape:
|
|
@@ -102,7 +102,7 @@ Representative pattern:
|
|
|
102
102
|
```typescript
|
|
103
103
|
config.onions = {
|
|
104
104
|
startup: {
|
|
105
|
-
'
|
|
105
|
+
'training-student:log': {
|
|
106
106
|
after: false,
|
|
107
107
|
debounce: true,
|
|
108
108
|
instance: false,
|
|
@@ -148,7 +148,7 @@ App config can disable a startup explicitly:
|
|
|
148
148
|
```typescript
|
|
149
149
|
config.onions = {
|
|
150
150
|
startup: {
|
|
151
|
-
'
|
|
151
|
+
'training-student:log': {
|
|
152
152
|
enable: false,
|
|
153
153
|
},
|
|
154
154
|
},
|
|
@@ -200,7 +200,7 @@ Module monkey files can also receive module-oriented hook callbacks, and the app
|
|
|
200
200
|
Representative CLI workflow:
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
npm run vona :init:monkey
|
|
203
|
+
npm run vona :init:monkey training-student
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
### Startup beans
|
|
@@ -27,7 +27,7 @@ A practical mental model is:
|
|
|
27
27
|
Create a status bean in your module with the shared Vona CLI entrypoint:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npm run vona :create:bean meta status -- --module=
|
|
30
|
+
npm run vona :create:bean meta status -- --module=training-student
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
This follows the same `:create:bean` workflow used by other backend bean scenes and metadata beans.
|
|
@@ -112,11 +112,11 @@ The stored payload is:
|
|
|
112
112
|
|
|
113
113
|
So a practical storage reading is:
|
|
114
114
|
|
|
115
|
-
| Field | Meaning
|
|
116
|
-
| -------- |
|
|
117
|
-
| `module` | the owning backend module
|
|
118
|
-
| `name` | the status key inside that module
|
|
119
|
-
| `value` | the persisted JSON value for that key
|
|
115
|
+
| Field | Meaning |
|
|
116
|
+
| -------- | ------------------------------------- |
|
|
117
|
+
| `module` | the owning backend module |
|
|
118
|
+
| `name` | the status key inside that module |
|
|
119
|
+
| `value` | the persisted JSON value for that key |
|
|
120
120
|
|
|
121
121
|
The current migration creates the table with the framework basic fields plus:
|
|
122
122
|
|
|
@@ -134,7 +134,7 @@ That means two different modules can both use a key such as `enable` without col
|
|
|
134
134
|
|
|
135
135
|
A practical reading is:
|
|
136
136
|
|
|
137
|
-
- `
|
|
137
|
+
- `training-student + enable` is one status record
|
|
138
138
|
- `demo-course + enable` is a different status record
|
|
139
139
|
|
|
140
140
|
This makes Status a natural fit for module-local state.
|
|
@@ -33,7 +33,7 @@ This is why Vona testing should not be reduced to isolated helper-unit testing o
|
|
|
33
33
|
Example:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npm run vona :create:test student -- --module=
|
|
36
|
+
npm run vona :create:test student -- --module=training-student
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Execute tests
|
|
@@ -91,7 +91,7 @@ Locale-sensitive variants and additional request-context helpers are also availa
|
|
|
91
91
|
Representative pattern:
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
|
-
const scopeStudent = app.scope('
|
|
94
|
+
const scopeStudent = app.scope('training-student');
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
This lets tests exercise:
|
|
@@ -108,7 +108,7 @@ through the same scoped abstractions used in application code.
|
|
|
108
108
|
Representative pattern:
|
|
109
109
|
|
|
110
110
|
```typescript
|
|
111
|
-
await app.bean.executor.performAction('get', '/
|
|
111
|
+
await app.bean.executor.performAction('get', '/training/student');
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
This is especially useful because it exercises the controller path more realistically than only unit-testing isolated helper functions.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Vona Source Reading Map
|
|
2
|
+
|
|
3
|
+
This page is a practical map for contributors and AI workflows that need to read Vona backend source code efficiently.
|
|
4
|
+
|
|
5
|
+
It does not try to teach every backend subsystem from scratch. Instead, it answers a narrower question:
|
|
6
|
+
|
|
7
|
+
> when I need to understand one kind of Vona backend behavior, which files should I read first, and in what order?
|
|
8
|
+
|
|
9
|
+
Use this page together with:
|
|
10
|
+
|
|
11
|
+
- [Backend Source Reading Roadmap](/backend/backend-source-reading-roadmap)
|
|
12
|
+
- [Backend (Vona)](/backend/introduction)
|
|
13
|
+
- [Backend Foundation](/backend/foundation)
|
|
14
|
+
- [Backend CLI](/backend/cli)
|
|
15
|
+
- [Backend Scripts](/backend/scripts)
|
|
16
|
+
- [Controller Guide](/backend/controller-guide)
|
|
17
|
+
- [Service Guide](/backend/service-guide)
|
|
18
|
+
- [Model Guide](/backend/model-guide)
|
|
19
|
+
- [Entity Guide](/backend/entity-guide)
|
|
20
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
21
|
+
|
|
22
|
+
## Why this page exists
|
|
23
|
+
|
|
24
|
+
In a framework-sized backend codebase, source reading usually becomes slow for one reason:
|
|
25
|
+
|
|
26
|
+
- you can already find _a_ relevant file
|
|
27
|
+
- but you do not yet know the shortest path to the _next_ file
|
|
28
|
+
|
|
29
|
+
Vona especially benefits from a reading map because several layers cooperate at once:
|
|
30
|
+
|
|
31
|
+
- root scripts and CLI wrappers
|
|
32
|
+
- generated metadata surfaces
|
|
33
|
+
- controller / service / model / entity layering
|
|
34
|
+
- module and suite boundaries
|
|
35
|
+
- project-level backend hooks such as play or build helpers
|
|
36
|
+
|
|
37
|
+
This page gives a compact starting sequence for each common backend topic so readers can move from concept guide to source path without drifting.
|
|
38
|
+
|
|
39
|
+
## How to use this page
|
|
40
|
+
|
|
41
|
+
For each topic below:
|
|
42
|
+
|
|
43
|
+
1. start with the concept guide to refresh the architectural intent
|
|
44
|
+
2. read the first source file to identify the public entry surface
|
|
45
|
+
3. continue into the next runtime file only if you still need the implementation detail
|
|
46
|
+
4. stop as soon as you have enough information for the task
|
|
47
|
+
|
|
48
|
+
The goal is not to read the entire backend tree every time. The goal is to choose the shortest accurate path.
|
|
49
|
+
|
|
50
|
+
## 1. CLI and backend startup entry path
|
|
51
|
+
|
|
52
|
+
Use this path when you are asking questions like:
|
|
53
|
+
|
|
54
|
+
- where does backend execution enter from the repo root?
|
|
55
|
+
- how does `npm run vona` reach the Vona CLI?
|
|
56
|
+
- where does `play` diverge from normal CLI startup?
|
|
57
|
+
- where does the backend build or verification hook surface begin?
|
|
58
|
+
|
|
59
|
+
### Read the docs first
|
|
60
|
+
|
|
61
|
+
- [Backend CLI](/backend/cli)
|
|
62
|
+
- [Backend Scripts](/backend/scripts)
|
|
63
|
+
- [Backend (Vona)](/backend/introduction)
|
|
64
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
65
|
+
|
|
66
|
+
### Then read source in this order
|
|
67
|
+
|
|
68
|
+
1. `package.json`
|
|
69
|
+
2. `vona/packages-cli/cli/src/bin/vona.ts`
|
|
70
|
+
3. `vona/packages-cli/cli/src/start.ts`
|
|
71
|
+
4. `vona/src/backend/cli.ts`
|
|
72
|
+
5. `vona/src/backend/play/index.ts`
|
|
73
|
+
|
|
74
|
+
### What each file clarifies
|
|
75
|
+
|
|
76
|
+
- `package.json` shows the root `vona` script and the shared monorepo workflow entrypoint
|
|
77
|
+
- `vona.ts` shows how raw CLI argv is normalized, how `play` is treated specially, and where normal execution hands off to `VonaCommand`
|
|
78
|
+
- `start.ts` shows the CLI bootstrap class itself
|
|
79
|
+
- `src/backend/cli.ts` shows the project-level backend build hook surface
|
|
80
|
+
- `src/backend/play/index.ts` shows the backend playground-oriented verification entrypoint through `mockCtx(...)`
|
|
81
|
+
|
|
82
|
+
## 2. Representative backend resource and module CRUD path
|
|
83
|
+
|
|
84
|
+
Use this path when you are asking questions like:
|
|
85
|
+
|
|
86
|
+
- how is one backend module wired end-to-end?
|
|
87
|
+
- where do controller, service, model, and entity responsibilities separate?
|
|
88
|
+
- where do generated metadata and API path registrations live?
|
|
89
|
+
|
|
90
|
+
### Read the docs first
|
|
91
|
+
|
|
92
|
+
- [Controller Guide](/backend/controller-guide)
|
|
93
|
+
- [Service Guide](/backend/service-guide)
|
|
94
|
+
- [Model Guide](/backend/model-guide)
|
|
95
|
+
- [Entity Guide](/backend/entity-guide)
|
|
96
|
+
- [Backend Directory Structure](/reference/backend-directory-structure)
|
|
97
|
+
|
|
98
|
+
### Then read source in this order
|
|
99
|
+
|
|
100
|
+
1. `vona/src/suite/a-training/modules/training-student/src/index.ts`
|
|
101
|
+
2. `vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts`
|
|
102
|
+
3. `vona/src/suite/a-training/modules/training-student/src/controller/student.ts`
|
|
103
|
+
4. `vona/src/suite/a-training/modules/training-student/src/service/student.ts`
|
|
104
|
+
5. `vona/src/suite/a-training/modules/training-student/src/model/student.ts`
|
|
105
|
+
6. `vona/src/suite/a-training/modules/training-student/src/entity/student.tsx`
|
|
106
|
+
|
|
107
|
+
### What each file clarifies
|
|
108
|
+
|
|
109
|
+
- `index.ts` shows the module export surface and tells you that generated metadata is part of the public reading path
|
|
110
|
+
- `.metadata/index.ts` shows the generated registration surface for entity, model, service, controller, DTO, API path, and scope wiring
|
|
111
|
+
- `controller/student.ts` shows the resource-facing HTTP layer through `@Controller('student')`, `@Resource()`, and CRUD methods delegating to `this.scope.service.student`
|
|
112
|
+
- `service/student.ts` shows the orchestration layer delegating to `this.scope.model.student`
|
|
113
|
+
- `model/student.ts` shows the compact model binding from `@Model(...)` to `EntityStudent`
|
|
114
|
+
- `entity/student.tsx` shows the entity fields plus OpenAPI and Zova render metadata that drive the broader contract loop
|
|
115
|
+
|
|
116
|
+
### When to continue into DTOs
|
|
117
|
+
|
|
118
|
+
If your next question becomes one of these:
|
|
119
|
+
|
|
120
|
+
- what is the request/response DTO shape for this resource?
|
|
121
|
+
- where do the select/view/create/update transport contracts live?
|
|
122
|
+
|
|
123
|
+
then continue into the module DTO files referenced from `.metadata/index.ts`.
|
|
124
|
+
|
|
125
|
+
If your next question is instead about generated registration, onion names, or API path typing, return to `.metadata/index.ts` before reading deeper.
|
|
126
|
+
|
|
127
|
+
If the next question becomes specifically about explicit DTOs, inferred DTO helpers, or how DTO choices surface in generated metadata, continue with [DTO Infer and Generation](/backend/dto-infer-generation).
|
|
128
|
+
|
|
129
|
+
If the next question becomes specifically about how those controller, DTO, and entity surfaces become emitted backend contract, continue with [Backend Contract Emission Source Reading Map](/backend/backend-contract-emission-source-reading-map).
|
|
130
|
+
|
|
131
|
+
## 3. A compact reading strategy
|
|
132
|
+
|
|
133
|
+
When in doubt, use this order:
|
|
134
|
+
|
|
135
|
+
1. read the concept guide first
|
|
136
|
+
2. open the smallest source entrypoint that matches your question
|
|
137
|
+
3. read the generated metadata surface early when the topic spans multiple backend layers
|
|
138
|
+
4. only then descend into controller, service, model, or entity details
|
|
139
|
+
|
|
140
|
+
That order usually gets you to the answer faster than starting from the deepest backend runtime file first.
|
|
141
|
+
|
|
142
|
+
## Where to read next
|
|
143
|
+
|
|
144
|
+
- If you now want a proof-oriented layer-by-layer backend validation workflow, continue with [Backend Source Reading Verify Playbook](/backend/backend-source-reading-verify-playbook).
|
|
145
|
+
- If something already looks wrong and you want symptom-first diagnosis, continue with [Backend Source Reading Debug Checklist](/backend/backend-source-reading-debug-checklist).
|
|
146
|
+
|
|
147
|
+
## Final takeaway
|
|
148
|
+
|
|
149
|
+
The fastest way to read Vona accurately is not to memorize every file under `vona/`.
|
|
150
|
+
|
|
151
|
+
It is to recognize which question you are asking first:
|
|
152
|
+
|
|
153
|
+
- CLI and startup entry question
|
|
154
|
+
- resource and module wiring question
|
|
155
|
+
- DTO and generated-metadata question
|
|
156
|
+
|
|
157
|
+
Then start from the smallest public source surface that matches that question and only descend into deeper files as needed.
|
|
@@ -59,7 +59,7 @@ _:[eventNameOrShortCode, data]
|
|
|
59
59
|
More precisely, the server sends:
|
|
60
60
|
|
|
61
61
|
```typescript
|
|
62
|
-
`${eventPrefix}${JSON.stringify([eventNameInner, data])}
|
|
62
|
+
`${eventPrefix}${JSON.stringify([eventNameInner, data])}`;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
That means the Web Socket protocol is event-oriented rather than frame-schema-oriented.
|
|
@@ -71,7 +71,7 @@ The event prefix comes from module config:
|
|
|
71
71
|
```typescript
|
|
72
72
|
return {
|
|
73
73
|
eventPrefix: '_:',
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
A practical interpretation is:
|
|
@@ -200,7 +200,7 @@ Representative logical payload:
|
|
|
200
200
|
{
|
|
201
201
|
"i": 1,
|
|
202
202
|
"m": "get",
|
|
203
|
-
"p": "/
|
|
203
|
+
"p": "/training/student/findOne",
|
|
204
204
|
"q": { "id": 3 },
|
|
205
205
|
"h": { "x-demo": "1" }
|
|
206
206
|
}
|
|
@@ -209,7 +209,7 @@ Representative logical payload:
|
|
|
209
209
|
Representative wire packet:
|
|
210
210
|
|
|
211
211
|
```text
|
|
212
|
-
_:["_b",{"i":1,"m":"get","p":"/
|
|
212
|
+
_:["_b",{"i":1,"m":"get","p":"/training/student/findOne","q":{"id":3},"h":{"x-demo":"1"}}]
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
## `sysReady`
|
|
@@ -378,4 +378,4 @@ Use the practical split:
|
|
|
378
378
|
- [Web Socket Guide](/backend/websocket-guide) for architecture
|
|
379
379
|
- [Web Socket Usage Guide](/backend/websocket-usage-guide) for server-side authoring patterns
|
|
380
380
|
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing
|
|
381
|
-
- this page for client-visible wire format and built-in protocol fields
|
|
381
|
+
- this page for client-visible wire format and built-in protocol fields
|
|
@@ -54,7 +54,7 @@ Use the Vona CLI to create a namespace bean shell.
|
|
|
54
54
|
Example:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npm run vona :create:bean socketNamespace chat -- --module=
|
|
57
|
+
npm run vona :create:bean socketNamespace chat -- --module=training-student
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
The generated shape follows the `a-socket` boilerplate pattern.
|
|
@@ -83,8 +83,7 @@ export interface ISocketNamespaceOptionsChatEvents {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export interface ISocketNamespaceOptionsChat
|
|
87
|
-
extends IDecoratorSocketNamespaceOptions<ISocketNamespaceOptionsChatEvents> {}
|
|
86
|
+
export interface ISocketNamespaceOptionsChat extends IDecoratorSocketNamespaceOptions<ISocketNamespaceOptionsChatEvents> {}
|
|
88
87
|
|
|
89
88
|
@SocketNamespace<ISocketNamespaceOptionsChat>({
|
|
90
89
|
namespace: '/chat',
|
|
@@ -231,14 +230,17 @@ If the behavior belongs to connect or disconnect time, create a `socketConnectio
|
|
|
231
230
|
Example:
|
|
232
231
|
|
|
233
232
|
```bash
|
|
234
|
-
npm run vona :create:bean socketConnection audit -- --module=
|
|
233
|
+
npm run vona :create:bean socketConnection audit -- --module=training-student
|
|
235
234
|
```
|
|
236
235
|
|
|
237
236
|
Representative generated shape:
|
|
238
237
|
|
|
239
238
|
```typescript
|
|
240
239
|
import type { Next } from 'vona';
|
|
241
|
-
import type {
|
|
240
|
+
import type {
|
|
241
|
+
IDecoratorSocketConnectionOptions,
|
|
242
|
+
ISocketConnectionExecute,
|
|
243
|
+
} from 'vona-module-a-socket';
|
|
242
244
|
import type { WebSocket } from 'ws';
|
|
243
245
|
import { BeanBase } from 'vona';
|
|
244
246
|
import { SocketConnection } from 'vona-module-a-socket';
|
|
@@ -273,7 +275,7 @@ If the behavior belongs to inbound socket messages, create a `socketPacket` bean
|
|
|
273
275
|
Example:
|
|
274
276
|
|
|
275
277
|
```bash
|
|
276
|
-
npm run vona :create:bean socketPacket chat -- --module=
|
|
278
|
+
npm run vona :create:bean socketPacket chat -- --module=training-student
|
|
277
279
|
```
|
|
278
280
|
|
|
279
281
|
Representative generated shape:
|
|
@@ -289,7 +291,12 @@ export interface ISocketPacketOptionsChat extends IDecoratorSocketPacketOptions
|
|
|
289
291
|
|
|
290
292
|
@SocketPacket<ISocketPacketOptionsChat>()
|
|
291
293
|
export class SocketPacketChat extends BeanBase implements ISocketPacketExecute {
|
|
292
|
-
async execute(
|
|
294
|
+
async execute(
|
|
295
|
+
_data: any,
|
|
296
|
+
_ws: WebSocket,
|
|
297
|
+
_options: ISocketPacketOptionsChat,
|
|
298
|
+
next: Next,
|
|
299
|
+
): Promise<void> {
|
|
293
300
|
return next();
|
|
294
301
|
}
|
|
295
302
|
}
|
|
@@ -353,4 +360,4 @@ If you need the broader context next, read:
|
|
|
353
360
|
|
|
354
361
|
- [Web Socket Guide](/backend/websocket-guide) for architecture
|
|
355
362
|
- [Web Socket Protocol Guide](/backend/websocket-protocol-guide) for the client-visible wire format
|
|
356
|
-
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing and debugging
|
|
363
|
+
- [Web Socket Call Flow](/backend/websocket-call-flow) for source tracing and debugging
|