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

blacktide

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blacktide - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

4

lib/index.js

@@ -12,3 +12,3 @@

if ( config.mongodb )
if ( config.mongoDB )
{

@@ -18,3 +18,3 @@

{
link: config.mongodb
link: config.mongoDB
};

@@ -21,0 +21,0 @@

@@ -22,58 +22,60 @@

async.waterfall( [
async
.waterfall( [
( done ) => {
( done ) => {
fs.readdir( params.models, ( err, files ) => {
fs
.readdir( params.models, ( err, files ) => {
if ( err )
{
return done( err );
}
if ( err )
{
return done( err );
}
async
.each( files, ( file, next ) => {
async
.each( files, ( file, next ) => {
const data = require( path.join( process.cwd(), params.models, file ) );
const data = require( path.join( process.cwd(), params.models, file ) );
if ( ! data.name )
{
return next( 'model has no name property' );
}
if ( ! data.name )
{
return next( 'model has no name property' );
}
if ( ! data.params )
{
return next( 'model has no params property' );
}
if ( ! data.params )
{
return next( 'model has no params property' );
}
const schema = mongoose.Schema( data.params );
const schema = mongoose.Schema( data.params );
if ( data.methods )
{
_.each( data.methods, ( fn, name ) => ( schema.methods[ name ] = fn ) );
}
if ( data.methods )
{
_.each( data.methods, ( fn, name ) => ( schema.methods[ name ] = fn ) );
}
if ( data.statics )
{
_.each( data.statics, ( fn, name ) => ( schema.statics[ name ] = fn ) );
}
if ( data.statics )
{
_.each( data.statics, ( fn, name ) => ( schema.statics[ name ] = fn ) );
}
mongoose.model( data.name, schema );
mongoose.model( data.name, schema );
return next();
return next();
}, done );
}, done );
} );
} );
}
}
], ( err ) => {
], ( err ) => {
if ( err )
{
throw new Error( err );
}
if ( err )
{
throw new Error( err );
}
} );
} );

@@ -80,0 +82,0 @@ }

{
"name": "blacktide",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "Lightweight back-end framework for Micro-services and APIs with added security",

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

@@ -24,2 +24,8 @@

## How to run with pm2
`$ NODE_ENV=production pm2 start services/ --name 'myapp'`
## Getting started (with blacktide-cli)
## Usage

@@ -26,0 +32,0 @@

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