Socket
Socket
Sign inDemoInstall

hotel

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotel - npm Package Compare versions

Comparing version 0.4.8 to 0.4.9

lib/client/actions.js

5

CHANGELOG.md
# Change Log
## Unreleased
* Add server logs in the browser.
* Bundle icons to make them available without network access.
## 0.4.8

@@ -4,0 +9,0 @@

@@ -19,3 +19,20 @@ 'use strict';

router.get('/output/:id', sse, function (req, res) {
var id = req.params.id;
var mon = servers.get(id);
if (!mon) return res.sendStatus(404);
function sendOutput(data) {
res.json({
output: data.toString()
});
}
mon.on('stdout', sendOutput);
mon.on('stderr', sendOutput);
sendOutput('');
});
return router;
};

@@ -16,2 +16,5 @@ 'use strict';

console.log('Exiting');
console.log('Stop daemon');
proxy.close();
server.close();
console.log('Remove pid file');

@@ -33,2 +36,12 @@ pidFile.remove();

proxy.on('proxyReq', function (proxyReq, req) {
req._proxyReq = proxyReq;
});
proxy.on('error', function (err, req) {
if (req.socket.destroyed && err.code === 'ECONNRESET') {
req._proxyReq.abort();
}
});
proxy.listen(conf.port + 1);

@@ -35,0 +48,0 @@

10

lib/daemon/server-group.js

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

util.log('Add server id: ' + id + ' cmd: ' + opts.cmd + ' port: ' + opts.env.PORT);
util.log('Add server id: ' + id + ' cmd: ' + server.cmd + ' port: ' + opts.env.PORT);

@@ -55,2 +55,5 @@ var logFile = void 0;

// Init tail
mon.tail = '';
// On start reset logfile and mon.tail

@@ -86,4 +89,5 @@ var onStart = function onStart() {

function updateServer(group, file) {
addServer(group, file);
group.restart(getId(file));
group.stop(getId(file), function () {
addServer(group, file);
});
}

@@ -90,0 +94,0 @@

@@ -14,11 +14,3 @@ 'use strict';

var msg = 'Can\'t connect to server on port ' + PORT + '.\n';
msg += 'Server crashed or timeout of ' + timeout + 'ms exceeded. Retry or check logs.\n';
msg += '<pre><code>';
msg += command;
msg += '\n\n';
msg += tail;
msg += '</code></pre>';
return msg;
return '\nCan\'t connect to server on PORT=<a href="http://localhost:' + PORT + '">' + PORT + '</a>.\nPossible causes:\n- Server crashed or timeout of ' + timeout + 'ms exceeded.\n- Server isn\'t listening on PORT environment variable.\'\nTry to reload or check logs.\n<pre><code>\n' + command + '\n\n' + tail + '\n</code></pre>\n';
};
{
"name": "hotel",
"version": "0.4.8",
"version": "0.4.9",
"description": "Easily start, stop and access your servers from the browser",

@@ -13,11 +13,11 @@ "main": "lib",

"test": "mocha && standard",
"start": "npm run babel:watch & npm run webpack:watch & npm run nodemon & wait",
"prepublish": "npm test && npm run babel:build && npm run webpack:build",
"start": "npm run nodemon & npm run watch:webpack & wait",
"prepublish": "npm run build",
"uninstall": "node bin/uninstall.js",
"precommit": "npm test",
"nodemon": "nodemon lib/daemon --ignore lib/daemon/public",
"babel:build": "babel src --out-dir lib --copy-files --loose all --ignore src/client",
"babel:watch": "npm run babel:build -- --watch",
"webpack:build": "webpack --colors",
"webpack:watch": "npm run webpack:build -- --watch"
"nodemon": "nodemon -- src/daemon",
"watch:webpack": "webpack -d --watch",
"build": "npm run build:webpack && npm run build:babel",
"build:babel": "babel src -d lib --copy-files --ignore src/daemon/public/bundle.js",
"build:webpack": "webpack -p --output-path lib/daemon/public"
},

@@ -63,3 +63,2 @@ "repository": {

"vhost": "^3.0.2",
"vue": "^1.0.16",
"yargs": "^3.29.0"

@@ -69,4 +68,4 @@ },

