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

five-bells-shared

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

five-bells-shared - npm Package Compare versions

Comparing version 8.3.0 to 8.4.0

32

lib/config.js
'use strict'
const url = require('url')
const tweetnacl = require('tweetnacl')

@@ -112,4 +113,35 @@ /**

}
/**
* Load configuration of this process' keypair.
*/
parseKeyConfig () {
this.keys = {}
this.keys.ed25519 = {
secret: process.env.ED25519_SECRET_KEY,
public: process.env.ED25519_PUBLIC_KEY
}
let keyPair
if (!this.keys.ed25519.secret) {
if (process.env.NODE_ENV === 'production') {
throw new Error('No ED25519_SECRET_KEY provided.')
}
keyPair = tweetnacl.sign.keyPair()
this.keys.ed25519.secret = tweetnacl.util.encodeBase64(keyPair.secretKey)
this.keys.ed25519.public = tweetnacl.util.encodeBase64(keyPair.publicKey)
}
if (!this.keys.ed25519.public) {
if (!keyPair) {
keyPair = tweetnacl.sign.keyPair.fromSecretKey(
tweetnacl.util.decodeBase64(this.keys.ed25519.secret))
}
this.keys.ed25519.public =
tweetnacl.util.encodeBase64(keyPair.publicKey)
}
}
}
module.exports = Config

7

lib/db.js

@@ -8,6 +8,9 @@ 'use strict'

module.exports = function (Sequelize, log) {
if (typeof log === 'object') {
log.warn('DEPRECATED: Do not pass a logger to five-bells-shared Database constructor. Instead, please pass it via the logging config option.')
}
return class DB extends Sequelize {
constructor (uri, options) {
options = _.merge({
logging: log.debug,
logging: typeof log === 'object' ? log.debug : false,
omitNull: true

@@ -27,3 +30,3 @@ }, options)

sync () {
log.info('synchronizing database schema')
this.options.logging('synchronizing database schema')
return super.sync()

@@ -30,0 +33,0 @@ }

{
"name": "five-bells-shared",
"version": "8.3.0",
"version": "8.4.0",
"description": "Shared components for Five Bells projects.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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