cabloy 5.1.149 → 5.1.151
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/commands/release.md +12 -1
- package/.claude/hooks/contract-loop-gate.ts +35 -17
- package/.claude/skills/cabloy-backend-scaffold/SKILL.md +4 -3
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +3 -2
- package/.claude/skills/cabloy-contract-loop/SKILL.md +4 -3
- package/.claude/skills/cabloy-domain-planning/SKILL.md +4 -3
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +5 -3
- package/.claude/skills/cabloy-master-detail/SKILL.md +4 -3
- package/.claude/skills/cabloy-module-removal/SKILL.md +5 -4
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +8 -5
- package/.claude/skills/cabloy-spec-execution/SKILL.md +169 -0
- package/.claude/skills/cabloy-spec-execution/evals/evals.json +71 -0
- package/.claude/skills/cabloy-spec-execution/references/execution-protocol.md +137 -0
- package/.claude/skills/cabloy-spec-execution/references/status-and-evidence.md +117 -0
- package/.claude/skills/cabloy-spec-generation/SKILL.md +227 -0
- package/.claude/skills/cabloy-spec-generation/evals/evals.json +83 -0
- package/.claude/skills/cabloy-spec-generation/references/repo-aware-discovery.md +101 -0
- package/.claude/skills/cabloy-spec-generation/references/repo-specs-document-set.md +267 -0
- package/.claude/skills/cabloy-spec-generation/references/traceability-and-status-rules.md +135 -0
- package/.claude/skills/cabloy-spec-generation/scripts/generate-implementation-charts.mjs +350 -0
- package/.claude/skills/cabloy-spec-generation/scripts/generate-implementation-charts.test.mjs +202 -0
- package/.claude/skills/cabloy-workflow/SKILL.md +21 -10
- package/.claude/skills/cabloy-workflow/evals/evals.json +8 -2
- package/.claude/skills/cabloy-workflow/references/edition-detection.md +5 -3
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +4 -3
- package/CHANGELOG.md +41 -0
- package/CLAUDE.md +12 -11
- package/package.json +4 -2
- package/repo-docs/.vitepress/config.mjs +4 -0
- package/repo-docs/ai/docs-skills-rules-mapping.md +6 -6
- package/repo-docs/ai/future-skill-roadmap.md +2 -2
- package/repo-docs/ai/introduction.md +5 -5
- package/repo-docs/ai/playbook-contract-regeneration.md +3 -9
- package/repo-docs/ai/repo-guidance.md +5 -4
- package/repo-docs/ai/rules-and-config.md +2 -2
- package/repo-docs/ai/virtual-decorator-guidance.md +1 -3
- package/repo-docs/backend/cache-guide.md +36 -0
- package/repo-docs/backend/dto-guide.md +7 -6
- package/repo-docs/backend/dto-infer-generation.md +25 -5
- package/repo-docs/backend/introduction.md +1 -1
- package/repo-docs/backend/migration-and-changes.md +27 -2
- package/repo-docs/backend/model-guide.md +1 -1
- package/repo-docs/backend/resource-field-update.md +156 -0
- package/repo-docs/frontend/a-model-under-the-hood.md +38 -0
- package/repo-docs/frontend/a-openapi-under-the-hood.md +13 -2
- package/repo-docs/frontend/form-layout-guide.md +26 -9
- package/repo-docs/frontend/model-resource-best-practices.md +2 -0
- package/repo-docs/frontend/model-resource-cookbook.md +7 -1
- package/repo-docs/frontend/router-tabs-introduction.md +2 -4
- package/repo-docs/frontend/use-state-data-best-practices.md +44 -0
- package/repo-docs/frontend/zova-form-source-reading-map.md +26 -9
- package/repo-docs/frontend/zova-form-under-the-hood.md +11 -0
- package/repo-docs/fullstack/a-pay-payment-suite.md +1 -1
- package/repo-docs/fullstack/contract-loop-playbook.md +4 -0
- package/repo-docs/fullstack/one-to-one-companion-resource-guide.md +2 -2
- package/repo-docs/reference/package-map.md +1 -1
- package/repo-e2e/specs/a-commerce.spec.ts +40 -0
- package/scripts/release.ts +48 -1
- package/scripts/upgrade.ts +18 -7
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/cli/templates/tools/crudStart/boilerplate/src/controller/{{resourceName}}.ts_ +2 -2
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/pnpm-lock.yaml +83 -75
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/.metadata/index.ts +108 -108
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/dto/skuSelectResItem.tsx +12 -0
- package/vona/src/suite/a-commerce/modules/commerce-catalog/src/service/sku.ts +19 -1
- package/vona/src/suite/a-commerce/modules/commerce-catalog/test/skuPresentation.test.ts +53 -4
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/.metadata/index.ts +148 -148
- package/vona/src/suite/a-commerce/modules/commerce-trade/src/dto/stockAdjust.tsx +37 -3
- package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +2 -2
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +7 -6
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +1 -1
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +7 -6
- package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +10 -7
- package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +4 -4
- package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +39 -67
- package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +56 -37
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +5 -5
- package/zova/src/suite/a-commerce/modules/commerce-trade/cli/openapi.config.ts +1 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/package.json +6 -1
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/.metadata/component/tableCellActionAdjustStock.ts +34 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/.metadata/index.ts +81 -6
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/commerceTradeStockBalance.ts +32 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/schemas.ts +44 -44
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/api/openapi/types.ts +356 -338
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/apiSchema/commerceTradeStockBalance.ts +17 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/bean/tableCell.actionAdjustStock.tsx +35 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/component/tableCellActionAdjustStock/controller.tsx +138 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/en-us.ts +3 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/config/locale/zh-cn.ts +3 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/model/stockBalance.ts +36 -0
- package/zova/src/suite/a-commerce/modules/commerce-trade/src/page/payment/controller.tsx +4 -4
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +8 -8
- package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +11 -11
- package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +2 -2
- package/zova/src/suite/cabloy-basic/modules/basic-app/src/bean/behavior.appModal.tsx +2 -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 +2 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/test/model/resource.types.ts +11 -0
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-form/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-form/src/lib/formLayout.ts +58 -9
- package/zova/src/suite-vendor/a-zova/modules/a-form/test/lib/formLayout.test.ts +157 -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/bean/bean.model/bean.model.persister.ts +3 -1
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useQuery.ts +11 -13
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useState.ts +9 -7
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useStateGeneral.ts +5 -12
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/lib/queryPersister.ts +17 -0
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/lib/queryRefetch.ts +34 -0
- package/zova/src/suite-vendor/a-zova/modules/a-model/src/types/query.ts +27 -3
- package/zova/src/suite-vendor/a-zova/modules/a-model/test/lib/queryPersister.test.ts +115 -0
- package/zova/src/suite-vendor/a-zova/modules/a-model/test/lib/queryRefetch.test.ts +84 -0
- 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/lib/schema.ts +27 -5
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/model/sdk.ts +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/rest.ts +4 -0
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/src/types/schema.ts +2 -5
- package/zova/src/suite-vendor/a-zova/modules/a-openapi/test/lib/schema.test.ts +179 -0
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
|
@@ -295,7 +295,7 @@ The dependency should be directional:
|
|
|
295
295
|
companion mutation → parent query cache invalidation
|
|
296
296
|
```
|
|
297
297
|
|
|
298
|
-
Keep the cache graph acyclic and avoid duplicate or reverse edges. Cache invalidation is not a lock, a uniqueness constraint, or a transaction. Continue to use normal Model mutation APIs so the framework’s cache behavior remains active. Read [
|
|
298
|
+
Keep the cache graph acyclic and avoid duplicate or reverse edges. Cache invalidation is not a lock, a uniqueness constraint, or a transaction. Continue to use normal Model mutation APIs so the framework’s cache behavior remains active. Read [Cross-model query-cache dependencies](/backend/cache-guide#cross-model-query-cache-dependencies) for the graph rules.
|
|
299
299
|
|
|
300
300
|
## DTO and contract design
|
|
301
301
|
|
|
@@ -318,7 +318,7 @@ const contentField = $makeMetadata(
|
|
|
318
318
|
);
|
|
319
319
|
```
|
|
320
320
|
|
|
321
|
-
The exact renderer is edition-specific; the nested source contract is not.
|
|
321
|
+
The exact renderer is edition-specific; the nested source contract is not. This is a valid `$makeMetadata(...)` overlay because `parentContentForm` is already supplied by the inferred relation projection through the DTO relation option type, `include`, and `dtoClass`; its schema exists before the renderer and `fieldSource(...)` metadata is added. `fieldSource(...)` maps the projected field to the nested source path but does not declare `sourceMarkdown`'s type. If a field-map key is instead a true virtual DTO key absent from the inferred projection, define it with `$makeSchema(...)` and an appropriate final concrete schema such as `z.string()`; see [Virtual fields in the DTO fields map](/backend/dto-infer-generation#virtual-fields-in-the-dto-fields-map). Do not add derived HTML to a mutation DTO merely because it exists in the table.
|
|
322
322
|
|
|
323
323
|
A DTO or OpenAPI declaration is not a substitute for runtime response review. If a service returns an already-built object with extra properties, narrowing the declaration alone may not remove those properties from JSON. Verify the actual action response as well as emitted schema metadata.
|
|
324
324
|
|
|
@@ -6,7 +6,7 @@ This monorepo is organized around a small set of stable top-level areas.
|
|
|
6
6
|
|
|
7
7
|
- `package.json` — shared scripts and release entrypoints
|
|
8
8
|
- `lerna.json` — package topology
|
|
9
|
-
-
|
|
9
|
+
- an established internal-documentation home, when present — edition-local maintainer notes and ADRs
|
|
10
10
|
- `.claude/` — Claude commands, skills, and local settings
|
|
11
11
|
- `repo-docs/` — unified public docs
|
|
12
12
|
|
|
@@ -1737,6 +1737,7 @@ test(
|
|
|
1737
1737
|
const categoryName = `E2E SKU Category ${suffix}`;
|
|
1738
1738
|
const productTitle = `E2E SKU Product ${suffix}`;
|
|
1739
1739
|
const skuCode = `E2E-SKU-${suffix}`;
|
|
1740
|
+
const stockActionPath = '/api/commerce/trade/stockBalance/adjustStock';
|
|
1740
1741
|
const adminContext = await browser.newContext();
|
|
1741
1742
|
const adminPage = await adminContext.newPage();
|
|
1742
1743
|
const adminPageErrors = collectPageErrors(adminPage);
|
|
@@ -1805,8 +1806,46 @@ test(
|
|
|
1805
1806
|
const skuRow = adminPage.getByRole('row', { name: new RegExp(skuCode) });
|
|
1806
1807
|
await expect(skuRow).toBeVisible();
|
|
1807
1808
|
await expect(skuRow.getByText('12.34', { exact: true })).toBeVisible();
|
|
1809
|
+
await expect(skuRow.getByText('0', { exact: true })).toBeVisible();
|
|
1808
1810
|
await expect(skuRow.getByText('Draft', { exact: true })).toBeVisible();
|
|
1809
1811
|
await expect(skuRow.getByRole('link', { name: skuCode, exact: true })).toBeVisible();
|
|
1812
|
+
const adjustStockButton = skuRow.getByRole('button', { name: 'Adjust stock', exact: true });
|
|
1813
|
+
await expect(adjustStockButton).toBeVisible();
|
|
1814
|
+
await expect(adminPage.locator('html')).toHaveAttribute(
|
|
1815
|
+
'data-zova-hydrated',
|
|
1816
|
+
'commerceAdmin',
|
|
1817
|
+
);
|
|
1818
|
+
await adjustStockButton.click();
|
|
1819
|
+
await expect(adminPage.getByRole('dialog')).toBeVisible();
|
|
1820
|
+
await expect(adminPage.getByRole('dialog').getByText(skuCode, { exact: true })).toBeVisible();
|
|
1821
|
+
await expect(adminPage.getByRole('dialog').getByText('0', { exact: true })).toBeVisible();
|
|
1822
|
+
const deltaInput = adminPage.getByRole('group', { name: 'Delta' }).getByRole('spinbutton');
|
|
1823
|
+
const reasonInput = adminPage.getByRole('group', { name: 'Reason' }).getByRole('textbox');
|
|
1824
|
+
await deltaInput.fill('7');
|
|
1825
|
+
await reasonInput.fill('Initial E2E stock');
|
|
1826
|
+
const stockRequest = adminPage.waitForRequest(request => {
|
|
1827
|
+
return request.method() === 'POST' && new URL(request.url()).pathname === stockActionPath;
|
|
1828
|
+
});
|
|
1829
|
+
const stockResponse = adminPage.waitForResponse(response => {
|
|
1830
|
+
return (
|
|
1831
|
+
response.request().method() === 'POST' &&
|
|
1832
|
+
new URL(response.url()).pathname === stockActionPath
|
|
1833
|
+
);
|
|
1834
|
+
});
|
|
1835
|
+
await adminPage
|
|
1836
|
+
.getByRole('dialog')
|
|
1837
|
+
.getByRole('button', { name: 'Adjust stock', exact: true })
|
|
1838
|
+
.click();
|
|
1839
|
+
const stockRequestValue = await stockRequest;
|
|
1840
|
+
expect(stockRequestValue.postDataJSON()).toMatchObject({
|
|
1841
|
+
skuId,
|
|
1842
|
+
delta: 7,
|
|
1843
|
+
reason: 'Initial E2E stock',
|
|
1844
|
+
correlationId: expect.any(String),
|
|
1845
|
+
});
|
|
1846
|
+
expect((await stockResponse).ok()).toBeTruthy();
|
|
1847
|
+
await expect(adminPage.getByRole('dialog')).toHaveCount(0);
|
|
1848
|
+
await expect(skuRow.getByText('7', { exact: true })).toBeVisible();
|
|
1810
1849
|
await expect(
|
|
1811
1850
|
adminPage.locator('section').getByText('SKU code', { exact: true }),
|
|
1812
1851
|
).toBeVisible();
|
|
@@ -1822,6 +1861,7 @@ test(
|
|
|
1822
1861
|
expect(adminPageErrors).toEqual([]);
|
|
1823
1862
|
} finally {
|
|
1824
1863
|
if (skuId && headers) {
|
|
1864
|
+
await adminPage.request.delete(`${stockActionPath}/${skuId}`, { headers }).catch(() => {});
|
|
1825
1865
|
const response = await adminPage.request.delete(`${skuActionPath}/${skuId}`, { headers });
|
|
1826
1866
|
expect(response.ok()).toBeTruthy();
|
|
1827
1867
|
}
|
package/scripts/release.ts
CHANGED
|
@@ -88,10 +88,55 @@ function readJson(filePath: string): Record<string, any> {
|
|
|
88
88
|
return JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
type CabloyEdition = 'basic' | 'start';
|
|
92
|
+
|
|
93
|
+
function resolveEdition(): CabloyEdition {
|
|
94
|
+
const hasBasic = existsSync(resolve(ROOT_DIR, '__CABLOY_BASIC__'));
|
|
95
|
+
const hasStart = existsSync(resolve(ROOT_DIR, '__CABLOY_START__'));
|
|
96
|
+
if (hasBasic === hasStart) {
|
|
97
|
+
throw new Error(
|
|
98
|
+
hasBasic
|
|
99
|
+
? 'Ambiguous Cabloy edition: both __CABLOY_BASIC__ and __CABLOY_START__ markers are present'
|
|
100
|
+
: 'Not a Cabloy project: no __CABLOY_BASIC__ or __CABLOY_START__ marker found',
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return hasBasic ? 'basic' : 'start';
|
|
104
|
+
}
|
|
105
|
+
|
|
91
106
|
function readPackageJson(): Record<string, any> {
|
|
92
107
|
return readJson(PACKAGE_JSON_PATH);
|
|
93
108
|
}
|
|
94
109
|
|
|
110
|
+
function assertPublicBasicReleaseSurface(): void {
|
|
111
|
+
const edition = resolveEdition();
|
|
112
|
+
if (edition !== 'basic') {
|
|
113
|
+
throw new Error(
|
|
114
|
+
'The public Cabloy release workflow is available only in Cabloy Basic. Use an explicitly configured Cabloy Start release workflow instead.',
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const pkg = readPackageJson();
|
|
119
|
+
const requiredScripts: Record<string, string> = {
|
|
120
|
+
'release-patch': 'node scripts/release.ts patch',
|
|
121
|
+
'release-minor': 'node scripts/release.ts minor',
|
|
122
|
+
'release-major': 'node scripts/release.ts major',
|
|
123
|
+
'release': 'node scripts/release.ts',
|
|
124
|
+
'release:dry-run': 'node scripts/release.ts --dry-run',
|
|
125
|
+
'release:changelog': 'node scripts/release.ts --changelog-only',
|
|
126
|
+
'release:publish': 'node scripts/release.ts --publish-only',
|
|
127
|
+
'release:github': 'node scripts/release.ts --release-only',
|
|
128
|
+
};
|
|
129
|
+
if (
|
|
130
|
+
pkg.name !== 'cabloy' ||
|
|
131
|
+
!isValidVersion(pkg.version) ||
|
|
132
|
+
Object.entries(requiredScripts).some(([name, command]) => pkg.scripts?.[name] !== command)
|
|
133
|
+
) {
|
|
134
|
+
throw new Error(
|
|
135
|
+
'The active package.json does not expose the Cabloy Basic public release surface required by scripts/release.ts.',
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
95
140
|
function writePackageJson(pkg: Record<string, any>): void {
|
|
96
141
|
writeFileSync(PACKAGE_JSON_PATH, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
97
142
|
}
|
|
@@ -274,7 +319,7 @@ function refreshZovaDependencyGraph(): void {
|
|
|
274
319
|
execInherited('pnpm install', false, { cwd: ZOVA_DIR });
|
|
275
320
|
execInherited('npm run zova :tools:deps', false, { cwd: ZOVA_DIR });
|
|
276
321
|
execInherited('npm run build:zova:admin');
|
|
277
|
-
if (
|
|
322
|
+
if (resolveEdition() === 'basic') {
|
|
278
323
|
execInherited('npm run build:zova:web');
|
|
279
324
|
}
|
|
280
325
|
}
|
|
@@ -882,6 +927,8 @@ async function release(options: ReleaseOptions): Promise<void> {
|
|
|
882
927
|
// eslint-disable-next-line
|
|
883
928
|
console.log('🔧 Cabloy Release\n');
|
|
884
929
|
|
|
930
|
+
assertPublicBasicReleaseSurface();
|
|
931
|
+
|
|
885
932
|
// Pre-flight checks
|
|
886
933
|
try {
|
|
887
934
|
execSync('git rev-parse --is-inside-work-tree', {
|
package/scripts/upgrade.ts
CHANGED
|
@@ -152,8 +152,21 @@ function copyDirectory(src: string, dest: string): void {
|
|
|
152
152
|
cpSync(src, dest, { recursive: true, filter: shouldCopyPath });
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
function resolveEdition(): 'basic' | 'start' {
|
|
156
|
+
const hasBasic = existsSync(resolve(ROOT_DIR, '__CABLOY_BASIC__'));
|
|
157
|
+
const hasStart = existsSync(resolve(ROOT_DIR, '__CABLOY_START__'));
|
|
158
|
+
if (hasBasic === hasStart) {
|
|
159
|
+
throw new Error(
|
|
160
|
+
hasBasic
|
|
161
|
+
? 'Ambiguous Cabloy edition: both __CABLOY_BASIC__ and __CABLOY_START__ markers are present'
|
|
162
|
+
: 'Not a Cabloy project: no __CABLOY_BASIC__ or __CABLOY_START__ marker found',
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
return hasBasic ? 'basic' : 'start';
|
|
166
|
+
}
|
|
167
|
+
|
|
155
168
|
function isCabloyBasic(): boolean {
|
|
156
|
-
return
|
|
169
|
+
return resolveEdition() === 'basic';
|
|
157
170
|
}
|
|
158
171
|
|
|
159
172
|
function readPackageJson(filePath: string): PackageJson {
|
|
@@ -337,12 +350,10 @@ function reconcileFrameworkE2ePackageJson(dryRun?: boolean): void {
|
|
|
337
350
|
// --- Step 1: Pre-flight ---
|
|
338
351
|
|
|
339
352
|
function preflight(): void {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
console.error(
|
|
344
|
-
'Error: Not a cabloy project (no __CABLOY_BASIC__ or __CABLOY_START__ marker found)',
|
|
345
|
-
);
|
|
353
|
+
try {
|
|
354
|
+
resolveEdition();
|
|
355
|
+
} catch (error) {
|
|
356
|
+
console.error(`Error: ${(error as Error).message}`);
|
|
346
357
|
process.exit(1);
|
|
347
358
|
}
|
|
348
359
|
}
|
|
@@ -24,14 +24,14 @@ export interface IControllerOptions<%=argv.resourceNameCapitalize%> extends IDec
|
|
|
24
24
|
})
|
|
25
25
|
@Resource()
|
|
26
26
|
export class Controller<%=argv.resourceNameCapitalize%> extends BeanBase {
|
|
27
|
-
@Web.post({ summary: $locale('<%=argv.resourceNameCapitalize%>Create') })
|
|
27
|
+
@Web.post('', { summary: $locale('<%=argv.resourceNameCapitalize%>Create') })
|
|
28
28
|
@Api.body(v.tableIdentity())
|
|
29
29
|
@Passport.rbac()
|
|
30
30
|
async create(@Arg.body() <%=argv.resourceName%>: Dto<%=argv.resourceNameCapitalize%>Create): Promise<TableIdentity> {
|
|
31
31
|
return (await this.scope.service.<%=argv.resourceName%>.create(<%=argv.resourceName%>)).id;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
@Web.get({ summary: $locale('<%=argv.resourceNameCapitalize%>Select') })
|
|
34
|
+
@Web.get('', { summary: $locale('<%=argv.resourceNameCapitalize%>Select') })
|
|
35
35
|
@Api.body(Dto<%=argv.resourceNameCapitalize%>SelectRes)
|
|
36
36
|
@Passport.rbac()
|
|
37
37
|
async select(@Arg.filter(Dto<%=argv.resourceNameCapitalize%>SelectReq) params: IQueryParams<Model<%=argv.resourceNameCapitalize%>>): Promise<Dto<%=argv.resourceNameCapitalize%>SelectRes> {
|
package/vona/pnpm-lock.yaml
CHANGED
|
@@ -545,9 +545,6 @@ importers:
|
|
|
545
545
|
|
|
546
546
|
.zova-rest/cabloy-basic-admin:
|
|
547
547
|
dependencies:
|
|
548
|
-
'@tanstack/query-core':
|
|
549
|
-
specifier: ^5.101.1
|
|
550
|
-
version: 5.101.2
|
|
551
548
|
'@tanstack/vue-query':
|
|
552
549
|
specifier: ^5.101.1
|
|
553
550
|
version: 5.101.2(vue@3.5.39(typescript@5.9.3))
|
|
@@ -564,8 +561,8 @@ importers:
|
|
|
564
561
|
specifier: npm:@cabloy/zod@4.3.8
|
|
565
562
|
version: '@cabloy/zod@4.3.8'
|
|
566
563
|
zova:
|
|
567
|
-
specifier: ^5.1.
|
|
568
|
-
version: 5.1.
|
|
564
|
+
specifier: ^5.1.154
|
|
565
|
+
version: 5.1.154(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
569
566
|
zova-jsx:
|
|
570
567
|
specifier: ^1.1.88
|
|
571
568
|
version: 1.1.88(typescript@5.9.3)
|
|
@@ -582,8 +579,8 @@ importers:
|
|
|
582
579
|
specifier: ^5.1.34
|
|
583
580
|
version: 5.1.34
|
|
584
581
|
zova-module-a-form:
|
|
585
|
-
specifier: ^5.1.
|
|
586
|
-
version: 5.1.
|
|
582
|
+
specifier: ^5.1.49
|
|
583
|
+
version: 5.1.49(vue@3.5.39(typescript@5.9.3))
|
|
587
584
|
zova-module-a-icon:
|
|
588
585
|
specifier: ^5.1.27
|
|
589
586
|
version: 5.1.27
|
|
@@ -779,9 +776,6 @@ importers:
|
|
|
779
776
|
|
|
780
777
|
.zova-rest/cabloy-commerce-admin:
|
|
781
778
|
dependencies:
|
|
782
|
-
'@tanstack/query-core':
|
|
783
|
-
specifier: ^5.101.1
|
|
784
|
-
version: 5.101.2
|
|
785
779
|
'@tanstack/vue-query':
|
|
786
780
|
specifier: ^5.101.1
|
|
787
781
|
version: 5.101.2(vue@3.5.39(typescript@5.9.3))
|
|
@@ -798,11 +792,11 @@ importers:
|
|
|
798
792
|
specifier: npm:@cabloy/zod@4.3.8
|
|
799
793
|
version: '@cabloy/zod@4.3.8'
|
|
800
794
|
zova:
|
|
801
|
-
specifier: ^5.1.
|
|
802
|
-
version: 5.1.
|
|
795
|
+
specifier: ^5.1.154
|
|
796
|
+
version: 5.1.154(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
803
797
|
zova-jsx:
|
|
804
|
-
specifier: ^1.1.
|
|
805
|
-
version: 1.1.
|
|
798
|
+
specifier: ^1.1.88
|
|
799
|
+
version: 1.1.88(typescript@5.9.3)
|
|
806
800
|
zova-module-a-api:
|
|
807
801
|
specifier: ^5.1.22
|
|
808
802
|
version: 5.1.22
|
|
@@ -816,8 +810,8 @@ importers:
|
|
|
816
810
|
specifier: ^5.1.34
|
|
817
811
|
version: 5.1.34
|
|
818
812
|
zova-module-a-form:
|
|
819
|
-
specifier: ^5.1.
|
|
820
|
-
version: 5.1.
|
|
813
|
+
specifier: ^5.1.49
|
|
814
|
+
version: 5.1.49(vue@3.5.39(typescript@5.9.3))
|
|
821
815
|
zova-module-a-icon:
|
|
822
816
|
specifier: ^5.1.27
|
|
823
817
|
version: 5.1.27
|
|
@@ -831,8 +825,8 @@ importers:
|
|
|
831
825
|
specifier: ^5.1.50
|
|
832
826
|
version: 5.1.50
|
|
833
827
|
zova-module-a-pay:
|
|
834
|
-
specifier: ^5.0.
|
|
835
|
-
version: 5.0.
|
|
828
|
+
specifier: ^5.0.7
|
|
829
|
+
version: 5.0.7
|
|
836
830
|
zova-module-a-router:
|
|
837
831
|
specifier: ^5.1.34
|
|
838
832
|
version: 5.1.34
|
|
@@ -840,8 +834,8 @@ importers:
|
|
|
840
834
|
specifier: ^5.1.34
|
|
841
835
|
version: 5.1.34
|
|
842
836
|
zova-module-a-ssr:
|
|
843
|
-
specifier: ^5.1.
|
|
844
|
-
version: 5.1.
|
|
837
|
+
specifier: ^5.1.38
|
|
838
|
+
version: 5.1.38
|
|
845
839
|
zova-module-a-style:
|
|
846
840
|
specifier: ^5.1.35
|
|
847
841
|
version: 5.1.35
|
|
@@ -849,11 +843,11 @@ importers:
|
|
|
849
843
|
specifier: ^5.1.38
|
|
850
844
|
version: 5.1.38(vue@3.5.39(typescript@5.9.3))
|
|
851
845
|
zova-module-pay-mock:
|
|
852
|
-
specifier: ^5.0.
|
|
853
|
-
version: 5.0.
|
|
846
|
+
specifier: ^5.0.5
|
|
847
|
+
version: 5.0.5
|
|
854
848
|
zova-module-rest-resource:
|
|
855
|
-
specifier: ^5.1.
|
|
856
|
-
version: 5.1.
|
|
849
|
+
specifier: ^5.1.46
|
|
850
|
+
version: 5.1.46
|
|
857
851
|
|
|
858
852
|
packages-cli/cabloy-cli:
|
|
859
853
|
dependencies:
|
|
@@ -8959,18 +8953,12 @@ packages:
|
|
|
8959
8953
|
zova-core@5.1.86:
|
|
8960
8954
|
resolution: {integrity: sha512-DoyHChxGUAefZ3OimhCJLFHD/ft8eoMLtlHkow8zh67n/6FVv4me7LYP0O0itzUcG5GskFUfBn6q72e3QoRzEg==}
|
|
8961
8955
|
|
|
8962
|
-
zova-core@5.1.87:
|
|
8963
|
-
resolution: {integrity: sha512-CANgp5A86nKkpx0YpGg5sQLnm93ZWLS8Sq3eMN/Pmf505EgSs7oJ8PSyKYa4eHknRbJwDAGHzqrKNQyARrLbKA==}
|
|
8964
|
-
|
|
8965
8956
|
zova-core@5.1.88:
|
|
8966
8957
|
resolution: {integrity: sha512-YZ8z1GHE5iAo/khgP8/gnrRN8bUkv80cVvxDzmGSG5p/CEqQpHhcrC8lUH48fbuc4BgeGMTRlZoB+uNopYnALQ==}
|
|
8967
8958
|
|
|
8968
8959
|
zova-jsx@1.1.86:
|
|
8969
8960
|
resolution: {integrity: sha512-cGGv9tsu8MuPjHM055n8On3MhuTnhdpk00VDpMN3eiljnMCQiiiW3McIDMxMkuXXJFgCJvshkDhQ9VR7EZhcsg==}
|
|
8970
8961
|
|
|
8971
|
-
zova-jsx@1.1.87:
|
|
8972
|
-
resolution: {integrity: sha512-sUq/v9cn1gPdVvE4VI1xZbsI/G36dBCIZcCB5LW3s75tg7ntZ8y6n8rjJVa6VZK0WHE0ZU8dfYd0AGtEHEyCrw==}
|
|
8973
|
-
|
|
8974
8962
|
zova-jsx@1.1.88:
|
|
8975
8963
|
resolution: {integrity: sha512-DusZAiEor+lrYwsbxrWFhTBjYTArg6ldxuo323ly1GJ39jmNeF+vRDc8liDQF1czstp0fnJtuMNxQCEBaCasxg==}
|
|
8976
8964
|
|
|
@@ -9004,6 +8992,9 @@ packages:
|
|
|
9004
8992
|
zova-module-a-form@5.1.48:
|
|
9005
8993
|
resolution: {integrity: sha512-/YuNFocyP3P6THVrSebi1jRm5+og7YOleBWc7gPzqKUFWTmxN7XBbomRidQWXSRenSd7AWBjNgO3OajhOdswlw==}
|
|
9006
8994
|
|
|
8995
|
+
zova-module-a-form@5.1.49:
|
|
8996
|
+
resolution: {integrity: sha512-p/faHaDELk2xH4TbuXQ9E+vIUZ4yZYS4URFF0HtrJ+bXDBMCJmjOl3H0encedLh9ZS0dGYpvejHPh3nLvw27JA==}
|
|
8997
|
+
|
|
9007
8998
|
zova-module-a-icon@5.1.27:
|
|
9008
8999
|
resolution: {integrity: sha512-KAvHkK6YsN2H5iQgl2IBQHIvvFDnfzPCxDzuQyTnAiCgSczD/UFO6bLZqWVT2m/qfsmJXMzWAWHPdU02J3ANZQ==}
|
|
9009
9000
|
|
|
@@ -9082,12 +9073,18 @@ packages:
|
|
|
9082
9073
|
zova-suite-a-zova@5.1.152:
|
|
9083
9074
|
resolution: {integrity: sha512-P/dcMb2fcMpnmDMlrgvpddWUbupnvohD1Jp60VYWoqI0JcWMlYTJvWQWrwszDqiMvMiOTH5mmQBTws0KzbsXpA==}
|
|
9084
9075
|
|
|
9076
|
+
zova-suite-a-zova@5.1.153:
|
|
9077
|
+
resolution: {integrity: sha512-Q7R6GL5O/Tlqk4cnFYumMR2eeCwAqfnTtFrYQuuQMpz7BmYhAPmMmJQWF2reHlRjG6B4dbOPZ5pxl1iWagY7PA==}
|
|
9078
|
+
|
|
9085
9079
|
zova@5.1.151:
|
|
9086
9080
|
resolution: {integrity: sha512-ORpFNcMYRmoWtIGIGGswPpeLgrYiax9prStB3Em0umUFGxVLPg9Yt0R1/psFlFgcC9WionitSz4WBhjvcra8Xw==}
|
|
9087
9081
|
|
|
9088
9082
|
zova@5.1.153:
|
|
9089
9083
|
resolution: {integrity: sha512-2c+4lhgZgIzM6a066eRU/Ru6CvrSTwRsq1SgsSj+NuLOxUXoj+JPvwUezuRRmBCTukpRMd2nfw8u6vWHzVArTA==}
|
|
9090
9084
|
|
|
9085
|
+
zova@5.1.154:
|
|
9086
|
+
resolution: {integrity: sha512-QF0f+wwLeuf18hsmZj1/3G/AQ9cNQYMKZiCoBBsTDh7oIhaxsmI5wxtjo59HiOEkk5ZmWPHqwjA4iepTLoKqeg==}
|
|
9087
|
+
|
|
9091
9088
|
zwitch@1.0.5:
|
|
9092
9089
|
resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
|
|
9093
9090
|
|
|
@@ -15392,37 +15389,6 @@ snapshots:
|
|
|
15392
15389
|
transitivePeerDependencies:
|
|
15393
15390
|
- typescript
|
|
15394
15391
|
|
|
15395
|
-
zova-core@5.1.87(typescript@5.9.3):
|
|
15396
|
-
dependencies:
|
|
15397
|
-
'@cabloy/compose': link:packages-utils/compose
|
|
15398
|
-
'@cabloy/extend': link:packages-utils/extend
|
|
15399
|
-
'@cabloy/json5': link:packages-utils/json5
|
|
15400
|
-
'@cabloy/localeutil': link:packages-utils/localeutil
|
|
15401
|
-
'@cabloy/logger': 1.1.25
|
|
15402
|
-
'@cabloy/module-info': 2.0.3
|
|
15403
|
-
'@cabloy/utils': link:packages-utils/utils
|
|
15404
|
-
'@cabloy/vue-compiler-sfc': 3.5.14
|
|
15405
|
-
'@cabloy/vue-reactivity': 3.5.16
|
|
15406
|
-
'@cabloy/vue-router': 4.4.16(vue@3.5.39(typescript@5.9.3))
|
|
15407
|
-
'@cabloy/vue-runtime-core': 3.5.57
|
|
15408
|
-
'@cabloy/vue-runtime-dom': 3.5.13
|
|
15409
|
-
'@cabloy/vue-server-renderer': 3.5.18(vue@3.5.39(typescript@5.9.3))
|
|
15410
|
-
'@cabloy/word-utils': 2.1.14
|
|
15411
|
-
'@cabloy/zod-errors-custom': link:packages-utils/zod-errors-custom
|
|
15412
|
-
'@cabloy/zod-openapi': link:packages-utils/zod-openapi
|
|
15413
|
-
'@cabloy/zod-query': link:packages-utils/zod-query
|
|
15414
|
-
'@types/js-cookie': 3.0.6
|
|
15415
|
-
'@types/ms': 2.1.0
|
|
15416
|
-
'@vue/shared': 3.5.36
|
|
15417
|
-
deep-equal: 2.2.3
|
|
15418
|
-
ms: 2.1.3
|
|
15419
|
-
reflect-metadata: 0.2.2
|
|
15420
|
-
vue: 3.5.39(typescript@5.9.3)
|
|
15421
|
-
vue-plugin-render-freeze: 2.0.4(vue@3.5.39(typescript@5.9.3))
|
|
15422
|
-
zod: '@cabloy/zod@4.3.8'
|
|
15423
|
-
transitivePeerDependencies:
|
|
15424
|
-
- typescript
|
|
15425
|
-
|
|
15426
15392
|
zova-core@5.1.88(patch_hash=144450bd7a567a6067e5857c0cf4c780981b7e90bc48745c09e1696a9b6f1b97)(typescript@5.9.3):
|
|
15427
15393
|
dependencies:
|
|
15428
15394
|
'@cabloy/compose': link:packages-utils/compose
|
|
@@ -15465,17 +15431,6 @@ snapshots:
|
|
|
15465
15431
|
transitivePeerDependencies:
|
|
15466
15432
|
- typescript
|
|
15467
15433
|
|
|
15468
|
-
zova-jsx@1.1.87(typescript@5.9.3):
|
|
15469
|
-
dependencies:
|
|
15470
|
-
'@cabloy/compose': link:packages-utils/compose
|
|
15471
|
-
'@cabloy/utils': link:packages-utils/utils
|
|
15472
|
-
'@cabloy/word-utils': 2.1.14
|
|
15473
|
-
typestyle: 2.4.0
|
|
15474
|
-
vue: 3.5.39(typescript@5.9.3)
|
|
15475
|
-
zova-core: 5.1.87(typescript@5.9.3)
|
|
15476
|
-
transitivePeerDependencies:
|
|
15477
|
-
- typescript
|
|
15478
|
-
|
|
15479
15434
|
zova-jsx@1.1.88(typescript@5.9.3):
|
|
15480
15435
|
dependencies:
|
|
15481
15436
|
'@cabloy/compose': link:packages-utils/compose
|
|
@@ -15526,6 +15481,14 @@ snapshots:
|
|
|
15526
15481
|
- '@vue/composition-api'
|
|
15527
15482
|
- vue
|
|
15528
15483
|
|
|
15484
|
+
zova-module-a-form@5.1.49(vue@3.5.39(typescript@5.9.3)):
|
|
15485
|
+
dependencies:
|
|
15486
|
+
'@tanstack/vue-form': 1.33.2(vue@3.5.39(typescript@5.9.3))
|
|
15487
|
+
'@tanstack/vue-store': 0.11.0(vue@3.5.39(typescript@5.9.3))
|
|
15488
|
+
transitivePeerDependencies:
|
|
15489
|
+
- '@vue/composition-api'
|
|
15490
|
+
- vue
|
|
15491
|
+
|
|
15529
15492
|
zova-module-a-icon@5.1.27: {}
|
|
15530
15493
|
|
|
15531
15494
|
zova-module-a-interceptor@5.1.31: {}
|
|
@@ -15613,7 +15576,7 @@ snapshots:
|
|
|
15613
15576
|
'@cabloy/word-utils': 2.1.14
|
|
15614
15577
|
defu: 6.1.7
|
|
15615
15578
|
luxon: 3.7.2
|
|
15616
|
-
zova-jsx: 1.1.
|
|
15579
|
+
zova-jsx: 1.1.88(typescript@5.9.3)
|
|
15617
15580
|
transitivePeerDependencies:
|
|
15618
15581
|
- typescript
|
|
15619
15582
|
- vue
|
|
@@ -15652,7 +15615,7 @@ snapshots:
|
|
|
15652
15615
|
zova-module-a-boundary: 5.1.22
|
|
15653
15616
|
zova-module-a-command: 5.1.34
|
|
15654
15617
|
zova-module-a-fetch: 5.1.25
|
|
15655
|
-
zova-module-a-form: 5.1.
|
|
15618
|
+
zova-module-a-form: 5.1.48(vue@3.5.39(typescript@5.9.3))
|
|
15656
15619
|
zova-module-a-icon: 5.1.27
|
|
15657
15620
|
zova-module-a-interceptor: 5.1.31
|
|
15658
15621
|
zova-module-a-logger: 5.1.28
|
|
@@ -15662,7 +15625,7 @@ snapshots:
|
|
|
15662
15625
|
zova-module-a-router: 5.1.34
|
|
15663
15626
|
zova-module-a-routerstack: 5.1.27
|
|
15664
15627
|
zova-module-a-routertabs: 5.1.34
|
|
15665
|
-
zova-module-a-ssr: 5.1.
|
|
15628
|
+
zova-module-a-ssr: 5.1.38
|
|
15666
15629
|
zova-module-a-ssrhmr: 5.1.23
|
|
15667
15630
|
zova-module-a-ssrserver: 5.1.26
|
|
15668
15631
|
zova-module-a-style: 5.1.35
|
|
@@ -15710,6 +15673,40 @@ snapshots:
|
|
|
15710
15673
|
- typescript
|
|
15711
15674
|
- vue
|
|
15712
15675
|
|
|
15676
|
+
zova-suite-a-zova@5.1.153(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
15677
|
+
dependencies:
|
|
15678
|
+
zova-module-a-api: 5.1.22
|
|
15679
|
+
zova-module-a-app: 5.1.26
|
|
15680
|
+
zova-module-a-bean: 5.1.33
|
|
15681
|
+
zova-module-a-behavior: 5.1.26
|
|
15682
|
+
zova-module-a-behaviors: 5.1.22
|
|
15683
|
+
zova-module-a-boundary: 5.1.22
|
|
15684
|
+
zova-module-a-command: 5.1.34
|
|
15685
|
+
zova-module-a-fetch: 5.1.25
|
|
15686
|
+
zova-module-a-form: 5.1.49(vue@3.5.39(typescript@5.9.3))
|
|
15687
|
+
zova-module-a-icon: 5.1.27
|
|
15688
|
+
zova-module-a-interceptor: 5.1.31
|
|
15689
|
+
zova-module-a-logger: 5.1.28
|
|
15690
|
+
zova-module-a-meta: 5.1.22
|
|
15691
|
+
zova-module-a-model: 5.1.35(vue@3.5.39(typescript@5.9.3))
|
|
15692
|
+
zova-module-a-openapi: 5.1.50
|
|
15693
|
+
zova-module-a-router: 5.1.34
|
|
15694
|
+
zova-module-a-routerstack: 5.1.27
|
|
15695
|
+
zova-module-a-routertabs: 5.1.34
|
|
15696
|
+
zova-module-a-ssr: 5.1.38
|
|
15697
|
+
zova-module-a-ssrhmr: 5.1.23
|
|
15698
|
+
zova-module-a-ssrserver: 5.1.26
|
|
15699
|
+
zova-module-a-style: 5.1.35
|
|
15700
|
+
zova-module-a-table: 5.1.38(vue@3.5.39(typescript@5.9.3))
|
|
15701
|
+
zova-module-a-zod: 5.1.37
|
|
15702
|
+
zova-module-a-zova: 5.1.103(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
15703
|
+
transitivePeerDependencies:
|
|
15704
|
+
- '@vue/composition-api'
|
|
15705
|
+
- debug
|
|
15706
|
+
- supports-color
|
|
15707
|
+
- typescript
|
|
15708
|
+
- vue
|
|
15709
|
+
|
|
15713
15710
|
zova@5.1.151(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
15714
15711
|
dependencies:
|
|
15715
15712
|
zova-core: 5.1.86(typescript@5.9.3)
|
|
@@ -15732,6 +15729,17 @@ snapshots:
|
|
|
15732
15729
|
- typescript
|
|
15733
15730
|
- vue
|
|
15734
15731
|
|
|
15732
|
+
zova@5.1.154(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3)):
|
|
15733
|
+
dependencies:
|
|
15734
|
+
zova-core: 5.1.88(patch_hash=144450bd7a567a6067e5857c0cf4c780981b7e90bc48745c09e1696a9b6f1b97)(typescript@5.9.3)
|
|
15735
|
+
zova-suite-a-zova: 5.1.153(typescript@5.9.3)(vue@3.5.39(typescript@5.9.3))
|
|
15736
|
+
transitivePeerDependencies:
|
|
15737
|
+
- '@vue/composition-api'
|
|
15738
|
+
- debug
|
|
15739
|
+
- supports-color
|
|
15740
|
+
- typescript
|
|
15741
|
+
- vue
|
|
15742
|
+
|
|
15735
15743
|
zwitch@1.0.5: {}
|
|
15736
15744
|
|
|
15737
15745
|
zwitch@2.0.4: {}
|