@orion-js/http
Advanced tools
Comparing version 3.3.14 to 3.3.18
@@ -7,3 +7,12 @@ "use strict"; | ||
const lodash_1 = require("lodash"); | ||
const env_1 = require("@orion-js/env"); | ||
const helpers_1 = require("@orion-js/helpers"); | ||
const simulateLatency = (0, env_1.internalGetEnv)('simulate_latency', 'SIMULATE_LATENCY'); | ||
async function executeRequest(route, req, res) { | ||
if (simulateLatency) { | ||
const time = parseInt(simulateLatency); | ||
if (time) { | ||
await (0, helpers_1.sleep)((0, lodash_1.random)(time * 0.9, time * 1.1)); | ||
} | ||
} | ||
try { | ||
@@ -10,0 +19,0 @@ const viewer = await (0, viewer_1.getViewer)(req); |
{ | ||
"name": "@orion-js/http", | ||
"version": "3.3.14", | ||
"version": "3.3.18", | ||
"main": "lib/index.js", | ||
@@ -45,3 +45,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "52d669169a12e27c602733c32bf19fdb390f971a" | ||
"gitHead": "caf7a903e301c1bcfec24617f74396703ca6a05c" | ||
} |
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
27994
634