File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,13 @@ class ServerlessDynamodbLocal {
4444 }
4545 } ,
4646 executeAll : {
47- lifecycleEvents : [ 'executeAllHandler' ]
47+ lifecycleEvents : [ 'executeAllHandler' ] ,
48+ options : {
49+ stage : {
50+ shortcut : 's' ,
51+ usage : 'Stage that dynamodb should be remotely executed'
52+ }
53+ }
4854 } ,
4955 start : {
5056 lifecycleEvents : [ 'startHandler' ] ,
@@ -170,10 +176,12 @@ class ServerlessDynamodbLocal {
170176
171177 executeAllHandler ( isOffline ) {
172178 let self = this ,
173- region = isOffline ? null :self . service . provider . region
179+ region = isOffline ? null : self . service . provider . region ,
180+ options = this . options ;
181+
174182 return new BbPromise ( function ( resolve , reject ) {
175183 let dynamodb = self . dynamodbOptions ( region ) ,
176- tableOptions = self . tableOptions ( ) ;
184+ tableOptions = self . tableOptions ( options . stage ) ;
177185 dynamodbMigrations . init ( dynamodb , tableOptions . path ) ;
178186 dynamodbMigrations . executeAll ( tableOptions ) . then ( resolve , reject ) ;
179187 } ) ;
You can’t perform that action at this time.
0 commit comments