faas-js-runtime
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -97,6 +97,9 @@ /** | ||
if (fnReturn.body !== undefined) { | ||
if (typeof fnReturn.body === 'string') { | ||
payload.headers['content-type'] = 'text/plain; charset=utf8'; | ||
} else if (typeof fnReturn.body === 'object') { | ||
payload.headers['content-type'] = 'application/json; charset=utf8'; | ||
// Provide default content-type unless supplied by user | ||
if (!payload.headers || !payload.headers['content-type']) { | ||
if (typeof fnReturn.body === 'string') { | ||
payload.headers['content-type'] = 'text/plain; charset=utf8'; | ||
} else if (typeof fnReturn.body === 'object') { | ||
payload.headers['content-type'] = 'application/json; charset=utf8'; | ||
} | ||
} | ||
@@ -103,0 +106,0 @@ payload.response = fnReturn.body; |
{ | ||
"name": "faas-js-runtime", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"repository": { | ||
@@ -39,3 +39,3 @@ "type": "git", | ||
"death": "^1.1.0", | ||
"fastify": "^4.18.0", | ||
"fastify": "^4.19.2", | ||
"fastify-raw-body": "^4.2.0", | ||
@@ -50,13 +50,13 @@ "js-yaml": "^4.1.0", | ||
"@cyclonedx/cyclonedx-npm": "^1.12.1", | ||
"@types/node": "^20.2.5", | ||
"@types/node": "^20.3.3", | ||
"@typescript-eslint/eslint-plugin": "^5.59.11", | ||
"@typescript-eslint/parser": "^5.60.0", | ||
"@typescript-eslint/parser": "^5.61.0", | ||
"colortape": "^0.1.2", | ||
"eslint": "^8.43.0", | ||
"eslint": "^8.44.0", | ||
"eslint-config-prettier": "^8.7.0", | ||
"nyc": "^15.1.0", | ||
"supertest": "^6.3.1", | ||
"tape": "^5.6.3", | ||
"tape": "^5.6.4", | ||
"tsd": "^0.28.1", | ||
"typescript": "^5.1.3" | ||
"typescript": "^5.1.6" | ||
}, | ||
@@ -63,0 +63,0 @@ "tsd": { |
Sorry, the diff of this file is too big to display
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
141080
4242
Updatedfastify@^4.19.2