vona-core 5.0.19 → 5.0.20
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/lib/utils/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as ModuleInfo from '@cabloy/module-info';
|
|
2
2
|
import type { IModule } from '@cabloy/module-info';
|
|
3
3
|
import type { BinaryToTextEncoding, HashOptions } from 'node:crypto';
|
|
4
|
-
import type { TypeMonkeyName, VonaConfigEnv, VonaContext } from '../../types/index.ts';
|
|
4
|
+
import type { IInstanceRecord, TypeMonkeyName, VonaConfigEnv, VonaContext } from '../../types/index.ts';
|
|
5
5
|
import type { IBeanSceneRecord } from '../decorator/interface/beanOptions.ts';
|
|
6
6
|
import { BeanSimple } from '../bean/beanSimple.ts';
|
|
7
7
|
export interface IExecuteBeanCallbackParams {
|
|
@@ -21,7 +21,7 @@ export interface IModuleAssetSceneRecord {
|
|
|
21
21
|
declare const SymbolProdRootPath: unique symbol;
|
|
22
22
|
export declare class AppUtil extends BeanSimple {
|
|
23
23
|
private [SymbolProdRootPath];
|
|
24
|
-
instanceStarted(instanceName:
|
|
24
|
+
instanceStarted(instanceName: keyof IInstanceRecord): boolean;
|
|
25
25
|
get protocol(): string;
|
|
26
26
|
get host(): string;
|
|
27
27
|
getAbsoluteUrl(path?: string): string;
|
|
@@ -42,7 +42,7 @@ export declare class AppUtil extends BeanSimple {
|
|
|
42
42
|
accepts(): "json" | "html";
|
|
43
43
|
}
|
|
44
44
|
export declare function compose(chains: any, adapter?: any): (context: any, next?: any) => any;
|
|
45
|
-
export declare function instanceDesp(instanceName:
|
|
45
|
+
export declare function instanceDesp(instanceName: keyof IInstanceRecord | null | undefined): string;
|
|
46
46
|
export declare function requireDynamic(file: string): any;
|
|
47
47
|
export declare function deepExtend<T extends []>(target: T, ...args: any[]): [];
|
|
48
48
|
export declare function deepExtend<T = any>(target: {}, ...args: any[]): T;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { VonaConfigOptional } from './config.ts';
|
|
2
|
+
export interface IInstanceRecord {
|
|
3
|
+
'': never;
|
|
4
|
+
}
|
|
2
5
|
export interface ConfigInstanceBase {
|
|
3
|
-
instanceName:
|
|
6
|
+
instanceName: keyof IInstanceRecord;
|
|
4
7
|
password?: string;
|
|
5
8
|
title?: string;
|
|
6
9
|
config?: VonaConfigOptional;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { BeanContainer, Constructable, ILocaleInfos, MetadataKey } from '../../lib/index.ts';
|
|
2
2
|
import type { VonaConfig } from '../config/config.ts';
|
|
3
|
+
import type { IInstanceRecord } from '../config/instance.ts';
|
|
3
4
|
import type { VonaContext } from './index.ts';
|
|
4
5
|
export interface ContextBase {
|
|
5
6
|
get bean(): BeanContainer;
|
|
6
7
|
get locale(): keyof ILocaleInfos;
|
|
7
8
|
set locale(value: keyof ILocaleInfos);
|
|
8
|
-
get instanceName():
|
|
9
|
-
set instanceName(value:
|
|
9
|
+
get instanceName(): keyof IInstanceRecord | undefined | null;
|
|
10
|
+
set instanceName(value: keyof IInstanceRecord | undefined | null);
|
|
10
11
|
get config(): VonaConfig;
|
|
11
12
|
get innerAccess(): boolean;
|
|
12
13
|
set innerAccess(value: boolean);
|