serverless-dynamodb-local
Advanced tools
Comparing version
10
index.js
@@ -16,3 +16,3 @@ "use strict"; | ||
this.options = _.merge({ | ||
localPath: path.join(serverless.config.servicePath, '.dynamodb') | ||
localPath: serverless.config && path.join(serverless.config.servicePath, '.dynamodb') | ||
}, | ||
@@ -109,3 +109,3 @@ options | ||
const stage = this.options.stage || this.service.provider.stage; | ||
const stage = (this.options && this.options.stage) || (this.service.provider && this.service.provider.stage); | ||
if (this.config.stages && !this.config.stages.includes(stage)) { | ||
@@ -211,2 +211,8 @@ // don't do anything for this stage | ||
this.options = options; | ||
let dbPath = options.dbPath; | ||
if (dbPath) { | ||
options.dbPath = path.isAbsolute(dbPath) ? dbPath : path.join(this.serverless.config.servicePath, dbPath); | ||
} | ||
if (!options.noStart) { | ||
@@ -213,0 +219,0 @@ dynamodbLocal.start(options); |
{ | ||
"name": "serverless-dynamodb-local", | ||
"version": "0.2.34", | ||
"version": "0.2.35", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=4.0" |
44545
0.57%676
0.6%