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

butler

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

butler - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

license

7

lib/config.js

@@ -46,4 +46,4 @@ 'use strict';

exports.default = function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
var userConfig = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
var userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var configFile, configFromFile, config;

@@ -87,5 +87,6 @@ return _regenerator2.default.wrap(function _callee$(_context) {

}));
return function (_x) {
return ref.apply(this, arguments);
return _ref.apply(this, arguments);
};
}();

@@ -80,4 +80,4 @@ 'use strict';

module.exports = function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(userConfig) {
var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(userConfig) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var config, app, hsr, uri, returnObj;

@@ -101,22 +101,24 @@ return _regenerator2.default.wrap(function _callee$(_context) {

app.use((0, _config4.default)(config));
app.use((0, _proxies2.default)());
if (!opts.hsr) {
_context.next = 14;
_context.next = 16;
break;
}
_context.next = 11;
_context.next = 13;
return (0, _hsr.enableHsr)(app);
case 11:
case 13:
_context.t0 = _context.sent;
_context.next = 15;
_context.next = 17;
break;
case 14:
case 16:
_context.t0 = null;
case 15:
case 17:
hsr = _context.t0;
app.use((0, _config4.default)(config));
app.use((0, _meta2.default)());

@@ -127,3 +129,2 @@ app.use((0, _headers2.default)());

app.use((0, _ssl2.default)());
app.use((0, _proxies2.default)());
app.use((0, _routes2.default)());

@@ -156,5 +157,6 @@

}));
return function (_x, _x2) {
return ref.apply(this, arguments);
return _ref.apply(this, arguments);
};
}();

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

function redirect(res, url) {
var code = arguments.length <= 2 || arguments[2] === undefined ? 301 : arguments[2];
var code = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 301;

@@ -42,0 +42,0 @@ res.writeHead(code, {

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

var enableHsr = exports.enableHsr = function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(app) {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(app) {
return _regenerator2.default.wrap(function _callee$(_context) {

@@ -65,4 +65,5 @@ while (1) {

}));
return function enableHsr(_x) {
return ref.apply(this, arguments);
return _ref.apply(this, arguments);
};

@@ -72,3 +73,3 @@ }();

var startHsrWebsocket = exports.startHsrWebsocket = function () {
var ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
var port, server, WsServer, ws, uri, send;

@@ -124,4 +125,5 @@ return _regenerator2.default.wrap(function _callee2$(_context2) {

}));
return function startHsrWebsocket() {
return ref.apply(this, arguments);
return _ref2.apply(this, arguments);
};

@@ -128,0 +130,0 @@ }();

{
"name": "butler",
"version": "0.4.1",
"version": "0.4.2",
"description": "Fully featured static site server",

@@ -41,4 +41,4 @@ "author": "Zab",

"lib/",
"LICENSE",
"README.md"
"license",
"readme.md"
],

@@ -50,41 +50,40 @@ "main": "lib/index.js",

"scripts": {
"test:lint": "exlint src test bin",
"test:unit": "nyc ava test/unit -a",
"test:lint": "standard --verbose | snazzy",
"test:unit": "rm -rf .nyc_output coverage && nyc ava test/unit -a",
"test:integration": "ava test/integration",
"pretest": "rm -rf .nyc_output coverage",
"test": "cross-env NODE_ENV=testing run-s test:*",
"posttest": "nyc report -r=lcov",
"test:coverage": "nyc report -r=lcov",
"test": "zoo NODE_ENV=testing run-s test:*",
"coveralls": "cat coverage/lcov.info | coveralls",
"prebuild": "rm -rf lib",
"build": "babel src -d lib --no-comments",
"watch": "cross-env NODE_ENV=development npm run build -- -w -s",
"prepublish": "cross-env NODE_ENV=production npm run build"
"build": "rm -rf lib && babel src -d lib --no-comments",
"watch": "zoo NODE_ENV=development npm run build -- -w -s",
"prepublish": "zoo NODE_ENV=production npm run build"
},
"devDependencies": {
"ava": "0.14.0",
"babel-cli": "6.9.0",
"ava": "0.16.0",
"babel-cli": "6.16.0",
"babel-plugin-transform-inline-environment-variables": "6.8.0",
"babel-plugin-transform-runtime": "6.9.0",
"babel-preset-es2015": "6.9.0",
"babel-preset-stage-0": "6.5.0",
"babel-register": "6.9.0",
"coveralls": "2.11.9",
"cross-env": "^1.0.7",
"exlint": "^0.1.3",
"npm-run-all": "2.1.1",
"nyc": "6.4.4",
"source-map-support": "0.4.0"
"babel-plugin-transform-runtime": "6.15.0",
"babel-preset-es2015": "6.16.0",
"babel-preset-stage-0": "6.16.0",
"babel-register": "6.16.3",
"coveralls": "2.11.14",
"npm-run-all": "3.1.0",
"nyc": "8.3.0",
"snazzy": "5.0.0",
"source-map-support": "0.4.3",
"standard": "8.3.0",
"zoo": "0.1.9"
},
"dependencies": {
"babel-runtime": "6.9.0",
"body-parser": "1.15.1",
"babel-runtime": "6.11.6",
"body-parser": "1.15.2",
"compression": "1.6.2",
"cors": "2.7.1",
"express": "4.13.4",
"cors": "2.8.1",
"express": "4.14.0",
"fs-promise": "0.5.0",
"helmet": "2.1.0",
"http-proxy": "1.13.3",
"lodash": "4.12.0",
"micromatch": "2.3.8",
"serve-static": "1.10.2",
"helmet": "2.3.0",
"http-proxy": "1.15.1",
"lodash": "4.16.4",
"micromatch": "2.3.11",
"serve-static": "1.11.1",
"websocket": "1.0.23"

@@ -91,0 +90,0 @@ },

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