Socket
Socket
Sign inDemoInstall

hariko

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hariko - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

.jshintrc

25

CHANGELOG.md

@@ -0,1 +1,26 @@

<a name="1.1.1"></a>
## 1.1.1 (2015-09-18)
### chore
* chore: add codeclimate's badges in README
([701b07e](https://github.com/rymizuki/node-hariko/commit/701b07e))
* chore: add jshint
([c8c95e2](https://github.com/rymizuki/node-hariko/commit/c8c95e2))
* chore: setting for codeclimate's coverage
([7ffdf20](https://github.com/rymizuki/node-hariko/commit/7ffdf20))
* chore(README): add codacy's badge
([7fc34d6](https://github.com/rymizuki/node-hariko/commit/7fc34d6))
### fix
* fix(server): #3 add cors option
([309005b](https://github.com/rymizuki/node-hariko/commit/309005b))
* Merge pull request #4 from rymizuki/dose_not_pass_the_cors_option_to_server
([23f5ef0](https://github.com/rymizuki/node-hariko/commit/23f5ef0))
<a name="1.1.0"></a>

@@ -2,0 +27,0 @@ # 1.1.0 (2015-07-23)

2

lib/cli.js

@@ -78,2 +78,2 @@ var hariko = require('../'),

hariko.start(argv);
}
};

@@ -16,2 +16,3 @@ var glob = require('glob');

proxy: argv.proxy,
cors: argv.cors,
verbose: argv.verbose

@@ -37,2 +38,3 @@ };

proxy: this.options.proxy,
cors: this.options.cors,
verbose: this.options.verbose

@@ -39,0 +41,0 @@ });

@@ -9,2 +9,2 @@ var Hariko = require('./hariko'),

Hariko.create(argv).exec(cb);
}
};

@@ -84,3 +84,3 @@ var fs = require('fs'),

logger.debug('request', req.path, req.query);
logger.debug('entries', _.map(resources, function (entry) { return entry.request.uri.queries }));
logger.debug('entries', _.map(resources, function (entry) { return entry.request.uri.queries; }));

@@ -87,0 +87,0 @@ var perfectMatchResources = _.select(resources, function (resource) {

@@ -27,3 +27,3 @@ var URL = require('url'),

.keys()
.map(function (name) { return {name: name, value: queries[name] }})
.map(function (name) { return {name: name, value: queries[name]}; })
.value();

@@ -33,3 +33,3 @@ return {

queries: queries
}
};
}

@@ -36,0 +36,0 @@

module.exports = function (options) {
options || (options = {});
if (!options) options = {};
return function (req, res, next) {

@@ -11,3 +11,3 @@ res.set('Access-Control-Allow-Origin',

next();
}
};
};

@@ -12,3 +12,3 @@ var logger = require('../../logger');

next();
}
};
};

@@ -14,3 +14,3 @@ var proxy = require('http-proxy').createProxyServer();

}
}
}
};
};

@@ -23,3 +23,3 @@ var logger = require('../../logger');

}
}
}
};
};

@@ -1,2 +0,2 @@

var ASSERTIVE_NAME = 'Hariko API Server'
var ASSERTIVE_NAME = 'Hariko API Server';

@@ -7,3 +7,3 @@ module.exports = function () {

next();
}
};
};

@@ -53,3 +53,3 @@ var _ = require('lodash'),

this._server.on('close', function () {
logger.info('Stoping Hariko Server')
logger.info('Stoping Hariko Server');
}.bind(this));

@@ -71,2 +71,2 @@ this._server.listen(this.options.port, this.options.host || 'localhost', function () { if (cb) cb(); });

return new HarikoServer(entries, options);
}
};

@@ -29,3 +29,3 @@ var colors = require('colors'),

var format = args.shift();
var tag = '[' + level.toUpperCase() + ']'
var tag = '[' + level.toUpperCase() + ']';
var time = this.time ? '[' + dateformat(new Date(), 'HH:MM:ss:l') + ']' : '';

