vona-core 5.0.104 → 5.0.105

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.
Files changed (134) hide show
  1. package/dist/index.js +3194 -2
  2. package/dist/lib/bean/beanBase.d.ts +1 -0
  3. package/dist/lib/bean/beanBaseSimple.d.ts +0 -2
  4. package/dist/lib/bean/beanContainer.d.ts +9 -5
  5. package/dist/lib/core/hmr.d.ts +20 -0
  6. package/dist/lib/core/hmrDeps.d.ts +12 -0
  7. package/dist/lib/core/index.d.ts +2 -0
  8. package/dist/lib/core/meta.d.ts +5 -1
  9. package/dist/lib/core/response.d.ts +7 -0
  10. package/dist/lib/decorator/class/util.d.ts +1 -0
  11. package/dist/lib/decorator/interface/beanOptions.d.ts +1 -0
  12. package/dist/lib/decorator/type/containerScope.d.ts +1 -0
  13. package/dist/lib/mappedClass/extendClass.d.ts +2 -0
  14. package/dist/lib/mappedClass/mappedClass.d.ts +2 -0
  15. package/package.json +13 -14
  16. package/dist/lib/bean/beanAopBase.js +0 -3
  17. package/dist/lib/bean/beanAopMethodBase.js +0 -3
  18. package/dist/lib/bean/beanBase.js +0 -41
  19. package/dist/lib/bean/beanBaseSimple.js +0 -32
  20. package/dist/lib/bean/beanContainer.js +0 -586
  21. package/dist/lib/bean/beanSimple.js +0 -9
  22. package/dist/lib/bean/index.js +0 -9
  23. package/dist/lib/bean/resource/config/index.js +0 -1
  24. package/dist/lib/bean/resource/config/type.js +0 -1
  25. package/dist/lib/bean/resource/constant/index.js +0 -1
  26. package/dist/lib/bean/resource/constant/type.js +0 -1
  27. package/dist/lib/bean/resource/error/beanScopeError.js +0 -17
  28. package/dist/lib/bean/resource/error/beanScopeErrorImpl.js +0 -18
  29. package/dist/lib/bean/resource/error/errorApplication.js +0 -1
  30. package/dist/lib/bean/resource/error/errorClass.js +0 -75
  31. package/dist/lib/bean/resource/error/errorGlobal.js +0 -1
  32. package/dist/lib/bean/resource/error/errorInternal.js +0 -68
  33. package/dist/lib/bean/resource/error/errorObject.js +0 -1
  34. package/dist/lib/bean/resource/error/index.js +0 -8
  35. package/dist/lib/bean/resource/error/type.js +0 -1
  36. package/dist/lib/bean/resource/index.js +0 -4
  37. package/dist/lib/bean/resource/locale/appLocale.js +0 -51
  38. package/dist/lib/bean/resource/locale/beanScopeLocale.js +0 -16
  39. package/dist/lib/bean/resource/locale/index.js +0 -4
  40. package/dist/lib/bean/resource/locale/type.js +0 -1
  41. package/dist/lib/bean/resource/locale/utils.js +0 -3
  42. package/dist/lib/bean/scope/beanScopeBase.js +0 -97
  43. package/dist/lib/bean/scope/beanScopeContainer.js +0 -15
  44. package/dist/lib/bean/scope/beanScopeScene.js +0 -20
  45. package/dist/lib/bean/scope/beanScopeUtil.js +0 -18
  46. package/dist/lib/bean/scope/index.js +0 -4
  47. package/dist/lib/bean/type.js +0 -2
  48. package/dist/lib/core/application.js +0 -86
  49. package/dist/lib/core/asyncLocalStorage.js +0 -23
  50. package/dist/lib/core/config.js +0 -54
  51. package/dist/lib/core/context.js +0 -121
  52. package/dist/lib/core/ctxCounter.js +0 -20
  53. package/dist/lib/core/index.js +0 -7
  54. package/dist/lib/core/locales.js +0 -6
  55. package/dist/lib/core/logger/appLogger.js +0 -103
  56. package/dist/lib/core/logger/index.js +0 -2
  57. package/dist/lib/core/logger/utils.js +0 -76
  58. package/dist/lib/core/meta.js +0 -120
  59. package/dist/lib/core/metadata.js +0 -80
  60. package/dist/lib/core/resource.js +0 -146
  61. package/dist/lib/decorator/class/beanInfo.js +0 -8
  62. package/dist/lib/decorator/class/createBeanDecorator.js +0 -22
  63. package/dist/lib/decorator/class/index.js +0 -5
  64. package/dist/lib/decorator/class/proxyDisable.js +0 -8
  65. package/dist/lib/decorator/class/use.js +0 -74
  66. package/dist/lib/decorator/class/util.js +0 -9
  67. package/dist/lib/decorator/class/virtual.js +0 -8
  68. package/dist/lib/decorator/index.js +0 -3
  69. package/dist/lib/decorator/interface/beanOptions.js +0 -1
  70. package/dist/lib/decorator/interface/index.js +0 -2
  71. package/dist/lib/decorator/interface/useOptions.js +0 -1
  72. package/dist/lib/decorator/type/constructable.js +0 -1
  73. package/dist/lib/decorator/type/containerScope.js +0 -1
  74. package/dist/lib/decorator/type/function.js +0 -1
  75. package/dist/lib/decorator/type/index.js +0 -4
  76. package/dist/lib/decorator/type/injectionScope.js +0 -1
  77. package/dist/lib/framework/bootstrap.js +0 -13
  78. package/dist/lib/framework/cluster.js +0 -33
  79. package/dist/lib/framework/createApp.js +0 -73
  80. package/dist/lib/framework/index.js +0 -4
  81. package/dist/lib/framework/process.js +0 -44
  82. package/dist/lib/framework/start.js +0 -79
  83. package/dist/lib/framework/useApp.js +0 -61
  84. package/dist/lib/index.js +0 -6
  85. package/dist/lib/locale/en-us.js +0 -5
  86. package/dist/lib/locale/zh-cn.js +0 -69
  87. package/dist/lib/mappedClass/index.js +0 -4
  88. package/dist/lib/mappedClass/mappedClass.js +0 -10
  89. package/dist/lib/mappedClass/mixinClass.js +0 -8
  90. package/dist/lib/mappedClass/omitClass.js +0 -14
  91. package/dist/lib/mappedClass/partialClass.js +0 -16
  92. package/dist/lib/mappedClass/pickClass.js +0 -6
  93. package/dist/lib/mappedClass/pickClassInner.js +0 -12
  94. package/dist/lib/mappedClass/type.js +0 -1
  95. package/dist/lib/mappedClass/utils.js +0 -80
  96. package/dist/lib/module/config.js +0 -17
  97. package/dist/lib/module/constant.js +0 -16
  98. package/dist/lib/module/errors.js +0 -29
  99. package/dist/lib/module/loader.js +0 -25
  100. package/dist/lib/module/locales.js +0 -49
  101. package/dist/lib/module/module.js +0 -32
  102. package/dist/lib/utils/customKey.js +0 -3
  103. package/dist/lib/utils/index.js +0 -6
  104. package/dist/lib/utils/retry.js +0 -16
  105. package/dist/lib/utils/sqlite3.js +0 -38
  106. package/dist/lib/utils/util.js +0 -316
  107. package/dist/lib/utils/zod-enhance.js +0 -18
  108. package/dist/lib/utils/zod-openapi.js +0 -29
  109. package/dist/types/application/app.js +0 -1
  110. package/dist/types/application/index.js +0 -1
  111. package/dist/types/config/config.js +0 -1
  112. package/dist/types/config/index.js +0 -3
  113. package/dist/types/config/instance.js +0 -1
  114. package/dist/types/config/locale.js +0 -3
  115. package/dist/types/context/contextBase.js +0 -1
  116. package/dist/types/context/contextConfig.js +0 -1
  117. package/dist/types/context/contextOthers.js +0 -1
  118. package/dist/types/context/contextState.js +0 -1
  119. package/dist/types/context/index.js +0 -1
  120. package/dist/types/enum/appEvent.js +0 -4
  121. package/dist/types/enum/index.js +0 -1
  122. package/dist/types/index.js +0 -6
  123. package/dist/types/interface/bootstrap.js +0 -1
  124. package/dist/types/interface/index.js +0 -4
  125. package/dist/types/interface/logger.js +0 -1
  126. package/dist/types/interface/module.js +0 -1
  127. package/dist/types/interface/monkey.js +0 -1
  128. package/dist/types/utils/cast.js +0 -3
  129. package/dist/types/utils/demo.js +0 -1
  130. package/dist/types/utils/env.js +0 -1
  131. package/dist/types/utils/index.js +0 -6
  132. package/dist/types/utils/omitNever.js +0 -1
  133. package/dist/types/utils/powerPartial.js +0 -8
  134. package/dist/types/utils/type.js +0 -1
