zova-core 5.1.19 → 5.1.21
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/bean/beanContainer.d.ts.map +1 -1
- package/dist/bean/beanControllerBase.d.ts +1 -1
- package/dist/bean/beanSimple.d.ts +1 -1
- package/dist/bean/beanSimple.d.ts.map +1 -1
- package/dist/core/app/application.d.ts +1 -1
- package/dist/core/app/application.d.ts.map +1 -1
- package/dist/core/sys/config.d.ts +3 -0
- package/dist/core/sys/config.d.ts.map +1 -1
- package/dist/core/sys/sys.d.ts.map +1 -1
- package/dist/core/sys/util.d.ts +0 -1
- package/dist/core/sys/util.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/types/interface/module.d.ts +1 -2
- package/dist/types/interface/module.d.ts.map +1 -1
- package/dist/types/utils/env.d.ts +1 -1
- package/dist/types/utils/env.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/bean/beanContainer.ts +1 -1
- package/src/core/sys/config.ts +3 -0
- package/src/core/sys/module.ts +1 -1
- package/src/core/sys/sys.ts +2 -3
- package/src/core/sys/util.ts +0 -4
- package/src/types/interface/module.ts +1 -2
- package/src/types/utils/env.ts +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IModuleInfo } from '@cabloy/module-info';
|
|
2
|
-
import type { ZovaConfigMeta } from '@cabloy/module-info';
|
|
3
2
|
import type { Component } from 'vue';
|
|
4
3
|
import type { ZovaSys } from '../../core/sys/sys.ts';
|
|
5
4
|
import type { Constructable } from '../../decorator/type/constructable.ts';
|
|
@@ -10,7 +9,7 @@ export type TypeModuleResourceLocaleModules = Record<string, TypeModuleResourceL
|
|
|
10
9
|
export type TypeModuleResourceErrors = Record<string, number>;
|
|
11
10
|
export type TypeModuleResourceErrorModules = Record<string, TypeModuleResourceErrors>;
|
|
12
11
|
export type TypeModuleResourceComponents = Record<string, Component>;
|
|
13
|
-
export type TypeModuleResourceConfig = (sys: ZovaSys
|
|
12
|
+
export type TypeModuleResourceConfig = (sys: ZovaSys) => object | Promise<object>;
|
|
14
13
|
export interface IModuleResource {
|
|
15
14
|
MainSys: Constructable<IModuleMainSys>;
|
|
16
15
|
MonkeySys: Constructable<IMonkeyModuleSys & IMonkeySys>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/interface/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/interface/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3I,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7D,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/D,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;AACxF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9D,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;AACtF,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACrE,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,SAAS,EAAE,aAAa,CAAC,gBAAgB,GAAG,UAAU,CAAC,CAAC;IACxD,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACjC,MAAM,EAAE,aAAa,CAAC,aAAa,GAAG,UAAU,GAAG,iBAAiB,CAAC,CAAC;IACtE,OAAO,EAAE,yBAAyB,CAAC;IACnC,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,wBAAwB,CAAC;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,uBAAuB,CAAC;IAC/B,UAAU,EAAE,4BAA4B,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe,eAA4B,CAAC;AAEzD,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAiB,OAAO;QAGtB,QAAQ,EAAE,eAAe,CAAC;QAC1B,IAAI,EAAE,WAAW,CAAC;KACnB;CACF;AAED,MAAM,WAAW,UAAU;CAG1B"}
|
|
@@ -26,7 +26,7 @@ export interface ZovaConfigEnv {
|
|
|
26
26
|
SSR_PROD_PORT: string | undefined;
|
|
27
27
|
SSR_PROD_PROTOCOL: string | undefined;
|
|
28
28
|
SSR_PROD_HOST: string | undefined;
|
|
29
|
-
|
|
29
|
+
SSR_WITH_VONA: string | undefined;
|
|
30
30
|
SSR_COOKIE: string | undefined;
|
|
31
31
|
OPENAPI_BASE_URL_DEFAULT: string | undefined;
|
|
32
32
|
OPENAPI_BASE_URL_HOME_API: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../../src/types/utils/env.ts"],"names":[],"mappings":"AAAA,OA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AAC;IAClC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM,CAAC;QACf,UAAU,UAAU;YAClB,QAAQ,EAAE,YAAY,CAAC;YACvB,WAAW,EAAE,cAAc,CAAC;YAC5B,SAAS,EAAE,YAAY,CAAC;YACxB,aAAa,EAAE,eAAe,CAAC;YAG/B,GAAG,EAAE,OAAO,CAAC;YAEb,GAAG,EAAE,OAAO,CAAC;YAEb,IAAI,EAAE,OAAO,CAAC;YAId,MAAM,EAAE,OAAO,CAAC;YAEhB,MAAM,EAAE,OAAO,CAAC;SAIjB;KACF;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-core",
|
|
3
|
-
"version": "5.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "5.1.21",
|
|
4
|
+
"gitHead": "8d42f31a8ee23be4564814a901d770307635c849",
|
|
5
5
|
"description": "A vue3 framework with ioc",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ioc",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@cabloy/compose": "^2.1.4",
|
|
45
45
|
"@cabloy/extend": "^3.2.3",
|
|
46
|
-
"@cabloy/json5": "^1.1.
|
|
46
|
+
"@cabloy/json5": "^1.1.5",
|
|
47
47
|
"@cabloy/localeutil": "^2.1.3",
|
|
48
48
|
"@cabloy/logger": "^1.1.9",
|
|
49
49
|
"@cabloy/module-info": "^2.0.0",
|
|
50
|
-
"@cabloy/utils": "^2.1.
|
|
50
|
+
"@cabloy/utils": "^2.1.9",
|
|
51
51
|
"@cabloy/vue-compiler-sfc": "^3.5.14",
|
|
52
52
|
"@cabloy/vue-reactivity": "^3.5.16",
|
|
53
53
|
"@cabloy/vue-router": "^4.4.16",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { compose } from '@cabloy/compose';
|
|
2
2
|
import { isClass, isNilOrEmptyString } from '@cabloy/utils';
|
|
3
3
|
import { inject as composableInject, provide as composableProvide, markRaw, reactive, shallowReactive } from 'vue';
|
|
4
|
-
import { useComputed } from 'zova';
|
|
5
4
|
|
|
6
5
|
import type { ZovaApplication, ZovaContext, ZovaSys } from '../core/index.ts';
|
|
7
6
|
import type { MetadataKey } from '../core/sys/metadata.ts';
|
|
@@ -21,6 +20,7 @@ import { appMetadata } from '../core/sys/metadata.ts';
|
|
|
21
20
|
import { appResource, SymbolDecoratorProxyDisable } from '../core/sys/resource.ts';
|
|
22
21
|
import { __prepareInjectSelectorInfo, SymbolDecoratorVueElements } from '../decorator/index.ts';
|
|
23
22
|
import { cast } from '../types/utils/cast.ts';
|
|
23
|
+
import { useComputed } from '../vueExtra/computed.ts';
|
|
24
24
|
import { BeanAopBase } from './beanAopBase.ts';
|
|
25
25
|
import { BeanBase } from './beanBase.ts';
|
|
26
26
|
import { SymbolBeanFullName, SymbolBeanInstanceKey, SymbolInited } from './beanBaseSimple.ts';
|
package/src/core/sys/config.ts
CHANGED
package/src/core/sys/module.ts
CHANGED
|
@@ -224,7 +224,7 @@ export class SysModule extends BeanSimple {
|
|
|
224
224
|
private async _registerConfig(module: IModule) {
|
|
225
225
|
if (!module.resource.config) return;
|
|
226
226
|
// config
|
|
227
|
-
const config = await module.resource.config(this.sys
|
|
227
|
+
const config = await module.resource.config(this.sys);
|
|
228
228
|
// monkey
|
|
229
229
|
await this._monkeyModule(true, 'configLoaded', module, config);
|
|
230
230
|
// extend
|
package/src/core/sys/sys.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { ViteHotContext } from 'vite/types/hot.js';
|
|
2
2
|
|
|
3
|
-
import { appResource } from 'zova';
|
|
4
|
-
|
|
5
3
|
import type { TypeModuleResourceConfig } from '../../types/interface/module.ts';
|
|
6
4
|
import type { PluginZovaOptions } from '../../types/interface/pluginZova.ts';
|
|
7
5
|
import type { ZovaConfigEnv } from '../../types/utils/env.ts';
|
|
@@ -14,6 +12,7 @@ import { zodEnhanceSys } from '../../utils/zod-enhance.ts';
|
|
|
14
12
|
import { configDefault } from './config.ts';
|
|
15
13
|
import { constantDefault } from './constant.ts';
|
|
16
14
|
import { SysMeta } from './meta.ts';
|
|
15
|
+
import { appResource } from './resource.ts';
|
|
17
16
|
import { setSys } from './sysFake.ts';
|
|
18
17
|
import { deepExtend, SysUtil } from './util.ts';
|
|
19
18
|
|
|
@@ -120,7 +119,7 @@ export class ZovaSys {
|
|
|
120
119
|
private async _combineConfig(config: TypeModuleResourceConfig[]): Promise<ZovaConfig> {
|
|
121
120
|
const _config = deepExtend({}, configDefault(this.env));
|
|
122
121
|
for (const configFn of config) {
|
|
123
|
-
deepExtend(_config, await configFn(this
|
|
122
|
+
deepExtend(_config, await configFn(this));
|
|
124
123
|
}
|
|
125
124
|
return _config;
|
|
126
125
|
}
|
package/src/core/sys/util.ts
CHANGED
|
@@ -130,10 +130,6 @@ export class SysUtil extends BeanSimple {
|
|
|
130
130
|
const parts = resource.split(':');
|
|
131
131
|
return api ?? combineApiPathControllerAndAction(parts[0], parts[1], undefined, true, true, this.sys.env.API_PREFIX);
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
ignoreCookieOnServer() {
|
|
135
|
-
return process.env.SERVER && !this.sys.config.ssr.cookie;
|
|
136
|
-
}
|
|
137
133
|
}
|
|
138
134
|
|
|
139
135
|
export function uuid(): string {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IModuleInfo } from '@cabloy/module-info';
|
|
2
|
-
import type { ZovaConfigMeta } from '@cabloy/module-info';
|
|
3
2
|
import type { Component } from 'vue';
|
|
4
3
|
|
|
5
4
|
import type { ZovaSys } from '../../core/sys/sys.ts';
|
|
@@ -13,7 +12,7 @@ export type TypeModuleResourceLocaleModules = Record<string, TypeModuleResourceL
|
|
|
13
12
|
export type TypeModuleResourceErrors = Record<string, number>;
|
|
14
13
|
export type TypeModuleResourceErrorModules = Record<string, TypeModuleResourceErrors>;
|
|
15
14
|
export type TypeModuleResourceComponents = Record<string, Component>;
|
|
16
|
-
export type TypeModuleResourceConfig = (sys: ZovaSys
|
|
15
|
+
export type TypeModuleResourceConfig = (sys: ZovaSys) => object | Promise<object>;
|
|
17
16
|
|
|
18
17
|
export interface IModuleResource {
|
|
19
18
|
MainSys: Constructable<IModuleMainSys>;
|
package/src/types/utils/env.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface ZovaConfigEnv {
|
|
|
28
28
|
SSR_PROD_PORT: string | undefined;
|
|
29
29
|
SSR_PROD_PROTOCOL: string | undefined;
|
|
30
30
|
SSR_PROD_HOST: string | undefined;
|
|
31
|
-
|
|
31
|
+
SSR_WITH_VONA: string | undefined;
|
|
32
32
|
SSR_COOKIE: string | undefined;
|
|
33
33
|
OPENAPI_BASE_URL_DEFAULT: string | undefined;
|
|
34
34
|
OPENAPI_BASE_URL_HOME_API: string | undefined;
|