@@ -176,7 +176,11 @@ export class LocalLambdaRunner {
176
176
177
177
const eventPath : string = path . join ( await this . getBaseBuildFolder ( ) , 'event.json' )
178
178
const environmentVariablePath = path . join ( await this . getBaseBuildFolder ( ) , 'env-vars.json' )
179
- const config = await this . getConfig ( )
179
+ const config = await getConfig ( {
180
+ handlerName : this . localInvokeParams . handlerName ,
181
+ documentUri : this . localInvokeParams . document . uri ,
182
+ samTemplate : this . localInvokeParams . samTemplate
183
+ } )
180
184
const maxRetries : number = getAttachDebuggerMaxRetryLimit ( this . configuration , MAX_DEBUGGER_RETRIES_DEFAULT )
181
185
182
186
await writeFile ( eventPath , JSON . stringify ( config . event || { } ) )
@@ -234,21 +238,6 @@ export class LocalLambdaRunner {
234
238
}
235
239
}
236
240
}
237
-
238
- private async getConfig ( ) : Promise < HandlerConfig > {
239
- const workspaceFolder = vscode . workspace . getWorkspaceFolder ( this . localInvokeParams . document . uri )
240
- if ( ! workspaceFolder ) {
241
- return generateDefaultHandlerConfig ( )
242
- }
243
-
244
- const config : HandlerConfig = await getLocalLambdaConfiguration (
245
- workspaceFolder ,
246
- this . localInvokeParams . handlerName ,
247
- this . localInvokeParams . samTemplate
248
- )
249
-
250
- return config
251
- }
252
241
} // end class LocalLambdaRunner
253
242
254
243
export const makeBuildDir = async ( ) : Promise < string > => {
0 commit comments