vona-core 1.0.0 → 5.0.10
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/LICENSE +21 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/lib/bean/beanAopBase.d.ts +3 -0
- package/dist/lib/bean/beanAopBase.js +3 -0
- package/dist/lib/bean/beanAopMethodBase.d.ts +3 -0
- package/dist/lib/bean/beanAopMethodBase.js +3 -0
- package/dist/lib/bean/beanBase.d.ts +19 -0
- package/dist/lib/bean/beanBase.js +36 -0
- package/dist/lib/bean/beanBaseSimple.d.ts +14 -0
- package/dist/lib/bean/beanBaseSimple.js +27 -0
- package/dist/lib/bean/beanContainer.d.ts +40 -0
- package/dist/lib/bean/beanContainer.js +578 -0
- package/dist/lib/bean/beanSimple.d.ts +7 -0
- package/dist/lib/bean/beanSimple.js +9 -0
- package/dist/lib/bean/index.d.ts +9 -0
- package/dist/lib/bean/index.js +9 -0
- package/dist/lib/bean/resource/config/index.d.ts +1 -0
- package/dist/lib/bean/resource/config/index.js +1 -0
- package/dist/lib/bean/resource/config/type.d.ts +2 -0
- package/dist/lib/bean/resource/config/type.js +1 -0
- package/dist/lib/bean/resource/constant/index.d.ts +1 -0
- package/dist/lib/bean/resource/constant/index.js +1 -0
- package/dist/lib/bean/resource/constant/type.d.ts +1 -0
- package/dist/lib/bean/resource/constant/type.js +1 -0
- package/dist/lib/bean/resource/error/_errorInternal.d.ts +66 -0
- package/dist/lib/bean/resource/error/_errorInternal.js +66 -0
- package/dist/lib/bean/resource/error/beanScopeError.d.ts +10 -0
- package/dist/lib/bean/resource/error/beanScopeError.js +17 -0
- package/dist/lib/bean/resource/error/beanScopeErrorImpl.d.ts +13 -0
- package/dist/lib/bean/resource/error/beanScopeErrorImpl.js +18 -0
- package/dist/lib/bean/resource/error/errorApplication.d.ts +32 -0
- package/dist/lib/bean/resource/error/errorApplication.js +1 -0
- package/dist/lib/bean/resource/error/errorClass.d.ts +17 -0
- package/dist/lib/bean/resource/error/errorClass.js +71 -0
- package/dist/lib/bean/resource/error/errorGlobal.d.ts +7 -0
- package/dist/lib/bean/resource/error/errorGlobal.js +1 -0
- package/dist/lib/bean/resource/error/errorObject.d.ts +4 -0
- package/dist/lib/bean/resource/error/errorObject.js +1 -0
- package/dist/lib/bean/resource/error/index.d.ts +7 -0
- package/dist/lib/bean/resource/error/index.js +7 -0
- package/dist/lib/bean/resource/error/type.d.ts +8 -0
- package/dist/lib/bean/resource/error/type.js +1 -0
- package/dist/lib/bean/resource/index.d.ts +4 -0
- package/dist/lib/bean/resource/index.js +4 -0
- package/dist/lib/bean/resource/locale/appLocale.d.ts +7 -0
- package/dist/lib/bean/resource/locale/appLocale.js +45 -0
- package/dist/lib/bean/resource/locale/beanScopeLocale.d.ts +10 -0
- package/dist/lib/bean/resource/locale/beanScopeLocale.js +16 -0
- package/dist/lib/bean/resource/locale/index.d.ts +3 -0
- package/dist/lib/bean/resource/locale/index.js +3 -0
- package/dist/lib/bean/resource/locale/type.d.ts +19 -0
- package/dist/lib/bean/resource/locale/type.js +1 -0
- package/dist/lib/bean/scope/beanScopeBase.d.ts +19 -0
- package/dist/lib/bean/scope/beanScopeBase.js +88 -0
- package/dist/lib/bean/scope/beanScopeContainer.d.ts +7 -0
- package/dist/lib/bean/scope/beanScopeContainer.js +15 -0
- package/dist/lib/bean/scope/beanScopeScene.d.ts +11 -0
- package/dist/lib/bean/scope/beanScopeScene.js +20 -0
- package/dist/lib/bean/scope/beanScopeUtil.d.ts +10 -0
- package/dist/lib/bean/scope/beanScopeUtil.js +18 -0
- package/dist/lib/bean/scope/index.d.ts +4 -0
- package/dist/lib/bean/scope/index.js +4 -0
- package/dist/lib/bean/type.d.ts +21 -0
- package/dist/lib/bean/type.js +2 -0
- package/dist/lib/core/application.d.ts +25 -0
- package/dist/lib/core/application.js +78 -0
- package/dist/lib/core/asyncLocalStorage.d.ts +8 -0
- package/dist/lib/core/asyncLocalStorage.js +23 -0
- package/dist/lib/core/config.d.ts +12 -0
- package/dist/lib/core/config.js +120 -0
- package/dist/lib/core/context.d.ts +2 -0
- package/dist/lib/core/context.js +104 -0
- package/dist/lib/core/ctxCounter.d.ts +7 -0
- package/dist/lib/core/ctxCounter.js +20 -0
- package/dist/lib/core/index.d.ts +6 -0
- package/dist/lib/core/index.js +6 -0
- package/dist/lib/core/locales.d.ts +137 -0
- package/dist/lib/core/locales.js +6 -0
- package/dist/lib/core/logger.d.ts +22 -0
- package/dist/lib/core/logger.js +147 -0
- package/dist/lib/core/loggerDefault.d.ts +3 -0
- package/dist/lib/core/loggerDefault.js +44 -0
- package/dist/lib/core/meta.d.ts +42 -0
- package/dist/lib/core/meta.js +123 -0
- package/dist/lib/core/metadata.d.ts +15 -0
- package/dist/lib/core/metadata.js +80 -0
- package/dist/lib/core/resource.d.ts +33 -0
- package/dist/lib/core/resource.js +146 -0
- package/dist/lib/decorator/class/beanInfo.d.ts +2 -0
- package/dist/lib/decorator/class/beanInfo.js +8 -0
- package/dist/lib/decorator/class/createBeanDecorator.d.ts +3 -0
- package/dist/lib/decorator/class/createBeanDecorator.js +23 -0
- package/dist/lib/decorator/class/index.d.ts +4 -0
- package/dist/lib/decorator/class/index.js +4 -0
- package/dist/lib/decorator/class/proxyDisable.d.ts +1 -0
- package/dist/lib/decorator/class/proxyDisable.js +8 -0
- package/dist/lib/decorator/class/use.d.ts +7 -0
- package/dist/lib/decorator/class/use.js +69 -0
- package/dist/lib/decorator/class/util.d.ts +3 -0
- package/dist/lib/decorator/class/util.js +9 -0
- package/dist/lib/decorator/index.d.ts +3 -0
- package/dist/lib/decorator/index.js +3 -0
- package/dist/lib/decorator/interface/beanOptions.d.ts +21 -0
- package/dist/lib/decorator/interface/beanOptions.js +1 -0
- package/dist/lib/decorator/interface/index.d.ts +2 -0
- package/dist/lib/decorator/interface/index.js +2 -0
- package/dist/lib/decorator/interface/useOptions.d.ts +29 -0
- package/dist/lib/decorator/interface/useOptions.js +1 -0
- package/dist/lib/decorator/type/constructable.d.ts +1 -0
- package/dist/lib/decorator/type/constructable.js +1 -0
- package/dist/lib/decorator/type/containerScope.d.ts +1 -0
- package/dist/lib/decorator/type/containerScope.js +1 -0
- package/dist/lib/decorator/type/function.d.ts +6 -0
- package/dist/lib/decorator/type/function.js +1 -0
- package/dist/lib/decorator/type/index.d.ts +4 -0
- package/dist/lib/decorator/type/index.js +4 -0
- package/dist/lib/decorator/type/injectionScope.d.ts +1 -0
- package/dist/lib/decorator/type/injectionScope.js +1 -0
- package/dist/lib/framework/bootstrap.d.ts +3 -0
- package/dist/lib/framework/bootstrap.js +13 -0
- package/dist/lib/framework/cluster.d.ts +2 -0
- package/dist/lib/framework/cluster.js +32 -0
- package/dist/lib/framework/createApp.d.ts +2 -0
- package/dist/lib/framework/createApp.js +71 -0
- package/dist/lib/framework/index.d.ts +4 -0
- package/dist/lib/framework/index.js +4 -0
- package/dist/lib/framework/process.d.ts +2 -0
- package/dist/lib/framework/process.js +36 -0
- package/dist/lib/framework/start.d.ts +10 -0
- package/dist/lib/framework/start.js +51 -0
- package/dist/lib/framework/useApp.d.ts +4 -0
- package/dist/lib/framework/useApp.js +49 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/locale/en-us.d.ts +68 -0
- package/dist/lib/locale/en-us.js +68 -0
- package/dist/lib/locale/zh-cn.d.ts +68 -0
- package/dist/lib/locale/zh-cn.js +68 -0
- package/dist/lib/mappedClass/index.d.ts +3 -0
- package/dist/lib/mappedClass/index.js +3 -0
- package/dist/lib/mappedClass/mappedClass.d.ts +10 -0
- package/dist/lib/mappedClass/mappedClass.js +10 -0
- package/dist/lib/mappedClass/mixinClass.d.ts +8 -0
- package/dist/lib/mappedClass/mixinClass.js +8 -0
- package/dist/lib/mappedClass/omitClass.d.ts +2 -0
- package/dist/lib/mappedClass/omitClass.js +14 -0
- package/dist/lib/mappedClass/partialClass.d.ts +3 -0
- package/dist/lib/mappedClass/partialClass.js +15 -0
- package/dist/lib/mappedClass/pickClass.d.ts +2 -0
- package/dist/lib/mappedClass/pickClass.js +14 -0
- package/dist/lib/mappedClass/type.d.ts +6 -0
- package/dist/lib/mappedClass/type.js +1 -0
- package/dist/lib/mappedClass/utils.d.ts +8 -0
- package/dist/lib/mappedClass/utils.js +76 -0
- package/dist/lib/module/config.d.ts +3 -0
- package/dist/lib/module/config.js +17 -0
- package/dist/lib/module/constant.d.ts +3 -0
- package/dist/lib/module/constant.js +16 -0
- package/dist/lib/module/errors.d.ts +3 -0
- package/dist/lib/module/errors.js +29 -0
- package/dist/lib/module/loader.d.ts +4 -0
- package/dist/lib/module/loader.js +25 -0
- package/dist/lib/module/locales.d.ts +3 -0
- package/dist/lib/module/locales.js +48 -0
- package/dist/lib/module/module.d.ts +7 -0
- package/dist/lib/module/module.js +32 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.js +4 -0
- package/dist/lib/utils/isClass.d.ts +2 -0
- package/dist/lib/utils/isClass.js +18 -0
- package/dist/lib/utils/retry.d.ts +4 -0
- package/dist/lib/utils/retry.js +16 -0
- package/dist/lib/utils/util.d.ts +59 -0
- package/dist/lib/utils/util.js +298 -0
- package/dist/lib/utils/zod-openapi.d.ts +1 -0
- package/dist/lib/utils/zod-openapi.js +3 -0
- package/dist/types/application/app.d.ts +36 -0
- package/dist/types/application/app.js +1 -0
- package/dist/types/application/index.d.ts +1 -0
- package/dist/types/application/index.js +1 -0
- package/dist/types/config/config.d.ts +36 -0
- package/dist/types/config/config.js +1 -0
- package/dist/types/config/index.d.ts +3 -0
- package/dist/types/config/index.js +3 -0
- package/dist/types/config/instance.d.ts +7 -0
- package/dist/types/config/instance.js +1 -0
- package/dist/types/config/locale.d.ts +10 -0
- package/dist/types/config/locale.js +3 -0
- package/dist/types/context/contextBase.d.ts +24 -0
- package/dist/types/context/contextBase.js +1 -0
- package/dist/types/context/contextConfig.d.ts +3 -0
- package/dist/types/context/contextConfig.js +1 -0
- package/dist/types/context/contextOthers.d.ts +4 -0
- package/dist/types/context/contextOthers.js +1 -0
- package/dist/types/context/contextState.d.ts +7 -0
- package/dist/types/context/contextState.js +1 -0
- package/dist/types/context/index.d.ts +10 -0
- package/dist/types/context/index.js +1 -0
- package/dist/types/enum/appEvent.d.ts +4 -0
- package/dist/types/enum/appEvent.js +5 -0
- package/dist/types/enum/httpStatus.d.ts +68 -0
- package/dist/types/enum/httpStatus.js +69 -0
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +6 -0
- package/dist/types/interface/bootstrap.d.ts +10 -0
- package/dist/types/interface/bootstrap.js +1 -0
- package/dist/types/interface/index.d.ts +4 -0
- package/dist/types/interface/index.js +4 -0
- package/dist/types/interface/logger.d.ts +22 -0
- package/dist/types/interface/logger.js +1 -0
- package/dist/types/interface/module.d.ts +24 -0
- package/dist/types/interface/module.js +1 -0
- package/dist/types/interface/monkey.d.ts +31 -0
- package/dist/types/interface/monkey.js +1 -0
- package/dist/types/utils/cast.d.ts +5 -0
- package/dist/types/utils/cast.js +3 -0
- package/dist/types/utils/demo.d.ts +4 -0
- package/dist/types/utils/demo.js +1 -0
- package/dist/types/utils/env.d.ts +25 -0
- package/dist/types/utils/env.js +1 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/index.js +6 -0
- package/dist/types/utils/omitNever.d.ts +9 -0
- package/dist/types/utils/omitNever.js +1 -0
- package/dist/types/utils/powerPartial.d.ts +3 -0
- package/dist/types/utils/powerPartial.js +1 -0
- package/dist/types/utils/type.d.ts +3 -0
- package/dist/types/utils/type.js +1 -0
- package/package.json +37 -18
- package/README.md +0 -1
|
@@ -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,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,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 @@
|
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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.10",
|
|
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
|
-
"
|
|
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
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
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
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@asteasolutions/zod-to-openapi": "^7.3.0",
|
|
37
|
+
"@cabloy/compose": "^2.0.7",
|
|
38
|
+
"@cabloy/extend": "^3.1.3",
|
|
39
|
+
"@cabloy/json5": "^1.0.11",
|
|
40
|
+
"@cabloy/localeutil": "^2.0.3",
|
|
41
|
+
"@cabloy/module-info": "^1.3.11",
|
|
42
|
+
"@cabloy/module-info-pro": "^1.0.19",
|
|
43
|
+
"@cabloy/set": "^1.0.10",
|
|
44
|
+
"@cabloy/utils": "^1.0.18",
|
|
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": "df34902798a7fa93b09c494ef0ff86fe07598c83"
|
|
38
57
|
}
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# @cabloy/set
|