Comparing version 0.1.1 to 0.1.2
@@ -5,2 +5,4 @@ 'use strict'; | ||
require('babel-polyfill'); | ||
var _express = require('express'); | ||
@@ -33,2 +35,3 @@ | ||
var QUERY_STRING_IGNORE = undefined; | ||
var QUIET_MODE = undefined; | ||
var SERVERS = {}; | ||
@@ -60,2 +63,3 @@ var REQUIRED_CONFIG_OPTIONS = ['prodRootURL', 'fixturesPath']; | ||
QUERY_STRING_IGNORE = queryStringIgnore; | ||
QUIET_MODE = quiet; | ||
@@ -75,3 +79,3 @@ if (corsWhitelist) { | ||
} else { | ||
serveLocalResponse(res, fileName, data, { quiet: quiet }); | ||
serveLocalResponse(res, fileName, data, { quiet: QUIET_MODE }); | ||
} | ||
@@ -183,3 +187,5 @@ }); | ||
app[method].call(app, route, jsonMiddleware, function (req, res) { | ||
console.info('==> 📁 Serving local fixture for ' + method.toUpperCase() + ' -> \'' + route + '\''); | ||
if (!QUIET_MODE) { | ||
console.info('==> 📁 Serving local fixture for ' + method.toUpperCase() + ' -> \'' + route + '\''); | ||
} | ||
var payload = responseIsJson && typeof mergeParams === 'function' ? mergeParams(JSON.parse(fixture), req.body) : fixture; | ||
@@ -186,0 +192,0 @@ res.status(status).set(headers).send(payload); |
{ | ||
"name": "highwind", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Mock API express server", | ||
@@ -26,3 +26,2 @@ "main": "lib/mock_api.js", | ||
"babel-plugin-transform-object-assign": "^6.3.13", | ||
"babel-polyfill": "^6.3.14", | ||
"babel-preset-es2015": "^6.3.13", | ||
@@ -36,2 +35,3 @@ "chai": "^3.4.1", | ||
"dependencies": { | ||
"babel-polyfill": "^6.3.14", | ||
"body-parser": "^1.14.2", | ||
@@ -38,0 +38,0 @@ "cors": "^2.7.1", |
@@ -0,1 +1,2 @@ | ||
import 'babel-polyfill'; | ||
import express from 'express'; | ||
@@ -11,2 +12,3 @@ import cors from 'cors'; | ||
let QUERY_STRING_IGNORE; | ||
let QUIET_MODE; | ||
const SERVERS = {}; | ||
@@ -43,2 +45,3 @@ const REQUIRED_CONFIG_OPTIONS = [ | ||
QUERY_STRING_IGNORE = queryStringIgnore; | ||
QUIET_MODE = quiet; | ||
@@ -58,3 +61,3 @@ if (corsWhitelist) { | ||
} else { | ||
serveLocalResponse(res, fileName, data, { quiet: quiet }); | ||
serveLocalResponse(res, fileName, data, { quiet: QUIET_MODE }); | ||
} | ||
@@ -164,3 +167,5 @@ }); | ||
app[method].call(app, route, jsonMiddleware, (req, res) => { | ||
console.info(`==> 📁 Serving local fixture for ${method.toUpperCase()} -> '${route}'`); | ||
if (!QUIET_MODE) { | ||
console.info(`==> 📁 Serving local fixture for ${method.toUpperCase()} -> '${route}'`); | ||
} | ||
const payload = responseIsJson && typeof mergeParams === 'function' | ||
@@ -167,0 +172,0 @@ ? mergeParams(JSON.parse(fixture), req.body) |
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
35291
11
817
8
+ Addedbabel-polyfill@^6.3.14
+ Addedbabel-polyfill@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.10.50.11.1(transitive)