add-custom-resource
Advanced tools
Comparing version 3.1.3 to 3.1.4
@@ -43,6 +43,10 @@ 'use strict'; | ||
const { code, exports } = result; | ||
if (exports.find(r => r === 'handler')) { | ||
const sourceCode = code.toString().replace(/[\r\n]+/g, '\n'); | ||
return sourceCode.split('\n').map(line => escapeJson(line)); | ||
return code | ||
.toString() | ||
.replace(/[\r\n/]+/g, '\n') | ||
.split('\n') | ||
.map(line => escapeJson(line.replace(/^[\t\s]+/g, ''))) | ||
.filter(line => line); | ||
} | ||
@@ -49,0 +53,0 @@ |
@@ -20,3 +20,3 @@ 'use strict'; | ||
ZipFile: { | ||
'Fn::Join': [' ', sourceCodeLines] | ||
'Fn::Join': ['\n', sourceCodeLines] | ||
} | ||
@@ -23,0 +23,0 @@ }, |
{ | ||
"name": "add-custom-resource", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "A helper library to add custom resources to a CloudFormation template", | ||
@@ -5,0 +5,0 @@ "main": "add-custom-resource.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10484
208