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

mock-js-server

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-js-server - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

libs/config.js

@@ -48,6 +48,6 @@ 'use strict';

config['conf-folder'] = './' + config['conf-folder'] + '/';
config['conf-folder'] = config['conf-folder'];
try {
fileOptions = require('../' + config['conf-folder'] + config['conf-file'] + '.json');
fileOptions = require(process.cwd() + '/' + config['conf-folder'] + config['conf-file'] + '.json');
parseOptions(config, fileOptions);

@@ -54,0 +54,0 @@ } catch (err) {

@@ -21,3 +21,3 @@ 'use strict';

function findMock(config, req) {
let routesPath = `.${config['conf-folder']}${config['routes-file']}`;
let routesPath = `${process.cwd()}/${config['conf-folder']}${config['routes-file']}`;
delete require.cache[require.resolve(routesPath)];

@@ -24,0 +24,0 @@ let routes = require(routesPath);

{
"name": "mock-js-server",
"version": "0.0.2",
"version": "0.0.3",
"description": "Mock server for API",

@@ -5,0 +5,0 @@ "scripts": {

@@ -53,3 +53,3 @@ # mock-js-server

| Option | Key | Description | Default |
| Option | Key | Default |  Description |
| ------------- | ------------- | ------------- | ------------- |

@@ -56,0 +56,0 @@ | Config file | `-c` | `config.json` | Name of configuration file |

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