Comparing version 0.4.1 to 0.4.2
@@ -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 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32519
14
+ Addedbabel-runtime@6.11.6(transitive)
+ Addedbody-parser@1.15.2(transitive)
+ Addedcookie@0.3.1(transitive)
+ Addedcors@2.8.1(transitive)
+ Addeddepd@1.1.0(transitive)
+ Addedencodeurl@1.0.2(transitive)
+ Addedexpress@4.14.0(transitive)
+ Addedfinalhandler@0.5.0(transitive)
+ Addedhelmet@2.3.0(transitive)
+ Addedhelmet-csp@1.2.2(transitive)
+ Addedhpkp@1.2.0(transitive)
+ Addedhttp-errors@1.5.1(transitive)
+ Addedhttp-proxy@1.15.1(transitive)
+ Addedinherits@2.0.3(transitive)
+ Addedipaddr.js@1.4.0(transitive)
+ Addedlodash@4.16.4(transitive)
+ Addedlodash.reduce@4.5.0(transitive)
+ Addedmicromatch@2.3.11(transitive)
+ Addednocache@1.0.1(transitive)
+ Addedproxy-addr@1.1.5(transitive)
+ Addedqs@6.2.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedreferrer-policy@1.0.0(transitive)
+ Addedregenerator-runtime@0.9.6(transitive)
+ Addedsend@0.14.1(transitive)
+ Addedserve-static@1.11.1(transitive)
+ Addedsetprototypeof@1.0.2(transitive)
+ Addedstatuses@1.3.1(transitive)
- Removedaccepts@1.2.13(transitive)
- Removedbabel-runtime@6.9.0(transitive)
- Removedbody-parser@1.15.1(transitive)
- Removedcookie@0.1.5(transitive)
- Removedcors@2.7.1(transitive)
- Removedexpress@4.13.4(transitive)
- Removedhelmet@2.1.0(transitive)
- Removedhelmet-csp@1.2.0(transitive)
- Removedhpkp@1.1.0(transitive)
- Removedhttp-errors@1.3.11.4.0(transitive)
- Removedhttp-proxy@1.13.3(transitive)
- Removedinherits@2.0.1(transitive)
- Removedipaddr.js@1.0.5(transitive)
- Removedlodash@4.12.0(transitive)
- Removedlodash._baseeach@4.1.3(transitive)
- Removedlodash._baseiteratee@4.7.0(transitive)
- Removedlodash._basereduce@3.0.2(transitive)
- Removedlodash._basetostring@4.12.0(transitive)
- Removedlodash._stringtopath@4.8.0(transitive)
- Removedlodash.assign@4.0.9(transitive)
- Removedlodash.isfunction@3.0.8(transitive)
- Removedlodash.keys@4.2.0(transitive)
- Removedlodash.reduce@4.4.0(transitive)
- Removedlodash.rest@4.0.5(transitive)
- Removedlodash.some@4.4.0(transitive)
- Removedmicromatch@2.3.8(transitive)
- Removednegotiator@0.5.3(transitive)
- Removednocache@1.0.0(transitive)
- Removedproxy-addr@1.0.10(transitive)
- Removedqs@4.0.06.1.0(transitive)
- Removedrange-parser@1.0.3(transitive)
- Removedsend@0.13.1(transitive)
- Removedserve-static@1.10.2(transitive)
- Removedstatuses@1.2.11.5.0(transitive)
- Removedvary@1.0.1(transitive)
Updatedbabel-runtime@6.11.6
Updatedbody-parser@1.15.2
Updatedcors@2.8.1
Updatedexpress@4.14.0
Updatedhelmet@2.3.0
Updatedhttp-proxy@1.15.1
Updatedlodash@4.16.4
Updatedmicromatch@2.3.11
Updatedserve-static@1.11.1