serverless-dynamodb
Advanced tools
Comparing version 0.2.46 to 0.2.47
22
index.js
@@ -273,3 +273,3 @@ "use strict"; | ||
(options.noStart ? Promise.resolve() : dynamodbLocal.start(options)) | ||
return (options.noStart ? Promise.resolve() : dynamodbLocal.start(options)) | ||
.then(() => options.migrate && this.migrateHandler()) | ||
@@ -398,14 +398,12 @@ .then(() => options.seed && this.seedHandler()); | ||
await dynamodb.raw.send(new CreateTableCommand(migration)).catch(err => { | ||
if (err) { | ||
if (err.name === 'ResourceInUseException') { | ||
this.serverlessLog(`DynamoDB - Warn - table ${migration.TableName} already exists`); | ||
resolve(); | ||
} else { | ||
this.serverlessLog("DynamoDB - Error - ", err); | ||
reject(err); | ||
} | ||
await dynamodb.raw.send(new CreateTableCommand(migration)).then(() => { | ||
this.serverlessLog("DynamoDB - created table " + migration.TableName); | ||
return migration; | ||
}).catch((err) => { | ||
if (err.name === 'ResourceInUseException') { | ||
this.serverlessLog(`DynamoDB - Warn - table ${migration.TableName} already exists`); | ||
return; | ||
} else { | ||
this.serverlessLog("DynamoDB - created table " + migration.TableName); | ||
resolve(migration); | ||
this.serverlessLog("DynamoDB - Error - ", err); | ||
throw err; | ||
} | ||
@@ -412,0 +410,0 @@ }) |
{ | ||
"name": "serverless-dynamodb", | ||
"version": "0.2.46", | ||
"version": "0.2.47", | ||
"description": "Serverless plugin to run DynamoDB local", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
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
49965
749