lambda-live-debugger 0.0.117 → 0.0.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -296,17 +296,22 @@ export default {
296
296
  // Verbose logging
297
297
  verbose: ${config.verbose},
298
298
  // Modify Lambda function list or support custom framework
299
- //getLambdas: async (foundLambdas) => {
300
- // you can customize the list of Lambdas here or create your own
301
- // return foundLambdas;
302
- //},
299
+ // getLambdas: async (foundLambdas) => {
300
+ // you can customize the list of Lambdas here or create your own
301
+ // return foundLambdas;
302
+ // },
303
303
  } satisfies LldConfigTs;
304
304
  `;
305
- // remove lines that contains undefined or ""
305
+ // comment lines that contains undefined or ""
306
306
  const configContentCleaned = configContent
307
307
  .trim()
308
308
  .split('\n')
309
- .filter((l) => !l.includes('undefined') && !l.includes('""'))
309
+ .map((l) => l.includes('undefined')
310
+ ? ` // ${l
311
+ .replace('"undefined",', '')
312
+ .replace('undefined,', '')
313
+ .trim()}`
314
+ : l)
310
315
  .join('\n');
311
316
  await fs.writeFile(configFileName, configContentCleaned);
312
317
  }
Binary file
@@ -334,7 +334,7 @@ async function attachLayerToLambda(functionName, functionId, layerArn) {
334
334
  },
335
335
  },
336
336
  //Timeout: LlDebugger.argOptions.observable ? undefined : 300, // Increase the timeout to 5 minutes
337
- Timeout: 300,
337
+ Timeout: Math.max(initialTimeout, 300), // Increase the timeout to min. 5 minutes
338
338
  });
339
339
  await getLambdaClient().send(updateFunctionConfigurationCommand);
340
340
  Logger.verbose(`[Function ${functionName}] Lambda layer and environment variables updated`);
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { createRequire as topLevelCreateRequire } from 'module';
2
3
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
4
  const require = topLevelCreateRequire(import.meta.url);
@@ -15,6 +16,12 @@ parentPort.on('message', async (data) => {
15
16
  const mod = await import(workerData.artifactFile);
16
17
  const fn = mod[workerData.handler];
17
18
 
19
+ if (!fn) {
20
+ throw new Error(
21
+ `Handler '${workerData.handler}' not found for function '${workerData.functionId}'`,
22
+ );
23
+ }
24
+
18
25
  try {
19
26
  const context = {
20
27
  ...data.context,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {