easywork-common-lib 1.0.231 → 1.0.232
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.
|
@@ -5,14 +5,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var NotifierModule_1;
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.NotifierModule = void 0;
|
|
10
11
|
const common_1 = require("@nestjs/common");
|
|
11
12
|
const notifier_service_1 = require("./notifier.service");
|
|
12
|
-
|
|
13
|
+
const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
|
|
14
|
+
let NotifierModule = NotifierModule_1 = class NotifierModule {
|
|
15
|
+
static register(exchangeName, routingKey) {
|
|
16
|
+
return {
|
|
17
|
+
module: NotifierModule_1,
|
|
18
|
+
providers: [
|
|
19
|
+
{
|
|
20
|
+
provide: 'EXCHANGE_NAME',
|
|
21
|
+
useValue: exchangeName,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
provide: 'ROUTING_KEY',
|
|
25
|
+
useValue: routingKey,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
provide: notifier_service_1.NotifierService,
|
|
29
|
+
useFactory: (amqpConnection, exchangeName, routingKey) => new notifier_service_1.NotifierService(amqpConnection, exchangeName, routingKey),
|
|
30
|
+
inject: [nestjs_rabbitmq_1.AmqpConnection, 'EXCHANGE_NAME', 'ROUTING_KEY'],
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
exports: [notifier_service_1.NotifierService],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
13
36
|
};
|
|
14
37
|
exports.NotifierModule = NotifierModule;
|
|
15
|
-
exports.NotifierModule = NotifierModule = __decorate([
|
|
38
|
+
exports.NotifierModule = NotifierModule = NotifierModule_1 = __decorate([
|
|
16
39
|
(0, common_1.Module)({
|
|
17
40
|
providers: [notifier_service_1.NotifierService],
|
|
18
41
|
exports: [notifier_service_1.NotifierService],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifier.module.js","sourceRoot":"","sources":["../../../src/modules/notifier/notifier.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notifier.module.js","sourceRoot":"","sources":["../../../src/modules/notifier/notifier.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,yDAAqD;AACrD,gEAA4D;AAMrD,IAAM,cAAc,sBAApB,MAAM,cAAc;IACvB,MAAM,CAAC,QAAQ,CAAC,YAAoB,EAAE,UAAkB;QACpD,OAAO;YACH,MAAM,EAAE,gBAAc;YACtB,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACzB;gBACD;oBACI,OAAO,EAAE,aAAa;oBACtB,QAAQ,EAAE,UAAU;iBACvB;gBACD;oBACI,OAAO,EAAE,kCAAe;oBACxB,UAAU,EAAE,CACR,cAA8B,EAC9B,YAAoB,EACpB,UAAkB,EACpB,EAAE,CAAC,IAAI,kCAAe,CAAC,cAAc,EAAE,YAAY,EAAE,UAAU,CAAC;oBAClE,MAAM,EAAE,CAAC,gCAAc,EAAE,eAAe,EAAE,aAAa,CAAC;iBAC3D;aACJ;YACD,OAAO,EAAE,CAAC,kCAAe,CAAC;SAC7B,CAAC;IACN,CAAC;CACJ,CAAA;AA1BY,wCAAc;yBAAd,cAAc;IAJ1B,IAAA,eAAM,EAAC;QACJ,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;KAC7B,CAAC;GACW,cAAc,CA0B1B"}
|