Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodemailer-sequelize-queue

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemailer-sequelize-queue - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

dist/utils/generateRandom.d.ts

3

dist/examples/index.js

@@ -38,2 +38,3 @@ "use strict";

maxAttempts: 2,
logging: true,
});

@@ -57,2 +58,2 @@ // Run cron schedule for sending mail (Only one time in root of the system)

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXhhbXBsZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBK0M7QUFDL0Msb0RBQTJCO0FBQzNCLGdCQUFNLENBQUMsTUFBTSxFQUFFLENBQUE7QUFFZixNQUFNLElBQUksR0FBRztJQUNYLElBQUksRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVM7SUFDM0IsSUFBSSxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUztDQUM1QixDQUFBO0FBRUQsZ0VBQWdFO0FBQ2hFLE1BQU0sU0FBUyxHQUFHO0lBQ2hCLElBQUksRUFBRSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVM7SUFDM0IsSUFBSSxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsR0FBRztJQUN6RCxNQUFNLEVBQUUsSUFBSTtJQUNaLElBQUksRUFBRSxJQUFJO0NBQ1gsQ0FBQTtBQUVELE1BQU0sYUFBYSxHQUFHO0lBQ3BCLCtEQUErRDt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pbmc6IHRydWUsXG59KVxuXG4vLyAgUnVuIGNyb24gc2NoZWR1bGUgZm9yIHNlbmRpbmcgbWFpbCAoT25seSBvbmUgdGltZSBpbiByb290IG9mIHRoZSBzeXN0ZW0pXG5xdWV1ZS5pbml0U2NoZWR1bGVyKClcblxuLy8gQWRkIG1haWwgdG8gcXVldWVcbnF1ZXVlLnF1ZXVlTWFpbCh7XG4gIGVtYWlsX2Zyb206ICd0ZXN0QGdtYWlsLmNvbScsXG4gIGVtYWlsX3RvOiAndGVzdEBnbWFpbC5jb20nLFxuICBzdWJqZWN0OiAndGVzdCBzdWJqZWN0JyxcbiAgaHRtbDogJ3Rlc3QgbWVzc2FnZScsXG5cbiAgYXR0YWNobWVudHM6IFtcbiAgICB7XG4gICAgICAvLyBOb3QgcmVxdWlyZWQgKHNlZSBOb2RlbWFpbGVyIGZpbGVuYW1lIHByb3ApXG4gICAgICBmaWxlbmFtZTogJ2ZpbGUuanBnJyxcbiAgICAgIC8vIExvY2FsIG9yIHJlbW90ZSB1cmwgKHNlZSBOb2RlbWFpbGVyIHBhdGggcHJvcClcbiAgICAgIHBhdGg6ICdodHRwczovL3BpY3N1bS5waG90b3MvaWQvMjM3LzIwMC8zMDAnLFxuICAgIH0sXG4gIF0sXG59KVxuIl19

@@ -7,2 +7,3 @@ import { AddQueueModelAttributes, IQueueModel } from './QueueModel';

private dbInisializated;
private scheduled;
private smtpCredentials;

@@ -9,0 +10,0 @@ private options;

@@ -14,2 +14,3 @@ "use strict";

this.options = options;
this.scheduled = false;
}

@@ -29,2 +30,7 @@ async initDatabase(dbConfigInstance) {

}
console.log('initScheduler - - - --- - --', this.scheduled);
if (this.scheduled) {
return;
}
this.scheduled = true;
new Scheduler_1.default(this.smtpCredentials, this.queueModel, this.options.expression, this.options.maxAttempts, this.options.logging);

@@ -53,2 +59,2 @@ }

exports.default = NodemailerSequelizeQueue;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZ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or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments) */
path: string | Url | undefined;
path?: string | Url;
url?: string | Url;
}

@@ -19,0 +20,0 @@ export declare type Message = {

@@ -14,3 +14,5 @@ "use strict";

async sendMail(message) {
console.log('Sending mail', message);
const mailResult = await this.transporter.sendMail(message);
console.log('mailResult', mailResult);
return mailResult;

@@ -20,2 +22,2 @@ }

exports.default = Mailer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWFpbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL01haWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDREQUFxRTtBQUdyRSxNQUFxQixNQUFNO0lBR3pCLFlBQVksUUFBYyxFQUFFLFNBQXVCO1FBQ2pELElBQUksQ0FBQyxXQUFXLEdBQUcsU0FBUztZQUMxQixDQUFDLENBQUMsb0JBQVUsQ0FBQyxlQUFlLENBQUMsU0FBUyxFQUFFLFFBQVEsQ0FBQztZQUNqRCxDQUFDLENBQUMsb0JBQVUsQ0FBQyxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUE7SUFDMUMsQ0FBQztJQUVELEtBQUssQ0FBQyxRQUFRLENBQUMsT0FBZ0I7UUFDN0IsTUFBTSxVQUFVLEdBQW9CLE1BQU0sSUFBSSxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLENBQUE7UUFDNUUsT0FBTyxVQUFVLENBQUE7SUFDbkIsQ0FBQztDQUNGO0FBYkQseUJBYUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbm9kZW1haWxlciwgeyBUcmFuc3BvcnRlciwgU2VudE1lc3NhZ2VJbmZvIH0gZnJvbSAnbm9kZW1haWxlcidcbmltcG9ydCB7IFVybCB9IGZyb20gJ3VybCdcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTWFpbGVyIGltcGxlb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W50TWVzc2FnZUluZm8+XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgQXR0YWNobWVudCB7XG4gIC8qKiBmaWxlbmFtZSB0byBiZSByZXBvcnRlZCBhcyB0aGUgbmFtZSBvZiB0aGUgYXR0YWNoZWQgZmlsZSwgdXNlIG9mIHVuaWNvZGUgaXMgYWxsb3dlZC4gSWYgeW91IGRvIG5vdCB3YW50IHRvIHVzZSBhIGZpbGVuYW1lLCBzZXQgdGhpcyB2YWx1ZSBhcyBmYWxzZSwgb3RoZXJ3aXNlIGEgZmlsZW5hbWUgaXMgZ2VuZXJhdGVkIGF1dG9tYXRpY2FsbHkgKi9cbiAgZmlsZW5hbWU/OiBzdHJpbmcgfCBmYWxzZVxuICAvKiogcGF0aCB0byBhIGZpbGUgb3IgYW4gVVJMIChkYXRhIHVyaXMgYXJlIGFsbG93ZWQgYXMgd2VsbCkgaWYgeW91IHdhbnQgdG8gc3RyZWFtIHRoZSBmaWxlIGluc3RlYWQgb2YgaW5jbHVkaW5nIGl0IChiZXR0ZXIgZm9yIGxhcmdlciBhdHRhY2htZW50cykgKi9cbiAgcGF0aD86IHN0cmluZyB8IFVybFxuICB1cmw/OiBzdHJpbmcgfCBVcmxcbn1cblxuZXhwb3J0IHR5cGUgTWVzc2FnZSA9IHtcbiAgZnJvbTogc3RyaW5nXG4gIHRvOiBzdHJpbmdcbiAgc3ViamVjdDogc3RyaW5nXG4gIGh0bWw6IHN0cmluZ1xuICBhdHRhY2htZW50cz86IEF0dGFjaG1lbnRbXVxufVxuIl19

@@ -8,5 +8,4 @@ import { IMailer } from './Mailer';

logging: boolean;
lockType?: LockType;
private queueModel;
constructor(smtpCredentials: any, queueModel: IQueueModelStatic, expression?: string, maxAttemps?: number, logging?: boolean, lockType?: LockType);
constructor(smtpCredentials: any, queueModel: IQueueModelStatic, expression?: string, maxAttemps?: number, logging?: boolean);
private runJobs;

@@ -13,0 +12,0 @@ private processQueueMails;

@@ -6,8 +6,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const node_cron_1 = __importDefault(require("node-cron"));
// import cron from 'node-cron'
const cron_1 = require("cron");
const sequelize_1 = require("sequelize");
const Mailer_1 = __importDefault(require("./Mailer"));
const logger_1 = __importDefault(require("./utils/logger"));
const generateRandom_1 = require("./utils/generateRandom");
class Scheduler {
constructor(smtpCredentials, queueModel, expression = '0 */1 * * *', maxAttemps = -1, logging = false, lockType) {
constructor(smtpCredentials, queueModel, expression = '0 */1 * * *', maxAttemps = -1, logging = false) {
if (!isCronValid(expression)) {

@@ -19,11 +21,14 @@ throw new Error('Cron expression is invalid');

this.logging = logging;
console.log('Scheduler - - - --- - --', this.expression);
this.runJobs();
this.queueModel = queueModel;
this.mailer = new Mailer_1.default(smtpCredentials);
this.lockType = lockType;
}
async runJobs() {
this.log(`Initialising cron schedule ${this.expression}`);
node_cron_1.default.schedule(this.expression, async () => {
this.processQueueMails().catch((e) => {
await new Promise((resolve) => setTimeout(resolve, (0, generateRandom_1.generateRandom)(500, 2500)));
// eslint-disable-next-line @typescript-eslint/no-this-alias
const self = this;
const job = new cron_1.CronJob(this.expression, function () {
self.processQueueMails().catch((e) => {
logger_1.default.error('Cron failed', {

@@ -35,6 +40,20 @@ message: e.message,

});
console.log('After job instantiation');
job.start();
// cron.schedule(this.expression, async () => {
// // if scheduler runing
// this.processQueueMails().catch((e) => {
// logger.error('Cron failed', {
// message: e.message,
// stack: e.stack,
// })
// })
// })
}
async processQueueMails() {
const options = {};
const transaction = await this.queueModel.sequelize.transaction();
const options = {
transaction: transaction,
lock: true,
};
try {

@@ -46,6 +65,5 @@ if (this.maxAttemps > 0) {

},
transaction,
lock: true,
};
}
console.log('processQueueMails - - - --- - --');
const mails = await this.queueModel.findAll(options);

@@ -59,12 +77,7 @@ // Remove from queue(prevents duplicate sends with multiple workers)

}
await Promise.all(models);
await transaction.commit();
const results = await Promise.all(models);
const ids = results.map((r) => r.id);
await this.queueModel.destroy({
where: {
id: ids,
},
});
}
catch (e) {
console.log(e);
await transaction.rollback();

@@ -81,7 +94,22 @@ throw e;

}
console.log(`Mail sent to ${model.email_to}`, 'debug');
// Remove from queue
await this.queueModel.destroy({
where: {
id: model.id,
},
});
this.log(`Deleted mail from queue ${model.id}`, 'debug');
return model;
}
catch (e) {
logger_1.default.error(`Error sending mail to ${model.email_to}`, model);
logger_1.default.error(`Error sending mail to ${model.email_to}`, { model, error: e });
model.update({
last_error: JSON.stringify(e),
attempts: model.attempts + 1,
}, {
where: {
id: model.id,
},
});
return model;

@@ -96,2 +124,3 @@ }

html: mail.html,
attachments: mail.attachments,
};

@@ -111,2 +140,2 @@ return message;

exports.default = Scheduler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2NoZWR1bGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1NjaGVkdWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDBEQUE0QjtBQUM1Qix5Q0FBOEI7QUFDOUIsc0RBQW1EO0FBRW5ELDREQUFtQztBQUVuQyxNQUFNLFNBQVM7SUFTYixZQUNFLGVBQW9CLEVBQ3BCLFVBQTZCLEVBQzdCLFVBQVUsR0FBRyxhQUFhLEVBQzFCLFVBQVUsR0FBRyxDQUFDLENBQUMsRUFDZixPQUFPLEdBQUcsS0FBSyxFQUNmLFFBQW1CO1FBRW5CLElBQUksQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0FBQyw0QkFBNEIsQ0FBQyxDQUFBO1NBQzlDO1FBQ0QsSUFBSSxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUE7UUFDNUIsSUFBSSxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUE7UUFDNUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUE7UUFDdEIsSUFBSSxDQUFDLE9BQU8sRUFBRSxD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zAtOV0pfFxcKlxcLyhbMC05XXwxWzAtOV18MlswLTldfDNbMC05XXw0WzAtOV18NVswLTldKSkgKFxcKnwoWzAtOV18MVswLTldfDJbMC0zXSl8XFwqXFwvKFswLTldfDFbMC05XXwyWzAtM10pKSAoXFwqfChbMS05XXwxWzAtOV18MlswLTldfDNbMC0xXSl8XFwqXFwvKFsxLTldfDFbMC05XXwyWzAtOV18M1swLTFdKSkgKFxcKnwoWzEtOV18MVswLTJdKXxcXCpcXC8oWzEtOV18MVswLTJdKSkgKFxcKnwoWzAtNl0pfFxcKlxcLyhbMC02XSkpJC9cbiAgKVxuICByZXR1cm4gY3JvbnJlZ2V4LnRlc3QoZnJlcSlcbn1cblxuZXhwb3J0IHR5cGUgTG9ja1R5cGUgPSAndHJhbnNhY3Rpb24nXG5cbmV4cG9ydCBkZWZhdWx0IFNjaGVkdWxlclxuIl19
{
"name": "nodemailer-sequelize-queue",
"version": "0.0.16",
"version": "0.0.17",
"description": "Queue for mails with nodemailer and cron scheduler",

@@ -24,3 +24,3 @@ "main": "./dist/index.js",

"release": "npm run build && standard-version",
"release:publish": "git add . && npm run release && git push --follow-tags origin main && npm publish"
"release:publish": "git add . && npm run release && git push --follow-tags origin master && npm publish"
},

@@ -52,2 +52,3 @@ "repository": {

"devDependencies": {
"@types/cron": "^2.0.1",
"@types/node": "^10.17.60",

@@ -79,2 +80,3 @@ "@types/prettier": "2.6.0",

"@types/winston": "^2.4.4",
"cron": "^2.3.0",
"node-cron": "^3.0.2",

@@ -81,0 +83,0 @@ "nodemailer": "^6.7.8",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc