vona-core 1.0.0 → 5.0.9

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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.js +4 -0
  4. package/dist/lib/bean/beanAopBase.d.ts +3 -0
  5. package/dist/lib/bean/beanAopBase.js +3 -0
  6. package/dist/lib/bean/beanAopMethodBase.d.ts +3 -0
  7. package/dist/lib/bean/beanAopMethodBase.js +3 -0
  8. package/dist/lib/bean/beanBase.d.ts +19 -0
  9. package/dist/lib/bean/beanBase.js +36 -0
  10. package/dist/lib/bean/beanBaseSimple.d.ts +14 -0
  11. package/dist/lib/bean/beanBaseSimple.js +27 -0
  12. package/dist/lib/bean/beanContainer.d.ts +40 -0
  13. package/dist/lib/bean/beanContainer.js +578 -0
  14. package/dist/lib/bean/beanSimple.d.ts +7 -0
  15. package/dist/lib/bean/beanSimple.js +9 -0
  16. package/dist/lib/bean/index.d.ts +9 -0
  17. package/dist/lib/bean/index.js +9 -0
  18. package/dist/lib/bean/resource/config/index.d.ts +1 -0
  19. package/dist/lib/bean/resource/config/index.js +1 -0
  20. package/dist/lib/bean/resource/config/type.d.ts +2 -0
  21. package/dist/lib/bean/resource/config/type.js +1 -0
  22. package/dist/lib/bean/resource/constant/index.d.ts +1 -0
  23. package/dist/lib/bean/resource/constant/index.js +1 -0
  24. package/dist/lib/bean/resource/constant/type.d.ts +1 -0
  25. package/dist/lib/bean/resource/constant/type.js +1 -0
  26. package/dist/lib/bean/resource/error/_errorInternal.d.ts +66 -0
  27. package/dist/lib/bean/resource/error/_errorInternal.js +66 -0
  28. package/dist/lib/bean/resource/error/beanScopeError.d.ts +10 -0
  29. package/dist/lib/bean/resource/error/beanScopeError.js +17 -0
  30. package/dist/lib/bean/resource/error/beanScopeErrorImpl.d.ts +13 -0
  31. package/dist/lib/bean/resource/error/beanScopeErrorImpl.js +18 -0
  32. package/dist/lib/bean/resource/error/errorApplication.d.ts +32 -0
  33. package/dist/lib/bean/resource/error/errorApplication.js +1 -0
  34. package/dist/lib/bean/resource/error/errorClass.d.ts +17 -0
  35. package/dist/lib/bean/resource/error/errorClass.js +71 -0
  36. package/dist/lib/bean/resource/error/errorGlobal.d.ts +7 -0
  37. package/dist/lib/bean/resource/error/errorGlobal.js +1 -0
  38. package/dist/lib/bean/resource/error/errorObject.d.ts +4 -0
  39. package/dist/lib/bean/resource/error/errorObject.js +1 -0
  40. package/dist/lib/bean/resource/error/index.d.ts +7 -0
  41. package/dist/lib/bean/resource/error/index.js +7 -0
  42. package/dist/lib/bean/resource/error/type.d.ts +8 -0
  43. package/dist/lib/bean/resource/error/type.js +1 -0
  44. package/dist/lib/bean/resource/index.d.ts +4 -0
  45. package/dist/lib/bean/resource/index.js +4 -0
  46. package/dist/lib/bean/resource/locale/appLocale.d.ts +7 -0
  47. package/dist/lib/bean/resource/locale/appLocale.js +45 -0
  48. package/dist/lib/bean/resource/locale/beanScopeLocale.d.ts +10 -0
  49. package/dist/lib/bean/resource/locale/beanScopeLocale.js +16 -0
  50. package/dist/lib/bean/resource/locale/index.d.ts +3 -0
  51. package/dist/lib/bean/resource/locale/index.js +3 -0
  52. package/dist/lib/bean/resource/locale/type.d.ts +19 -0
  53. package/dist/lib/bean/resource/locale/type.js +1 -0
  54. package/dist/lib/bean/scope/beanScopeBase.d.ts +19 -0
  55. package/dist/lib/bean/scope/beanScopeBase.js +88 -0
  56. package/dist/lib/bean/scope/beanScopeContainer.d.ts +7 -0
  57. package/dist/lib/bean/scope/beanScopeContainer.js +15 -0
  58. package/dist/lib/bean/scope/beanScopeScene.d.ts +11 -0
  59. package/dist/lib/bean/scope/beanScopeScene.js +20 -0
  60. package/dist/lib/bean/scope/beanScopeUtil.d.ts +10 -0
  61. package/dist/lib/bean/scope/beanScopeUtil.js +18 -0
  62. package/dist/lib/bean/scope/index.d.ts +4 -0
  63. package/dist/lib/bean/scope/index.js +4 -0
  64. package/dist/lib/bean/type.d.ts +21 -0
  65. package/dist/lib/bean/type.js +2 -0
  66. package/dist/lib/core/application.d.ts +25 -0
  67. package/dist/lib/core/application.js +78 -0
  68. package/dist/lib/core/asyncLocalStorage.d.ts +8 -0
  69. package/dist/lib/core/asyncLocalStorage.js +23 -0
  70. package/dist/lib/core/config.d.ts +12 -0
  71. package/dist/lib/core/config.js +120 -0
  72. package/dist/lib/core/context.d.ts +2 -0
  73. package/dist/lib/core/context.js +104 -0
  74. package/dist/lib/core/ctxCounter.d.ts +7 -0
  75. package/dist/lib/core/ctxCounter.js +20 -0
  76. package/dist/lib/core/index.d.ts +6 -0
  77. package/dist/lib/core/index.js +6 -0
  78. package/dist/lib/core/locales.d.ts +137 -0
  79. package/dist/lib/core/locales.js +6 -0
  80. package/dist/lib/core/logger.d.ts +22 -0
  81. package/dist/lib/core/logger.js +147 -0
  82. package/dist/lib/core/loggerDefault.d.ts +3 -0
  83. package/dist/lib/core/loggerDefault.js +44 -0
  84. package/dist/lib/core/meta.d.ts +42 -0
  85. package/dist/lib/core/meta.js +123 -0
  86. package/dist/lib/core/metadata.d.ts +15 -0
  87. package/dist/lib/core/metadata.js +80 -0
  88. package/dist/lib/core/resource.d.ts +33 -0
  89. package/dist/lib/core/resource.js +146 -0
  90. package/dist/lib/decorator/class/beanInfo.d.ts +2 -0
  91. package/dist/lib/decorator/class/beanInfo.js +8 -0
  92. package/dist/lib/decorator/class/createBeanDecorator.d.ts +3 -0
  93. package/dist/lib/decorator/class/createBeanDecorator.js +23 -0
  94. package/dist/lib/decorator/class/index.d.ts +4 -0
  95. package/dist/lib/decorator/class/index.js +4 -0
  96. package/dist/lib/decorator/class/proxyDisable.d.ts +1 -0
  97. package/dist/lib/decorator/class/proxyDisable.js +8 -0
  98. package/dist/lib/decorator/class/use.d.ts +7 -0
  99. package/dist/lib/decorator/class/use.js +69 -0
  100. package/dist/lib/decorator/class/util.d.ts +3 -0
  101. package/dist/lib/decorator/class/util.js +9 -0
  102. package/dist/lib/decorator/index.d.ts +3 -0
  103. package/dist/lib/decorator/index.js +3 -0
  104. package/dist/lib/decorator/interface/beanOptions.d.ts +21 -0
  105. package/dist/lib/decorator/interface/beanOptions.js +1 -0
  106. package/dist/lib/decorator/interface/index.d.ts +2 -0
  107. package/dist/lib/decorator/interface/index.js +2 -0
  108. package/dist/lib/decorator/interface/useOptions.d.ts +29 -0
  109. package/dist/lib/decorator/interface/useOptions.js +1 -0
  110. package/dist/lib/decorator/type/constructable.d.ts +1 -0
  111. package/dist/lib/decorator/type/constructable.js +1 -0
  112. package/dist/lib/decorator/type/containerScope.d.ts +1 -0
  113. package/dist/lib/decorator/type/containerScope.js +1 -0
  114. package/dist/lib/decorator/type/function.d.ts +6 -0
  115. package/dist/lib/decorator/type/function.js +1 -0
  116. package/dist/lib/decorator/type/index.d.ts +4 -0
  117. package/dist/lib/decorator/type/index.js +4 -0
  118. package/dist/lib/decorator/type/injectionScope.d.ts +1 -0
  119. package/dist/lib/decorator/type/injectionScope.js +1 -0
  120. package/dist/lib/framework/bootstrap.d.ts +3 -0
  121. package/dist/lib/framework/bootstrap.js +13 -0
  122. package/dist/lib/framework/cluster.d.ts +2 -0
  123. package/dist/lib/framework/cluster.js +32 -0
  124. package/dist/lib/framework/createApp.d.ts +2 -0
  125. package/dist/lib/framework/createApp.js +71 -0
  126. package/dist/lib/framework/index.d.ts +4 -0
  127. package/dist/lib/framework/index.js +4 -0
  128. package/dist/lib/framework/process.d.ts +2 -0
  129. package/dist/lib/framework/process.js +36 -0
  130. package/dist/lib/framework/start.d.ts +10 -0
  131. package/dist/lib/framework/start.js +51 -0
  132. package/dist/lib/framework/useApp.d.ts +4 -0
  133. package/dist/lib/framework/useApp.js +49 -0
  134. package/dist/lib/index.d.ts +6 -0
  135. package/dist/lib/index.js +6 -0
  136. package/dist/lib/locale/en-us.d.ts +68 -0
  137. package/dist/lib/locale/en-us.js +68 -0
  138. package/dist/lib/locale/zh-cn.d.ts +68 -0
  139. package/dist/lib/locale/zh-cn.js +68 -0
  140. package/dist/lib/mappedClass/index.d.ts +3 -0
  141. package/dist/lib/mappedClass/index.js +3 -0
  142. package/dist/lib/mappedClass/mappedClass.d.ts +10 -0
  143. package/dist/lib/mappedClass/mappedClass.js +10 -0
  144. package/dist/lib/mappedClass/mixinClass.d.ts +8 -0
  145. package/dist/lib/mappedClass/mixinClass.js +8 -0
  146. package/dist/lib/mappedClass/omitClass.d.ts +2 -0
  147. package/dist/lib/mappedClass/omitClass.js +14 -0
  148. package/dist/lib/mappedClass/partialClass.d.ts +3 -0
  149. package/dist/lib/mappedClass/partialClass.js +15 -0
  150. package/dist/lib/mappedClass/pickClass.d.ts +2 -0
  151. package/dist/lib/mappedClass/pickClass.js +14 -0
  152. package/dist/lib/mappedClass/type.d.ts +6 -0
  153. package/dist/lib/mappedClass/type.js +1 -0
  154. package/dist/lib/mappedClass/utils.d.ts +8 -0
  155. package/dist/lib/mappedClass/utils.js +76 -0
  156. package/dist/lib/module/config.d.ts +3 -0
  157. package/dist/lib/module/config.js +17 -0
  158. package/dist/lib/module/constant.d.ts +3 -0
  159. package/dist/lib/module/constant.js +16 -0
  160. package/dist/lib/module/errors.d.ts +3 -0
  161. package/dist/lib/module/errors.js +29 -0
  162. package/dist/lib/module/loader.d.ts +4 -0
  163. package/dist/lib/module/loader.js +25 -0
  164. package/dist/lib/module/locales.d.ts +3 -0
  165. package/dist/lib/module/locales.js +48 -0
  166. package/dist/lib/module/module.d.ts +7 -0
  167. package/dist/lib/module/module.js +32 -0
  168. package/dist/lib/utils/index.d.ts +4 -0
  169. package/dist/lib/utils/index.js +4 -0
  170. package/dist/lib/utils/isClass.d.ts +2 -0
  171. package/dist/lib/utils/isClass.js +18 -0
  172. package/dist/lib/utils/retry.d.ts +4 -0
  173. package/dist/lib/utils/retry.js +16 -0
  174. package/dist/lib/utils/util.d.ts +59 -0
  175. package/dist/lib/utils/util.js +298 -0
  176. package/dist/lib/utils/zod-openapi.d.ts +1 -0
  177. package/dist/lib/utils/zod-openapi.js +3 -0
  178. package/dist/types/application/app.d.ts +36 -0
  179. package/dist/types/application/app.js +1 -0
  180. package/dist/types/application/index.d.ts +1 -0
  181. package/dist/types/application/index.js +1 -0
  182. package/dist/types/config/config.d.ts +36 -0
  183. package/dist/types/config/config.js +1 -0
  184. package/dist/types/config/index.d.ts +3 -0
  185. package/dist/types/config/index.js +3 -0
  186. package/dist/types/config/instance.d.ts +7 -0
  187. package/dist/types/config/instance.js +1 -0
  188. package/dist/types/config/locale.d.ts +10 -0
  189. package/dist/types/config/locale.js +3 -0
  190. package/dist/types/context/contextBase.d.ts +24 -0
  191. package/dist/types/context/contextBase.js +1 -0
  192. package/dist/types/context/contextConfig.d.ts +3 -0
  193. package/dist/types/context/contextConfig.js +1 -0
  194. package/dist/types/context/contextOthers.d.ts +4 -0
  195. package/dist/types/context/contextOthers.js +1 -0
  196. package/dist/types/context/contextState.d.ts +7 -0
  197. package/dist/types/context/contextState.js +1 -0
  198. package/dist/types/context/index.d.ts +10 -0
  199. package/dist/types/context/index.js +1 -0
  200. package/dist/types/enum/appEvent.d.ts +4 -0
  201. package/dist/types/enum/appEvent.js +5 -0
  202. package/dist/types/enum/httpStatus.d.ts +68 -0
  203. package/dist/types/enum/httpStatus.js +69 -0
  204. package/dist/types/enum/index.d.ts +2 -0
  205. package/dist/types/enum/index.js +2 -0
  206. package/dist/types/index.d.ts +6 -0
  207. package/dist/types/index.js +6 -0
  208. package/dist/types/interface/bootstrap.d.ts +10 -0
  209. package/dist/types/interface/bootstrap.js +1 -0
  210. package/dist/types/interface/index.d.ts +4 -0
  211. package/dist/types/interface/index.js +4 -0
  212. package/dist/types/interface/logger.d.ts +22 -0
  213. package/dist/types/interface/logger.js +1 -0
  214. package/dist/types/interface/module.d.ts +24 -0
  215. package/dist/types/interface/module.js +1 -0
  216. package/dist/types/interface/monkey.d.ts +31 -0
  217. package/dist/types/interface/monkey.js +1 -0
  218. package/dist/types/utils/cast.d.ts +5 -0
  219. package/dist/types/utils/cast.js +3 -0
  220. package/dist/types/utils/demo.d.ts +4 -0
  221. package/dist/types/utils/demo.js +1 -0
  222. package/dist/types/utils/env.d.ts +25 -0
  223. package/dist/types/utils/env.js +1 -0
  224. package/dist/types/utils/index.d.ts +6 -0
  225. package/dist/types/utils/index.js +6 -0
  226. package/dist/types/utils/omitNever.d.ts +9 -0
  227. package/dist/types/utils/omitNever.js +1 -0
  228. package/dist/types/utils/powerPartial.d.ts +3 -0
  229. package/dist/types/utils/powerPartial.js +1 -0
  230. package/dist/types/utils/type.d.ts +3 -0
  231. package/dist/types/utils/type.js +1 -0
  232. package/package.json +37 -18
  233. package/README.md +0 -1
