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 {
44
44
}
45
45
} ,
46
46
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
+ }
48
54
} ,
49
55
start : {
50
56
lifecycleEvents : [ 'startHandler' ] ,
@@ -170,10 +176,12 @@ class ServerlessDynamodbLocal {
170
176
171
177
executeAllHandler ( isOffline ) {
172
178
let self = this ,
173
- region = isOffline ? null :self . service . provider . region
179
+ region = isOffline ? null : self . service . provider . region ,
180
+ options = this . options ;
181
+
174
182
return new BbPromise ( function ( resolve , reject ) {
175
183
let dynamodb = self . dynamodbOptions ( region ) ,
176
- tableOptions = self . tableOptions ( ) ;
184
+ tableOptions = self . tableOptions ( options . stage ) ;
177
185
dynamodbMigrations . init ( dynamodb , tableOptions . path ) ;
178
186
dynamodbMigrations . executeAll ( tableOptions ) . then ( resolve , reject ) ;
179
187
} ) ;
You can’t perform that action at this time.
0 commit comments