From 56f1b98c7d427599c5a1312315c461d5241563e6 Mon Sep 17 00:00:00 2001 From: Mike Foxtech Date: Tue, 26 Nov 2024 23:44:22 +0100 Subject: [PATCH 1/2] Update serverless-plugin-canary-deployments.js --- serverless-plugin-canary-deployments.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/serverless-plugin-canary-deployments.js b/serverless-plugin-canary-deployments.js index 46062db..5807fbc 100644 --- a/serverless-plugin-canary-deployments.js +++ b/serverless-plugin-canary-deployments.js @@ -273,11 +273,15 @@ class ServerlessCanaryDeployments { getApiGatewayV2MethodsFor (functionName) { const isApiGMethod = _.matchesProperty('Type', 'AWS::ApiGatewayV2::Integration') - const isMethodForFunction = _.pipe( - _.prop('Properties.IntegrationUri'), - flattenObject, - _.includes(functionName) - ) + let isMethodForFunction = _.has('Properties.IntegrationUri') + if (isMethodForFunction) { + isMethodForFunction = _.pipe( + _.prop('Properties.IntegrationUri'), + flattenObject, + _.includes(functionName) + ) + } + const getMethodsForFunction = _.pipe( _.pickBy(isApiGMethod), _.pickBy(isMethodForFunction) From b311d4d4a810f6a0caecb80784a602af53c72069 Mon Sep 17 00:00:00 2001 From: Mike Foxtech Date: Tue, 26 Nov 2024 23:48:32 +0100 Subject: [PATCH 2/2] Remove trailing spaces not allowed. --- serverless-plugin-canary-deployments.js | 1 - 1 file changed, 1 deletion(-) diff --git a/serverless-plugin-canary-deployments.js b/serverless-plugin-canary-deployments.js index 5807fbc..ba7f4e7 100644 --- a/serverless-plugin-canary-deployments.js +++ b/serverless-plugin-canary-deployments.js @@ -281,7 +281,6 @@ class ServerlessCanaryDeployments { _.includes(functionName) ) } - const getMethodsForFunction = _.pipe( _.pickBy(isApiGMethod), _.pickBy(isMethodForFunction)