@google-cloud/functions-framework
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -103,9 +103,12 @@ "use strict"; | ||
dataWithContext = getJSONWithContext(processedData, currentContext); | ||
if (stderr && !(SEVERITY in dataWithContext)) { | ||
dataWithContext[SEVERITY] = 'ERROR'; | ||
} | ||
} | ||
else { | ||
dataWithContext = getTextWithContext(processedData, currentContext); | ||
if (stderr) { | ||
dataWithContext[SEVERITY] = 'ERROR'; | ||
} | ||
} | ||
if (stderr) { | ||
dataWithContext[SEVERITY] = 'ERROR'; | ||
} | ||
return JSON.stringify(dataWithContext) + '\n'; | ||
@@ -149,2 +152,5 @@ } | ||
} | ||
// strip any leading ANSI color codes from the decoded data | ||
// to parse colored JSON objects correctly | ||
decodedData = decodedData.replace(/\x1b[[(?);]{0,2}(;?\d)*./g, ''); | ||
try { | ||
@@ -151,0 +157,0 @@ return { isJSON: true, processedData: JSON.parse(decodedData) }; |
@@ -85,3 +85,7 @@ "use strict"; | ||
if (isTrue && !isVersionSatisfied) { | ||
throw new OptionsError(`Execution id is only supported with Node.js versions ${exports.requiredNodeJsVersionForLogExecutionID} and above. Your current version is ${nodeVersion}. Please upgrade.`); | ||
console.warn(`Execution id is only supported with Node.js versions | ||
${exports.requiredNodeJsVersionForLogExecutionID} and above. Your | ||
current version is ${nodeVersion}. Please upgrade.`); | ||
console.warn('Proceeding with execution id support disabled...'); | ||
return false; | ||
} | ||
@@ -88,0 +92,0 @@ return isTrue; |
{ | ||
"name": "@google-cloud/functions-framework", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "FaaS (Function as a service) framework for writing portable Node.js functions", | ||
@@ -5,0 +5,0 @@ "engines": { |
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
122062
2480