@midwayjs/rabbitmq 3.0.0-beta.1 → 3.0.0-beta.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/CHANGELOG.md +87 -0
- package/README.md +1 -1
- package/dist/configuration.d.ts +0 -1
- package/dist/configuration.js +0 -5
- package/dist/framework.js +8 -6
- package/dist/interface.d.ts +7 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,93 @@
|
|
|
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.10](https://github.com/midwayjs/midway/compare/v3.0.0-beta.9...v3.0.0-beta.10) (2021-12-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* implement i18n for validate ([#1426](https://github.com/midwayjs/midway/issues/1426)) ([4c7ed2f](https://github.com/midwayjs/midway/commit/4c7ed2ff2e7ccf10f88f62abad230f92f5e76b97))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @midwayjs/rabbitmq
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* 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))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* middleware with ctx.body ([#1389](https://github.com/midwayjs/midway/issues/1389)) ([77af5c0](https://github.com/midwayjs/midway/commit/77af5c0b456f1843f4dcfd3dbfd2c0aa244c51bd))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
48
|
+
|
|
49
|
+
**Note:** Version bump only for package @midwayjs/rabbitmq
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
56
|
+
|
|
57
|
+
**Note:** Version bump only for package @midwayjs/rabbitmq
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* add i18n ([#1375](https://github.com/midwayjs/midway/issues/1375)) ([bffefe0](https://github.com/midwayjs/midway/commit/bffefe07afe45777d49b5a76b9ab17fc2b9d9a55))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Features
|
|
78
|
+
|
|
79
|
+
* add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
|
|
86
|
+
|
|
87
|
+
**Note:** Version bump only for package @midwayjs/rabbitmq
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
6
93
|
# [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
|
|
7
94
|
|
|
8
95
|
|
package/README.md
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -14,11 +14,6 @@ const decorator_1 = require("@midwayjs/decorator");
|
|
|
14
14
|
const framework_1 = require("./framework");
|
|
15
15
|
let RabbitMQConfiguration = class RabbitMQConfiguration {
|
|
16
16
|
async onReady() { }
|
|
17
|
-
async onServerReady() {
|
|
18
|
-
if (this.framework.isEnable()) {
|
|
19
|
-
await this.framework.run();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
17
|
};
|
|
23
18
|
__decorate([
|
|
24
19
|
(0, decorator_1.Inject)(),
|
package/dist/framework.js
CHANGED
|
@@ -58,15 +58,17 @@ let MidwayRabbitMQFramework = class MidwayRabbitMQFramework extends core_1.BaseF
|
|
|
58
58
|
};
|
|
59
59
|
this.app.createAnonymousContext(ctx);
|
|
60
60
|
const ins = await ctx.requestContext.getAsync(module);
|
|
61
|
-
const fn = await this.
|
|
61
|
+
const fn = await this.applyMiddleware(async (ctx) => {
|
|
62
62
|
return await ins[listenerOptions.propertyKey].call(ins, data);
|
|
63
63
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
try {
|
|
65
|
+
const result = await fn(ctx);
|
|
66
|
+
if (result) {
|
|
67
|
+
return channelWrapper.ack(data);
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
catch (error) {
|
|
71
|
+
this.logger.error(error);
|
|
70
72
|
}
|
|
71
73
|
});
|
|
72
74
|
}
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IConfigurationOptions, IMidwayApplication, IMidwayContext } from '@midwayjs/core';
|
|
1
|
+
import { IConfigurationOptions, IMidwayApplication, IMidwayContext, NextFunction as BaseNextFunction } from '@midwayjs/core';
|
|
2
2
|
import { ConsumeMessage, Options } from 'amqplib/properties';
|
|
3
3
|
import { RabbitMQListenerOptions } from '@midwayjs/decorator';
|
|
4
4
|
import type { ConfirmChannel, Channel, Options as AmqpOptions } from 'amqplib';
|
|
@@ -29,5 +29,11 @@ export declare type IMidwayRabbitMQContext = IMidwayContext<{
|
|
|
29
29
|
export declare type Application = IMidwayRabbitMQApplication;
|
|
30
30
|
export interface Context extends IMidwayRabbitMQContext {
|
|
31
31
|
}
|
|
32
|
+
export declare type NextFunction = BaseNextFunction;
|
|
32
33
|
export declare type DefaultConfig = string | AmqpOptions.Connect;
|
|
34
|
+
declare module '@midwayjs/core/dist/interface' {
|
|
35
|
+
interface MidwayConfig {
|
|
36
|
+
rabbitMQServer?: PowerPartial<IMidwayRabbitMQConfigurationOptions>;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
33
39
|
//# sourceMappingURL=interface.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/rabbitmq",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.10",
|
|
4
4
|
"description": "Midway Framework for rabbitmq",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
],
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@midwayjs/decorator": "^3.0.0-beta.
|
|
27
|
-
"@midwayjs/mock": "^3.0.0-beta.
|
|
26
|
+
"@midwayjs/decorator": "^3.0.0-beta.10",
|
|
27
|
+
"@midwayjs/mock": "^3.0.0-beta.10",
|
|
28
28
|
"@types/amqplib": "*",
|
|
29
29
|
"fs-extra": "^8.0.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@midwayjs/core": "^3.0.0-beta.
|
|
33
|
-
"@midwayjs/logger": "^3.0.0-beta.
|
|
32
|
+
"@midwayjs/core": "^3.0.0-beta.10",
|
|
33
|
+
"@midwayjs/logger": "^3.0.0-beta.10",
|
|
34
34
|
"amqp-connection-manager": "^3.2.2",
|
|
35
35
|
"amqplib": "*"
|
|
36
36
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=12"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "153870f2e2dd6b17673ec7591e49224a6bd51b36"
|
|
50
50
|
}
|