loopback-component-migrate
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -32,9 +32,9 @@ var debug = require('debug')('loopback-component-migrate'); | ||
var migrationModelSettings = getSettings(migrationDef) | ||
var migrationMapModelSettings = getSettings(migrationMapDef) | ||
var migrationModelSettings = getSettings(migrationDef); | ||
var migrationMapModelSettings = getSettings(migrationMapDef); | ||
if (typeof options.acls !== 'object') { | ||
migrationModelSettings.acls = migrationMapModelSettings.acls = [] | ||
migrationModelSettings.acls = migrationMapModelSettings.acls = []; | ||
} else { | ||
migrationModelSettings.acls = migrationMapModelSettings.acls = options.acls | ||
migrationModelSettings.acls = migrationMapModelSettings.acls = options.acls; | ||
} | ||
@@ -41,0 +41,0 @@ |
@@ -119,3 +119,4 @@ 'use strict'; | ||
Migration.log.info(localScriptName, 'running.'); | ||
require(path.join(Migration.migrationsDir, localScriptName))[upOrDown](Migration.app, function(err) { | ||
const scriptPath = path.resolve(path.join(Migration.migrationsDir, localScriptName)); | ||
require(scriptPath)[upOrDown](Migration.app, function(err) { | ||
if (err) { | ||
@@ -122,0 +123,0 @@ Migration.log.error(localScriptName, 'error:'); |
{ | ||
"name": "loopback-component-migrate", | ||
"version": "0.1.4", | ||
"description": "Migration framework for Loopback.", | ||
"version": "0.1.3", | ||
"author": { | ||
@@ -46,3 +46,4 @@ "name": "Tom Kirkpatrick @mrfelton" | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"outdated": "npm outdated --depth=0" | ||
"outdated": "npm outdated --depth=0", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
@@ -61,2 +62,4 @@ "dependencies": { | ||
"chai": "latest", | ||
"condition-circle": "^1.5.0", | ||
"ghooks": "^1.3.2", | ||
"jscs": "latest", | ||
@@ -71,7 +74,17 @@ "jshint": "latest", | ||
"mocha": "latest", | ||
"mocha-sinon": "latest", | ||
"nyc": "latest", | ||
"semantic-release": "^4.3.5", | ||
"sinon": "latest", | ||
"sinon-chai": "latest" | ||
"sinon-chai": "latest", | ||
"validate-commit-msg": "^2.8.0" | ||
}, | ||
"config": { | ||
"ghooks": { | ||
"commit-msg": "validate-commit-msg", | ||
"pre-commit": "npm run lint" | ||
} | ||
}, | ||
"release": { | ||
"verifyConditions": "condition-circle" | ||
} | ||
} |
@@ -39,7 +39,7 @@ A library to add simple database migration support to loopback projects. | ||
[Boolean] : Directory containing migration scripts. *(default: server/migrations)* | ||
[String] : Directory containing migration scripts. *(default: server/migrations)* | ||
- `dataSource` | ||
[Boolean] : Datasource to connect the Migration and MigrationMap models to. *(default: db)* | ||
[String] : Datasource to connect the Migration and MigrationMap models to. *(default: db)* | ||
@@ -46,0 +46,0 @@ - `acls` |
@@ -13,3 +13,2 @@ 'use strict'; | ||
chai.use(require('sinon-chai')); | ||
require('mocha-sinon'); | ||
@@ -16,0 +15,0 @@ var path = require('path'); |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
32235
18