cabloy 5.1.60 → 5.1.61

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.
Files changed (76) hide show
  1. package/.claude/hooks/contract-loop-gate.ts +296 -0
  2. package/.claude/settings.json +16 -0
  3. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  4. package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
  5. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
  6. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
  7. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
  8. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +11 -0
  9. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  10. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  11. package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
  12. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  13. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  14. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  15. package/CHANGELOG.md +22 -0
  16. package/CLAUDE.md +10 -0
  17. package/cabloy-docs/.vitepress/config.mjs +50 -4
  18. package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
  19. package/cabloy-docs/ai/docs-skills-rules-mapping.md +14 -0
  20. package/cabloy-docs/ai/future-skill-roadmap.md +10 -7
  21. package/cabloy-docs/ai/introduction.md +1 -0
  22. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  23. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  24. package/cabloy-docs/ai/skills.md +11 -0
  25. package/cabloy-docs/backend/dto-guide.md +6 -0
  26. package/cabloy-docs/backend/entity-guide.md +18 -0
  27. package/cabloy-docs/backend/introduction.md +2 -0
  28. package/cabloy-docs/backend/serialization-guide.md +10 -0
  29. package/cabloy-docs/backend/status-guide.md +271 -0
  30. package/cabloy-docs/frontend/api-guide.md +2 -0
  31. package/cabloy-docs/frontend/bean-scene-authoring.md +2 -0
  32. package/cabloy-docs/frontend/cli.md +12 -0
  33. package/cabloy-docs/frontend/command-scene-authoring.md +495 -0
  34. package/cabloy-docs/frontend/design-principles.md +6 -0
  35. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  36. package/cabloy-docs/frontend/form-guide.md +795 -0
  37. package/cabloy-docs/frontend/foundation.md +29 -0
  38. package/cabloy-docs/frontend/introduction.md +12 -1
  39. package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
  40. package/cabloy-docs/frontend/mock-guide.md +1 -0
  41. package/cabloy-docs/frontend/model-architecture.md +252 -39
  42. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  43. package/cabloy-docs/frontend/model-resource-cookbook.md +505 -0
  44. package/cabloy-docs/frontend/model-resource-owner-pattern.md +382 -0
  45. package/cabloy-docs/frontend/model-resource-usage-guide.md +318 -0
  46. package/cabloy-docs/frontend/model-state-guide.md +366 -13
  47. package/cabloy-docs/frontend/openapi-sdk-guide.md +5 -2
  48. package/cabloy-docs/frontend/page-guide.md +6 -0
  49. package/cabloy-docs/frontend/quickstart.md +4 -0
  50. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  51. package/cabloy-docs/frontend/server-data.md +2 -0
  52. package/cabloy-docs/frontend/zova-form-source-reading-map.md +295 -0
  53. package/cabloy-docs/frontend/zova-form-under-the-hood.md +556 -0
  54. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  55. package/cabloy-docs/frontend/zova-source-reading-map.md +327 -0
  56. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  57. package/cabloy-docs/fullstack/contract-loop-playbook.md +350 -0
  58. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +44 -1
  59. package/cabloy-docs/fullstack/introduction.md +12 -1
  60. package/cabloy-docs/fullstack/openapi-to-sdk.md +19 -9
  61. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +2 -2
  62. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +30 -5
  63. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +9 -7
  64. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +2 -0
  65. package/cabloy-docs/fullstack/tutorials-overview.md +16 -3
  66. package/cabloy-docs/reference/bean-scene-boilerplates.md +2 -0
  67. package/package.json +2 -1
  68. package/scripts/init.ts +2 -18
  69. package/scripts/initTestData.ts +25 -0
  70. package/scripts/upgrade.ts +17 -2
  71. package/vona/pnpm-lock.yaml +94 -4
  72. package/zova/packages-cli/cli/package.json +2 -2
  73. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  74. package/zova/packages-cli/cli-set-front/package.json +1 -1
  75. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  76. package/zova/pnpm-lock.yaml +20 -20
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli",
3
- "version": "1.2.79",
3
+ "version": "1.2.80",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  "@cabloy/process-helper": "^3.1.8",
45
45
  "fs-extra": "^11.3.5",