@@ -0,0 +1,4 @@
1
+ export declare enum EnumAppEvent {
2
+ AppStarted = "eb:event:appStarted",
3
+ AppStartError = "eb:event:appStartError"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var EnumAppEvent;
2
+ (function (EnumAppEvent) {
3
+ EnumAppEvent["AppStarted"] = "eb:event:appStarted";
4
+ EnumAppEvent["AppStartError"] = "eb:event:appStartError";
5
+ })(EnumAppEvent || (EnumAppEvent = {}));
@@ -0,0 +1,68 @@
1
+ /** https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100 */
2
+ export declare enum HttpStatus {
3
+ SUCCESS = 0,
4
+ UNKNOWN_ERROR = 1,
5
+ CONTINUE = 100,
6
+ SWITCHING_PROTOCOLS = 101,
7
+ PROCESSING = 102,
8
+ EARLYHINTS = 103,
9
+ OK = 200,
10
+ CREATED = 201,
11
+ ACCEPTED = 202,
12
+ NON_AUTHORITATIVE_INFORMATION = 203,
13
+ NO_CONTENT = 204,
14
+ RESET_CONTENT = 205,
15
+ PARTIAL_CONTENT = 206,
16
+ MULTI_STATUS = 207,
17
+ ALREADY_REPORTED = 208,
18
+ IM_USED = 226,
19
+ MULTIPLE_CHOICES = 300,
20
+ MOVED_PERMANENTLY = 301,
21
+ FOUND = 302,
22
+ SEE_OTHER = 303,
23
+ NOT_MODIFIED = 304,
24
+ USE_PROXY = 305,
25
+ TEMPORARY_REDIRECT = 307,
26
+ PERMANENT_REDIRECT = 308,
27
+ BAD_REQUEST = 400,
28
+ UNAUTHORIZED = 401,
29
+ PAYMENT_REQUIRED = 402,
30
+ FORBIDDEN = 403,
31
+ NOT_FOUND = 404,
32
+ METHOD_NOT_ALLOWED = 405,
33
+ NOT_ACCEPTABLE = 406,
34
+ PROXY_AUTHENTICATION_REQUIRED = 407,
35
+ REQUEST_TIMEOUT = 408,
36
+ CONFLICT = 409,
37
+ GONE = 410,
38
+ LENGTH_REQUIRED = 411,
39
+ PRECONDITION_FAILED = 412,
40
+ PAYLOAD_TOO_LARGE = 413,
41
+ URI_TOO_LONG = 414,
42
+ UNSUPPORTED_MEDIA_TYPE = 415,
43
+ REQUESTED_RANGE_NOT_SATISFIABLE = 416,
44
+ EXPECTATION_FAILED = 417,
45
+ I_AM_A_TEAPOT = 418,
46
+ MISDIRECTED = 421,
47
+ UNPROCESSABLE_CONTENT = 422,
48
+ LOCKED = 423,
49
+ FAILED_DEPENDENCY = 424,
50
+ TOO_EARLY = 425,
51
+ UPGRADE_REQUIRED = 426,
52
+ PRECONDITION_REQUIRED = 428,
53
+ TOO_MANY_REQUESTS = 429,
54
+ REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
55
+ UNAVAILABLE_FOR_LEGAL_REASONS = 451,
56
+ INTERNAL_SERVER_ERROR = 500,
57
+ NOT_IMPLEMENTED = 501,
58
+ BAD_GATEWAY = 502,
59
+ SERVICE_UNAVAILABLE = 503,
60
+ GATEWAY_TIMEOUT = 504,
61
+ HTTP_VERSION_NOT_SUPPORTED = 505,
62
+ VARIANT_ALSO_NEGOTIATES = 506,
63
+ INSUFFICIENT_STORAGE = 507,
64
+ LOOP_DETECTED = 508,
65
+ BANDWIDTH_LIMIT_EXCEEDED = 509,
66
+ NOT_EXTENDED = 510,
67
+ NETWORK_AUTHENTICATION_REQUIRED = 511
68
+ }
@@ -0,0 +1,69 @@
1
+ /** https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100 */
2
+ export var HttpStatus;
3
+ (function (HttpStatus) {
4
+ HttpStatus[HttpStatus["SUCCESS"] = 0] = "SUCCESS";
5
+ HttpStatus[HttpStatus["UNKNOWN_ERROR"] = 1] = "UNKNOWN_ERROR";
6
+ HttpStatus[HttpStatus["CONTINUE"] = 100] = "CONTINUE";
7
+ HttpStatus[HttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
8
+ HttpStatus[HttpStatus["PROCESSING"] = 102] = "PROCESSING";
9
+ HttpStatus[HttpStatus["EARLYHINTS"] = 103] = "EARLYHINTS";
10
+ HttpStatus[HttpStatus["OK"] = 200] = "OK";
11
+ HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED";
12
+ HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
13
+ HttpStatus[HttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
14
+ HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
15
+ HttpStatus[HttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT";
16
+ HttpStatus[HttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
17
+ HttpStatus[HttpStatus["MULTI_STATUS"] = 207] = "MULTI_STATUS";
18
+ HttpStatus[HttpStatus["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
19
+ HttpStatus[HttpStatus["IM_USED"] = 226] = "IM_USED";
20
+ HttpStatus[HttpStatus["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
21
+ HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
22
+ HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND";
23
+ HttpStatus[HttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER";
24
+ HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
25
+ HttpStatus[HttpStatus["USE_PROXY"] = 305] = "USE_PROXY";
26
+ HttpStatus[HttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
27
+ HttpStatus[HttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
28
+ HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
29
+ HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
30
+ HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
31
+ HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
32
+ HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
33
+ HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
34
+ HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
35
+ HttpStatus[HttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
36
+ HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
37
+ HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT";
38
+ HttpStatus[HttpStatus["GONE"] = 410] = "GONE";
39
+ HttpStatus[HttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
40
+ HttpStatus[HttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
41
+ HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
42
+ HttpStatus[HttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
43
+ HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
44
+ HttpStatus[HttpStatus["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
45
+ HttpStatus[HttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
46
+ HttpStatus[HttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
47
+ HttpStatus[HttpStatus["MISDIRECTED"] = 421] = "MISDIRECTED";
48
+ HttpStatus[HttpStatus["UNPROCESSABLE_CONTENT"] = 422] = "UNPROCESSABLE_CONTENT";
49
+ HttpStatus[HttpStatus["LOCKED"] = 423] = "LOCKED";
50
+ HttpStatus[HttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
51
+ HttpStatus[HttpStatus["TOO_EARLY"] = 425] = "TOO_EARLY";
52
+ HttpStatus[HttpStatus["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
53
+ HttpStatus[HttpStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
54
+ HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
55
+ HttpStatus[HttpStatus["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
56
+ HttpStatus[HttpStatus["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
57
+ HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
58
+ HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
59
+ HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
60
+ HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
61
+ HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
62
+ HttpStatus[HttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
63
+ HttpStatus[HttpStatus["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
64
+ HttpStatus[HttpStatus["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
65
+ HttpStatus[HttpStatus["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
66
+ HttpStatus[HttpStatus["BANDWIDTH_LIMIT_EXCEEDED"] = 509] = "BANDWIDTH_LIMIT_EXCEEDED";
67
+ HttpStatus[HttpStatus["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
68
+ HttpStatus[HttpStatus["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
69
+ })(HttpStatus || (HttpStatus = {}));
@@ -0,0 +1,2 @@
1
+ export * from './appEvent.ts';
2
+ export * from './httpStatus.ts';
@@ -0,0 +1,2 @@
1
+ export * from "./appEvent.js";
2
+ export * from "./httpStatus.js";
@@ -0,0 +1,6 @@
1
+ export * from './application/index.ts';
2
+ export * from './config/index.ts';
3
+ export * from './context/index.ts';
4
+ export * from './enum/index.ts';
5
+ export * from './interface/index.ts';
6
+ export * from './utils/index.ts';
@@ -0,0 +1,6 @@
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";
@@ -0,0 +1,10 @@
1
+ import type { TypeAppInfoConfig, TypeOptionsModulesMeta } from '../application/app.ts';
2
+ import type { VonaLocaleOptionalMap } from '../config/locale.ts';
3
+ import type { AppMonkeyConstructable } from './monkey.ts';
4
+ export interface BootstrapOptions {
5
+ modulesMeta: TypeOptionsModulesMeta;
6
+ locales: VonaLocaleOptionalMap;
7
+ config: TypeAppInfoConfig[];
8
+ env: Partial<NodeJS.ProcessEnv>;
9
+ AppMonkey?: AppMonkeyConstructable;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './bootstrap.ts';
2
+ export * from './logger.ts';
3
+ export * from './module.ts';
4
+ export * from './monkey.ts';
@@ -0,0 +1,4 @@
1
+ export * from "./bootstrap.js";
2
+ export * from "./logger.js";
3
+ export * from "./module.js";
4
+ export * from "./monkey.js";
@@ -0,0 +1,22 @@
1
+ import type * as Winston from 'winston';
2
+ import type DailyRotateFile from 'winston-daily-rotate-file';
3
+ export interface ILoggerOptionsClientInfo {
4
+ clientName: keyof ILoggerClientRecord;
5
+ level: () => (LoggerLevel | undefined);
6
+ }
7
+ export type TypeLoggerOptions = Winston.LoggerOptions | ((winston: typeof Winston, clientInfo: ILoggerOptionsClientInfo) => Winston.LoggerOptions);
8
+ export type TypeLoggerRotateOptions = (fileName: string, winston: typeof Winston, clientInfo: ILoggerOptionsClientInfo) => DailyRotateFile.DailyRotateFileTransportOptions;
9
+ export interface ILoggerClientRecord {
10
+ default: never;
11
+ }
12
+ export interface ILoggerClientChildRecord {
13
+ }
14
+ export interface ConfigLogger {
15
+ default: TypeLoggerOptions;
16
+ clients: Record<keyof ILoggerClientRecord, TypeLoggerOptions>;
17
+ rotate: {
18
+ enable: boolean;
19
+ options: TypeLoggerRotateOptions;
20
+ };
21
+ }
22
+ export type LoggerLevel = 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { VonaApplication } from '../../lib/core/application.ts';
2
+ import type { Constructable } from '../../lib/decorator/type/constructable.ts';
3
+ import type { IModuleMain, IMonkeyModule, IMonkeySystem } from './monkey.ts';
4
+ export type TypeModuleResourceLocales = Record<string, object>;
5
+ export type TypeModuleResourceLocaleModules = Record<string, TypeModuleResourceLocales>;
6
+ export type TypeModuleResourceErrors = Record<number, string>;
7
+ export type TypeModuleResourceErrorModules = Record<string, TypeModuleResourceErrors>;
8
+ export type TypeModuleResourceConfig = (app: VonaApplication) => object | Promise<object>;
9
+ export interface IModuleResource {
10
+ Main: new () => IModuleMain;
11
+ Monkey: new () => IMonkeyModule & IMonkeySystem;
12
+ locales: TypeModuleResourceLocales;
13
+ Errors: TypeModuleResourceErrors;
14
+ config: TypeModuleResourceConfig;
15
+ constants: unknown;
16
+ controllers: Constructable[];
17
+ }
18
+ declare module '@cabloy/module-info' {
19
+ interface IModule {
20
+ resource: IModuleResource;
21
+ mainInstance: IModuleMain;
22
+ monkeyInstance: IMonkeyModule & IMonkeySystem;
23
+ }
24
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { IModule } from '@cabloy/module-info';
2
+ import type { Constructable } from '../../lib/decorator/type/constructable.ts';
3
+ export type TypeMonkeyName = keyof IMonkeyModule | keyof IMonkeySystem;
4
+ export interface IModuleMain {
5
+ moduleLoading: () => Promise<void>;
6
+ moduleLoaded: () => Promise<void>;
7
+ configLoaded: (config: any) => Promise<void>;
8
+ }
9
+ export interface IMonkeyModule {
10
+ moduleLoading: (module: IModule) => Promise<void>;
11
+ moduleLoaded: (module: IModule) => Promise<void>;
12
+ configLoaded: (module: IModule, config: any) => Promise<void>;
13
+ }
14
+ export interface IMonkeySystem extends IMonkeyAppStart, IMonkeyAppReady, IMonkeyAppStarted, IMonkeyAppClose, IMonkeyAppClosed {
15
+ }
16
+ export interface IMonkeyAppStart {
17
+ appStart: () => Promise<void>;
18
+ }
19
+ export interface IMonkeyAppReady {
20
+ appReady: () => Promise<void>;
21
+ }
22
+ export interface IMonkeyAppStarted {
23
+ appStarted: () => Promise<void>;
24
+ }
25
+ export interface IMonkeyAppClose {
26
+ appClose: () => Promise<void>;
27
+ }
28
+ export interface IMonkeyAppClosed {
29
+ appClosed: () => Promise<void>;
30
+ }
31
+ export type AppMonkeyConstructable = Constructable<IMonkeyModule & IMonkeySystem>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare function cast<T = any>(source: unknown): T;
2
+ declare global {
3
+ function parseInt(num: number, radix?: number): number;
4
+ function parseInt(num: any, radix?: number): number;
5
+ }
@@ -0,0 +1,3 @@
1
+ export function cast(source) {
2
+ return source;
3
+ }
@@ -0,0 +1,4 @@
1
+ export interface IArgv {
2
+ _: string[];
3
+ [key: string]: any;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { VonaMetaFlavor, VonaMetaMode } from '@cabloy/module-info';
2
+ export interface VonaConfigEnv {
3
+ APP_NAME: string | undefined;
4
+ APP_TITLE: string | undefined;
5
+ APP_VERSION: string | undefined;
6
+ SERVER_KEYS: string | undefined;
7
+ SERVER_GLOBALPREFIX: string | undefined;
8
+ SERVER_PUBLICDIR: string | undefined;
9
+ SERVER_LOGGERDIR: string | undefined;
10
+ SERVER_SUBDOMAINOFFSET: string | undefined;
11
+ SERVER_WORKERS: string | undefined;
12
+ SERVER_LISTEN_HOSTNAME: string | undefined;
13
+ SERVER_LISTEN_PORT: string | undefined;
14
+ SERVER_LISTEN_DISABLE: 'true' | 'false' | undefined;
15
+ TEST_WHYISNODERUNNING: string | undefined;
16
+ }
17
+ declare global {
18
+ namespace NodeJS {
19
+ interface ProcessEnv {
20
+ NODE_ENV: 'development' | 'production' | 'test';
21
+ META_FLAVOR: VonaMetaFlavor;
22
+ META_MODE: VonaMetaMode;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './cast.ts';
2
+ export * from './demo.ts';
3
+ export * from './env.ts';
4
+ export * from './omitNever.ts';
5
+ export * from './powerPartial.ts';
6
+ export * from './type.ts';
@@ -0,0 +1,6 @@
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";
@@ -0,0 +1,9 @@
1
+ export type FilteredKeys<T> = {
2
+ [K in keyof T]: T[K] extends never ? never : K;
3
+ }[keyof T];
4
+ export type RemoveNever<T> = {
5
+ [K in FilteredKeys<T>]: T[K];
6
+ };
7
+ export type OmitNever<T> = {
8
+ [K in keyof T as T[K] extends never ? never : K]: T[K];
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type PowerPartial<T> = {
2
+ [U in keyof T]?: T[U] extends object ? PowerPartial<T[U]> : T[U];
3
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface Type<T = any> extends Function {
2
+ new (...args: any[]): T;
3
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,38 +1,57 @@
1
1
  {
2
- "aaaa":"zova-module/zova-suite/a-home/a-demo/a-base/a-core/a-flow/a-cms",
3
2
  "name": "vona-core",
4
- "version": "1.0.0",
5
3
  "type": "module",
4
+ "version": "5.0.9",
5
+ "description": "vona",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
+ "author": "zhennann",
10
+ "keywords": [
11
+ "framework",
12
+ "cabloy"
13
+ ],
9
14
  "exports": {
10
15
  ".": {
11
16
  "types": [
12
17
  "./src/index.ts",
13
18
  "./dist/index.d.ts"
14
19
  ],
15
- "development": "./src/index.ts",
16
- "import": "./dist/index.js",
17
- "default": "./src/index.ts"
20
+ "default": "./dist/index.js"
18
21
  },
19
22
  "./package.json": "./package.json"
20
23
  },
21
- "description": "",
22
24
  "files": [
23
- "dist",
24
- "static",
25
- "typings"
25
+ "dist"
26
26
  ],
27
27
  "scripts": {
28
- "build:front": "node ../../../../../scripts/egg-born-bin.js front-build-module",
29
- "build:backend": "node ../../../../../scripts/egg-born-bin.js backend-build-module",
30
- "build:all": "npm run build:front && npm run build:backend",
31
- "preversion": "npm run build:all && git add ."
28
+ "lint": "eslint .",
29
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
30
+ "tsc:publish": "npm run clean && tsc",
31
+ "prepublishOnly": "npm run tsc:publish",
32
+ "prepack": "clean-package",
33
+ "postpack": "clean-package restore"
32
34
  },
33
- "keywords": [
34
- "Cabloy Module"
35
- ],
36
- "author": "zhennann",
37
- "dependencies": {}
35
+ "dependencies": {
36
+ "@asteasolutions/zod-to-openapi": "^7.3.0",
37
+ "@cabloy/compose": "^2.0.6",
38
+ "@cabloy/extend": "^3.1.2",
39
+ "@cabloy/json5": "^1.0.10",
40
+ "@cabloy/localeutil": "^2.0.2",
41
+ "@cabloy/module-info": "^1.3.10",
42
+ "@cabloy/module-info-pro": "^1.0.18",
43
+ "@cabloy/set": "^1.0.9",
44
+ "@cabloy/utils": "^1.0.17",
45
+ "@cabloy/word-utils": "^2.0.1",
46
+ "fs-extra": "^10.1.0",
47
+ "koa": "^3.0.0",
48
+ "reflect-metadata": "^0.2.2",
49
+ "retry": "^0.13.1",
50
+ "triple-beam": "^1.4.1",
51
+ "uuid": "^11.0.3",
52
+ "winston": "^3.17.0",
53
+ "winston-daily-rotate-file": "^5.0.0",
54
+ "zod": "^3.23.8"
55
+ },
56
+ "gitHead": "0eab9dc4a5622caffe89e7b1b3f02c08ccbc4c4b"
38
57
  }
package/README.md DELETED
@@ -1 +0,0 @@
1
- # @cabloy/set