lambda-serverless-api
Advanced tools
Comparing version 1.9.1 to 1.9.2
@@ -12,8 +12,12 @@ const fs = require("fs"); | ||
// replace yaml variables with defaults | ||
entry = entry.replace(/\${[a-zA-Z0-9]+?:[a-zA-Z0-9]+?, ["']([a-zA-Z0-9]+)["']}/g, "$1"); | ||
entry = entry.replace(/\${[a-zA-Z0-9]+?:[a-zA-Z0-9]+?, ["']([a-zA-Z0-9]+?)["']}/g, "$1"); | ||
// load referenced yaml file | ||
const match = /^\${file\(([^(){}$]+?)\)(?::([a-zA-Z0-9]*?))?}$/g.exec(entry); | ||
const match = /^\${file\(([^(){}$]+?)\)(?::([a-zA-Z0-9.]+?))?}$/g.exec(entry); | ||
if (match) { | ||
const loaded = yaml.safeLoad(fs.readFileSync(path.join(dir, match[1]), 'utf8')); | ||
entry = loadRecursive(dir, get(loaded, match[2], loaded)); | ||
const filePath = path.join(dir, match[1]); | ||
const loaded = yaml.safeLoad(fs.readFileSync(filePath, 'utf8')); | ||
entry = loadRecursive( | ||
path.dirname(filePath), | ||
get(loaded, match[2], loaded) | ||
); | ||
} | ||
@@ -20,0 +24,0 @@ } |
@@ -23,3 +23,3 @@ { | ||
}, | ||
"version": "1.9.1", | ||
"version": "1.9.2", | ||
"scripts": { | ||
@@ -26,0 +26,0 @@ "test": "grunt gardener", |
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
17954
354