cabloy 5.1.236 → 5.1.239
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/repo-docs/backend/broadcast-guide.md +2 -0
- package/repo-docs/backend/queue-guide.md +31 -0
- package/repo-docs/backend/schedule-guide.md +23 -0
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/bean/resource/locale/appLocale.ts +2 -2
- package/vona/packages-vona/vona-core/src/lib/bean/resource/locale/utils.ts +46 -1
- package/vona/packages-vona/vona-core/src/lib/framework/start.ts +4 -0
- package/vona/packages-vona/vona-core/src/lib/module/locales.ts +41 -22
- package/vona/packages-vona/vona-core/src/lib/utils/zod-enhance.ts +1 -1
- package/vona/packages-vona/vona-core/src/types/config/config.ts +2 -0
- package/vona/packages-vona/vona-core/src/types/config/locale.ts +11 -4
- package/vona/packages-vona/vona-core/src/types/interface/module.ts +1 -0
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/patches/{zova-core@5.1.94.patch → zova-core@5.1.95.patch} +2 -2
- package/vona/pnpm-lock.yaml +146 -21
- package/vona/pnpm-workspace.yaml +1 -1
- package/vona/src/backend/config/config/config.ts +9 -0
- package/vona/src/suite/a-home/modules/home-base/src/main.ts +1 -4
- package/vona/src/suite-vendor/a-cabloy/modules/a-rbac/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-hmr/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-hmr/src/service/watch.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-locale/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-locale/src/config/config.ts +2 -4
- package/vona/src/suite-vendor/a-vona/modules/a-locale/src/main.ts +12 -30
- 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/bean.openapi.ts +6 -2
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/service/openapi.ts +107 -48
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/types/contract.ts +25 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapi/src/types/index.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/const/decorator.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/decorator/index.ts +1 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/lib/decorator/mcp.ts +28 -0
- package/vona/src/suite-vendor/a-vona/modules/a-openapiutils/src/types/api.ts +8 -0
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-queue/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-queue/src/config/config.ts +2 -0
- package/vona/src/suite-vendor/a-vona/modules/a-ratelimit/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ratelimit/src/service/rateLimit.ts +3 -1
- package/vona/src/suite-vendor/a-vona/modules/a-ratelimit/src/types/rateLimit.ts +4 -0
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/packages-utils/zova-jsx/package.json +2 -2
- package/zova/packages-zova/zova/package.json +3 -3
- package/zova/packages-zova/zova-core/package.json +1 -1
- package/zova/packages-zova/zova-core/src/core/component/locale.ts +13 -3
- package/zova/packages-zova/zova-core/src/core/sys/config.ts +28 -1
- package/zova/packages-zova/zova-core/src/core/sys/locale.ts +24 -0
- package/zova/packages-zova/zova-core/src/core/sys/module.ts +16 -4
- package/zova/packages-zova/zova-core/src/core/sys/sys.ts +7 -2
- package/zova/packages-zova/zova-core/src/types/interface/module.ts +1 -0
- package/zova/packages-zova/zova-core/src/utils/zod-enhance.ts +1 -1
- package/zova/pnpm-lock.yaml +7 -7
- package/zova/src/suite/a-home/modules/home-base/src/config/locale/en-us.ts +1 -0
- package/zova/src/suite/a-home/modules/home-base/src/config/locale/zh-cn.ts +1 -0
- package/zova/src/suite/a-home/modules/home-layoutweb/src/component/layoutWeb/render.locale.tsx +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 +13 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/lib/ssrNavigation.ts +24 -0
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/src/monkey.ts +8 -1
- package/zova/src/suite-vendor/a-zova/modules/a-ssr/test/lib/ssrNavigation.test.ts +54 -1
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +3 -3
package/vona/pnpm-lock.yaml
CHANGED
|
@@ -174,7 +174,7 @@ overrides:
|
|
|
174
174
|
zod: npm:@cabloy/zod@4.3.8
|
|
175
175
|
|
|
176
176
|
patchedDependencies:
|
|
177
|
-
zova-core@5.1.
|
|
177
|
+
zova-core@5.1.95: 44197c3f359a73a1a5bb3dc0a8a97e705a55b30f9a434717aa24d75a96f2c6b6
|
|
178
178
|
|
|
179
179
|
importers:
|
|
180
180
|
|
|
@@ -737,11 +737,11 @@ importers:
|
|
|
737
737
|
specifier: npm:@cabloy/zod@4.3.8
|
|
738
738
|
version: '@cabloy/zod@4.3.8'
|
|
739
739
|
zova:
|
|
740
|
-
specifier: ^5.1.
|
|
741
|
-
version: 5.1.
|
|
740
|
+
specifier: ^5.1.177
|
|
741
|
+
version: 5.1.177(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
742
742
|
zova-jsx:
|
|
743
|
-
specifier: ^1.1.
|
|
744
|
-
version: 1.1.
|
|
743
|
+
specifier: ^1.1.95
|
|
744
|
+
version: 1.1.95(typescript@5.9.3)
|
|
745
745
|
zova-module-a-api:
|
|
746
746
|
specifier: ^5.1.23
|
|
747
747
|
version: 5.1.23
|
|
@@ -803,8 +803,8 @@ importers:
|
|
|
803
803
|
specifier: ^5.1.36
|
|
804
804
|
version: 5.1.36
|
|
805
805
|
zova-module-a-ssr:
|
|
806
|
-
specifier: ^5.1.
|
|
807
|
-
version: 5.1.
|
|
806
|
+
specifier: ^5.1.42
|
|
807
|
+
version: 5.1.42
|
|
808
808
|
zova-module-a-ssrhmr:
|
|
809
809
|
specifier: ^5.1.24
|
|
810
810
|
version: 5.1.24
|
|
@@ -821,8 +821,8 @@ importers:
|
|
|
821
821
|
specifier: ^5.1.39
|
|
822
822
|
version: 5.1.39
|
|
823
823
|
zova-module-a-zova:
|
|
824
|
-
specifier: ^5.1.
|
|
825
|
-
version: 5.1.
|
|
824
|
+
specifier: ^5.1.114
|
|
825
|
+
version: 5.1.114(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
826
826
|
zova-module-pay-mock:
|
|
827
827
|
specifier: ^5.0.6
|
|
828
828
|
version: 5.0.6
|
|
@@ -866,11 +866,11 @@ importers:
|
|
|
866
866
|
specifier: npm:@cabloy/zod@4.3.8
|
|
867
867
|
version: '@cabloy/zod@4.3.8'
|
|
868
868
|
zova:
|
|
869
|
-
specifier: ^5.1.
|
|
870
|
-
version: 5.1.
|
|
869
|
+
specifier: ^5.1.177
|
|
870
|
+
version: 5.1.177(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
871
871
|
zova-jsx:
|
|
872
|
-
specifier: ^1.1.
|
|
873
|
-
version: 1.1.
|
|
872
|
+
specifier: ^1.1.95
|
|
873
|
+
version: 1.1.95(typescript@5.9.3)
|
|
874
874
|
zova-module-a-api:
|
|
875
875
|
specifier: ^5.1.23
|
|
876
876
|
version: 5.1.23
|
|
@@ -932,8 +932,8 @@ importers:
|
|
|
932
932
|
specifier: ^5.1.36
|
|
933
933
|
version: 5.1.36
|
|
934
934
|
zova-module-a-ssr:
|
|
935
|
-
specifier: ^5.1.
|
|
936
|
-
version: 5.1.
|
|
935
|
+
specifier: ^5.1.42
|
|
936
|
+
version: 5.1.42
|
|
937
937
|
zova-module-a-ssrhmr:
|
|
938
938
|
specifier: ^5.1.24
|
|
939
939
|
version: 5.1.24
|
|
@@ -950,8 +950,8 @@ importers:
|
|
|
950
950
|
specifier: ^5.1.39
|
|
951
951
|
version: 5.1.39
|
|
952
952
|
zova-module-a-zova:
|
|
953
|
-
specifier: ^5.1.
|
|
954
|
-
version: 5.1.
|
|
953
|
+
specifier: ^5.1.114
|
|
954
|
+
version: 5.1.114(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
955
955
|
zova-module-pay-mock:
|
|
956
956
|
specifier: ^5.0.6
|
|
957
957
|
version: 5.0.6
|
|
@@ -1990,7 +1990,7 @@ importers:
|
|
|
1990
1990
|
specifier: ^5.0.3
|
|
1991
1991
|
version: link:modules/a-markdown
|
|
1992
1992
|
vona-module-a-rbac:
|
|
1993
|
-
specifier: ^5.0.
|
|
1993
|
+
specifier: ^5.0.17
|
|
1994
1994
|
version: link:modules/a-rbac
|
|
1995
1995
|
vona-module-a-socket:
|
|
1996
1996
|
specifier: workspace:^
|
|
@@ -9415,9 +9415,15 @@ packages:
|
|
|
9415
9415
|
zova-core@5.1.94:
|
|
9416
9416
|
resolution: {integrity: sha512-puo3pqa4/ngwZj//Md457XMloZ4FRaoJlmwf+zyPyxKL7GoV81BaJeUPi9szzY8aM9EkoWXBhSVA0cp6mTXBhw==}
|
|
9417
9417
|
|
|
9418
|
+
zova-core@5.1.95:
|
|
9419
|
+
resolution: {integrity: sha512-nvBb3zVdJEQ9SWi+cl5j2PLs/T0FRRIULfHqU3SBFUn3jFSZFizniRlak+qoSq3mzj+LGD61BfnFJQb2JJ8+Zg==}
|
|
9420
|
+
|
|
9418
9421
|
zova-jsx@1.1.94:
|
|
9419
9422
|
resolution: {integrity: sha512-4QGgNE5J32PXYCgHBt8JBrTRp8CXADgZzIBUsovQmKfIwtMY6DK5+zPQeWBVqHoV5vK95RKhRPwdAKFGOLupeg==}
|
|
9420
9423
|
|
|
9424
|
+
zova-jsx@1.1.95:
|
|
9425
|
+
resolution: {integrity: sha512-gzmR01Qt4oBrMCejH4W0fqfFx62L+XQOfOROs6mBVdFYGmbyXzy/lDXtTH4v4WjlrmVbuoAyZE/BrYmNxn2swA==}
|
|
9426
|
+
|
|
9421
9427
|
zova-module-a-api@5.1.23:
|
|
9422
9428
|
resolution: {integrity: sha512-qKOZOgaEr92GJDO1y56P1s0RA9lz0i4xa2VpY3Eu8KBU+KixiXLKEo0LKW9E0qpWphsXK8l1JHQwxSAPBogFvA==}
|
|
9423
9429
|
|
|
@@ -9481,6 +9487,9 @@ packages:
|
|
|
9481
9487
|
zova-module-a-ssr@5.1.41:
|
|
9482
9488
|
resolution: {integrity: sha512-2p19mMzc9MjvYDdEbV6qjOngxuM7vdzwA1+Z4+/81pOfptU7nBobqDaDUNZxblHEoiIHrDM8NCeghPBO6Fz2sg==}
|
|
9483
9489
|
|
|
9490
|
+
zova-module-a-ssr@5.1.42:
|
|
9491
|
+
resolution: {integrity: sha512-XaZcUHwDxwyQi4VNLK6CxkdG4lV5aUNgPNkiLjN3LWh9l2yS0u8CQqGV8+gEKcpOOj7XhZIubu4gb4GUNNQoGw==}
|
|
9492
|
+
|
|
9484
9493
|
zova-module-a-ssrhmr@5.1.24:
|
|
9485
9494
|
resolution: {integrity: sha512-wB3ud1BYabj0GH8IQea1skcbMquHTtRHJsxDlFNfKtf+jiofN8YuWgrw3XKyOPW98BaMnHPRvpy4G+3Uh4hnOA==}
|
|
9486
9495
|
|
|
@@ -9499,6 +9508,9 @@ packages:
|
|
|
9499
9508
|
zova-module-a-zova@5.1.113:
|
|
9500
9509
|
resolution: {integrity: sha512-PuasOjYgRz8F94oVPSjQepwVxL+LySauwJQKNzly+yD7YCbQJcHy6tw7IejwcaSTjlBe3M1Iy6IWX7IwrOrfyw==}
|
|
9501
9510
|
|
|
9511
|
+
zova-module-a-zova@5.1.114:
|
|
9512
|
+
resolution: {integrity: sha512-H16jQ2YRw3Q9KSO7RDKMl+QRFZSZ7J/AkUUD71BTQA1oDLY+zBLuKTABwicEgS3S44R4qJC79rR/yuTXLlZnkw==}
|
|
9513
|
+
|
|
9502
9514
|
zova-module-pay-mock@5.0.6:
|
|
9503
9515
|
resolution: {integrity: sha512-i133rYinCELjb0WkcRKs1LPNxNxlJ9XUV+NgimSNXUHi6O7TLEHq28Ygq5D6HvG9t+TevXbYS5TxTfPtXpPkOg==}
|
|
9504
9516
|
|
|
@@ -9514,9 +9526,15 @@ packages:
|
|
|
9514
9526
|
zova-suite-a-zova@5.1.175:
|
|
9515
9527
|
resolution: {integrity: sha512-cjN97iaDZ3WhvOtu27YnqfZpEnnKptLGqqpllIhAtOFaTXtuMGiGVTmH7Q1tc/k9OPEHzvvCThsYKRxzYbR5DQ==}
|
|
9516
9528
|
|
|
9529
|
+
zova-suite-a-zova@5.1.176:
|
|
9530
|
+
resolution: {integrity: sha512-w7JQ0cutO3zaZosxfsSLn9/mcY5deftZWTGkiPJTTG6I6eGGZlFJRDCQpu+dBd8eYI66xe4kstdH3KGhLSt74A==}
|
|
9531
|
+
|
|
9517
9532
|
zova@5.1.176:
|
|
9518
9533
|
resolution: {integrity: sha512-7E/Kc9QkuB6ckDX2ual9DFmiVrcPy/umDVlC+QlRFy5A30L8D5/WNKzWxmBubXYsXWmsAd/VZQUQPwditMmNkA==}
|
|
9519
9534
|
|
|
9535
|
+
zova@5.1.177:
|
|
9536
|
+
resolution: {integrity: sha512-35jZVs08Qn4cybwNqu1/PE3qz1J7Vi64y7AgTD98rVv5uOnDPkuwIIIVgMYZllV/C3kCsWPBLoC3tz/UG4SEcA==}
|
|
9537
|
+
|
|
9520
9538
|
zwitch@1.0.5:
|
|
9521
9539
|
resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
|
|
9522
9540
|
|
|
@@ -15862,7 +15880,38 @@ snapshots:
|
|
|
15862
15880
|
|
|
15863
15881
|
yocto-queue@0.1.0: {}
|
|
15864
15882
|
|
|
15865
|
-
zova-core@5.1.94(
|
|
15883
|
+
zova-core@5.1.94(typescript@5.9.3):
|
|
15884
|
+
dependencies:
|
|
15885
|
+
'@cabloy/compose': link:packages-utils/compose
|
|
15886
|
+
'@cabloy/extend': link:packages-utils/extend
|
|
15887
|
+
'@cabloy/json5': link:packages-utils/json5
|
|
15888
|
+
'@cabloy/localeutil': link:packages-utils/localeutil
|
|
15889
|
+
'@cabloy/logger': 1.1.25
|
|
15890
|
+
'@cabloy/module-info': 2.0.3
|
|
15891
|
+
'@cabloy/utils': link:packages-utils/utils
|
|
15892
|
+
'@cabloy/vue-compiler-sfc': 3.5.14
|
|
15893
|
+
'@cabloy/vue-reactivity': 3.5.16
|
|
15894
|
+
'@cabloy/vue-router': 4.4.18(vue@3.5.43(typescript@5.9.3))
|
|
15895
|
+
'@cabloy/vue-runtime-core': 3.5.57
|
|
15896
|
+
'@cabloy/vue-runtime-dom': 3.5.13
|
|
15897
|
+
'@cabloy/vue-server-renderer': 3.5.18(vue@3.5.43(typescript@5.9.3))
|
|
15898
|
+
'@cabloy/word-utils': 2.1.14
|
|
15899
|
+
'@cabloy/zod-errors-custom': link:packages-utils/zod-errors-custom
|
|
15900
|
+
'@cabloy/zod-openapi': link:packages-utils/zod-openapi
|
|
15901
|
+
'@cabloy/zod-query': link:packages-utils/zod-query
|
|
15902
|
+
'@types/js-cookie': 3.0.6
|
|
15903
|
+
'@types/ms': 2.1.0
|
|
15904
|
+
'@vue/shared': 3.5.36
|
|
15905
|
+
deep-equal: 2.2.3
|
|
15906
|
+
ms: 2.1.3
|
|
15907
|
+
reflect-metadata: 0.2.2
|
|
15908
|
+
vue: 3.5.43(typescript@5.9.3)
|
|
15909
|
+
vue-plugin-render-freeze: 2.0.4(vue@3.5.43(typescript@5.9.3))
|
|
15910
|
+
zod: '@cabloy/zod@4.3.8'
|
|
15911
|
+
transitivePeerDependencies:
|
|
15912
|
+
- typescript
|
|
15913
|
+
|
|
15914
|
+
zova-core@5.1.95(patch_hash=44197c3f359a73a1a5bb3dc0a8a97e705a55b30f9a434717aa24d75a96f2c6b6)(typescript@5.9.3):
|
|
15866
15915
|
dependencies:
|
|
15867
15916
|
'@cabloy/compose': link:packages-utils/compose
|
|
15868
15917
|
'@cabloy/extend': link:packages-utils/extend
|
|
@@ -15900,7 +15949,18 @@ snapshots:
|
|
|
15900
15949
|
'@cabloy/word-utils': 2.1.14
|
|
15901
15950
|
typestyle: 2.4.0
|
|
15902
15951
|
vue: 3.5.43(typescript@5.9.3)
|
|
15903
|
-
zova-core: 5.1.94(
|
|
15952
|
+
zova-core: 5.1.94(typescript@5.9.3)
|
|
15953
|
+
transitivePeerDependencies:
|
|
15954
|
+
- typescript
|
|
15955
|
+
|
|
15956
|
+
zova-jsx@1.1.95(typescript@5.9.3):
|
|
15957
|
+
dependencies:
|
|
15958
|
+
'@cabloy/compose': link:packages-utils/compose
|
|
15959
|
+
'@cabloy/utils': link:packages-utils/utils
|
|
15960
|
+
'@cabloy/word-utils': 2.1.14
|
|
15961
|
+
typestyle: 2.4.0
|
|
15962
|
+
vue: 3.5.43(typescript@5.9.3)
|
|
15963
|
+
zova-core: 5.1.95(patch_hash=44197c3f359a73a1a5bb3dc0a8a97e705a55b30f9a434717aa24d75a96f2c6b6)(typescript@5.9.3)
|
|
15904
15964
|
transitivePeerDependencies:
|
|
15905
15965
|
- typescript
|
|
15906
15966
|
|
|
@@ -15978,6 +16038,11 @@ snapshots:
|
|
|
15978
16038
|
devalue: 5.9.4
|
|
15979
16039
|
ms: 2.1.3
|
|
15980
16040
|
|
|
16041
|
+
zova-module-a-ssr@5.1.42:
|
|
16042
|
+
dependencies:
|
|
16043
|
+
devalue: 5.9.4
|
|
16044
|
+
ms: 2.1.3
|
|
16045
|
+
|
|
15981
16046
|
zova-module-a-ssrhmr@5.1.24:
|
|
15982
16047
|
dependencies:
|
|
15983
16048
|
'@cabloy/socket': link:packages-utils/socket
|
|
@@ -16022,6 +16087,22 @@ snapshots:
|
|
|
16022
16087
|
- typescript
|
|
16023
16088
|
- vue
|
|
16024
16089
|
|
|
16090
|
+
zova-module-a-zova@5.1.114(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3)):
|
|
16091
|
+
dependencies:
|
|
16092
|
+
'@cabloy/compose': link:packages-utils/compose
|
|
16093
|
+
'@cabloy/deps': link:packages-utils/deps
|
|
16094
|
+
'@cabloy/json5': link:packages-utils/json5
|
|
16095
|
+
'@cabloy/module-info': 2.0.3
|
|
16096
|
+
'@cabloy/utils': link:packages-utils/utils
|
|
16097
|
+
'@cabloy/vue-router': 4.4.18(vue@3.5.43(typescript@5.9.3))
|
|
16098
|
+
'@cabloy/word-utils': 2.1.14
|
|
16099
|
+
defu: 6.1.7
|
|
16100
|
+
luxon: 3.7.2
|
|
16101
|
+
zova-jsx: 1.1.95(typescript@5.9.3)
|
|
16102
|
+
transitivePeerDependencies:
|
|
16103
|
+
- typescript
|
|
16104
|
+
- vue
|
|
16105
|
+
|
|
16025
16106
|
zova-module-pay-mock@5.0.6: {}
|
|
16026
16107
|
|
|
16027
16108
|
zova-module-pay-paypal@5.0.3: {}
|
|
@@ -16063,9 +16144,42 @@ snapshots:
|
|
|
16063
16144
|
- typescript
|
|
16064
16145
|
- vue
|
|
16065
16146
|
|
|
16147
|
+
zova-suite-a-zova@5.1.176(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3)):
|
|
16148
|
+
dependencies:
|
|
16149
|
+
zova-module-a-api: 5.1.23
|
|
16150
|
+
zova-module-a-app: 5.1.27
|
|
16151
|
+
zova-module-a-bean: 5.1.37
|
|
16152
|
+
zova-module-a-behavior: 5.1.28
|
|
16153
|
+
zova-module-a-behaviors: 5.1.23
|
|
16154
|
+
zova-module-a-command: 5.1.36
|
|
16155
|
+
zova-module-a-fetch: 5.1.26(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)
|
|
16156
|
+
zova-module-a-form: 5.1.55(vue@3.5.43(typescript@5.9.3))
|
|
16157
|
+
zova-module-a-icon: 5.1.28
|
|
16158
|
+
zova-module-a-interceptor: 5.1.32
|
|
16159
|
+
zova-module-a-logger: 5.1.29
|
|
16160
|
+
zova-module-a-meta: 5.1.23
|
|
16161
|
+
zova-module-a-model: 5.1.39(vue@3.5.43(typescript@5.9.3))
|
|
16162
|
+
zova-module-a-openapi: 5.1.59
|
|
16163
|
+
zova-module-a-router: 5.1.43
|
|
16164
|
+
zova-module-a-routerstack: 5.1.30
|
|
16165
|
+
zova-module-a-routertabs: 5.1.36
|
|
16166
|
+
zova-module-a-ssr: 5.1.42
|
|
16167
|
+
zova-module-a-ssrhmr: 5.1.24
|
|
16168
|
+
zova-module-a-ssrserver: 5.1.27
|
|
16169
|
+
zova-module-a-style: 5.1.36
|
|
16170
|
+
zova-module-a-table: 5.1.45(vue@3.5.43(typescript@5.9.3))
|
|
16171
|
+
zova-module-a-zod: 5.1.39
|
|
16172
|
+
zova-module-a-zova: 5.1.114(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
16173
|
+
transitivePeerDependencies:
|
|
16174
|
+
- '@vue/composition-api'
|
|
16175
|
+
- debug
|
|
16176
|
+
- supports-color
|
|
16177
|
+
- typescript
|
|
16178
|
+
- vue
|
|
16179
|
+
|
|
16066
16180
|
zova@5.1.176(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3)):
|
|
16067
16181
|
dependencies:
|
|
16068
|
-
zova-core: 5.1.94(
|
|
16182
|
+
zova-core: 5.1.94(typescript@5.9.3)
|
|
16069
16183
|
zova-suite-a-zova: 5.1.175(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
16070
16184
|
transitivePeerDependencies:
|
|
16071
16185
|
- '@vue/composition-api'
|
|
@@ -16074,6 +16188,17 @@ snapshots:
|
|
|
16074
16188
|
- typescript
|
|
16075
16189
|
- vue
|
|
16076
16190
|
|
|
16191
|
+
zova@5.1.177(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3)):
|
|
16192
|
+
dependencies:
|
|
16193
|
+
zova-core: 5.1.95(patch_hash=44197c3f359a73a1a5bb3dc0a8a97e705a55b30f9a434717aa24d75a96f2c6b6)(typescript@5.9.3)
|
|
16194
|
+
zova-suite-a-zova: 5.1.176(debug@4.4.3(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)(vue@3.5.43(typescript@5.9.3))
|
|
16195
|
+
transitivePeerDependencies:
|
|
16196
|
+
- '@vue/composition-api'
|
|
16197
|
+
- debug
|
|
16198
|
+
- supports-color
|
|
16199
|
+
- typescript
|
|
16200
|
+
- vue
|
|
16201
|
+
|
|
16077
16202
|
zwitch@1.0.5: {}
|
|
16078
16203
|
|
|
16079
16204
|
zwitch@2.0.4: {}
|
package/vona/pnpm-workspace.yaml
CHANGED
|
@@ -39,6 +39,15 @@ export default async function (app: VonaApplication) {
|
|
|
39
39
|
mode: env.META_MODE,
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
// Language availability is application policy, independent of installed dictionaries.
|
|
43
|
+
config.locale = {
|
|
44
|
+
items: {
|
|
45
|
+
'en-us': 'LanguageEnglish',
|
|
46
|
+
'zh-cn': 'LanguageChinese',
|
|
47
|
+
},
|
|
48
|
+
default: 'en-us',
|
|
49
|
+
};
|
|
50
|
+
|
|
42
51
|
// instance
|
|
43
52
|
config.instance = {
|
|
44
53
|
getInstanceName: undefined,
|
|
@@ -10,10 +10,7 @@ export class Main extends BeanSimple implements IModuleMain {
|
|
|
10
10
|
'en-us': en,
|
|
11
11
|
'zh-cn': zhCN,
|
|
12
12
|
};
|
|
13
|
-
this.app.util.setLocaleErrors(
|
|
14
|
-
localeErrors,
|
|
15
|
-
this.app.scope('a-locale').config.locale.defaultLocale,
|
|
16
|
-
);
|
|
13
|
+
this.app.util.setLocaleErrors(localeErrors, this.app.config.locale.default);
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
async configLoaded(_config: any) {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-suite-a-cabloy",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.69",
|
|
4
4
|
"gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"vona-module-a-cabloy": "workspace:^",
|
|
11
11
|
"vona-module-a-layoutprofile": "^5.0.2",
|
|
12
12
|
"vona-module-a-markdown": "^5.0.3",
|
|
13
|
-
"vona-module-a-rbac": "^5.0.
|
|
13
|
+
"vona-module-a-rbac": "^5.0.17",
|
|
14
14
|
"vona-module-a-socket": "workspace:^",
|
|
15
15
|
"vona-module-a-ssr": "workspace:^",
|
|
16
16
|
"vona-module-a-ssrhmr": "workspace:^"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IProtocolKeyRecord, VonaApplication } from 'vona';
|
|
2
2
|
|
|
3
3
|
import { $protocolKey } from 'vona';
|
|
4
4
|
|
|
5
5
|
export interface I18nConfigLocale {
|
|
6
|
-
defaultLocale: keyof ILocaleRecord;
|
|
7
6
|
queryField?: keyof IProtocolKeyRecord;
|
|
8
7
|
headerField?: keyof IProtocolKeyRecord;
|
|
9
8
|
cookieField?: string;
|
|
10
|
-
localeAlias:
|
|
9
|
+
localeAlias: Record<string, string>;
|
|
11
10
|
writeCookie: boolean;
|
|
12
11
|
cookieMaxAge: number;
|
|
13
12
|
cookieDomain?: string;
|
|
@@ -31,7 +30,6 @@ export interface I18nConfig {
|
|
|
31
30
|
export function config(_app: VonaApplication) {
|
|
32
31
|
return {
|
|
33
32
|
locale: {
|
|
34
|
-
defaultLocale: 'en-us',
|
|
35
33
|
queryField: $protocolKey('x-vona-locale'),
|
|
36
34
|
headerField: $protocolKey('x-vona-locale'),
|
|
37
35
|
cookieField: 'locale',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IModuleMain, VonaContext } from 'vona';
|
|
2
2
|
|
|
3
|
-
import { BeanSimple } from 'vona';
|
|
3
|
+
import { BeanSimple, resolveEnabledLocale, resolveLocale, validateLocaleConfig } from 'vona';
|
|
4
4
|
|
|
5
5
|
import type { I18nConfigLocale, I18nConfigTz } from './config/config.ts';
|
|
6
6
|
|
|
@@ -15,11 +15,12 @@ export class Main extends BeanSimple implements IModuleMain {
|
|
|
15
15
|
async moduleLoading() {}
|
|
16
16
|
async moduleLoaded() {
|
|
17
17
|
const options = this.app.scope(__ThisModule__).config;
|
|
18
|
+
validateLocaleConfig(this.app.config.locale);
|
|
18
19
|
this.app.context.__getLocale = function (this: VonaContext) {
|
|
19
20
|
return __getLocale(this, options.locale);
|
|
20
21
|
};
|
|
21
22
|
this.app.context.__setLocale = function (this: VonaContext, locale: string) {
|
|
22
|
-
return __setLocale(this, locale);
|
|
23
|
+
return __setLocale(this, locale, options.locale);
|
|
23
24
|
};
|
|
24
25
|
this.app.context.__getTz = function (this: VonaContext) {
|
|
25
26
|
return __getTz(this, options.tz);
|
|
@@ -32,8 +33,8 @@ export class Main extends BeanSimple implements IModuleMain {
|
|
|
32
33
|
async configLoaded(_config: any) {}
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
function __setLocale(ctx: VonaContext, locale: string) {
|
|
36
|
-
ctx[SymbolLocale] = locale;
|
|
36
|
+
function __setLocale(ctx: VonaContext, locale: string, options: I18nConfigLocale) {
|
|
37
|
+
ctx[SymbolLocale] = resolveLocale(locale, ctx.app.config.locale, options.localeAlias);
|
|
37
38
|
ctx[SymbolLocaleOrigin] = 'set';
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -42,7 +43,7 @@ function __getLocale(ctx: VonaContext, options: I18nConfigLocale) {
|
|
|
42
43
|
return ctx[SymbolLocale];
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
const
|
|
46
|
+
const policy = ctx.app.config.locale;
|
|
46
47
|
|
|
47
48
|
const queryField = options.queryField;
|
|
48
49
|
const headerField = options.headerField;
|
|
@@ -89,9 +90,10 @@ function __getLocale(ctx: VonaContext, options: I18nConfigLocale) {
|
|
|
89
90
|
}
|
|
90
91
|
if (languages.length > 0) {
|
|
91
92
|
for (let i = 0; i < languages.length; i++) {
|
|
92
|
-
const lang =
|
|
93
|
-
if (
|
|
94
|
-
|
|
93
|
+
const lang = resolveEnabledLocale(languages[i], policy, options.localeAlias);
|
|
94
|
+
if (lang) {
|
|
95
|
+
// Keep the input until final resolution so an alias is applied only once.
|
|
96
|
+
locale = languages[i];
|
|
95
97
|
localeOrigin = 'header';
|
|
96
98
|
break;
|
|
97
99
|
}
|
|
@@ -104,23 +106,8 @@ function __getLocale(ctx: VonaContext, options: I18nConfigLocale) {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
locale = options.defaultLocale;
|
|
110
|
-
localeOrigin = 'default';
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// cookie alias
|
|
114
|
-
if ((locale as string) in options.localeAlias) {
|
|
115
|
-
locale = options.localeAlias[locale as string];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
locale = formatLocale(locale);
|
|
119
|
-
|
|
120
|
-
// validate locale
|
|
121
|
-
if (!localeNames.includes(locale)) {
|
|
122
|
-
locale = options.defaultLocale;
|
|
123
|
-
}
|
|
109
|
+
if (!locale) localeOrigin = 'default';
|
|
110
|
+
locale = resolveLocale(locale, policy, options.localeAlias);
|
|
124
111
|
|
|
125
112
|
// if header not send, set the locale cookie
|
|
126
113
|
if (cookieField && options.writeCookie && cookieLocale !== locale && !ctx.headerSent) {
|
|
@@ -217,11 +204,6 @@ function updateCookie(ctx: VonaContext, options: I18nConfigLocale | I18nConfigTz
|
|
|
217
204
|
ctx.cookies.set(options.cookieField!, locale, cookieOptions);
|
|
218
205
|
}
|
|
219
206
|
|
|
220
|
-
function formatLocale(locale) {
|
|
221
|
-
// support zh_CN, en_US => zh-CN, en-US
|
|
222
|
-
return parseTokenSafe(locale).replace('_', '-').toLowerCase();
|
|
223
|
-
}
|
|
224
|
-
|
|
225
207
|
function parseTokenSafe(token?: string) {
|
|
226
208
|
if (!token) return '';
|
|
227
209
|
return token.replace(/[\\.*#%'"`;, ]/g, '');
|
|
@@ -8,6 +8,8 @@ import { Bean } from 'vona-module-a-bean';
|
|
|
8
8
|
import { Caching } from 'vona-module-a-caching';
|
|
9
9
|
import { $schema } from 'vona-module-a-openapiutils';
|
|
10
10
|
|
|
11
|
+
import type { IGenerateJsonOfControllerActionOptions } from '../types/contract.ts';
|
|
12
|
+
|
|
11
13
|
@Bean()
|
|
12
14
|
export class BeanOpenapi extends BeanBase {
|
|
13
15
|
public async clearAllCaches() {
|
|
@@ -65,11 +67,11 @@ export class BeanOpenapi extends BeanBase {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
protected generateJsonOfControllerActionCacheKey(info: ICachingActionKeyInfo) {
|
|
68
|
-
const [controller, actionKey, version] = info.args;
|
|
70
|
+
const [controller, actionKey, version, options] = info.args;
|
|
69
71
|
const beanOptions = appResource.getBean(controller)!;
|
|
70
72
|
const beanFullName = beanOptions.beanFullName;
|
|
71
73
|
const locale = this.ctx.locale;
|
|
72
|
-
return `${info.prop}_${beanFullName}_${actionKey}_${version ?? 'V31'}_${locale}`;
|
|
74
|
+
return `${info.prop}_${beanFullName}_${actionKey}_${version ?? 'V31'}_${locale}_${options?.includeExcluded === true}`;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
@Caching.get({ cacheName: 'a-openapi:json', cacheKeyFn: 'generateJsonCacheKey' })
|
|
@@ -94,6 +96,7 @@ export class BeanOpenapi extends BeanBase {
|
|
|
94
96
|
controller: Constructable,
|
|
95
97
|
actionKey: string,
|
|
96
98
|
version: K = 'V31' as any,
|
|
99
|
+
options: IGenerateJsonOfControllerActionOptions = {},
|
|
97
100
|
): Promise<IOpenapiObject[K]> {
|
|
98
101
|
const registry = new OpenAPIRegistry();
|
|
99
102
|
const beanOptions = appResource.getBean(controller);
|
|
@@ -103,6 +106,7 @@ export class BeanOpenapi extends BeanBase {
|
|
|
103
106
|
beanOptions.module,
|
|
104
107
|
controller,
|
|
105
108
|
actionKey,
|
|
109
|
+
options,
|
|
106
110
|
);
|
|
107
111
|
const generator =
|
|
108
112
|
version === 'V30'
|