vendease-common
Advanced tools
Comparing version 2.1.13 to 2.1.14
@@ -5,2 +5,3 @@ "use strict"; | ||
const logger_1 = require("../../../util/logger"); | ||
const notifications_1 = require("../../../notifications"); | ||
class Listener { | ||
@@ -14,4 +15,4 @@ constructor(client) { | ||
this.consumMessage = (msg) => { | ||
console.log(this.onMessage); | ||
logger_1.logger.info(`Message received: ${this.subject} / ${this.queueGroupName}`); | ||
notifications_1.slackNotification.send(`Message received: ${this.subject} / ${this.queueGroupName}`, false); | ||
const parsedData = this.parseMessage(msg); | ||
@@ -18,0 +19,0 @@ logger_1.logger.info(`consuming message....`); |
@@ -5,2 +5,3 @@ "use strict"; | ||
const logger_1 = require("../../../util/logger"); | ||
const notifications_1 = require("../../../notifications"); | ||
class Publisher { | ||
@@ -11,10 +12,11 @@ constructor(client) { | ||
publish(data) { | ||
const self = this; | ||
logger_1.logger.info(`Publishing to ${self.subject}`); | ||
logger_1.logger.info(`Publishing to ${this.subject}`); | ||
return new Promise((resolve, reject) => { | ||
this.client.publish(self.subject, JSON.stringify(data), (err) => { | ||
this.client.publish(this.subject, JSON.stringify(data), (err) => { | ||
if (err) { | ||
notifications_1.slackNotification.send(err.message, true); | ||
return reject(err); | ||
} | ||
logger_1.logger.info(`Event published to subject [${self.subject}]`); | ||
logger_1.logger.info(`Event published to subject [${this.subject}]`); | ||
notifications_1.slackNotification.send(JSON.stringify(data), false); | ||
resolve(); | ||
@@ -21,0 +23,0 @@ }); |
{ | ||
"name": "vendease-common", | ||
"version": "2.1.13", | ||
"version": "2.1.14", | ||
"description": "", | ||
@@ -31,2 +31,3 @@ "main": "./build/index.js", | ||
"devDependencies": { | ||
"@faker-js/faker": "^8.0.2", | ||
"@types/jest": "^29.5.3", | ||
@@ -51,2 +52,3 @@ "@types/supertest": "^2.0.12", | ||
"@types/sequelize": "^4.28.15", | ||
"axios": "^1.5.0", | ||
"bcryptjs": "2.4.3", | ||
@@ -53,0 +55,0 @@ "cookie-session": "^1.4.0", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
431566
410
12058
0
28
8
+ Addedaxios@^1.5.0
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.2(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedform-data@4.0.0(transitive)
+ Addedproxy-from-env@1.1.0(transitive)