lambda-live-debugger 0.0.120 → 0.0.122
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.
package/dist/cloudFormation.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AwsCredentials } from './awsCredentials.mjs';
|
|
2
|
+
import { Logger } from './logger.mjs';
|
|
2
3
|
let cloudFormationClient;
|
|
3
4
|
/**
|
|
4
5
|
* Get CloudFormation stack template
|
|
@@ -20,7 +21,8 @@ async function getCloudFormationStackTemplate(stackName, awsConfiguration) {
|
|
|
20
21
|
}
|
|
21
22
|
catch (error) {
|
|
22
23
|
if (error.name === 'ValidationError') {
|
|
23
|
-
|
|
24
|
+
Logger.error(`Stack ${stackName} not found. Try specifying a region. Error: ${error.message}`, error);
|
|
25
|
+
return undefined;
|
|
24
26
|
}
|
|
25
27
|
else {
|
|
26
28
|
throw error;
|
|
@@ -60,7 +62,8 @@ async function getCloudFormationResources(stackName, awsConfiguration) {
|
|
|
60
62
|
}
|
|
61
63
|
catch (error) {
|
|
62
64
|
if (error.name === 'ValidationError') {
|
|
63
|
-
|
|
65
|
+
Logger.error(`Stack ${stackName} not found. Try specifying a region. Error: ${error.message}`, error);
|
|
66
|
+
return undefined;
|
|
64
67
|
}
|
|
65
68
|
else {
|
|
66
69
|
throw error;
|
|
@@ -75,7 +78,7 @@ async function getCloudFormationResources(stackName, awsConfiguration) {
|
|
|
75
78
|
*/
|
|
76
79
|
async function getLambdasInStack(stackName, awsConfiguration) {
|
|
77
80
|
const response = await getCloudFormationResources(stackName, awsConfiguration);
|
|
78
|
-
const lambdaResources = response
|
|
81
|
+
const lambdaResources = response?.StackResourceSummaries?.filter((resource) => resource.ResourceType === 'AWS::Lambda::Function');
|
|
79
82
|
return (lambdaResources?.map((resource) => {
|
|
80
83
|
return {
|
|
81
84
|
lambdaName: resource.PhysicalResourceId,
|
|
Binary file
|
|
@@ -68,6 +68,7 @@ async function fixCdkPaths(awsCdkLibPath) {
|
|
|
68
68
|
|
|
69
69
|
const pathsFix = {
|
|
70
70
|
'custom-resource-handlers/': `${awsCdkLibPath}/custom-resource-handlers/`,
|
|
71
|
+
'aws-custom-resource-handler': `${awsCdkLibPath}/custom-resource-handlers/dist/custom-resources/aws-custom-resource-handler`,
|
|
71
72
|
};
|
|
72
73
|
|
|
73
74
|
// Create a proxy to intercept calls to the path module so we can fix paths
|