camouflage-server
Advanced tools
Comparing version 0.14.1 to 0.14.2
@@ -191,3 +191,5 @@ "use strict"; | ||
yield (0, sleep_1.sleep)(DELAY); | ||
this.res.sendFile(fileResponse); | ||
return Object.assign(Object.assign({}, response), { body: JSON.stringify({ | ||
"camouflage_file_helper": fileResponse | ||
}) }); | ||
} | ||
@@ -194,0 +196,0 @@ else { |
@@ -52,2 +52,13 @@ "use strict"; | ||
const response = yield parser.getResponse(mockFile); | ||
try { | ||
const fileBody = JSON.parse(response.body); | ||
const hasKey = Object.prototype.hasOwnProperty.call(fileBody, 'camouflage_file_helper'); | ||
if (hasKey) { | ||
res.sendFile(fileBody["camouflage_file_helper"]); | ||
return; | ||
} | ||
} | ||
catch (error) { | ||
//do nothing | ||
} | ||
if (!res.headersSent) { | ||
@@ -54,0 +65,0 @@ const responseValidation = validator.validateResponse(req, response); |
{ | ||
"name": "camouflage-server", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "Easily mock your webservices while testing frontends.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://testinggospels.github.io/camouflage/", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
346183
4643