"babel-cli": "^6.1.2",
"babel-core": "^6.5.1",
"babel-loader": "^6.2.2",
"babel-core": "^6.7.4",
"babel-loader": "^6.2.4",
"babel-plugin-transform-object-assign": "^6.1.18",

@@ -78,10 +77,18 @@ "babel-plugin-transform-runtime": "^6.5.0",

"css-loader": "^0.23.1",
"file-loader": "^0.8.5",
"font-awesome": "^4.5.0",
"husky": "^0.11.3",
"mocha": "^2.4.2",
"mock-fs": "^3.6.0",
"node-sass": "^3.4.2",
"nodemon": "^1.8.1",
"sass-loader": "^3.2.0",
"sinon": "^1.17.3",
"standard": "^4.5.4",
"style-loader": "^0.13.1",
"supertest": "^0.15.0",
"uid": "0.0.2",
"untildify": "^2.1.0",
"url-loader": "^0.5.7",
"vue": "^1.0.18",
"vue-hot-reload-api": "^1.3.2",

@@ -91,2 +98,3 @@ "vue-html-loader": "^1.1.0",

"vue-style-loader": "^1.0.0",
"vuex": "^0.6.2",
"webpack": "^1.12.13",

@@ -93,0 +101,0 @@ "whatwg-fetch": "^0.11.0"

@@ -1,4 +0,4 @@

# hotel [![Mac/Linux Build Status](https://img.shields.io/travis/typicode/hotel/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/typicode/hotel) [![](https://badge.fury.io/js/hotel.svg)](https://www.npmjs.com/package/hotel)
# hotel [![Mac/Linux Build Status](https://img.shields.io/travis/typicode/hotel/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/typicode/hotel) [![Windows Build status](https://img.shields.io/appveyor/ci/typicode/hotel/master.svg?label=Windows)](https://ci.appveyor.com/project/typicode/hotel/branch/master) [![](https://badge.fury.io/js/hotel.svg)](https://www.npmjs.com/package/hotel)
> No need to worry about ports, remember commands, manage terminal tabs, ... access and start your servers from the browser. You can even use local `.dev` domains or any other tld, and it works everywhere (OS X, Linux, Windows) :+1:
> No need to worry about ports, remember commands, manage terminal tabs, mess with /etc/hosts ... access and start your servers from the browser. You can even use local `.dev` domains or any other tld, and it works everywhere (OS X, Linux, Windows) :+1:

@@ -14,7 +14,8 @@ ![](http://i.imgur.com/dAhxGMj.gif)

* __Servers are only started when you access them__
* __Random or fixed ports__
* Works with any server (Node, Ruby, PHP, ...)
* Cross-platform (OS X, Linux and Windows)
* Plays nice with other servers (Apache, Nginx, ...)
* No port 80 or admin/root privileges needed
* No port 80, /etc/hosts or admin/root privileges needed
* Random or fixed ports
* See Roadmap for upcoming features :)

@@ -29,2 +30,4 @@ _* Local `.dev` domains are optional. To use them, configure your network or browser to use hotel's proxy auto-config file (`proxy.pac`). See instructions [here](https://github.com/typicode/hotel/blob/master/docs/README.md)._

If you don't have Node installed, use [brew](http://brew.sh/) or [nvm](https://github.com/creationix/nvm).
## Quick start

@@ -137,4 +140,9 @@

## Roadmap
- [ ] In-browser logs
- [ ] Sub-domains support
## License
MIT - [Typicode](https://github.com/typicode)

@@ -15,4 +15,4 @@ const fs = require('fs')

// Set request timeout to 10 seconds instead of 5 seconds for slower CI servers
conf.timeout = 10000
// Set request timeout to 20 seconds instead of 5 seconds for slower CI servers
conf.timeout = 20000

@@ -19,0 +19,0 @@ const serverKey = path.join(__dirname, '../../src/daemon/certs/server.key')

module.exports = {
entry: './src/client/main.js',
output: {
path: './lib/daemon/public',
filename: 'build.js'
path: './src/daemon/public',
filename: 'bundle.js'
},

@@ -10,4 +10,21 @@ module: {

{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel'
},
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
},
{
test: /\.css$/,
loaders: ['style', 'css']
},
{
test: /\.(eot|svg|ttf|woff(2)?)(\?v=\d+\.\d+\.\d+)?/,
loader: 'url'
}

@@ -14,0 +31,0 @@ ]

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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