notification-processor
Advanced tools
Comparing version 1.7.2 to 1.8.0
@@ -13,5 +13,6 @@ (function() { | ||
DeadletterProcessor: require("./processors/deadletter") | ||
} | ||
}, | ||
Sources: require("./sources") | ||
}; | ||
}).call(this); |
@@ -39,13 +39,2 @@ (function() { | ||
}); | ||
if (this.source.shouldBeIgnored({ | ||
notification: notification | ||
})) { | ||
this._emitEvent("ignored", { | ||
context: context, | ||
id: id, | ||
notification: notification | ||
}); | ||
context.done(); | ||
return; | ||
} | ||
Promise.method(this.runner)(notification, context).tap((function(_this) { | ||
@@ -52,0 +41,0 @@ return function() { |
@@ -5,2 +5,3 @@ (function() { | ||
QueueSource: require("./queue.source"), | ||
TableSource: require("./table.source"), | ||
UnknownSource: require("./unknown.source") | ||
@@ -7,0 +8,0 @@ }; |
(function() { | ||
var DeadLetterSucceeded, DelayObserver, DidLastRetry, IgnoredUsers, MeliUsersThanCanNotRefreshAccessToken, MeliUsersThanNotBelongsToProducteca, _, create, ref, ref1; | ||
var DeadLetterSucceeded, DelayObserver, DidLastRetry, _, create; | ||
@@ -12,8 +12,2 @@ _ = require("lodash"); | ||
MeliUsersThanNotBelongsToProducteca = ((ref = process.env.MeliUsersThanNotBelongsToProducteca) != null ? ref.split(",") : void 0) || []; | ||
MeliUsersThanCanNotRefreshAccessToken = ((ref1 = process.env.MeliUsersThanCanNotRefreshAccessToken) != null ? ref1.split(",") : void 0) || []; | ||
IgnoredUsers = _.concat(MeliUsersThanNotBelongsToProducteca, MeliUsersThanCanNotRefreshAccessToken); | ||
create = function(Type) { | ||
@@ -31,4 +25,4 @@ return function(opts) { | ||
newNotification: function(arg) { | ||
var dequeueCount, insertionTime, message, ref2, ref3; | ||
(ref2 = arg.context, (ref3 = ref2.bindingData, insertionTime = ref3.insertionTime, dequeueCount = ref3.dequeueCount)), message = arg.message; | ||
var dequeueCount, insertionTime, message, ref, ref1; | ||
(ref = arg.context, (ref1 = ref.bindingData, insertionTime = ref1.insertionTime, dequeueCount = ref1.dequeueCount)), message = arg.message; | ||
return { | ||
@@ -43,7 +37,2 @@ message: message, | ||
}, | ||
shouldBeIgnored: function(arg) { | ||
var notification, ref2, ref3; | ||
notification = arg.notification; | ||
return _.includes(IgnoredUsers, notification != null ? (ref2 = notification.message) != null ? (ref3 = ref2.user_id) != null ? ref3.toString() : void 0 : void 0 : void 0); | ||
}, | ||
delayObserver: create(DelayObserver), | ||
@@ -50,0 +39,0 @@ deadLetterSucceeded: create(DeadLetterSucceeded), |
(function() { | ||
var DeadLetterSucceeded, DelayObserver, DidLastRetry, IgnoredUsers, MeliUsersThanCanNotRefreshAccessToken, MeliUsersThanNotBelongsToProducteca, _, create, ref, ref1; | ||
var DeadLetterSucceeded, DelayObserver, DidLastRetry, _, create; | ||
@@ -12,8 +12,2 @@ _ = require("lodash"); | ||
MeliUsersThanNotBelongsToProducteca = ((ref = process.env.MeliUsersThanNotBelongsToProducteca) != null ? ref.split(",") : void 0) || []; | ||
MeliUsersThanCanNotRefreshAccessToken = ((ref1 = process.env.MeliUsersThanCanNotRefreshAccessToken) != null ? ref1.split(",") : void 0) || []; | ||
IgnoredUsers = _.concat(MeliUsersThanNotBelongsToProducteca, MeliUsersThanCanNotRefreshAccessToken); | ||
create = function(Type) { | ||
@@ -31,4 +25,4 @@ return function(opts) { | ||
newNotification: function(arg) { | ||
var deliveryCount, enqueuedTimeUtc, message, ref2, ref3; | ||
(ref2 = arg.context, (ref3 = ref2.bindingData, enqueuedTimeUtc = ref3.enqueuedTimeUtc, deliveryCount = ref3.deliveryCount)), message = arg.message; | ||
var deliveryCount, enqueuedTimeUtc, message, ref, ref1; | ||
(ref = arg.context, (ref1 = ref.bindingData, enqueuedTimeUtc = ref1.enqueuedTimeUtc, deliveryCount = ref1.deliveryCount)), message = arg.message; | ||
return { | ||
@@ -43,7 +37,2 @@ message: _.omit(message, "Sent"), | ||
}, | ||
shouldBeIgnored: function(arg) { | ||
var notification, ref2, ref3; | ||
notification = arg.notification; | ||
return _.includes(IgnoredUsers, notification != null ? (ref2 = notification.message) != null ? (ref3 = ref2.CompanyId) != null ? ref3.toString() : void 0 : void 0 : void 0); | ||
}, | ||
delayObserver: create(DelayObserver), | ||
@@ -50,0 +39,0 @@ deadLetterSucceeded: create(DeadLetterSucceeded), |
@@ -15,5 +15,2 @@ (function() { | ||
}, | ||
shouldBeIgnored: function() { | ||
return false; | ||
}, | ||
delayObserver: function() { | ||
@@ -20,0 +17,0 @@ throw new Error("not supported `delayObserver`"); |
{ | ||
"name": "notification-processor", | ||
"version": "1.7.2", | ||
"version": "1.8.0", | ||
"description": "notification-processor", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
42
16
109134
1307