New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wingbot-mongodb

Package Overview
Dependencies
Maintainers
2
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wingbot-mongodb - npm Package Compare versions

Comparing version 3.0.0-alpha.10 to 3.0.0

.github/workflows/test.yml

2

.nyc_output/processinfo/index.json

@@ -1,1 +0,1 @@

{"processes":{"feb4a098-7fff-42f7-b475-9771b6201741":{"parent":null,"children":[]}},"files":{"/Users/david/Development/wingbot-mongodb/src/AttachmentCache.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/AuditLogStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/BaseStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/BotConfigStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/BotTokenStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/tokenFactory.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/ChatLogStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/NotificationsStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"],"/Users/david/Development/wingbot-mongodb/src/StateStorage.js":["feb4a098-7fff-42f7-b475-9771b6201741"]},"externalIds":{}}
{"processes":{"0d879467-0e5f-4098-bea4-73c520af6dcd":{"parent":null,"children":[]}},"files":{"/Users/david/Development/wingbot-mongodb/src/BaseStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/defaultLogger.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/AttachmentCache.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/AuditLogStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/BotConfigStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/BotTokenStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/tokenFactory.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/ChatLogStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/NotificationsStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"],"/Users/david/Development/wingbot-mongodb/src/StateStorage.js":["0d879467-0e5f-4098-bea4-73c520af6dcd"]},"externalIds":{}}
{
"name": "wingbot-mongodb",
"version": "3.0.0-alpha.10",
"version": "3.0.0",
"description": "MongoDB storage for wingbot.ai",

@@ -12,3 +12,3 @@ "main": "src/main.js",

"test:coverage": "nyc --reporter=html mocha ./test && nyc report",
"test:coverage:threshold": "nyc check-coverage --lines 80 --functions 79 --branches 75",
"test:coverage:threshold": "nyc check-coverage --lines 80 --functions 78 --branches 75",
"test:lint": "eslint ./src/**/*.js ./bin/**/*.js ./test/**/*.js ",

@@ -39,13 +39,13 @@ "doc": "node ./bin/makeApiDoc.js"

"cross-env": "^7.0.3",
"eslint": "^7.2.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsdoc": "^37.0.3",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint": "^8.28.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-react": "^7.31.11",
"jsdoc-to-markdown": "^7.1.1",
"jsdoc-tsimport-plugin": "^1.0.5",
"mocha": "^9.2.2",
"mongodb": "^4.7.0",
"mocha": "^10.1.0",
"mongodb": "^4.12.1",
"nyc": "^15.1.0",

@@ -52,0 +52,0 @@ "wingbot": "^3.34.0"

@@ -306,3 +306,3 @@ /**

_wait (ms) {
return new Promise((r) => setTimeout(r, ms));
return new Promise((r) => { setTimeout(r, ms); });
}

@@ -309,0 +309,0 @@

@@ -241,11 +241,13 @@ /**

await this._fixtures.reduce((p, o) => p
.then(() => collection.insertOne(o))
.then(() => this._log.log(`DB.${this._collectionName} Inserted fixture doc to "${this._collectionName}"`))
.catch((e) => {
if (e.code !== 11000) {
this._log.error(`DB.${this._collectionName} failed to insert fixture doc to "${this._collectionName}"`, e);
}
}),
Promise.resolve());
await this._fixtures.reduce(
(p, o) => p
.then(() => collection.insertOne(o))
.then(() => this._log.log(`DB.${this._collectionName} Inserted fixture doc to "${this._collectionName}"`))
.catch((e) => {
if (e.code !== 11000) {
this._log.error(`DB.${this._collectionName} failed to insert fixture doc to "${this._collectionName}"`, e);
}
}),
Promise.resolve()
);
}

@@ -252,0 +254,0 @@ }

@@ -63,3 +63,3 @@ /*

*/
api (onUpdate = () => Promise.resolve(), acl) {
api (onUpdate = () => Promise.resolve(), acl = undefined) {
const storage = this;

@@ -66,0 +66,0 @@ return {

@@ -137,2 +137,3 @@ /*

// @ts-ignore
res = res.value;

@@ -154,2 +155,3 @@

// @ts-ignore
res = await c.findOne({ senderId, pageId });

@@ -171,3 +173,3 @@

_wait (ms) {
return new Promise((r) => setTimeout(r, ms));
return new Promise((r) => { setTimeout(r, ms); });
}

@@ -174,0 +176,0 @@

@@ -104,2 +104,13 @@ /**

this._collections = new Map();
if (isCosmo && !process.argv.some((a) => a.endsWith('mocha'))) {
process.nextTick(() => {
Promise.all([
this._getCollection(this.taksCollection),
this._getCollection(this.campaignsCollection),
this._getCollection(this.subscribtionsCollection)
])
.catch((e) => log.error('DB.<NotificationsStorage> index pre-heat FAILED', e));
});
}
}

@@ -247,4 +258,3 @@

} else {
this._log.error(`failed to create index ${i.options.name} on ${collection.collectionName}`);
throw e;
this._log.error(`failed to create index ${i.options.name} on ${collection.collectionName}`, e);
}

@@ -251,0 +261,0 @@ })));

@@ -9,8 +9,10 @@ 'use strict';

function tokenFactory () {
return new Promise((res, rej) => crypto.randomBytes(
255,
(err, buf) => (err ? rej(err) : res(buf.toString('base64')))
));
return new Promise((res, rej) => {
crypto.randomBytes(
255,
(err, buf) => (err ? rej(err) : res(buf.toString('base64')))
);
});
}
module.exports = tokenFactory;
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