clever-orm
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -6,3 +6,4 @@ 'use strict'; | ||
, pkgJson = require( path.resolve( path.join( __dirname, '..', '..', 'package.json') ) ) | ||
, odmEnabled = pkgJson.bundledDependencies.indexOf( 'clever-odm' ) !== -1; | ||
, odmEnabled = pkgJson.bundledDependencies.indexOf( 'clever-odm' ) !== -1 | ||
, _ = require( 'underscore' ); | ||
@@ -101,11 +102,9 @@ module.exports = function( grunt ) { | ||
grunt.registerTask( 'cleverOrmCreateConfig', 'Creates a .json config file for database credentials', function ( ) { | ||
var conf = grunt.config( 'cleverstackorm' ) | ||
, obj = { | ||
'clever-orm': { db: { options: {} } } | ||
} | ||
, env = process.env.NODE_ENV ? process.env.NODE_ENV.toLowerCase() : 'local' | ||
, file = path.join( process.cwd( ), 'config', env + '.json' ); | ||
var conf = grunt.config( 'cleverstackorm' ) | ||
, obj = require( path.resolve( path.join( process.cwd(), 'modules', 'clever-orm', 'config', 'default.json' ) ) ) | ||
, env = process.env.NODE_ENV ? process.env.NODE_ENV.toLowerCase() : 'local' | ||
, file = path.join( process.cwd( ), 'config', env + '.json' ); | ||
if ( fs.existsSync( file ) ) { | ||
obj = require( file ); | ||
obj = _.extend( obj, require( file ) ); | ||
} | ||
@@ -112,0 +111,0 @@ |
@@ -94,8 +94,8 @@ var injector = require( 'injector' ) | ||
this._model[ accessor ]( where, options ) | ||
.success( function( _model ) { | ||
.then( function( _model ) { | ||
resolve( _model ); | ||
}) | ||
.error( reject ); | ||
.catch( reject ); | ||
} else { | ||
this._model[ accessor ].success( resolve ).error( reject ); | ||
this._model[ accessor ].then( resolve ).catch( reject ); | ||
} | ||
@@ -102,0 +102,0 @@ }.bind( this )) |
{ | ||
"name": "clever-orm", | ||
"description": "CleverStack ORM (SQL) Module", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"main": "module.js", | ||
@@ -6,0 +6,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55580
993
14