46
46
  "semver": "^7.6.2",
47
- "zova-cli-set-front": "^1.2.77"
47
+ "zova-cli-set-front": "^1.2.78"
48
48
  },
49
49
  "devDependencies": {
50
50
  "clean-package": "^2.2.0",
@@ -1,5 +1,10 @@
1
1
  import type { ZovaOpenapiConfigModule } from 'zova-openapi';
2
2
 
3
3
  export default function (): ZovaOpenapiConfigModule {
4
- return {};
4
+ return {
5
+ operations: {
6
+ // Specify operations.match or operations.ignore explicitly for this module.
7
+ match: [],
8
+ },
9
+ };
5
10
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zova-cli-set-front",
3
- "version": "1.2.77",
3
+ "version": "1.2.78",
4
4
  "gitHead": "6f675a8cc46d596142c591c28a40cc4d82fcc6cc",
5
5
  "description": "zova cli-set-front",
6
6
  "keywords": [
@@ -4,7 +4,11 @@ import type {
4
4
  SchemaObject,
5
5
  TransformNodeOptions,
6
6
  } from '@cabloy/openapi-typescript';
7
- import type { ZovaOpenapiConfig, ZovaOpenapiConfigModule } from 'zova-openapi';
7
+ import type {
8
+ TypeOpenapiConfigMatchRule,
9
+ ZovaOpenapiConfig,
10
+ ZovaOpenapiConfigModule,
11
+ } from 'zova-openapi';
8
12
 
9
13
  import { BeanCliBase } from '@cabloy/cli';
10
14
  import { extend } from '@cabloy/extend';
@@ -107,6 +111,7 @@ export class CliOpenapiGenerate extends BeanCliBase {
107
111
  moduleConfigCli,
108
112
  config.modules[moduleInfo.relativeName],
109
113
  );
114
+ _validateOperations(moduleConfig, moduleInfo.relativeName, configFile);
110
115
  const cache = await this._outputFiles(
111
116
  openapiTypescript,
112
117
  moduleConfig,
@@ -534,12 +539,37 @@ function _q(question: boolean) {
534
539
  return question ? '?' : '';
535
540
  }
536
541
 
542
+ function _hasOperationRule(rule?: TypeOpenapiConfigMatchRule) {
543
+ if (!rule) return false;
544
+ return !Array.isArray(rule) || rule.length > 0;
545
+ }
546
+
547
+ function _validateOperations(
548
+ moduleConfig: ZovaOpenapiConfigModule,
549
+ moduleName: string,
550
+ configFile: string,
551
+ ) {
552
+ if (
553
+ _hasOperationRule(moduleConfig.operations?.match) ||
554
+ _hasOperationRule(moduleConfig.operations?.ignore)
555
+ ) {
556
+ return;
557
+ }
558
+ throw new Error(
559
+ `Please specify operations.match or operations.ignore in ${configFile} to avoid generating a large number of API SDKs unrelated to module "${moduleName}".`,
560
+ );
561
+ }
562
+
537
563
  function _checkOperationIdEnabled(moduleConfig: ZovaOpenapiConfigModule, selector?: string) {
538
564
  if (!selector) return false;
539
- if (!moduleConfig.operations?.match && !moduleConfig.operations?.ignore) return true;
565
+ const match = moduleConfig.operations?.match;
566
+ const ignore = moduleConfig.operations?.ignore;
567
+ const hasMatch = _hasOperationRule(match);
568
+ const hasIgnore = _hasOperationRule(ignore);
569
+ if (!hasMatch && !hasIgnore) return false;
540
570
  return (
541
- (moduleConfig.operations?.match && matchSelector(moduleConfig.operations?.match, selector)) ||
542
- (moduleConfig.operations?.ignore && !matchSelector(moduleConfig.operations?.ignore, selector))
571
+ (hasMatch && matchSelector(match!, selector)) ||
572
+ (hasIgnore && !matchSelector(ignore!, selector))
543
573
  );
544
574
  }
545
575
 
@@ -296,8 +296,8 @@ importers:
296
296
  version: link:src/suite-vendor/a-cabloy/modules/rest-resource
297
297
  devDependencies:
298
298
  '@cabloy/cli':
299
- specifier: ^3.1.17
300
- version: 3.1.17(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
299
+ specifier: ^3.1.18
300
+ version: 3.1.18(vue@3.5.38(typescript@5.9.3))
301
301
  '@cabloy/lint':
302
302
  specifier: ^5.1.27
303
303
  version: 5.1.27(@typescript-eslint/eslint-plugin@8.61.0(@typescript-eslint/parser@8.61.0(eslint@10.4.1(jiti@2.7.0))(typescript@5.9.3))(eslint@10.4.1(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/rule-tester@8.61.0(eslint@10.4.1(jiti@2.7.0))(typescript@5.9.3))(@typescript-eslint/typescript-estree@8.61.0(typescript@5.9.3))(@typescript-eslint/utils@8.61.0(eslint@10.4.1(jiti@2.7.0))(typescript@5.9.3))(eslint@10.4.1(jiti@2.7.0))(oxfmt@0.45.0)(oxlint@1.69.0)(supports-color@10.2.2)(typescript@5.9.3)(vue-eslint-parser@10.4.1(eslint@10.4.1(jiti@2.7.0)))
@@ -371,8 +371,8 @@ importers:
371
371
  packages-cli/cli:
372
372
  dependencies:
373
373
  '@cabloy/cli':
374
- specifier: ^3.1.17
375
- version: 3.1.17(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
374
+ specifier: ^3.1.18
375
+ version: 3.1.18(vue@3.5.38(typescript@5.9.3))
376
376
  '@cabloy/process-helper':
377
377
  specifier: ^3.1.8
378
378
  version: 3.1.8
@@ -383,7 +383,7 @@ importers:
383
383
  specifier: ^7.6.2
384
384
  version: 7.8.4
385
385
  zova-cli-set-front:
386
- specifier: ^1.2.76
386
+ specifier: ^1.2.77
387
387
  version: link:../cli-set-front
388
388
  devDependencies:
389
389
  clean-package:
@@ -405,8 +405,8 @@ importers:
405
405
  specifier: ^7.28.6
406
406
  version: 7.29.7(@babel/core@7.29.7)
407
407
  '@cabloy/cli':
408
- specifier: ^3.1.17
409
- version: 3.1.17(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
408
+ specifier: ^3.1.18
409
+ version: 3.1.18(vue@3.5.38(typescript@5.9.3))
410
410
  '@cabloy/extend':
411
411
  specifier: ^3.2.8
412
412
  version: 3.2.8
@@ -492,7 +492,7 @@ importers:
492
492
  specifier: ^1.1.17
493
493
  version: link:../../packages-utils/zova-openapi
494
494
  zova-vite:
495
- specifier: ^1.1.38
495
+ specifier: ^1.1.39
496
496
  version: link:../../packages-utils/zova-vite
497
497
  devDependencies:
498
498
  clean-package:
@@ -804,7 +804,7 @@ importers:
804
804
  specifier: ^5.1.57
805
805
  version: link:../zova-core
806
806
  zova-suite-a-zova:
807
- specifier: ^5.1.101
807
+ specifier: ^5.1.102
808
808
  version: link:../../src/suite-vendor/a-zova
809
809
  devDependencies:
810
810
  clean-package:
@@ -902,7 +902,7 @@ importers:
902
902
  src/suite-vendor/a-cabloy:
903
903
  dependencies:
904
904
  zova-module-rest-resource:
905
- specifier: ^5.1.35
905
+ specifier: ^5.1.36
906
906
  version: link:modules/rest-resource
907
907
 
908
908
  src/suite-vendor/a-cabloy/modules/rest-resource:
@@ -968,7 +968,7 @@ importers:
968
968
  specifier: ^5.1.23
969
969
  version: link:modules/a-routerstack
970
970
  zova-module-a-routertabs:
971
- specifier: ^5.1.28
971
+ specifier: ^5.1.29
972
972
  version: link:modules/a-routertabs
973
973
  zova-module-a-ssr:
974
974
  specifier: ^5.1.23
@@ -983,13 +983,13 @@ importers:
983
983
  specifier: ^5.1.29
984
984
  version: link:modules/a-style
985
985
  zova-module-a-table:
986
- specifier: ^5.1.30
986
+ specifier: ^5.1.31
987
987
  version: link:modules/a-table
988
988
  zova-module-a-zod:
989
989
  specifier: ^5.1.30
990
990
  version: link:modules/a-zod
991
991
  zova-module-a-zova:
992
- specifier: ^5.1.69
992
+ specifier: ^5.1.70
993
993
  version: link:modules/a-zova
994
994
 
995
995
  src/suite-vendor/a-zova/modules/a-api:
@@ -1332,8 +1332,8 @@ importers:
1332
1332
  version: link:../../../../../packages-utils/zova-jsx
1333
1333
  devDependencies:
1334
1334
  '@cabloy/cli':
1335
- specifier: ^3.1.17
1336
- version: 3.1.17(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))
1335
+ specifier: ^3.1.18
1336
+ version: 3.1.18(vue@3.5.38(typescript@5.9.3))
1337
1337
  '@types/luxon':
1338
1338
  specifier: ^3.7.1
1339
1339
  version: 3.7.1
@@ -1885,8 +1885,8 @@ packages:
1885
1885
  '@bufbuild/protobuf@2.12.0':
1886
1886
  resolution: {integrity: sha512-B/XlCaFIP8LOwzo+bz5uFzATYokcwCKQcghqnlfwSmM5eX/qTkvDBnDPs+gXtX/RyjxJ4DRikECcPJbyALA8FA==}
1887
1887
 
1888
- '@cabloy/cli@3.1.17':
1889
- resolution: {integrity: sha512-PwaTOyszzAstcwI5dXkCha5buzDPs34TeSqjYjeB1nn+YcSYgba5tEPrR2YvkG5jkcSx7z+2sRBGFaawLTRyNA==}
1888
+ '@cabloy/cli@3.1.18':
1889
+ resolution: {integrity: sha512-469aCSeUHKr6jbiMTtiAJBpWPegmy99Ont9ZUWzoJvLKbkk9yYDX7OKfj/E0nQAVdf2P2vz9T7WOOSjytfQdGQ==}
1890
1890
 
1891
1891
  '@cabloy/compose@2.1.8':
1892
1892
  resolution: {integrity: sha512-TdEr9BY54BYoIlTjkrOKkzK8yJWmP07OrRTh4punJMnWzM+oDExQ2EGCGAHXnEHjLWqdhyMGm/ejmxnVgBmraQ==}
@@ -8339,7 +8339,7 @@ snapshots:
8339
8339
 
8340
8340
  '@bufbuild/protobuf@2.12.0': {}
8341
8341
 
8342
- '@cabloy/cli@3.1.17(supports-color@10.2.2)(vue@3.5.38(typescript@5.9.3))':
8342
+ '@cabloy/cli@3.1.18(vue@3.5.38(typescript@5.9.3))':
8343
8343
  dependencies:
8344
8344
  '@babel/parser': 7.29.7
8345
8345
  '@cabloy/module-glob': 5.3.13
@@ -8348,7 +8348,7 @@ snapshots:
8348
8348
  '@cabloy/utils': 2.1.22
8349
8349
  '@cabloy/word-utils': link:packages-utils/word-utils
8350
8350
  '@npmcli/config': 10.10.0
8351
- '@zhennann/common-bin': 4.0.1(supports-color@10.2.2)
8351
+ '@zhennann/common-bin': 4.0.1
8352
8352
  '@zhennann/ejs': 3.0.1
8353
8353
  boxen: 4.2.0
8354
8354
  chalk: 3.0.0
@@ -10471,7 +10471,7 @@ snapshots:
10471
10471
 
10472
10472
  '@vue/shared@3.5.13': {}
10473
10473
 
10474
- '@zhennann/common-bin@4.0.1(supports-color@10.2.2)':
10474
+ '@zhennann/common-bin@4.0.1':
10475
10475
  dependencies:
10476
10476
  chalk: 4.1.2
10477
10477
  change-case: 4.1.2