@midwayjs/core 3.15.8 → 3.16.2
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.
|
@@ -23,6 +23,7 @@ export declare const FrameworkErrorEnum: {
|
|
|
23
23
|
readonly CODE_INVOKE_TIMEOUT: "MIDWAY_10019";
|
|
24
24
|
readonly MAIN_FRAMEWORK_MISSING: "MIDWAY_10020";
|
|
25
25
|
readonly INVALID_CONFIG_PROPERTY: "MIDWAY_10021";
|
|
26
|
+
readonly EMPTY_VALUE: "MIDWAY_10022";
|
|
26
27
|
};
|
|
27
28
|
export declare class MidwayCommonError extends MidwayError {
|
|
28
29
|
constructor(message: string);
|
|
@@ -90,4 +91,7 @@ export declare class MidwayMainFrameworkMissingError extends MidwayError {
|
|
|
90
91
|
export declare class MidwayInvalidConfigPropertyError extends MidwayError {
|
|
91
92
|
constructor(propertyName: string, allowTypes?: string[]);
|
|
92
93
|
}
|
|
94
|
+
export declare class MidwayEmptyValueError extends MidwayError {
|
|
95
|
+
constructor(msg: string);
|
|
96
|
+
}
|
|
93
97
|
//# sourceMappingURL=framework.d.ts.map
|
package/dist/error/framework.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MidwayInvalidConfigPropertyError = exports.MidwayMainFrameworkMissingError = exports.MidwayCodeInvokeTimeoutError = exports.MidwayInvokeForbiddenError = exports.MidwayRetryExceededMaxTimesError = exports.MidwayDuplicateControllerOptionsError = exports.MidwayDuplicateClassNameError = exports.MidwayInconsistentVersionError = exports.MidwayUtilHttpClientTimeoutError = exports.MidwayMissingImportComponentError = exports.MidwaySingletonInjectRequestError = exports.MidwayUseWrongMethodError = exports.MidwayDuplicateRouteError = exports.MidwayResolverMissingError = exports.MidwayInvalidConfigError = exports.MidwayConfigMissingError = exports.MidwayFeatureNotImplementedError = exports.MidwayFeatureNoLongerSupportedError = exports.MidwayDefinitionNotFoundError = exports.MidwayParameterError = exports.MidwayCommonError = exports.FrameworkErrorEnum = void 0;
|
|
3
|
+
exports.MidwayEmptyValueError = exports.MidwayInvalidConfigPropertyError = exports.MidwayMainFrameworkMissingError = exports.MidwayCodeInvokeTimeoutError = exports.MidwayInvokeForbiddenError = exports.MidwayRetryExceededMaxTimesError = exports.MidwayDuplicateControllerOptionsError = exports.MidwayDuplicateClassNameError = exports.MidwayInconsistentVersionError = exports.MidwayUtilHttpClientTimeoutError = exports.MidwayMissingImportComponentError = exports.MidwaySingletonInjectRequestError = exports.MidwayUseWrongMethodError = exports.MidwayDuplicateRouteError = exports.MidwayResolverMissingError = exports.MidwayInvalidConfigError = exports.MidwayConfigMissingError = exports.MidwayFeatureNotImplementedError = exports.MidwayFeatureNoLongerSupportedError = exports.MidwayDefinitionNotFoundError = exports.MidwayParameterError = exports.MidwayCommonError = exports.FrameworkErrorEnum = void 0;
|
|
4
4
|
const base_1 = require("./base");
|
|
5
5
|
exports.FrameworkErrorEnum = (0, base_1.registerErrorCode)('midway', {
|
|
6
6
|
UNKNOWN: 10000,
|
|
@@ -25,6 +25,7 @@ exports.FrameworkErrorEnum = (0, base_1.registerErrorCode)('midway', {
|
|
|
25
25
|
CODE_INVOKE_TIMEOUT: 10019,
|
|
26
26
|
MAIN_FRAMEWORK_MISSING: 10020,
|
|
27
27
|
INVALID_CONFIG_PROPERTY: 10021,
|
|
28
|
+
EMPTY_VALUE: 10022,
|
|
28
29
|
});
|
|
29
30
|
class MidwayCommonError extends base_1.MidwayError {
|
|
30
31
|
constructor(message) {
|
|
@@ -175,4 +176,10 @@ class MidwayInvalidConfigPropertyError extends base_1.MidwayError {
|
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
exports.MidwayInvalidConfigPropertyError = MidwayInvalidConfigPropertyError;
|
|
179
|
+
class MidwayEmptyValueError extends base_1.MidwayError {
|
|
180
|
+
constructor(msg) {
|
|
181
|
+
super(msg !== null && msg !== void 0 ? msg : 'There is an empty value got and it is not allowed.', exports.FrameworkErrorEnum.EMPTY_VALUE);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
exports.MidwayEmptyValueError = MidwayEmptyValueError;
|
|
178
185
|
//# sourceMappingURL=framework.js.map
|
|
@@ -26,7 +26,7 @@ let MidwayHealthService = class MidwayHealthService {
|
|
|
26
26
|
if (lifecycleInstance.instance &&
|
|
27
27
|
lifecycleInstance.instance['onHealthCheck']) {
|
|
28
28
|
this.healthCheckMethods.push({
|
|
29
|
-
item: lifecycleInstance.instance['onHealthCheck'],
|
|
29
|
+
item: lifecycleInstance.instance['onHealthCheck'].bind(lifecycleInstance.instance),
|
|
30
30
|
meta: {
|
|
31
31
|
namespace: lifecycleInstance.namespace,
|
|
32
32
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.2",
|
|
4
4
|
"description": "midway core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"koa": "2.15.3",
|
|
27
27
|
"mm": "3.4.0",
|
|
28
28
|
"raw-body": "2.5.2",
|
|
29
|
-
"sinon": "17.0.
|
|
29
|
+
"sinon": "17.0.2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@midwayjs/glob": "^1.0.2",
|
|
33
33
|
"class-transformer": "0.5.1",
|
|
34
34
|
"picomatch": "2.3.1",
|
|
35
|
-
"reflect-metadata": "0.2.
|
|
35
|
+
"reflect-metadata": "0.2.2"
|
|
36
36
|
},
|
|
37
37
|
"author": "Harry Chen <czy88840616@gmail.com>",
|
|
38
38
|
"repository": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=12"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "45af90c8055ed62b4a0e811d3b5ce42a796b6d65"
|
|
46
46
|
}
|