@@ -1,29 +0,0 @@
1
- import { hashkey, isEmptyObject } from '@cabloy/utils';
2
- import { ZodMetadata } from '@cabloy/zod-openapi';
3
- import { extendZodWithOpenApi } from '@cabloy/zod-to-openapi';
4
- import { z } from 'zod';
5
- import { deepExtend } from "./util.js";
6
- export function zodExtendOpenApi() {
7
- extendZodWithOpenApi(z);
8
- const openapiOriginal = z.ZodType.prototype.openapi;
9
- z.ZodType.prototype.openapi = function (...args) {
10
- // refId
11
- if (typeof args[0] === 'string')
12
- return openapiOriginal.call(this, ...args);
13
- const refId = ZodMetadata.getRefId(this);
14
- if (!refId)
15
- return openapiOriginal.call(this, ...args);
16
- // metadata
17
- const metadata = args[0];
18
- if (isEmptyObject(metadata)) {
19
- return this;
20
- // return openapiOriginal.call(this, ...args);
21
- }
22
- const options = args[1];
23
- // refId: update
24
- const refIdNew = `${refId}_${hashkey(metadata)}`;
25
- const metadataOld = ZodMetadata.getOpenapiMetadata(this);
26
- const metadataNew = deepExtend({}, metadataOld, metadata);
27
- return openapiOriginal.call(this, refIdNew, metadataNew, options);
28
- };
29
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from "./app.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export * from "./config.js";
2
- export * from "./instance.js";
3
- export * from "./locale.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export const localeDefault = {
2
- modules: {},
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from "./contextState.js";
@@ -1,4 +0,0 @@
1
- export const EnumAppEvent = {
2
- AppStarted: 'eb:event:appStarted',
3
- AppStartError: 'eb:event:appStartError',
4
- };
@@ -1 +0,0 @@
1
- export * from "./appEvent.js";
@@ -1,6 +0,0 @@
1
- export * from "./application/index.js";
2
- export * from "./config/index.js";
3
- export * from "./context/index.js";
4
- export * from "./enum/index.js";
5
- export * from "./interface/index.js";
6
- export * from "./utils/index.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export * from "./bootstrap.js";
2
- export * from "./logger.js";
3
- export * from "./module.js";
4
- export * from "./monkey.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export function cast(source) {
2
- return source;
3
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export * from "./cast.js";
2
- export * from "./demo.js";
3
- export * from "./env.js";
4
- export * from "./omitNever.js";
5
- export * from "./powerPartial.js";
6
- export * from "./type.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
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>;
@@ -1 +0,0 @@
1
- export {};