@@ -48,3 +48,3 @@ args.unshift(time.grey + tag[LOG_COLORS[level]] + ' ' + format);

set: function (value) {
if (!LOG_LEVELS[value]) throw new Error("Unsupported log level '"+value+"'")
if (!LOG_LEVELS[value]) throw new Error("Unsupported log level '"+value+"'");
__level = value;

@@ -51,0 +51,0 @@ }

@@ -20,3 +20,3 @@ // SEE ALSO https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md#operators

path: this.parsePathname(this.attrs[0])
}
};
},

@@ -32,3 +32,3 @@ parseQuery: function (query_string) {

})
.value()
.value();
},

@@ -35,0 +35,0 @@ parsePathname: function (pathname) {

{
"name": "hariko",
"version": "1.1.0",
"version": "1.1.1",
"description": "Mock Server that implements the API Blueprint specification.",

@@ -12,3 +12,3 @@ "main": "index.js",

"test": "gulp test",
"coveralls": "istanbul cover _mocha 'test/**/*.js' --report lcovonly -- -R spec --no-color && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"coverage": "istanbul cover _mocha 'test/**/*.js' --report lcovonly -- -R spec --no-color && cat ./coverage/lcov.info | codeclimate-test-reporter && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"bump": "mversion $1 -m '%s'"

@@ -40,2 +40,3 @@ },

"devDependencies": {
"codeclimate-test-reporter": "^0.1.0",
"coffee-script": "^1.9.3",

@@ -46,4 +47,6 @@ "conventional-changelog": "^0.1.3",

"gulp": "^3.9.0",
"gulp-jshint": "^1.11.2",
"gulp-mocha": "^2.1.2",
"istanbul": "^0.3.17",
"jshint-stylish": "^2.0.1",
"mocha": "^2.2.5",

@@ -50,0 +53,0 @@ "mocha-lcov-reporter": "0.0.2",

# node-hariko
Mock Server that implements the API Blueprint specification.
[![npm version](https://badge.fury.io/js/hariko.svg)](http://badge.fury.io/js/hariko) [![Build Status](https://travis-ci.org/rymizuki/node-hariko.svg?branch=master)](https://travis-ci.org/rymizuki/node-hariko) [![Coverage Status](https://coveralls.io/repos/rymizuki/node-hariko/badge.svg?branch=master&service=github)](https://coveralls.io/github/rymizuki/node-hariko?branch=master) [![Inline docs](http://inch-ci.org/github/rymizuki/node-hariko.svg?branch=master)](http://inch-ci.org/github/rymizuki/node-hariko) [![Dependency Status](https://gemnasium.com/rymizuki/node-hariko.svg)](https://gemnasium.com/rymizuki/node-hariko)
[![npm version](https://badge.fury.io/js/hariko.svg)](http://badge.fury.io/js/hariko)
[![Build Status](https://travis-ci.org/rymizuki/node-hariko.svg?branch=master)](https://travis-ci.org/rymizuki/node-hariko)
[![Codacy Badge](https://www.codacy.com/project/badge/3d26f82e280d432183e2b768c5a78ab1)](https://www.codacy.com/app/ry-mizuki/node-hariko)
[![Code Climate](https://codeclimate.com/github/rymizuki/node-hariko/badges/gpa.svg)](https://codeclimate.com/github/rymizuki/node-hariko)
[![Test Coverage](https://codeclimate.com/github/rymizuki/node-hariko/badges/coverage.svg)](https://codeclimate.com/github/rymizuki/node-hariko/coverage)
[![Inline docs](http://inch-ci.org/github/rymizuki/node-hariko.svg?branch=master)](http://inch-ci.org/github/rymizuki/node-hariko)
[![Dependency Status](https://gemnasium.com/rymizuki/node-hariko.svg)](https://gemnasium.com/rymizuki/node-hariko)

@@ -6,0 +12,0 @@ ## Get started

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