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

simple-json-replay-server

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-json-replay-server - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

0

app_mock/example.1.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

8

package.json
{
"name": "simple-json-replay-server",
"version": "0.0.8",
"version": "0.0.9",
"description": "A simple json replay server which can be used for standalone frontend web application (angular especially) when development. Simply put the url & parameters & response json data, then hit the url in browser or from your web application, whenever it matches the url and parameters, it will return the best match json data.",

@@ -36,8 +36,8 @@ "main": "main.js",

"underscore": "^1.8.3",
"chokidar": "^1.6.1"
"chokidar": "^1.6.1",
"rx": "^4.1.0"
},
"devDependencies": {
"mocha": "^3.2.0",
"rx": "^4.1.0"
"mocha": "^3.2.0"
}
}

@@ -0,0 +0,0 @@ # Simple JSON Replay Server ❤️ [![Build Status](https://travis-ci.org/realdah/simple-json-replay-server.svg?branch=master)](https://travis-ci.org/realdah/simple-json-replay-server) [![npm version](https://badge.fury.io/js/simple-json-replay-server.svg)](https://badge.fury.io/js/simple-json-replay-server) [![Node version](https://img.shields.io/node/v/simple-json-replay-server.svg?style=flat)](http://nodejs.org/download/)

@@ -0,0 +0,0 @@ var express = require('express');

@@ -0,0 +0,0 @@ var _ = require('underscore');

@@ -0,0 +0,0 @@ var glob = require("glob"); //load many files and filtering with some rules at one shot

@@ -0,0 +0,0 @@ function print(message, option) {

var chokidar = require('chokidar');
var Rx = require( 'rx' );
var Rx = require('rx');
var mockDataLoader = require("./mockDataLoader");
var util = require("./util");
var log = console.log;
function startWatching(folder) {

@@ -15,18 +13,18 @@

//Only reload the files until user stops changing files after 800 milliseconds, to avoid repeat loading when saving/copying multiple files.
var changedFiles = Rx.Observable.fromEvent( dirWatcher, 'change' ).debounce(function (x) { return Rx.Observable.timer(800); });
var changedFiles = Rx.Observable.fromEvent(dirWatcher, 'change').debounce(function (x) { return Rx.Observable.timer(800); });
var subscription = changedFiles.subscribe(
function( filename ) {
function (filename) {
util.print("Change detected for mock data, reload...");
mockDataLoader.reset();
mockDataLoader.loadRequestMappings(folder);
},
function( err ) {
console.log( 'Error: ' + err );
},
function () {
console.log( 'Completed' );
});
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
}
exports.startWatching = startWatching;

@@ -0,0 +0,0 @@ var assert = require('assert');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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