vona-core 5.0.101 → 5.0.103

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.
@@ -1,2 +1,3 @@
1
- import type { VonaApplication } from '../../../../index.ts';
2
- export type TypeModuleConfig<T extends (app: VonaApplication) => object> = ReturnType<T>;
1
+ import type { VonaConfigEnv } from '../../../../types/utils/env.ts';
2
+ import type { VonaApplication } from '../../../core/application.ts';
3
+ export type TypeModuleConfig<T extends (app: VonaApplication, env: VonaConfigEnv) => object> = ReturnType<T>;
@@ -3,5 +3,7 @@ import { BeanSimple } from '../../beanSimple.ts';
3
3
  export declare class AppLocale extends BeanSimple {
4
4
  get current(): keyof ILocaleRecord;
5
5
  set current(value: keyof ILocaleRecord);
6
+ get tz(): string | undefined;
7
+ set tz(value: string | undefined);
6
8
  getText<T extends keyof ILocaleRecord>(supportCustomMessage: boolean, moduleScope: string | undefined, locale: T | undefined, key: string, ...args: any[]): string;
7
9
  }
@@ -8,6 +8,12 @@ export class AppLocale extends BeanSimple {
8
8
  set current(value) {
9
9
  this.ctx.locale = value;
10
10
  }
11
+ get tz() {
12
+ return this.ctx.tz;
13
+ }
14
+ set tz(value) {
15
+ this.ctx.tz = value;
16
+ }
11
17
  /** @internal */
12
18
  createLocaleText(moduleScope) {
13
19
  const self = this;
@@ -4,7 +4,6 @@ import { cast } from "../../types/utils/cast.js";
4
4
  import { BeanContainer } from "../bean/beanContainer.js";
5
5
  import { closeApp } from "../framework/useApp.js";
6
6
  import { AppUtil } from "../utils/util.js";
7
- import { zodEnhance } from "../utils/zod-enhance.js";
8
7
  import { VonaAsyncLocalStorage } from "./asyncLocalStorage.js";
9
8
  import { contextBase } from "./context.js";
10
9
  import { AppMeta } from "./meta.js";
@@ -20,16 +19,10 @@ export class VonaApplication extends KoaApplication {
20
19
  const env = options.env;
21
20
  const koaOptions = {
22
21
  env: cast(env).NODE_ENV,
23
- keys: options.config.server.keys,
24
- proxy: options.config.proxy.enable,
25
- subdomainOffset: options.config.server.subdomainOffset,
26
- proxyIpHeader: options.config.proxy.ipHeaders,
27
- maxIpsCount: options.config.proxy.maxIpsCount,
28
22
  asyncLocalStorage: false,
29
23
  };
30
24
  super(koaOptions);
31
25
  this.options = options;
32
- this.config = options.config;
33
26
  this.bean = BeanContainer.create(this, undefined);
34
27
  this.util = this.bean._newBean(AppUtil);
35
28
  this.meta = this.bean._newBean(AppMeta, env);
@@ -40,8 +33,6 @@ export class VonaApplication extends KoaApplication {
40
33
  const desc = Object.getOwnPropertyDescriptor(contextBase, key);
41
34
  Object.defineProperty(this.context, key, desc);
42
35
  }
43
- // zod
44
- zodEnhance(this);
45
36
  }
46
37
  get name() {
47
38
  return this.options.name;
@@ -1,15 +1,7 @@
1
- import type { VonaAppInfo } from '../../types/application/app.ts';
2
- import type { VonaConfigOptional } from '../../types/config/config.ts';
3
- import type { VonaConfigEnv } from '../../types/utils/env.ts';
4
1
  import type { PowerPartial } from '../../types/utils/powerPartial.ts';
5
2
  import type { VonaApplication } from './application.ts';
6
- export declare function combineAppConfigDefault(appInfo: VonaAppInfo, env: VonaConfigEnv): PowerPartial<import("../../types/config/config.ts").VonaConfig>;
7
- export declare function configDefault(_appInfo: VonaAppInfo, _env: VonaConfigEnv): VonaConfigOptional;
8
- export declare function configDev(_env: VonaConfigEnv): VonaConfigOptional;
9
- export declare function configProd(_env: VonaConfigEnv): VonaConfigOptional;
10
- export declare function configTest(_env: VonaConfigEnv): VonaConfigOptional;
11
3
  export type TypeConfigLoader<T> = (app: VonaApplication) => Promise<PowerPartial<T>>;
12
4
  export declare function combineConfigDefault<T>(app: VonaApplication, configDefault: TypeConfigLoader<T>, configDev?: TypeConfigLoader<T>, configProd?: TypeConfigLoader<T>, configTest?: TypeConfigLoader<T>): Promise<PowerPartial<T>>;
13
- export declare function getLoggerPathPhysicalRoot(appInfo: VonaAppInfo): string;
14
- export declare function getPublicPathPhysicalRoot(appInfo: VonaAppInfo): string;
5
+ export declare function getLoggerPathPhysicalRoot(app: VonaApplication): string;
6
+ export declare function getPublicPathPhysicalRoot(app: VonaApplication): string;
15
7
  export declare function getRuntimePathPhysicalRoot(app: VonaApplication): string;
@@ -2,34 +2,8 @@ import os from 'node:os';
2
2
  import path from 'node:path';
3
3
  import fse from 'fs-extra';
4
4
  import { deepExtend } from "../utils/util.js";
5
- export function combineAppConfigDefault(appInfo, env) {
6
- let config = configDefault(appInfo, env);
7
- const mode = appInfo.configMeta.mode;
8
- if (mode === 'dev') {
9
- config = deepExtend(config, configDev(env));
10
- }
11
- else if (mode === 'prod') {
12
- config = deepExtend(config, configProd(env));
13
- }
14
- else if (mode === 'test') {
15
- config = deepExtend(config, configTest(env));
16
- }
17
- return config;
18
- }
19
- export function configDefault(_appInfo, _env) {
20
- return {};
21
- }
22
- export function configDev(_env) {
23
- return {};
24
- }
25
- export function configProd(_env) {
26
- return {};
27
- }
28
- export function configTest(_env) {
29
- return {};
30
- }
31
5
  export async function combineConfigDefault(app, configDefault, configDev, configProd, configTest) {
32
- let config = await configDefault(app);
6
+ let config = (await configDefault(app));
33
7
  const mode = app.config.meta.mode;
34
8
  if (mode === 'dev' && configDev) {
35
9
  config = deepExtend(config, await configDev(app));
@@ -42,26 +16,26 @@ export async function combineConfigDefault(app, configDefault, configDev, config
42
16
  }
43
17
  return config;
44
18
  }
45
- export function getLoggerPathPhysicalRoot(appInfo) {
46
- const mode = appInfo.configMeta.mode;
19
+ export function getLoggerPathPhysicalRoot(app) {
20
+ const mode = app.configMeta.mode;
47
21
  let loggerDir;
48
22
  if (mode === 'test' || mode === 'dev') {
49
- loggerDir = path.join(appInfo.projectPath, '.app/logs');
23
+ loggerDir = path.join(app.projectPath, '.app/logs');
50
24
  }
51
25
  else {
52
- loggerDir = path.join(os.homedir(), 'vona', appInfo.name, 'logs');
26
+ loggerDir = path.join(os.homedir(), 'vona', app.name, 'logs');
53
27
  }
54
28
  fse.ensureDirSync(loggerDir);
55
29
  return loggerDir;
56
30
  }
57
- export function getPublicPathPhysicalRoot(appInfo) {
58
- const mode = appInfo.configMeta.mode;
31
+ export function getPublicPathPhysicalRoot(app) {
32
+ const mode = app.configMeta.mode;
59
33
  let publicDir;
60
34
  if (mode === 'test' || mode === 'dev') {
61
- publicDir = path.join(appInfo.projectPath, '.app/public');
35
+ publicDir = path.join(app.projectPath, '.app/public');
62
36
  }
63
37
  else {
64
- publicDir = path.join(os.homedir(), 'vona', appInfo.name, 'public');
38
+ publicDir = path.join(os.homedir(), 'vona', app.name, 'public');
65
39
  }
66
40
  fse.ensureDirSync(publicDir);
67
41
  return publicDir;
@@ -21,6 +21,14 @@ export const contextBase = {
21
21
  const self = cast(this);
22
22
  self.__setLocale(value);
23
23
  },
24
+ get tz() {
25
+ const self = cast(this);
26
+ return self.__getTz();
27
+ },
28
+ set tz(value) {
29
+ const self = cast(this);
30
+ self.__setTz(value);
31
+ },
24
32
  get instanceName() {
25
33
  const self = cast(this);
26
34
  return self.__getInstanceName();
@@ -62,7 +62,7 @@ export class AppMeta extends BeanSimple {
62
62
  this.metadata = appMetadata;
63
63
  }
64
64
  _prepareEnv() {
65
- const mode = this.app.config.meta.mode;
65
+ const mode = this.app.configMeta.mode;
66
66
  this.isProd = mode === 'prod';
67
67
  this.isTest = mode === 'test';
68
68
  this.isDev = mode === 'dev';
@@ -131,6 +131,9 @@ export class AppResource extends BeanSimple {
131
131
  }
132
132
  _prepareOnionOptions(options, optionsPrimitive, scene, name) {
133
133
  const app = useApp();
134
+ if (!app?.config && scene !== 'scope') {
135
+ throw new Error('Should not import vona module in config');
136
+ }
134
137
  const optionsConfig = cast(app?.config)?.onions?.[scene]?.[name];
135
138
  if (optionsPrimitive) {
136
139
  return optionsConfig === undefined ? options : optionsConfig;
@@ -1,8 +1,8 @@
1
1
  import { sleep } from '@cabloy/utils';
2
2
  import { cast } from "../../types/utils/cast.js";
3
3
  import { VonaApplication } from "../core/application.js";
4
- import { combineAppConfigDefault } from "../core/config.js";
5
- import { deepExtend, prepareEnv } from "../utils/util.js";
4
+ import { prepareEnv } from "../utils/util.js";
5
+ import { zodEnhance } from "../utils/zod-enhance.js";
6
6
  import { Start } from "./start.js";
7
7
  export async function createAppMaster(bootstrapOptions) {
8
8
  globalThis.__bootstrapOptions__ = bootstrapOptions;
@@ -42,12 +42,12 @@ export async function createApp(bootstrapOptions) {
42
42
  }
43
43
  }
44
44
  function __createApp({ modulesMeta, locales, config, env, AppMonkey }) {
45
+ // patch zod, should before config
46
+ zodEnhance();
45
47
  // env
46
48
  const env2 = prepareEnv(env);
47
49
  // appInfo
48
50
  const appInfo = prepareAppInfo(env2);
49
- // config
50
- const appConfig = prepareConfig(appInfo, config, env2);
51
51
  // options
52
52
  const options = {
53
53
  name: appInfo.name,
@@ -55,7 +55,7 @@ function __createApp({ modulesMeta, locales, config, env, AppMonkey }) {
55
55
  configMeta: appInfo.configMeta,
56
56
  modulesMeta,
57
57
  locales,
58
- config: appConfig,
58
+ config,
59
59
  env: env2,
60
60
  AppMonkey,
61
61
  };
@@ -71,13 +71,3 @@ function prepareAppInfo(env) {
71
71
  },
72
72
  };
73
73
  }
74
- function prepareConfig(appInfo, configs, env) {
75
- const config = combineAppConfigDefault(appInfo, env);
76
- for (const configItem of configs) {
77
- const res = configItem(appInfo, env);
78
- if (res) {
79
- deepExtend(config, res);
80
- }
81
- }
82
- return config;
83
- }
@@ -7,4 +7,5 @@ export declare class Start {
7
7
  _start_appStart(): Promise<void>;
8
8
  _start_appReady(): Promise<void>;
9
9
  _start_appStarted(): Promise<void>;
10
+ _start_appConfig(): Promise<void>;
10
11
  }
@@ -1,5 +1,6 @@
1
1
  import { EnumAppEvent } from "../../types/index.js";
2
2
  import { ModuleLoader } from "../module/loader.js";
3
+ import { deepExtend } from "../utils/util.js";
3
4
  export class Start {
4
5
  app;
5
6
  constructor(app) {
@@ -8,6 +9,7 @@ export class Start {
8
9
  async start() {
9
10
  const app = this.app;
10
11
  try {
12
+ await this._start_appConfig();
11
13
  await this._start_appLoad();
12
14
  await this._start_appStart();
13
15
  await this._start_appReady();
@@ -48,4 +50,30 @@ export class Start {
48
50
  // hook: appStarted
49
51
  await app.util.monkeyModule(app.meta.appMonkey, app.meta.modulesMonkey, 'appStarted');
50
52
  }
53
+ async _start_appConfig() {
54
+ const app = this.app;
55
+ // config
56
+ const appConfig = await __prepareConfig(app);
57
+ this.app.config = appConfig;
58
+ this.app.keys = appConfig.server.keys;
59
+ this.app.proxy = appConfig.proxy.enable;
60
+ this.app.subdomainOffset = appConfig.server.subdomainOffset;
61
+ this.app.proxyIpHeader = appConfig.proxy.ipHeaders;
62
+ this.app.maxIpsCount = appConfig.proxy.maxIpsCount;
63
+ }
64
+ }
65
+ async function __prepareConfig(app) {
66
+ const config = {};
67
+ const configItems = (await app.options.config()).default;
68
+ const configItemsPromise = [];
69
+ for (const configItem of configItems) {
70
+ configItemsPromise.push(configItem(app, app.options.env));
71
+ }
72
+ const configItemsRes = await Promise.all(configItemsPromise);
73
+ for (const configItem of configItemsRes) {
74
+ if (configItem) {
75
+ deepExtend(config, configItem);
76
+ }
77
+ }
78
+ return config;
51
79
  }
@@ -7,7 +7,7 @@ export default async function (app, modules) {
7
7
  const module = modules[key];
8
8
  // module config
9
9
  if (module.resource.config) {
10
- const configModule = await module.resource.config(app);
10
+ const configModule = await module.resource.config(app, app.options.env);
11
11
  // configNew is not used by now
12
12
  await app.util.monkeyModule(app.meta.appMonkey, app.meta.modulesMonkey, 'configLoaded', module, configModule);
13
13
  app.config.modules[module.info.relativeName] = deepExtend({}, configModule, app.config.modules[module.info.relativeName]);
@@ -16,7 +16,7 @@ export class ModuleLoader extends BeanSimple {
16
16
  // monkey modules
17
17
  await moduleTools.monkey('moduleLoading');
18
18
  await loadConfig(app, modules);
19
- loadLocales(app, modules);
19
+ await loadLocales(app, modules);
20
20
  loadErrors(app, modules);
21
21
  loadConstants(app, modules);
22
22
  // monkey modules
@@ -1,3 +1,3 @@
1
1
  import type { IModule } from '@cabloy/module-info';
2
2
  import type { VonaApplication } from '../core/application.ts';
3
- export default function (app: VonaApplication, modules: Record<string, IModule>): void;
3
+ export default function (app: VonaApplication, modules: Record<string, IModule>): Promise<void>;
@@ -1,14 +1,15 @@
1
1
  import localesDefault from "../core/locales.js";
2
- export default function (app, modules) {
2
+ export default async function (app, modules) {
3
3
  // all locales
4
4
  app.meta.locales = localesDefault;
5
5
  app.meta.localeModules = {};
6
6
  // load locales
7
- loadLocales();
8
- function loadLocales() {
7
+ await loadLocales();
8
+ async function loadLocales() {
9
+ const locales = (await app.options.locales()).locales;
9
10
  // project locales
10
- for (const locale in app.options.locales) {
11
- _initLocales(locale, app.options.locales[locale]);
11
+ for (const locale in locales) {
12
+ _initLocales(locale, locales[locale]);
12
13
  }
13
14
  // module locales
14
15
  for (const moduleName in modules) {
@@ -1,6 +1,7 @@
1
1
  import type { ILocaleRecord } from '../bean/resource/locale/type.ts';
2
2
  export interface ICustomKeyRecord {
3
3
  'x-vona-locale': keyof ILocaleRecord | undefined;
4
+ 'x-vona-tz': string | undefined;
4
5
  'x-vona-instance-name': string | undefined;
5
6
  'x-vona-passport-code': string | undefined;
6
7
  'x-vona-oauth-code': string | undefined;
@@ -1,4 +1,3 @@
1
1
  export * from './customKey.ts';
2
- export * from './redis.ts';
3
2
  export * from './retry.ts';
4
3
  export * from './util.ts';
@@ -1,6 +1,5 @@
1
1
  import { zodExtendOpenApi } from "./zod-openapi.js";
2
2
  export * from "./customKey.js";
3
- export * from "./redis.js";
4
3
  export * from "./retry.js";
5
4
  export * from "./util.js";
6
5
  zodExtendOpenApi();
@@ -5,5 +5,5 @@ export type ZodLocaleError = () => {
5
5
  localeError: z.core.$ZodErrorMap;
6
6
  };
7
7
  export type ZodLocaleErrors = Record<keyof ILocaleRecord, ZodLocaleError>;
8
- export declare function zodEnhance(app: VonaApplication): void;
8
+ export declare function zodEnhance(): void;
9
9
  export declare function zodSetLocaleErrors(app: VonaApplication, localeErrors: ZodLocaleErrors, localeDefault?: string): void;
@@ -1,8 +1,10 @@
1
1
  import { setLocaleAdapter, setLocaleErrors, translateError } from '@cabloy/zod-errors-custom';
2
2
  import { ZodMetadata } from '@cabloy/zod-openapi';
3
3
  import { setParseAdapter } from '@cabloy/zod-query';
4
- export function zodEnhance(app) {
4
+ import { useApp } from "../framework/useApp.js";
5
+ export function zodEnhance() {
5
6
  setLocaleAdapter((text, iss) => {
7
+ const app = useApp();
6
8
  return translateError((text, ...args) => {
7
9
  return app.meta.text(text, ...args);
8
10
  }, text, iss);
@@ -1,5 +1,6 @@
1
1
  import type { IModule, VonaConfigMeta } from '@cabloy/module-info';
2
- import type { VonaConfig, VonaConfigOptional } from '../config/config.ts';
2
+ import type { VonaApplication } from '../../lib/core/application.ts';
3
+ import type { VonaConfigOptional } from '../config/config.ts';
3
4
  import type { VonaLocaleOptionalMap } from '../config/locale.ts';
4
5
  import type { AppMonkeyConstructable } from '../interface/monkey.ts';
5
6
  import type { VonaConfigEnv } from '../utils/env.ts';
@@ -7,9 +8,15 @@ export interface VonaModulesMeta {
7
8
  modules: Record<string, IModule>;
8
9
  moduleNames: string[];
9
10
  }
10
- export type TypeOptionsModulesMeta = () => Promise<{
11
+ export type TypeBootstrapOptionsModulesMeta = () => Promise<{
11
12
  modulesMeta: VonaModulesMeta;
12
13
  }>;
14
+ export type TypeBootstrapOptionsConfig = () => Promise<{
15
+ default: TypeAppInfoConfig[];
16
+ }>;
17
+ export type TypeBootstrapOptionsLocales = () => Promise<{
18
+ locales: VonaLocaleOptionalMap;
19
+ }>;
13
20
  export interface KoaApplicationOptions {
14
21
  env?: string | undefined;
15
22
  keys?: string[] | undefined;
@@ -28,10 +35,10 @@ export interface VonaApplicationOptions {
28
35
  name: string;
29
36
  projectPath: string;
30
37
  configMeta: VonaConfigMeta;
31
- modulesMeta: TypeOptionsModulesMeta;
32
- locales: VonaLocaleOptionalMap;
33
- config: VonaConfig;
38
+ modulesMeta: TypeBootstrapOptionsModulesMeta;
39
+ locales: TypeBootstrapOptionsLocales;
40
+ config: TypeBootstrapOptionsConfig;
34
41
  env: VonaConfigEnv;
35
42
  AppMonkey?: AppMonkeyConstructable;
36
43
  }
37
- export type TypeAppInfoConfig = (appInfo: VonaAppInfo, env: VonaConfigEnv) => VonaConfigOptional;
44
+ export type TypeAppInfoConfig = (app: VonaApplication, env: VonaConfigEnv) => VonaConfigOptional | Promise<VonaConfigOptional>;
@@ -1,3 +1,4 @@
1
+ import type { ILocaleRecord } from '../../lib/bean/resource/locale/type.ts';
1
2
  import type { IBeanScopeLocale } from '../../lib/bean/type.ts';
2
3
  import type { PowerPartial } from '../utils/powerPartial.ts';
3
4
  export declare const localeDefault: {
@@ -7,4 +8,4 @@ export type VonaLocale = {
7
8
  modules: IBeanScopeLocale;
8
9
  } & typeof localeDefault;
9
10
  export type VonaLocaleOptional = PowerPartial<VonaLocale>;
10
- export type VonaLocaleOptionalMap = Record<string, VonaLocaleOptional>;
11
+ export type VonaLocaleOptionalMap = Record<keyof ILocaleRecord, VonaLocaleOptional>;
@@ -6,6 +6,8 @@ export interface ContextBase {
6
6
  get bean(): BeanContainer;
7
7
  get locale(): keyof ILocaleRecord;
8
8
  set locale(value: keyof ILocaleRecord);
9
+ get tz(): string | undefined;
10
+ set tz(value: string | undefined);
9
11
  get instanceName(): keyof IInstanceRecord | undefined | null;
10
12
  set instanceName(value: keyof IInstanceRecord | undefined | null);
11
13
  get config(): VonaConfig;
@@ -1,10 +1,9 @@
1
- import type { TypeAppInfoConfig, TypeOptionsModulesMeta } from '../application/app.ts';
2
- import type { VonaLocaleOptionalMap } from '../config/locale.ts';
1
+ import type { TypeBootstrapOptionsConfig, TypeBootstrapOptionsLocales, TypeBootstrapOptionsModulesMeta } from '../application/app.ts';
3
2
  import type { AppMonkeyConstructable } from './monkey.ts';
4
3
  export interface BootstrapOptions {
5
- modulesMeta: TypeOptionsModulesMeta;
6
- locales: VonaLocaleOptionalMap;
7
- config: TypeAppInfoConfig[];
4
+ modulesMeta: TypeBootstrapOptionsModulesMeta;
5
+ locales: TypeBootstrapOptionsLocales;
6
+ config: TypeBootstrapOptionsConfig;
8
7
  env: Partial<NodeJS.ProcessEnv>;
9
8
  AppMonkey?: AppMonkeyConstructable;
10
9
  }
@@ -1,11 +1,12 @@
1
1
  import type { VonaApplication } from '../../lib/core/application.ts';
2
2
  import type { Constructable } from '../../lib/decorator/type/constructable.ts';
3
+ import type { VonaConfigEnv } from '../utils/env.ts';
3
4
  import type { IModuleMain, IMonkeyModule, IMonkeySystem } from './monkey.ts';
4
5
  export type TypeModuleResourceLocales = Record<string, object>;
5
6
  export type TypeModuleResourceLocaleModules = Record<string, TypeModuleResourceLocales>;
6
7
  export type TypeModuleResourceErrors = Record<string, number>;
7
8
  export type TypeModuleResourceErrorModules = Record<string, TypeModuleResourceErrors>;
8
- export type TypeModuleResourceConfig = (app: VonaApplication) => object | Promise<object>;
9
+ export type TypeModuleResourceConfig = (app: VonaApplication, env: VonaConfigEnv) => object | Promise<object>;
9
10
  export interface IModuleResource {
10
11
  Main: new () => IModuleMain;
11
12
  Monkey: new () => IMonkeyModule & IMonkeySystem;
@@ -1,5 +1,5 @@
1
- export type PowerPartial<T> = {
2
- [U in keyof T]?: T[U] extends (...args: any) => any ? (...args: Parameters<T[U]>) => PowerPartialFunctionResult<ReturnType<T[U]>> : T[U] extends object ? PowerPartial<T[U]> : T[U];
3
- };
4
- type PowerPartialFunctionResult<T> = T extends Promise<infer R> ? Promise<PowerPartial<R>> : PowerPartial<T>;
5
- export {};
1
+ import type { PartialDeep } from '@cabloy/type-fest';
2
+ export type PowerPartial<T> = PartialDeep<T, {
3
+ recurseIntoArrays: true;
4
+ allowUndefinedInNonTupleArrays: false;
5
+ }>;
@@ -1 +1,8 @@
1
1
  export {};
2
+ // export type PowerPartial<T> = {
3
+ // [U in keyof T]?:
4
+ // T[U] extends (...args: any) => any
5
+ // ? (...args: Parameters<T[U]>) => PowerPartialFunctionResult<ReturnType<T[U]>>
6
+ // : T[U] extends object ? PowerPartial<T[U]> : T[U];
7
+ // };
8
+ // type PowerPartialFunctionResult<T> = T extends Promise<infer R> ? Promise<PowerPartial<R>> : PowerPartial<T>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-core",
3
3
  "type": "module",
4
- "version": "5.0.101",
4
+ "version": "5.0.103",
5
5
  "description": "vona",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -32,10 +32,11 @@
32
32
  "@cabloy/module-info": "^1.3.31",
33
33
  "@cabloy/module-info-pro": "^1.0.39",
34
34
  "@cabloy/set": "^1.0.17",
35
- "@cabloy/utils": "^1.0.47",
35
+ "@cabloy/type-fest": "^5.3.1",
36
+ "@cabloy/utils": "^1.0.48",
36
37
  "@cabloy/word-utils": "^2.0.1",
37
38
  "@cabloy/zod-errors-custom": "^2.0.3",
38
- "@cabloy/zod-openapi": "^1.0.3",
39
+ "@cabloy/zod-openapi": "^1.0.6",
39
40
  "@cabloy/zod-query": "^2.0.3",
40
41
  "@cabloy/zod-to-openapi": "^8.1.4",
41
42
  "chalk": "^5.3.0",
@@ -1,3 +0,0 @@
1
- import type { VonaAppInfo } from '../../types/application/app.ts';
2
- import type { VonaApplication } from '../core/application.ts';
3
- export declare function getRedisClientKeyPrefix(clientName: string, appInfo: VonaAppInfo | VonaApplication): string;
@@ -1,4 +0,0 @@
1
- export function getRedisClientKeyPrefix(clientName, appInfo) {
2
- const mode = ['test', 'dev'].includes(appInfo.configMeta.mode) ? '_local' : '';
3
- return `${clientName}_${appInfo.name}${mode}:`;
4
- }