Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

highwind

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highwind - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

10

lib/mock_api.js

@@ -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);

4

package.json
{
"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)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc