vona-core 5.0.130 → 5.0.131
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
|
@@ -9,7 +9,6 @@ import { compose as compose$1 } from '@cabloy/compose';
|
|
|
9
9
|
import { extend } from '@cabloy/extend';
|
|
10
10
|
import fse from 'fs-extra';
|
|
11
11
|
import * as uuid from 'uuid';
|
|
12
|
-
import React from 'react';
|
|
13
12
|
import { setLocaleErrors, setLocaleAdapter, translateError } from '@cabloy/zod-errors-custom';
|
|
14
13
|
import { ZodMetadata } from '@cabloy/zod-openapi';
|
|
15
14
|
import { setParseAdapter } from '@cabloy/zod-query';
|
|
@@ -25,6 +24,7 @@ import DailyRotateFile from 'winston-daily-rotate-file';
|
|
|
25
24
|
import os from 'node:os';
|
|
26
25
|
import { MESSAGE, LEVEL } from 'triple-beam';
|
|
27
26
|
import cluster from 'node:cluster';
|
|
27
|
+
import React from 'react';
|
|
28
28
|
import { extendZodWithOpenApi } from '@cabloy/zod-to-openapi';
|
|
29
29
|
import { z } from 'zod';
|
|
30
30
|
import * as Retry from 'retry';
|
|
@@ -541,6 +541,7 @@ function copyMetadataOfClasses(target, sources, transform) {
|
|
|
541
541
|
const SymbolDecoratorBeanFullName = Symbol('SymbolDecoratorBeanFullName');
|
|
542
542
|
const SymbolDecoratorBeanInfo = Symbol('SymbolDecoratorBeanInfo');
|
|
543
543
|
const SymbolDecoratorProxyDisable = Symbol('SymbolDecoratorProxyDisable');
|
|
544
|
+
const SymbolDecoratorGlobal = Symbol('SymbolDecoratorGlobal');
|
|
544
545
|
const SymbolDecoratorVirtual = Symbol('SymbolDecoratorVirtual');
|
|
545
546
|
const SymbolDecoratorUse = Symbol('SymbolDecoratorUse');
|
|
546
547
|
class AppResource extends BeanSimple {
|
|
@@ -830,6 +831,13 @@ function createBeanDecorator(scene, options, optionsPrimitive, fn) {
|
|
|
830
831
|
};
|
|
831
832
|
}
|
|
832
833
|
|
|
834
|
+
function Global() {
|
|
835
|
+
return function (target) {
|
|
836
|
+
// set metadata
|
|
837
|
+
appMetadata.defineMetadata(SymbolDecoratorGlobal, true, target);
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
|
|
833
841
|
function ProxyDisable() {
|
|
834
842
|
return function (target) {
|
|
835
843
|
// set metadata
|
|
@@ -1742,7 +1750,7 @@ function isLocaleMagic(str) {
|
|
|
1742
1750
|
|
|
1743
1751
|
class AppLocale extends BeanSimple {
|
|
1744
1752
|
get current() {
|
|
1745
|
-
return this.ctx.locale;
|
|
1753
|
+
return this.ctx ? this.ctx.locale : 'en-us';
|
|
1746
1754
|
}
|
|
1747
1755
|
set current(value) {
|
|
1748
1756
|
this.ctx.locale = value;
|
|
@@ -2695,8 +2703,9 @@ function jsxEnhance() {
|
|
|
2695
2703
|
function _translateJsxRender(component) {
|
|
2696
2704
|
if (typeof component !== 'object' || !component.$$typeof) return component;
|
|
2697
2705
|
const componentNew = {};
|
|
2698
|
-
|
|
2699
|
-
componentNew
|
|
2706
|
+
const type = typeof component.type === 'function' ? component.type() : component.type;
|
|
2707
|
+
componentNew.$$typeof = type === 'action' ? 'zova-jsx:event' : 'zova-jsx:component';
|
|
2708
|
+
componentNew.type = type;
|
|
2700
2709
|
componentNew.key = component.key;
|
|
2701
2710
|
componentNew.props = {
|
|
2702
2711
|
...component.props
|
|
@@ -3303,4 +3312,4 @@ function prepareNativeBinding(nativeBinding) {
|
|
|
3303
3312
|
|
|
3304
3313
|
zodExtendOpenApi();
|
|
3305
3314
|
|
|
3306
|
-
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, LocaleModuleNameSeparator, PickClassInner, ProxyDisable, SymbolBeanContainerInstances, SymbolBeanFullName, SymbolBeanInstanceKey, SymbolBeanInstancePropsLazy, SymbolCacheAopChains, SymbolCacheAopChainsKey, SymbolDecoratorBeanFullName, SymbolDecoratorBeanInfo, 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, localeDefault, onionNameFromBeanFullName, pathToHref, polyfillDispose, prepareEnv, registerMappedClassMetadataKey, requireDynamic, retry, saveJSONFile, setMappedClassMetadataKeys, text, useApp, usePrepareArg, usePrepareArgs, uuidv4 };
|
|
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, localeDefault, onionNameFromBeanFullName, pathToHref, polyfillDispose, prepareEnv, registerMappedClassMetadataKey, requireDynamic, retry, saveJSONFile, setMappedClassMetadataKeys, text, useApp, usePrepareArg, usePrepareArgs, uuidv4 };
|
|
@@ -5,6 +5,7 @@ import { BeanSimple } from '../bean/beanSimple.ts';
|
|
|
5
5
|
export declare const SymbolDecoratorBeanFullName: unique symbol;
|
|
6
6
|
export declare const SymbolDecoratorBeanInfo: unique symbol;
|
|
7
7
|
export declare const SymbolDecoratorProxyDisable: unique symbol;
|
|
8
|
+
export declare const SymbolDecoratorGlobal: unique symbol;
|
|
8
9
|
export declare const SymbolDecoratorVirtual: unique symbol;
|
|
9
10
|
export declare const SymbolDecoratorUse: unique symbol;
|
|
10
11
|
export type IAppResourceRecord = Record<string, IDecoratorBeanOptionsBase>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Global(): ClassDecorator;
|
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.131",
|
|
5
5
|
"description": "vona",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@cabloy/compose": "^2.0.15",
|
|
29
|
-
"@cabloy/extend": "^3.1.
|
|
29
|
+
"@cabloy/extend": "^3.1.13",
|
|
30
30
|
"@cabloy/json5": "^1.0.19",
|
|
31
31
|
"@cabloy/localeutil": "^2.0.11",
|
|
32
|
-
"@cabloy/module-info": "^1.3.
|
|
33
|
-
"@cabloy/module-info-pro": "^1.0.
|
|
32
|
+
"@cabloy/module-info": "^1.3.41",
|
|
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.17",
|
|
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",
|