lambda-live-debugger 0.0.122 → 0.0.123

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.
Binary file
@@ -121,15 +121,18 @@ export class CdkFramework {
121
121
  async getLambdaCdkPathFromTemplateMetadata(stackName, awsConfiguration) {
122
122
  const cfTemplate = await CloudFormation.getCloudFormationStackTemplate(stackName, awsConfiguration);
123
123
  // get all Lambda functions in the template
124
- const lambdas = Object.entries(cfTemplate.Resources)
125
- .filter(([, resource]) => resource.Type === 'AWS::Lambda::Function')
126
- .map(([key, resource]) => {
127
- return {
128
- logicalId: key,
129
- cdkPath: resource.Metadata['aws:cdk:path'],
130
- };
131
- });
132
- return lambdas;
124
+ if (cfTemplate) {
125
+ const lambdas = Object.entries(cfTemplate.Resources)
126
+ .filter(([, resource]) => resource.Type === 'AWS::Lambda::Function')
127
+ .map(([key, resource]) => {
128
+ return {
129
+ logicalId: key,
130
+ cdkPath: resource.Metadata['aws:cdk:path'],
131
+ };
132
+ });
133
+ return lambdas;
134
+ }
135
+ return [];
133
136
  }
134
137
  /**
135
138
  * Get Lambdas data from CDK by compiling and running the CDK code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "0.0.122",
3
+ "version": "0.0.123",
4
4
  "type": "module",
5
5
  "description": "Debug Lambda functions locally like it is running in the cloud",
6
6
  "repository": {