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

errsole-sequelize

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errsole-sequelize - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

23

lib/index.js

@@ -41,4 +41,5 @@ /**

const bcrypt = require('bcryptjs');
const { EventEmitter } = require('events');
const { Sequelize, DataTypes } = require('sequelize');
const bcrypt = require('bcryptjs');

@@ -48,3 +49,3 @@ const packageJSON = require('../package.json');

class ErrsoleSequelize {
class ErrsoleSequelize extends EventEmitter {
/**

@@ -57,8 +58,13 @@ * Constructs an instance of the database handler using Sequelize.

constructor (options = {}) {
super();
if (!options.logging) options.logging = false;
this.name = packageJSON.name;
this.version = packageJSON.version || '0.0.0';
this.dialect = options.dialect;
this.sequelize = new Sequelize(options);
this.isConnectionInProgress = true;
this.defineModels();
this.syncModels();
this.name = packageJSON.name;
this.version = packageJSON.version || '0.0.0';
this.dialect = options.dialect;
}

@@ -148,2 +154,4 @@

await this.sequelize.sync();
this.isConnectionInProgress = false;
this.emit('ready');
}

@@ -161,3 +169,6 @@

async postLogs (logEntries) {
await this.errsoleLogs.bulkCreate(logEntries);
while (this.isConnectionInProgress) {
await new Promise(resolve => setTimeout(resolve, 100));
}
await this.errsoleLogs.bulkCreate(logEntries, { logging: false });
return {};

@@ -164,0 +175,0 @@ }

{
"name": "errsole-sequelize",
"version": "1.1.0",
"version": "1.1.1",
"description": "Sequelize storage plugin for Errsole",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -9,3 +9,3 @@ # errsole-sequelize

If your application uses Oracle, PostgreSQL, MySQL, MariaDB, SQLite, or SQL Server as its database, or if you prefer to store your application logs in these databases, you should install the "errsole-sequelize" module along with "errsole". This combination enables you to store your app logs in your chosen database.
If your app uses Oracle, PostgreSQL, MySQL, MariaDB, SQLite, or SQL Server as its database, or if you prefer to store your app logs in one of these databases, you should install the "errsole-sequelize" module along with "errsole". This combination enables you to store your app logs in your chosen database.

@@ -12,0 +12,0 @@ ## Full Documentation

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