vona-core 5.0.131 → 5.0.132
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/dist/index.js
CHANGED
|
@@ -46,10 +46,6 @@ class BeanSimple {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const localeDefault = {
|
|
50
|
-
modules: {}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
49
|
const EnumAppEvent = {
|
|
54
50
|
AppStarted: 'eb:event:appStarted',
|
|
55
51
|
AppStartError: 'eb:event:appStartError'
|
|
@@ -2795,10 +2791,14 @@ async function loadLocales (app, modules) {
|
|
|
2795
2791
|
// load locales
|
|
2796
2792
|
await loadLocales();
|
|
2797
2793
|
async function loadLocales() {
|
|
2798
|
-
const
|
|
2799
|
-
// project locales
|
|
2800
|
-
for (const locale in
|
|
2801
|
-
_initLocales(locale,
|
|
2794
|
+
const localesAll = await app.options.locales();
|
|
2795
|
+
// project locales default
|
|
2796
|
+
for (const locale in localesAll.localesDefault) {
|
|
2797
|
+
_initLocales(locale, localesAll.localesDefault[locale]);
|
|
2798
|
+
}
|
|
2799
|
+
// project locales modules
|
|
2800
|
+
for (const locale in localesAll.localesModules) {
|
|
2801
|
+
_initLocales(locale, localesAll.localesModules[locale]);
|
|
2802
2802
|
}
|
|
2803
2803
|
// app cache
|
|
2804
2804
|
app.meta.hmrCacheLocaleModules = deepExtend({}, app.meta.localeModules);
|
|
@@ -3312,4 +3312,4 @@ function prepareNativeBinding(nativeBinding) {
|
|
|
3312
3312
|
|
|
3313
3313
|
zodExtendOpenApi();
|
|
3314
3314
|
|
|
3315
|
-
export { $Class, $customKey, $localeScope, $makeLocaleMagic, AppHmr, AppHmrDeps, AppLocale, AppLogger, AppMeta, AppMetadata, AppResource, AppUtil, BeanAopBase, BeanAopMethodBase, BeanBase, BeanBaseSimple, BeanContainer, BeanInfo, BeanScopeBase, BeanScopeContainer, BeanScopeError, BeanScopeErrorImpl, BeanScopeLocale, BeanScopeScene, BeanScopeUtil, BeanSimple, EnumAppEvent, ErrorClass, Global, LocaleModuleNameSeparator, PickClassInner, ProxyDisable, SymbolBeanContainerInstances, SymbolBeanFullName, SymbolBeanInstanceKey, SymbolBeanInstancePropsLazy, SymbolCacheAopChains, SymbolCacheAopChainsKey, SymbolDecoratorBeanFullName, SymbolDecoratorBeanInfo, SymbolDecoratorGlobal, SymbolDecoratorProxyDisable, SymbolDecoratorUse, SymbolDecoratorVirtual, SymbolHmrStateLoad, SymbolHmrStateSave, SymbolMappedClassMetadataKeys, SymbolModuleBelong, SymbolModuleName, Use, Virtual, VonaApplication, __prepareInjectSelectorInfo, appHmrDeps, appMetadata, appResource, beanFullNameFromOnionName, bootstrap, cast, closeApp, combineConfigDefault, combineFilePathSafe, compose, copyMetadataOfClasses, copyProperties, copyPropertiesOfClasses, copySqlite3NativeBinding, createApp, createAppMaster, createBeanDecorator, createGeneralApp, createHash, deepExtend, disposeInstance, errorsInternal, filterHeaders, formatLoggerAxiosError, formatLoggerConsole, formatLoggerCtx, formatLoggerDummy, formatLoggerFilter, functionNoop, getLoggerPathPhysicalRoot, getMappedClassMetadataKeys, getPublicPathPhysicalRoot, getRuntimePathPhysicalRoot, getSqlite3DatabaseNameDefault, getSqlite3NativeBinding, instanceDesp, isLocaleMagic, loadJSONFile,
|
|
3315
|
+
export { $Class, $customKey, $localeScope, $makeLocaleMagic, AppHmr, AppHmrDeps, AppLocale, AppLogger, AppMeta, AppMetadata, AppResource, AppUtil, BeanAopBase, BeanAopMethodBase, BeanBase, BeanBaseSimple, BeanContainer, BeanInfo, BeanScopeBase, BeanScopeContainer, BeanScopeError, BeanScopeErrorImpl, BeanScopeLocale, BeanScopeScene, BeanScopeUtil, BeanSimple, EnumAppEvent, ErrorClass, Global, LocaleModuleNameSeparator, PickClassInner, ProxyDisable, SymbolBeanContainerInstances, SymbolBeanFullName, SymbolBeanInstanceKey, SymbolBeanInstancePropsLazy, SymbolCacheAopChains, SymbolCacheAopChainsKey, SymbolDecoratorBeanFullName, SymbolDecoratorBeanInfo, SymbolDecoratorGlobal, SymbolDecoratorProxyDisable, SymbolDecoratorUse, SymbolDecoratorVirtual, SymbolHmrStateLoad, SymbolHmrStateSave, SymbolMappedClassMetadataKeys, SymbolModuleBelong, SymbolModuleName, Use, Virtual, VonaApplication, __prepareInjectSelectorInfo, appHmrDeps, appMetadata, appResource, beanFullNameFromOnionName, bootstrap, cast, closeApp, combineConfigDefault, combineFilePathSafe, compose, copyMetadataOfClasses, copyProperties, copyPropertiesOfClasses, copySqlite3NativeBinding, createApp, createAppMaster, createBeanDecorator, createGeneralApp, createHash, deepExtend, disposeInstance, errorsInternal, filterHeaders, formatLoggerAxiosError, formatLoggerConsole, formatLoggerCtx, formatLoggerDummy, formatLoggerFilter, functionNoop, getLoggerPathPhysicalRoot, getMappedClassMetadataKeys, getPublicPathPhysicalRoot, getRuntimePathPhysicalRoot, getSqlite3DatabaseNameDefault, getSqlite3NativeBinding, instanceDesp, isLocaleMagic, loadJSONFile, onionNameFromBeanFullName, pathToHref, polyfillDispose, prepareEnv, registerMappedClassMetadataKey, requireDynamic, retry, saveJSONFile, setMappedClassMetadataKeys, text, useApp, usePrepareArg, usePrepareArgs, uuidv4 };
|
|
@@ -8,15 +8,17 @@ export interface VonaModulesMeta {
|
|
|
8
8
|
modules: Record<string, IModule>;
|
|
9
9
|
moduleNames: string[];
|
|
10
10
|
}
|
|
11
|
+
export interface IBootstrapOptionsLocales {
|
|
12
|
+
localesDefault: {};
|
|
13
|
+
localesModules: VonaLocaleOptionalMap;
|
|
14
|
+
}
|
|
11
15
|
export type TypeBootstrapOptionsModulesMeta = () => Promise<{
|
|
12
16
|
modulesMeta: VonaModulesMeta;
|
|
13
17
|
}>;
|
|
14
18
|
export type TypeBootstrapOptionsConfig = () => Promise<{
|
|
15
19
|
default: TypeAppInfoConfig[];
|
|
16
20
|
}>;
|
|
17
|
-
export type TypeBootstrapOptionsLocales = () => Promise<
|
|
18
|
-
locales: VonaLocaleOptionalMap;
|
|
19
|
-
}>;
|
|
21
|
+
export type TypeBootstrapOptionsLocales = () => Promise<IBootstrapOptionsLocales>;
|
|
20
22
|
export interface KoaApplicationOptions {
|
|
21
23
|
env?: string | undefined;
|
|
22
24
|
keys?: string[] | undefined;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import type { ILocaleRecord } from '../../lib/bean/resource/locale/type.ts';
|
|
2
2
|
import type { IBeanScopeLocale } from '../../lib/bean/type.ts';
|
|
3
3
|
import type { PowerPartial } from '../utils/powerPartial.ts';
|
|
4
|
-
export
|
|
5
|
-
modules: {};
|
|
6
|
-
};
|
|
7
|
-
export type VonaLocale = {
|
|
4
|
+
export interface VonaLocale {
|
|
8
5
|
modules: IBeanScopeLocale;
|
|
9
|
-
}
|
|
6
|
+
}
|
|
10
7
|
export type VonaLocaleOptional = PowerPartial<VonaLocale>;
|
|
11
8
|
export type VonaLocaleOptionalMap = Record<keyof ILocaleRecord, VonaLocaleOptional>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.132",
|
|
5
5
|
"description": "vona",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@cabloy/module-info": "^1.3.41",
|
|
33
33
|
"@cabloy/module-info-pro": "^1.0.45",
|
|
34
34
|
"@cabloy/type-fest": "^5.3.1",
|
|
35
|
-
"@cabloy/utils": "^2.0.
|
|
35
|
+
"@cabloy/utils": "^2.0.18",
|
|
36
36
|
"@cabloy/word-utils": "^2.0.2",
|
|
37
37
|
"@cabloy/zod-errors-custom": "^2.0.6",
|
|
38
38
|
"@cabloy/zod-openapi": "^1.0.8",
|