easywork-common-lib 1.0.481 → 1.0.483

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.
@@ -2,3 +2,4 @@ export * from "./queue/notifier.service";
2
2
  export * from "./queue/scheduler.service";
3
3
  export * from "./queue/queue.module";
4
4
  export * from "./queue/event.service";
5
+ export * from "./queue/queue.service";
@@ -18,4 +18,5 @@ __exportStar(require("./queue/notifier.service"), exports);
18
18
  __exportStar(require("./queue/scheduler.service"), exports);
19
19
  __exportStar(require("./queue/queue.module"), exports);
20
20
  __exportStar(require("./queue/event.service"), exports);
21
+ __exportStar(require("./queue/queue.service"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC;AACtC,wDAAsC"}
@@ -13,6 +13,7 @@ const notifier_service_1 = require("./notifier.service");
13
13
  const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
14
14
  const scheduler_service_1 = require("./scheduler.service");
15
15
  const event_service_1 = require("./event.service");
16
+ const queue_service_1 = require("./queue.service");
16
17
  let EasyQueueModule = EasyQueueModule_1 = class EasyQueueModule {
17
18
  static register(exchangeName, rabbitMQUri, notificationRoutingKey, schedulerRoutingKey, eventRoutingKey) {
18
19
  return {
@@ -48,8 +49,9 @@ let EasyQueueModule = EasyQueueModule_1 = class EasyQueueModule {
48
49
  notifier_service_1.EasyNotifierService,
49
50
  scheduler_service_1.EasySchedulerService,
50
51
  event_service_1.EasyEventService,
52
+ queue_service_1.EasyQueueService,
51
53
  ],
52
- exports: [notifier_service_1.EasyNotifierService, scheduler_service_1.EasySchedulerService, event_service_1.EasyEventService],
54
+ exports: [notifier_service_1.EasyNotifierService, scheduler_service_1.EasySchedulerService, event_service_1.EasyEventService, queue_service_1.EasyQueueService],
53
55
  };
54
56
  }
55
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"queue.module.js","sourceRoot":"","sources":["../../../src/modules/queue/queue.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAC5D,2DAA2D;AAC3D,mDAAmD;AAI5C,IAAM,eAAe,uBAArB,MAAM,eAAe;IAC1B,MAAM,CAAC,QAAQ,CACb,YAAoB,EACpB,WAAmB,EACnB,sBAA8B,EAC9B,mBAA2B,EAC3B,eAAuB;QAEvB,OAAO;YACL,MAAM,EAAE,iBAAe;YACvB,OAAO,EAAE;gBACP,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACrC,SAAS,EAAE;wBACT;4BACE,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBACd;qBACF;oBACD,GAAG,EAAE,WAAW;iBACjB,CAAC;aACH;YACD,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACvB;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,sBAAsB;iBACjC;gBACD;oBACE,OAAO,EAAE,uBAAuB;oBAChC,QAAQ,EAAE,mBAAmB;iBAC9B;gBACD;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,QAAQ,EAAE,eAAe;iBAC1B;gBACD,sCAAmB;gBACnB,wCAAoB;gBACpB,gCAAgB;aACjB;YACD,OAAO,EAAE,CAAC,sCAAmB,EAAE,wCAAoB,EAAE,gCAAgB,CAAC;SACvE,CAAC;IACJ,CAAC;CACF,CAAA;AA7CY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,eAAe,CA6C3B"}
1
+ {"version":3,"file":"queue.module.js","sourceRoot":"","sources":["../../../src/modules/queue/queue.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAC5D,2DAA2D;AAC3D,mDAAmD;AACnD,mDAAmD;AAI5C,IAAM,eAAe,uBAArB,MAAM,eAAe;IAC1B,MAAM,CAAC,QAAQ,CACb,YAAoB,EACpB,WAAmB,EACnB,sBAA8B,EAC9B,mBAA2B,EAC3B,eAAuB;QAEvB,OAAO;YACL,MAAM,EAAE,iBAAe;YACvB,OAAO,EAAE;gBACP,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACrC,SAAS,EAAE;wBACT;4BACE,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBACd;qBACF;oBACD,GAAG,EAAE,WAAW;iBACjB,CAAC;aACH;YACD,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACvB;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,sBAAsB;iBACjC;gBACD;oBACE,OAAO,EAAE,uBAAuB;oBAChC,QAAQ,EAAE,mBAAmB;iBAC9B;gBACD;oBACE,OAAO,EAAE,mBAAmB;oBAC5B,QAAQ,EAAE,eAAe;iBAC1B;gBACD,sCAAmB;gBACnB,wCAAoB;gBACpB,gCAAgB;gBAChB,gCAAgB;aACjB;YACD,OAAO,EAAE,CAAC,sCAAmB,EAAE,wCAAoB,EAAE,gCAAgB,EAAE,gCAAgB,CAAC;SACzF,CAAC;IACJ,CAAC;CACF,CAAA;AA9CY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,eAAe,CA8C3B"}
@@ -0,0 +1,7 @@
1
+ import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
2
+ export declare class EasyQueueService {
3
+ private readonly amqpConnection;
4
+ private readonly exchangeName;
5
+ constructor(amqpConnection: AmqpConnection, exchangeName: string);
6
+ publishMessage(routingKey: string, message: any): Promise<void>;
7
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EasyQueueService = void 0;
16
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
17
+ const common_1 = require("@nestjs/common");
18
+ const logger = new common_1.Logger("EasyQueueService");
19
+ let EasyQueueService = class EasyQueueService {
20
+ amqpConnection;
21
+ exchangeName;
22
+ constructor(amqpConnection, exchangeName) {
23
+ this.amqpConnection = amqpConnection;
24
+ this.exchangeName = exchangeName;
25
+ }
26
+ async publishMessage(routingKey, message) {
27
+ logger.debug(`Publishing Message on the queue...`, this.exchangeName, routingKey);
28
+ await this.amqpConnection.publish(this.exchangeName, routingKey, message);
29
+ }
30
+ };
31
+ exports.EasyQueueService = EasyQueueService;
32
+ exports.EasyQueueService = EasyQueueService = __decorate([
33
+ (0, common_1.Injectable)(),
34
+ __param(1, (0, common_1.Inject)('EXCHANGE_NAME')),
35
+ __metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String])
36
+ ], EasyQueueService);
37
+ //# sourceMappingURL=queue.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.service.js","sourceRoot":"","sources":["../../../src/modules/queue/queue.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAE5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAkB,CAAC,CAAC;AAGvC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAEJ;IACyB;IAF9C,YACqB,cAA8B,EACL,YAAoB;QAD7C,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;IAC9D,CAAC;IAEL,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,OAAY;QACnD,MAAM,CAAC,KAAK,CAAC,oCAAoC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAClF,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACJ,CAAA;AAVY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAIJ,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;qCADS,gCAAc;GAF1C,gBAAgB,CAU5B"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "easywork-common-lib",
3
- "version": "1.0.481",
3
+ "version": "1.0.483",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "tsc && cpx-fixed src/**/*.proto dist/",
8
- "bump": "./scripts/bump.sh",
8
+ "bump": "sh ./scripts/bump.sh",
9
9
  "bump-win": "cross-env ./scripts/bump.sh"
10
10
  },
11
11
  "repository": {