stubs-express-middleware
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -28,3 +28,3 @@ const express = require('express') | ||
const stubPath = getStubPath(req, key) | ||
const testApi = `${origin}/stub/test/${encodeURIComponent(stubPath)}` | ||
const testApi = `${origin}/api/${stubPath}` | ||
http.get(testApi, res => { | ||
@@ -40,7 +40,7 @@ if (res.statusCode !== 200) { | ||
res.on('end', () => { | ||
console.log(`stubs: ${stubPath} is enabled`) | ||
console.log(`✅ Stub found => ${stubPath}`) | ||
resolve(true) | ||
}) | ||
}).on('error', () => { | ||
console.log(`stubs: ${stubPath} is not enabled, skip proxy`) | ||
console.log(`❌️ Stub NOT found or disabled, call real api => ${stubPath}`) | ||
reject() | ||
@@ -47,0 +47,0 @@ }) |
{ | ||
"name": "stubs-express-middleware", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/middleware.js", |
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
8582
5