@midwayjs/decorator 3.0.0-beta.4 → 3.0.0-beta.8
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/CHANGELOG.md +42 -0
- package/README.md +1 -1
- package/dist/decorator/common/filter.d.ts +2 -2
- package/dist/decorator/common/filter.js +1 -1
- package/dist/decorator/framework/schedule.js +2 -2
- package/dist/decorator/microservice/consumer.js +3 -2
- package/dist/decoratorManager.js +8 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([b9272e0](https://github.com/midwayjs/midway/commit/b9272e0971003443304b0c53815be31a0061b4bd))
|
|
12
|
+
* typeorm EntityView missing connectionName ([#1403](https://github.com/midwayjs/midway/issues/1403)) ([30b2b37](https://github.com/midwayjs/midway/commit/30b2b3711db485cb85d825d56aeabf53b1374cae))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @midwayjs/decorator
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* class transformer method missing ([#1387](https://github.com/midwayjs/midway/issues/1387)) ([074e839](https://github.com/midwayjs/midway/commit/074e8393598dc95e2742f735df75a2191c5fe25d))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* [@match](https://github.com/match) empty args ([#1384](https://github.com/midwayjs/midway/issues/1384)) ([6f90fc9](https://github.com/midwayjs/midway/commit/6f90fc993ff01e078288ff664833c61c02dede51))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
6
48
|
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
7
49
|
|
|
8
50
|
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function Catch(catchTarget?: any | any[]): (target: any) => void;
|
|
2
|
-
export declare type MatchPattern<
|
|
3
|
-
export declare function Match(matchPattern
|
|
2
|
+
export declare type MatchPattern<CtxOrReq = any, Res = any> = ((ctxOrReq: CtxOrReq, res: Res) => boolean) | string | string[] | boolean;
|
|
3
|
+
export declare function Match(matchPattern?: MatchPattern): (target: any) => void;
|
|
4
4
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Schedule = void 0;
|
|
4
4
|
const __1 = require("../../");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("../common");
|
|
6
6
|
function Schedule(scheduleOpts) {
|
|
7
7
|
return function (target) {
|
|
8
8
|
(0, __1.saveModule)(__1.SCHEDULE_KEY, target);
|
|
9
9
|
(0, __1.saveClassMetadata)(__1.SCHEDULE_KEY, scheduleOpts, target);
|
|
10
|
-
(0,
|
|
10
|
+
(0, common_1.Scope)(__1.ScopeEnum.Request)(target);
|
|
11
11
|
(0, __1.Provide)()(target);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Consumer = void 0;
|
|
4
4
|
const __1 = require("../../");
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("../common");
|
|
6
6
|
function Consumer(type, options = {}) {
|
|
7
7
|
return (target) => {
|
|
8
8
|
(0, __1.saveModule)(__1.MS_CONSUMER_KEY, target);
|
|
@@ -10,7 +10,8 @@ function Consumer(type, options = {}) {
|
|
|
10
10
|
type,
|
|
11
11
|
metadata: options,
|
|
12
12
|
}, target);
|
|
13
|
-
(0,
|
|
13
|
+
(0, common_1.Scope)(__1.ScopeEnum.Request)(target);
|
|
14
|
+
(0, __1.Provide)()(target);
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
exports.Consumer = Consumer;
|
package/dist/decoratorManager.js
CHANGED
|
@@ -243,12 +243,14 @@ class DecoratorManager extends Map {
|
|
|
243
243
|
}
|
|
244
244
|
exports.DecoratorManager = DecoratorManager;
|
|
245
245
|
let manager = new DecoratorManager();
|
|
246
|
-
if (global
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
if (typeof global === 'object') {
|
|
247
|
+
if (global['MIDWAY_GLOBAL_DECORATOR_MANAGER']) {
|
|
248
|
+
console.warn('DecoratorManager not singleton and please check @midwayjs/decorator version by "npm ls @midwayjs/decorator"');
|
|
249
|
+
manager = global['MIDWAY_GLOBAL_DECORATOR_MANAGER'];
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
global['MIDWAY_GLOBAL_DECORATOR_MANAGER'] = manager;
|
|
253
|
+
}
|
|
252
254
|
}
|
|
253
255
|
/**
|
|
254
256
|
* save data to class
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/decorator",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.8",
|
|
4
4
|
"description": "definition decorator for midway project",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "bfafbdf8798f48d4daac5dd88ad53c6b2f33c110"
|
|
41
41
|
}
|