exodus-framework 2.0.711 → 2.0.713

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.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/app/settings.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B,cAAM,YAAY;IAChB,WAAW,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAM;IAChD,cAAc,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAM;IACtD,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,CAAM;IACpC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAM;IAC1C,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,CAAM;IAClC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAM;IAC9B,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAM;IAE5C,QAAQ,EAAE,eAAe,CAgFvB;IACF,QAAQ,EAAE,eAAe,CAAC;;IAM1B,SAAS,CAAC,aAAa;IAavB,aAAa;IAGb,iBAAiB;IAGjB,QAAQ;IAGR,WAAW;IAGX,OAAO;IAGP,SAAS;IAGT,YAAY;CAGb;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/app/settings.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B,cAAM,YAAY;IAChB,WAAW,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAM;IAChD,cAAc,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAM;IACtD,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,CAAM;IACpC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAM;IAC1C,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,CAAM;IAClC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAM;IAC9B,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAM;IAE5C,QAAQ,EAAE,eAAe,CAmFvB;IACF,QAAQ,EAAE,eAAe,CAAC;;IAM1B,SAAS,CAAC,aAAa;IAavB,aAAa;IAGb,iBAAiB;IAGjB,QAAQ;IAGR,WAAW;IAGX,OAAO;IAGP,SAAS;IAGT,YAAY;CAGb;AAED,eAAe,YAAY,CAAC"}
@@ -91,7 +91,10 @@ class CoreSettings {
91
91
  messaging: {
92
92
  user: process.env.MSG_USER || 'guest',
93
93
  pass: process.env.MSG_PASS || 'guest',
94
- host: process.env.MSG_HOST || 'localhost'
94
+ host: process.env.MSG_HOST || 'localhost',
95
+ exchanges: {
96
+ main: 'exodus.messaging.events.exchange'
97
+ }
95
98
  }
96
99
  };
97
100
  settings;
@@ -55,6 +55,9 @@ export type TmessagingSettings = {
55
55
  user: string;
56
56
  pass: string;
57
57
  host: string;
58
+ exchanges: {
59
+ main: string;
60
+ } & Record<string, any>;
58
61
  };
59
62
  export type GeneralSettings = {
60
63
  application: TApplicationSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/contracts/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MA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EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,kBAAkB,CAAC;CAC/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rabitmq.d.ts","sourceRoot":"","sources":["../../src/services/rabitmq.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAEL,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAYhD,cAAM,eAAgB,SAAQ,OAAQ,YAAW,QAAQ;IACvD,UAAU,EAAG,UAAU,CAAC;IACxB,OAAO,EAAG,OAAO,CAAC;IAClB,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,UAAU,CAA2B;;IAMvC,IAAI;IAMV,eAAe;IAKT,OAAO;IAmBP,WAAW,CAAC,CAAC,SAAS,MAAM,oBAAoB,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAWzF,gBAAgB,CAAC,CAAC,SAAS,MAAM,oBAAoB,EACzD,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IA2BrC,cAAc,CAAC,MAAM,EAAE,wBAAwB;CAGhD;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"rabitmq.d.ts","sourceRoot":"","sources":["../../src/services/rabitmq.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAEL,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAe,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAYhD,cAAM,eAAgB,SAAQ,OAAQ,YAAW,QAAQ;IACvD,UAAU,EAAG,UAAU,CAAC;IACxB,OAAO,EAAG,OAAO,CAAC;IAClB,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,UAAU,CAA2B;;IAMvC,IAAI;IAMV,eAAe;IAKT,OAAO;IAuBP,WAAW,CAAC,CAAC,SAAS,MAAM,oBAAoB,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAmBzF,gBAAgB,CAAC,CAAC,SAAS,MAAM,oBAAoB,EACzD,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IA2BrC,cAAc,CAAC,MAAM,EAAE,wBAAwB;CAGhD;AAED,eAAe,eAAe,CAAC"}
@@ -48,6 +48,9 @@ class RabbitMQService extends _service.default {
48
48
  this.connection = await _amqplib.default.connect(`amqp://${_app.Core.settings.getMessaging().user}:${_app.Core.settings.getMessaging().pass}@${_app.Core.settings.getMessaging().host}:5672`);
49
49
  this.log(`✅ Rabbit MQ Connection is ready`);
50
50
  this.channel = await this.connection.createChannel();
51
+ this.channel.assertExchange(_app.Core.settings.getMessaging().exchanges.main, 'topic', {
52
+ durable: false
53
+ });
51
54
  this.log(`🛸 Created RabbitMQ Channel successfully`);
52
55
  this.registerHandles();
53
56
  } catch (error) {
@@ -61,7 +64,12 @@ class RabbitMQService extends _service.default {
61
64
  if (!this.channel) {
62
65
  await this.connect();
63
66
  }
64
- this.channel.sendToQueue(queue, Buffer.from(JSON.stringify(data)));
67
+ this.channel.publish(_app.Core.settings.getMessaging().exchanges.main, queue, Buffer.from(JSON.stringify(data)));
68
+
69
+ /* this.channel.sendToQueue(queue, Buffer.from(JSON.stringify(data)), {
70
+ messageId: new Date().toDateString(),
71
+ persistent: true
72
+ }); */
65
73
  } catch (error) {
66
74
  new _error.ApplicationException('Houve um erro no envio de uma mensagem para o rabitmq', error);
67
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodus-framework",
3
- "version": "2.0.711",
3
+ "version": "2.0.713",
4
4
  "description": "Exodus Framework",
5
5
  "author": "jhownpaixao",
6
6
  "license": "ISC",