forked from mirrors/Scribe.js
Enabling socket from httpserver
This commit is contained in:
parent
b29dcb6a6c
commit
2f001dd06c
46 changed files with 1000 additions and 23813 deletions
281
.scriberc
281
.scriberc
|
@ -1,141 +1,144 @@
|
|||
{
|
||||
"app": "Scribe",
|
||||
"id": "instance-0",
|
||||
"handleUncaughtException": true,
|
||||
"reader": "reader/BasicConsole",
|
||||
"expose": {
|
||||
"default": [
|
||||
"mongo-socket",
|
||||
"bash"
|
||||
],
|
||||
"express": [
|
||||
"express-mongo-socket",
|
||||
"express-bash"
|
||||
]
|
||||
},
|
||||
"expose/pipeline": {
|
||||
"mongo-socket": [
|
||||
"transform/ErrorExtractor",
|
||||
"transform/ToJSON2",
|
||||
"transform/FullTextSerialize",
|
||||
"writer/MongoDB",
|
||||
"writer/SocketIO"
|
||||
],
|
||||
"express-mongo-socket": [
|
||||
"transform/ExpressExtractor",
|
||||
"transform/ErrorExtractor",
|
||||
"transform/ToJSON2",
|
||||
"transform/FullTextSerialize",
|
||||
"writer/MongoDB",
|
||||
"writer/SocketIO"
|
||||
],
|
||||
"bash": [
|
||||
"transform/Inspector",
|
||||
"writer/DefaultConsole"
|
||||
],
|
||||
"express-bash": [
|
||||
"transform/ExpressExtractor",
|
||||
"transform/ExpressInspector",
|
||||
"transform/Inspector",
|
||||
"writer/DefaultConsole"
|
||||
]
|
||||
},
|
||||
"module": {
|
||||
"middleware/ExpressLogger": {
|
||||
"expose": "express",
|
||||
"ignore": ["(scribe)"]
|
||||
},
|
||||
"writer/MongoDB": {
|
||||
"uri": "mongodb://localhost/scribe"
|
||||
},
|
||||
"writer/SocketIO": {
|
||||
"port": 4000,
|
||||
"options": {}
|
||||
},
|
||||
"transform/Inspector": {
|
||||
"colors": true,
|
||||
"showHidden": false,
|
||||
"depth": 5,
|
||||
"pre": true,
|
||||
"callsite": true,
|
||||
"tags": true,
|
||||
"args": true,
|
||||
"metrics": true
|
||||
},
|
||||
"router/Viewer": {
|
||||
"mongoUri": "mongodb://localhost/scribe",
|
||||
"basePath": "/scribe",
|
||||
"username": "build",
|
||||
"password": "build",
|
||||
"authentication": true,
|
||||
"sessionSecret": "scribe-session",
|
||||
"useBodyParser": true,
|
||||
"useSession": true
|
||||
},
|
||||
"router/Viewer/native": {
|
||||
"protocol": "",
|
||||
"host": "",
|
||||
"port": "",
|
||||
"pathname": ""
|
||||
},
|
||||
"router/Viewer/client": {
|
||||
"background": "#222",
|
||||
"socketPorts": [
|
||||
4000
|
||||
],
|
||||
"socketOptions": {},
|
||||
"queries": {
|
||||
"all": {
|
||||
"label": "all",
|
||||
"query": {
|
||||
"expose": {
|
||||
"$exists": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"label": "error",
|
||||
"query": {
|
||||
"expose": "error"
|
||||
},
|
||||
"color": "red"
|
||||
},
|
||||
"express": {
|
||||
"label": "express",
|
||||
"query": {
|
||||
"expose": "express"
|
||||
},
|
||||
"color": "blue"
|
||||
},
|
||||
"info": {
|
||||
"label": "info",
|
||||
"query": {
|
||||
"expose": "info"
|
||||
},
|
||||
"color": "cyan"
|
||||
},
|
||||
"log": {
|
||||
"label": "log",
|
||||
"query": {
|
||||
"expose": "log"
|
||||
},
|
||||
"color": "green"
|
||||
},
|
||||
"warn": {
|
||||
"label": "warn",
|
||||
"query": {
|
||||
"expose": "warn"
|
||||
},
|
||||
"color": "yellow"
|
||||
},
|
||||
"trace": {
|
||||
"label": "trace",
|
||||
"query": {
|
||||
"expose": "trace"
|
||||
},
|
||||
"color": "magenta"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"app": "Scribe",
|
||||
"id": "instance-0",
|
||||
"handleUncaughtException": true,
|
||||
"reader": "reader/BasicConsole",
|
||||
"expose": {
|
||||
"default": [
|
||||
"mongo-socket",
|
||||
"bash"
|
||||
],
|
||||
"express": [
|
||||
"express-mongo-socket",
|
||||
"express-bash"
|
||||
]
|
||||
},
|
||||
"expose/pipeline": {
|
||||
"mongo-socket": [
|
||||
"transform/ErrorExtractor",
|
||||
"transform/ToJSON2",
|
||||
"transform/FullTextSerialize",
|
||||
"writer/MongoDB",
|
||||
"writer/SocketIO"
|
||||
],
|
||||
"express-mongo-socket": [
|
||||
"transform/ExpressExtractor",
|
||||
"transform/ErrorExtractor",
|
||||
"transform/ToJSON2",
|
||||
"transform/FullTextSerialize",
|
||||
"writer/MongoDB",
|
||||
"writer/SocketIO"
|
||||
],
|
||||
"bash": [
|
||||
"transform/Inspector",
|
||||
"writer/DefaultConsole"
|
||||
],
|
||||
"express-bash": [
|
||||
"transform/ExpressExtractor",
|
||||
"transform/ExpressInspector",
|
||||
"transform/Inspector",
|
||||
"writer/DefaultConsole"
|
||||
]
|
||||
},
|
||||
"module": {
|
||||
"middleware/ExpressRequestLogger": {
|
||||
"expose": "express",
|
||||
"ignore": [
|
||||
"(scribe)"
|
||||
]
|
||||
},
|
||||
"writer/MongoDB": {
|
||||
"uri": "mongodb://localhost/scribe"
|
||||
},
|
||||
"writer/SocketIO": {
|
||||
"port": 4000,
|
||||
"options": {
|
||||
}
|
||||
},
|
||||
"transform/Inspector": {
|
||||
"colors": true,
|
||||
"showHidden": false,
|
||||
"depth": 5,
|
||||
"pre": true,
|
||||
"callsite": true,
|
||||
"tags": true,
|
||||
"args": true,
|
||||
"metrics": true
|
||||
},
|
||||
"router/Viewer": {
|
||||
"mongoUri": "mongodb://localhost/scribe",
|
||||
"basePath": "/scribe",
|
||||
"username": "build",
|
||||
"password": "build",
|
||||
"sessionSecret": "scribe-session",
|
||||
"useBodyParser": true,
|
||||
"useSession": true
|
||||
},
|
||||
"router/Viewer/native": {
|
||||
"protocol": "",
|
||||
"host": "",
|
||||
"port": "",
|
||||
"pathname": ""
|
||||
},
|
||||
"router/Viewer/client": {
|
||||
"background": "#222",
|
||||
"socketPorts": [
|
||||
4000
|
||||
],
|
||||
"socketOptions": {
|
||||
},
|
||||
"queries": {
|
||||
"all": {
|
||||
"label": "all",
|
||||
"query": {
|
||||
"expose": {
|
||||
"$exists": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"label": "error",
|
||||
"query": {
|
||||
"expose": "error"
|
||||
},
|
||||
"color": "red"
|
||||
},
|
||||
"express": {
|
||||
"label": "express",
|
||||
"query": {
|
||||
"expose": "express"
|
||||
},
|
||||
"color": "blue"
|
||||
},
|
||||
"info": {
|
||||
"label": "info",
|
||||
"query": {
|
||||
"expose": "info"
|
||||
},
|
||||
"color": "cyan"
|
||||
},
|
||||
"log": {
|
||||
"label": "log",
|
||||
"query": {
|
||||
"expose": "log"
|
||||
},
|
||||
"color": "green"
|
||||
},
|
||||
"warn": {
|
||||
"label": "warn",
|
||||
"query": {
|
||||
"expose": "warn"
|
||||
},
|
||||
"color": "yellow"
|
||||
},
|
||||
"trace": {
|
||||
"label": "trace",
|
||||
"query": {
|
||||
"expose": "trace"
|
||||
},
|
||||
"color": "magenta"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
.travis.yml
16
.travis.yml
|
@ -1,14 +1,14 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "4.1.0"
|
||||
- "4.2.0"
|
||||
- "4.0.0"
|
||||
- "5.0"
|
||||
- "5"
|
||||
- "5.1"
|
||||
- "5.2"
|
||||
- "5.3"
|
||||
- "5.4"
|
||||
- "5.5"
|
||||
- "4"
|
||||
- "4.2"
|
||||
- "4.1"
|
||||
- "4.0"
|
||||
- "0.12"
|
||||
- "0.11"
|
||||
- "iojs"
|
||||
services:
|
||||
- mongodb
|
||||
script: npm run tests
|
53
Gruntfile.js
53
Gruntfile.js
|
@ -4,10 +4,10 @@ module.exports = function (grunt) {
|
|||
require('time-grunt')(grunt);
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
const gruntConfig = {
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '/*! Grunt Uglify <%= grunt.template.today("yyyy-mm-dd") %> */ ',
|
||||
banner: '/*! Grunt Uglify <%= grunt.template.today(\'yyyy-mm-dd\') %> */ ',
|
||||
compress: {
|
||||
drop_console: true
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ module.exports = function (grunt) {
|
|||
files: [{
|
||||
expand: true,
|
||||
cwd: 'src/',
|
||||
src: ['**/*.js','*.js'],
|
||||
src: ['**/*.js', '*.js'],
|
||||
dest: 'dist/',
|
||||
ext: '.js'
|
||||
}]
|
||||
|
@ -66,9 +66,9 @@ module.exports = function (grunt) {
|
|||
browserify: {
|
||||
dist: {
|
||||
options: {
|
||||
transform: ["babelify"],
|
||||
transform: ['babelify'],
|
||||
browserifyOptions: {
|
||||
debug: true, // source mapping
|
||||
debug: false, // source mapping
|
||||
ignoreMTime: true
|
||||
}
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ module.exports = function (grunt) {
|
|||
options: {
|
||||
watch: true,
|
||||
keepAlive: true,
|
||||
transform: ["babelify"],
|
||||
transform: ['babelify'],
|
||||
browserifyOptions: {
|
||||
debug: true, // source mapping
|
||||
ignoreMTime: true
|
||||
|
@ -104,8 +104,8 @@ module.exports = function (grunt) {
|
|||
map: false,
|
||||
processors: [
|
||||
require('autoprefixer')({
|
||||
browsers: ['> 1%']
|
||||
})
|
||||
browsers: ['> 1%']
|
||||
})
|
||||
]
|
||||
},
|
||||
dist: {
|
||||
|
@ -143,42 +143,15 @@ module.exports = function (grunt) {
|
|||
}
|
||||
}
|
||||
},
|
||||
clean: ["public/", "./package.noDevDeps.json", "dist/"]
|
||||
});
|
||||
clean: ['public/', 'dist/']
|
||||
};
|
||||
|
||||
var lastNodeEnv;
|
||||
grunt.registerTask('env-force-production', '', function () {
|
||||
lastNodeEnv = process.env.NODE_ENV;
|
||||
process.env.NODE_ENV = 'production';
|
||||
});
|
||||
|
||||
grunt.registerTask('env-restore', '', function () {
|
||||
process.env.NODE_ENV = lastNodeEnv;
|
||||
});
|
||||
|
||||
grunt.registerTask('get-deps', '', function () {
|
||||
var done = this.async();
|
||||
var pkg = require('./package.json');
|
||||
var fs = require('fs');
|
||||
var exec = require('child_process').exec;
|
||||
|
||||
delete pkg.devDependencies;
|
||||
|
||||
fs.writeFileSync('package.noDevDeps.json', JSON.stringify(pkg), "utf8");
|
||||
|
||||
exec('node node_modules/license-report/index.js --package=./package.noDevDeps.json --output=json',
|
||||
function (err, stdout, stderr) {
|
||||
if (err || stderr) console.error(err, stderr);
|
||||
else fs.writeFileSync('deps.json', JSON.stringify(JSON.parse(stdout), null, 2), "utf8");
|
||||
fs.unlinkSync('package.noDevDeps.json');
|
||||
done();
|
||||
})
|
||||
});
|
||||
grunt.initConfig(gruntConfig);
|
||||
|
||||
grunt.registerTask('styles', ['sass:dist', 'postcss:dist']);
|
||||
grunt.registerTask('build', ['get-deps', 'sass:dist', 'postcss:dist', 'browserify:dist', 'copy', 'imagemin', 'babel']);
|
||||
grunt.registerTask('build', ['sass:dist', 'postcss:dist', 'browserify:dist', 'copy', 'imagemin', 'babel']);
|
||||
grunt.registerTask('default', 'build');
|
||||
grunt.registerTask('watch-scripts', ['browserify:dev']);
|
||||
grunt.registerTask('watch-styles', ['sass:dev', 'watch:sass']);
|
||||
grunt.registerTask('production', ['env-force-production', 'clean', 'build', 'uglify:dist', 'env-restore']);
|
||||
grunt.registerTask('production', ['clean', 'build', 'uglify:dist']);
|
||||
};
|
2
Procfile
2
Procfile
|
@ -1 +1 @@
|
|||
web: node ./herokuapp/app.js
|
||||
web: npm run demo
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Node.js logging made simple! Online access to logs and more...
|
||||
|
||||
```bash
|
||||
npm install scribe@3.0.0-alpha.5
|
||||
npm install scribe@3.0.0-alpha.8
|
||||
```
|
||||
|
||||
### Features
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
import App from './components/App.jsx'
|
||||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
|
||||
render(<App />, document.getElementById('app'));
|
|
@ -1,49 +0,0 @@
|
|||
import React from 'react'
|
||||
import request from 'superagent'
|
||||
import Influx from 'react-influx'
|
||||
import Wave from './Wave'
|
||||
|
||||
const ANIMATION = false;
|
||||
class App extends Influx.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.state = {credentials: {}};
|
||||
}
|
||||
|
||||
_handleSubmit() {
|
||||
request
|
||||
.post(window.location.pathname)
|
||||
.send(this.state.credentials)
|
||||
.end((err, res) => {
|
||||
if (err || res.body.status) return;
|
||||
window.location.href = res.body.data;
|
||||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (ANIMATION) {
|
||||
setTimeout(()=> new Wave().init(), 1500);
|
||||
document.getElementById('footer').style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
_handleChange(key, e) {
|
||||
this.setState({credentials: {...this.state.credentials, [key]: e.target.value}});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="full">
|
||||
<div className="float">
|
||||
<input className="input" placeholder="USERNAME" onChange={this._handleChange.bind(this, 'username')}/>
|
||||
<input className="input" type="password" placeholder="PASSWORD"
|
||||
onChange={this._handleChange.bind(this, 'password')}/>
|
||||
<div className="button" onClick={this._handleSubmit.bind(this)}>Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
|
@ -1,106 +0,0 @@
|
|||
export default class Wave {
|
||||
constructor() {
|
||||
this.shapeX = 0.5;
|
||||
this.shapeY = 100;
|
||||
this.shapeZ = 100;
|
||||
this.shapeColor = 0xffffff;
|
||||
}
|
||||
|
||||
init() {
|
||||
this.scene = new THREE.Scene();
|
||||
this.camera();
|
||||
this.renderer();
|
||||
this.light();
|
||||
this.floor();
|
||||
|
||||
this.initShape();
|
||||
|
||||
this.render();
|
||||
}
|
||||
|
||||
camera() {
|
||||
this.camera = new THREE.OrthographicCamera(window.innerWidth / -2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / -2, 1, 5000);
|
||||
this.camera.position.y = 500;
|
||||
this.camera.position.z = 500;
|
||||
this.camera.position.x = 500;
|
||||
this.camera.updateProjectionMatrix();
|
||||
this.camera.lookAt(this.scene.position);
|
||||
}
|
||||
|
||||
renderer() {
|
||||
this.renderer = new THREE.WebGLRenderer({antialias: true});
|
||||
this.renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
this.renderer.setClearColor(0x202020, 1);
|
||||
this.renderer.shadowMapEnabled = true;
|
||||
this.renderer.shadowMapType = THREE.PCFSoftShadowMap;
|
||||
document.body.appendChild(this.renderer.domElement);
|
||||
}
|
||||
|
||||
light() {
|
||||
var shadowlight = new THREE.DirectionalLight(0xffffff, 0.20);
|
||||
shadowlight.position.set(0, 1000, 0);
|
||||
shadowlight.castShadow = true;
|
||||
shadowlight.shadowDarkness = 0.1;
|
||||
this.scene.add(shadowlight);
|
||||
|
||||
var light = new THREE.DirectionalLight(0xffffff, 1.2);
|
||||
light.position.set(60, 100, 20);
|
||||
this.scene.add(light);
|
||||
}
|
||||
|
||||
floor() {
|
||||
var geometry = new THREE.PlaneGeometry(10000, 10000, 1, 1);
|
||||
var material = new THREE.MeshBasicMaterial({color: 0x202020});
|
||||
this.floor = new THREE.Mesh(geometry, material);
|
||||
this.floor.material.side = THREE.DoubleSide;
|
||||
this.floor.position.y = -150;
|
||||
this.floor.position.x = -1000;
|
||||
this.floor.rotation.x = 90 * Math.PI / 180;
|
||||
this.floor.rotation.y = 0;
|
||||
this.floor.rotation.z = 0;
|
||||
this.floor.doubleSided = true;
|
||||
this.floor.receiveShadow = true;
|
||||
this.scene.add(this.floor);
|
||||
}
|
||||
|
||||
|
||||
initShape() {
|
||||
this.myArray = new THREE.Group();
|
||||
|
||||
this.scene.add(this.myArray);
|
||||
|
||||
this.geometry = new THREE.BoxGeometry(10, 70, 100);
|
||||
this.material = new THREE.MeshLambertMaterial({color: 0x2e2e2e, shading: THREE.FlatShading});
|
||||
|
||||
|
||||
for (var i = 0; i < 100; i++) {
|
||||
this.layer = new THREE.Group();
|
||||
|
||||
this.shape = new THREE.Mesh(this.geometry, this.material);
|
||||
//this.shape.rotation.y = -Math.PI/4;
|
||||
this.shape.position.x = -1500 + (i * 30);
|
||||
this.shape.position.y = -120;
|
||||
this.shape.castShadow = true;
|
||||
this.shape.receiveShadow = false;
|
||||
|
||||
this.layer.add(this.shape);
|
||||
this.scene.add(this.layer);
|
||||
|
||||
this.tl = new TimelineMax({repeat: -1, delay: i * 0.05, repeatDelay: 1});
|
||||
this.tl.to(this.shape.position, 0.5, {
|
||||
y: 0,
|
||||
ease: Power1.easeInOut
|
||||
});
|
||||
this.tl.to(this.shape.position, 0.5, {
|
||||
y: -120,
|
||||
ease: Power1.easeInOut
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
requestAnimationFrame(this.render.bind(this));
|
||||
this.renderer.render(this.scene, this.camera);
|
||||
}
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ class App extends Influx.Component {
|
|||
render() {
|
||||
const {entries} = this.state;
|
||||
const length = entries.length;
|
||||
const maxLineChars = String(length).length + 3;
|
||||
const maxLineChars = String(length).length + 2;
|
||||
|
||||
const rowRenderer = (i, key) => {
|
||||
const entry = this.state.entries[i];
|
||||
|
@ -109,7 +109,7 @@ class App extends Influx.Component {
|
|||
<div className='full-abs'>
|
||||
<div className="full flex vertical" style={{overflow:'hidden'}}>
|
||||
<Header hide={this.state.hideHeader}/>
|
||||
<div style={{overflow:'scroll',overflowX:'hidden',paddingTop:10}}>
|
||||
<div className="momentum" style={{overflow:'scroll',overflowX:'hidden',paddingTop:10}}>
|
||||
<ReactListTracked entries={entries} ref='list' useTranslate3d={true} length={length}
|
||||
itemRenderer={rowRenderer}/>
|
||||
</div>
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
var Scribe = require('../');
|
||||
var express = require('express');
|
||||
var path = require('path');
|
||||
var http = require('http');
|
||||
var bodyParser = require('body-parser');
|
||||
var app = express();
|
||||
var server = http.createServer(app);
|
||||
var port = process.env.PORT || 5000;
|
||||
|
||||
const options = {
|
||||
"app": 'simple-server',
|
||||
|
@ -14,16 +17,18 @@
|
|||
"uri": process.env.MONGOLAB_URI || "mongodb://localhost/scribe"
|
||||
},
|
||||
"router/Viewer": {
|
||||
"mongoUri": process.env.MONGOLAB_URI || "mongodb://localhost/scribe"
|
||||
"mongoUri": process.env.MONGOLAB_URI || "mongodb://localhost/scribe",
|
||||
"username": false,
|
||||
"password": false
|
||||
},
|
||||
"writer/SocketIO": {
|
||||
"port": 50000,
|
||||
"server": server,
|
||||
"options": {}
|
||||
},
|
||||
"router/Viewer/client": {
|
||||
"background": "#222",
|
||||
"socketPorts": [
|
||||
50000
|
||||
process.env.PORT ? 443 : port
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -31,12 +36,12 @@
|
|||
};
|
||||
|
||||
const console = Scribe.create(options);
|
||||
const logger = new Scribe.Middleware.ExpressLogger(console);
|
||||
const logger = new Scribe.Middleware.ExpressRequestLogger(console);
|
||||
const viewer = new Scribe.Router.Viewer(console);
|
||||
|
||||
console.persistent('tags', ['scribe']);
|
||||
|
||||
app.set('port', (process.env.PORT || 5000));
|
||||
app.set('port', port);
|
||||
|
||||
app.use(logger.getMiddleware());
|
||||
app.use(bodyParser.urlencoded({extended: true}));
|
||||
|
@ -77,7 +82,7 @@
|
|||
console.tag("Test").log("Hi there ! Server date : " + new Date());
|
||||
}, 10 * 60 * 1000);
|
||||
|
||||
app.listen(port, function () {
|
||||
server.listen(port, function () {
|
||||
console.time().log('Server listening at port ' + port);
|
||||
});
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
461
deps.json
461
deps.json
|
@ -1,461 +0,0 @@
|
|||
[
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "JSONStream",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "(MIT OR Apache-2.0)",
|
||||
"link": "git://github.com/dominictarr/JSONStream.git",
|
||||
"comment": "1.1.1"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "async",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/caolan/async.git",
|
||||
"comment": "1.5.2"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-syntax-async-functions",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-functions",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-syntax-class-properties",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-class-properties",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-async-functions",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-async-functions",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-async-to-module-method",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-async-to-module-method",
|
||||
"comment": "6.7.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-class-properties",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-export-default-name",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "BSD-3-Clause",
|
||||
"link": "git+https://github.com/gajus/babel-plugin-transform-export-default-name.git",
|
||||
"comment": "1.0.4"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-object-rest-spread",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-rest-spread",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-plugin-transform-runtime",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime",
|
||||
"comment": "6.5.2"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-preset-es2015",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-preset-es2015",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-preset-react",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-preset-react",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-register",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-register",
|
||||
"comment": "6.5.2"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "babel-runtime",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/babel/babel/tree/master/packages/babel-runtime",
|
||||
"comment": "6.5.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "basic-auth",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/jshttp/basic-auth",
|
||||
"comment": "1.0.3"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "basic-auth-connect",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/expressjs/basic-auth-connect.git",
|
||||
"comment": "1.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "bluebird",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/petkaantonov/bluebird.git",
|
||||
"comment": "3.3.4"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "body-parser",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/expressjs/body-parser",
|
||||
"comment": "1.15.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "brace",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/thlorenz/brace.git",
|
||||
"comment": "0.7.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "callsite",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"link": "http://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
|
||||
"comment": "1.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "chalk",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/chalk/chalk.git",
|
||||
"comment": "1.1.1"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "express",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/visionmedia/express",
|
||||
"comment": "4.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "extend",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/justmoon/node-extend.git",
|
||||
"comment": "3.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "format-error",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/endangeredmassa/format-error",
|
||||
"comment": "1.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "jade",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/jadejs/jade.git",
|
||||
"comment": "1.11.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "json-fn",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/vkiryukhin/jsonfn.git",
|
||||
"comment": "0.60.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "keymirror",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "Apache-2.0",
|
||||
"link": "https://github.com/STRML/keyMirror",
|
||||
"comment": "0.1.1"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "minimongo",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "LGPLv3",
|
||||
"link": "git+https://github.com/mWater/minimongo.git",
|
||||
"comment": "3.8.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "moment",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/moment/moment.git",
|
||||
"comment": "2.11.2"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "mongoose",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/Automattic/mongoose.git",
|
||||
"comment": "4.4.3"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "nw-builder",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/mllrsohn/nw-builder.git",
|
||||
"comment": "2.2.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "on-finished",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/jshttp/on-finished",
|
||||
"comment": "2.3.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "rc",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "(BSD-2-Clause OR MIT OR Apache-2.0)",
|
||||
"link": "git+https://github.com/dominictarr/rc.git",
|
||||
"comment": "1.1.6"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "BSD-3-Clause",
|
||||
"link": "git+https://github.com/facebook/react.git",
|
||||
"comment": "0.14.7"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-ace",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "http://github.com/securingsincity/react-ace.git",
|
||||
"comment": "3.1.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-datepicker",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/Hacker0x01/react-datepicker.git",
|
||||
"comment": "0.25.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-dom",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "BSD-3-Clause",
|
||||
"link": "git+https://github.com/facebook/react.git",
|
||||
"comment": "0.14.7"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-influx",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "ISC",
|
||||
"link": "git+https://github.com/bluejamesbond/Influx.js.git",
|
||||
"comment": "1.1.5"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-list",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/orgsync/react-list.git",
|
||||
"comment": "0.7.14"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-object-inspector",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/xyc/react-object-inspector.git",
|
||||
"comment": "0.1.6"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-prefixr",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/naman34/react-stylePrefixr.git",
|
||||
"comment": "0.1.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "react-spinkit",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git+https://github.com/KyleAMathews/react-spinkit.git",
|
||||
"comment": "1.1.4"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "socket.io",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/Automattic/socket.io",
|
||||
"comment": "1.4.3"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "strip-ansi",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "https://github.com/sindresorhus/strip-ansi",
|
||||
"comment": "3.0.0"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "superagent",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/visionmedia/superagent.git",
|
||||
"comment": "1.7.2"
|
||||
},
|
||||
{
|
||||
"department": "kessler",
|
||||
"relatedTo": "stuff",
|
||||
"name": "underscore",
|
||||
"licensePeriod": "perpetual",
|
||||
"material": "material",
|
||||
"licenseType": "MIT",
|
||||
"link": "git://github.com/jashkenas/underscore.git",
|
||||
"comment": "1.8.3"
|
||||
}
|
||||
]
|
85
dist/middleware/ExpressRequestLogger.js
vendored
Normal file
85
dist/middleware/ExpressRequestLogger.js
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _getIterator2 = require('babel-runtime/core-js/get-iterator');
|
||||
|
||||
var _getIterator3 = _interopRequireDefault(_getIterator2);
|
||||
|
||||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
||||
var _createClass2 = require('babel-runtime/helpers/createClass');
|
||||
|
||||
var _createClass3 = _interopRequireDefault(_createClass2);
|
||||
|
||||
var _onFinished = require('on-finished');
|
||||
|
||||
var _onFinished2 = _interopRequireDefault(_onFinished);
|
||||
|
||||
var _time = require('../libs/time');
|
||||
|
||||
var _time2 = _interopRequireDefault(_time);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var ExpressRequestLogger = function () {
|
||||
function ExpressRequestLogger(scribe) {
|
||||
(0, _classCallCheck3.default)(this, ExpressRequestLogger);
|
||||
|
||||
this.options = scribe.module('middleware/ExpressRequestLogger').options;
|
||||
this.scribe = scribe;
|
||||
}
|
||||
|
||||
(0, _createClass3.default)(ExpressRequestLogger, [{
|
||||
key: 'getMiddleware',
|
||||
value: function getMiddleware() {
|
||||
var scribe = this.scribe;
|
||||
var options = this.options;
|
||||
|
||||
|
||||
return function (req, res, next) {
|
||||
var start = (0, _time2.default)();
|
||||
(0, _onFinished2.default)(res, function () {
|
||||
var originalUrl = req.originalUrl;
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = (0, _getIterator3.default)(options.ignore), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var k = _step.value;
|
||||
|
||||
if (new RegExp(k).test(originalUrl)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scribe[options.expose]({ req: req, res: res, duration: (0, _time2.default)() - start });
|
||||
});
|
||||
|
||||
next();
|
||||
};
|
||||
}
|
||||
}]);
|
||||
return ExpressRequestLogger;
|
||||
}();
|
||||
|
||||
exports.default = ExpressRequestLogger;
|
6
dist/middleware/index.js
vendored
6
dist/middleware/index.js
vendored
|
@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
|
||||
var _ExpressLogger = require('./ExpressLogger');
|
||||
var _ExpressRequestLogger = require('./ExpressRequestLogger');
|
||||
|
||||
Object.defineProperty(exports, 'ExpressLogger', {
|
||||
Object.defineProperty(exports, 'ExpressRequestLogger', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_ExpressLogger).default;
|
||||
return _interopRequireDefault(_ExpressRequestLogger).default;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
10
dist/reader/Console.js
vendored
10
dist/reader/Console.js
vendored
|
@ -8,10 +8,6 @@ var _assign = require('babel-runtime/core-js/object/assign');
|
|||
|
||||
var _assign2 = _interopRequireDefault(_assign);
|
||||
|
||||
var _promise = require('babel-runtime/core-js/promise');
|
||||
|
||||
var _promise2 = _interopRequireDefault(_promise);
|
||||
|
||||
var _typeof2 = require('babel-runtime/helpers/typeof');
|
||||
|
||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||
|
@ -36,6 +32,10 @@ var _async = require('async');
|
|||
|
||||
var _async2 = _interopRequireDefault(_async);
|
||||
|
||||
var _bluebird = require('bluebird');
|
||||
|
||||
var _bluebird2 = _interopRequireDefault(_bluebird);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var console = function () {
|
||||
|
@ -148,7 +148,7 @@ var console = function () {
|
|||
|
||||
this.captureStackTrace();
|
||||
|
||||
return new _promise2.default(function (resolve, reject) {
|
||||
return new _bluebird2.default(function (resolve, reject) {
|
||||
if (!_this2._pipelines[expose]) {
|
||||
return resolve();
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@ function getObject(d, def) {
|
|||
}
|
||||
|
||||
var viewer = _jade2.default.compileFile(__dirname + '/../../views/viewer.jade');
|
||||
var login = _jade2.default.compileFile(__dirname + '/../../views/login.jade');
|
||||
|
||||
var Viewer = function () {
|
||||
function Viewer(scribe) {
|
4
dist/scribe.js
vendored
4
dist/scribe.js
vendored
|
@ -106,8 +106,10 @@ function resolvePipeline(scribe, pipeline) {
|
|||
return resolved;
|
||||
}
|
||||
|
||||
var defaultOpts = _fs2.default.readFileSync(__dirname + '/../.scriberc', 'utf8');
|
||||
|
||||
function create(opts) {
|
||||
opts = (0, _extend2.default)(true, (0, _rc2.default)('scribe', {}), opts);
|
||||
opts = (0, _extend2.default)(true, (0, _rc2.default)('scribe', JSON.parse(defaultOpts)), opts);
|
||||
|
||||
// create default console
|
||||
var console = new Reader.BasicConsole(opts);
|
||||
|
|
10
dist/writer/SocketIO.js
vendored
10
dist/writer/SocketIO.js
vendored
|
@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|||
value: true
|
||||
});
|
||||
|
||||
var _typeof2 = require('babel-runtime/helpers/typeof');
|
||||
|
||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||
|
||||
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
||||
|
||||
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
||||
|
@ -27,7 +31,11 @@ var SocketIO = function () {
|
|||
this.options = scribe.module('writer/SocketIO').options;
|
||||
|
||||
if (!sio) {
|
||||
sio = (0, _socket2.default)(this.options.port, this.options.options);
|
||||
if ((0, _typeof3.default)(this.options.server) === 'object') {
|
||||
sio = _socket2.default.listen(this.options.server, this.options.options);
|
||||
} else {
|
||||
sio = (0, _socket2.default)(this.options.port, this.options.options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ if (cluster.isMaster) {
|
|||
|
||||
// express
|
||||
const app = express();
|
||||
const logger = new Scribe.Middleware.ExpressLogger(console);
|
||||
const logger = new Scribe.Middleware.ExpressRequestLogger(console);
|
||||
const viewer = new Scribe.Router.Viewer(console);
|
||||
|
||||
// express logger
|
||||
|
|
|
@ -57,7 +57,7 @@ console.persistent('tags', ['mocha', 'scribe']);
|
|||
|
||||
// express
|
||||
const app = express();
|
||||
const logger = new Scribe.Middleware.ExpressLogger(console);
|
||||
const logger = new Scribe.Middleware.ExpressRequestLogger(console);
|
||||
const viewer = new Scribe.Router.Viewer(console);
|
||||
|
||||
// express logger
|
||||
|
|
|
@ -50,7 +50,7 @@ console.pipe('express', 'express-mongo-socket')
|
|||
|
||||
// express
|
||||
const app = express();
|
||||
const logger = new Scribe.Middleware.ExpressLogger(console);
|
||||
const logger = new Scribe.Middleware.ExpressRequestLogger(console);
|
||||
const viewer = new Scribe.Router.Viewer(console);
|
||||
|
||||
// express logger
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
"name": "scribe-js",
|
||||
"description": "Comprehensive logging framework with online interface",
|
||||
"version": "3.0.0-alpha.5",
|
||||
"version": "3.0.0-alpha.8",
|
||||
"homepage": "https://github.com/bluejamesbond/Scribe.js",
|
||||
"keywords": [],
|
||||
"scripts": {
|
||||
"test": "./node_modules/mocha/bin/mocha --compilers js:babel-register --timeout 15000",
|
||||
"tests": "npm run test ./tests/*.test.js",
|
||||
"production": "export NODE_ENV=production; grunt production",
|
||||
"demo": "export NODE_ENV=production; node ./demo/app.js",
|
||||
"babel-node": "node ./babel-node"
|
||||
},
|
||||
"author": {
|
||||
|
@ -93,7 +95,6 @@
|
|||
"grunt-contrib-uglify": "0.11.1",
|
||||
"grunt-contrib-watch": "0.6.1",
|
||||
"grunt-postcss": "0.7.1",
|
||||
"license-report": "2.0.0",
|
||||
"load-grunt-tasks": "3.4.0",
|
||||
"mocha": "2.4.5",
|
||||
"time-grunt": "1.3.0",
|
||||
|
|
22724
public/scripts/login/Bootstrap.min.js
vendored
22724
public/scripts/login/Bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/scripts/socket.min.js
vendored
2
public/scripts/socket.min.js
vendored
File diff suppressed because one or more lines are too long
77
public/scripts/viewer/Bootstrap.min.js
vendored
77
public/scripts/viewer/Bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
664
public/styles/login.min.css
vendored
664
public/styles/login.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/styles/viewer.min.css
vendored
2
public/styles/viewer.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,88 +0,0 @@
|
|||
@import "shared/reset";
|
||||
@import "shared/fonts";
|
||||
@import "shared/base";
|
||||
@import "shared/scroll";
|
||||
@import "shared/layouts";
|
||||
@import "shared/datepicker";
|
||||
|
||||
html, body {
|
||||
background: #000;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.float {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
text-align: center;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.input {
|
||||
background: transparent;
|
||||
border-radius: 50px;
|
||||
padding: 15px 20px;
|
||||
font-size: 70%;
|
||||
letter-spacing: 1px;
|
||||
width: 100%;
|
||||
margin: 5px auto;
|
||||
color: #FFF;
|
||||
border: 1px solid #222;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.button {
|
||||
background: #2589DE;
|
||||
border-radius: 30px;
|
||||
color: #FFF;
|
||||
font-size: 70%;
|
||||
width: 50%;
|
||||
margin-top: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: background 50ms;
|
||||
padding: 5px 0;
|
||||
display: inline-block;
|
||||
&.disabled {
|
||||
cursor: none;
|
||||
pointer-events: none;
|
||||
background: #0f3657;
|
||||
}
|
||||
}
|
||||
|
||||
canvas {
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
z-index: 0;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
#footer {
|
||||
color: #3b434c;
|
||||
font-family: 'Proxima Nova', sans-serif;
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
a {
|
||||
color: white;
|
||||
font-family: 'Proxima Nova', sans-serif;
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
|
@ -80,7 +80,7 @@ $secondaryColor: #ae720c;
|
|||
.react-datepicker__header {
|
||||
text-align: center;
|
||||
background-color: $secondaryColor;
|
||||
padding-top: 10px;
|
||||
padding-top: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
@ -88,11 +88,10 @@ $secondaryColor: #ae720c;
|
|||
margin-top: 0;
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
font-size: 9px;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
position: relative;
|
||||
top: -4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
@ -101,11 +100,11 @@ $secondaryColor: #ae720c;
|
|||
}
|
||||
|
||||
.react-datepicker__navigation {
|
||||
line-height: 24px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
top: 13px;
|
||||
width: 0;
|
||||
border: 6px solid transparent;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
html, body {
|
||||
background: #222;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.5rem;
|
||||
font-size: 12px;
|
||||
font-family: 'Proxima Nova', "Helvetica", "Helvetic Neue", "Open Sans", sans-serif;
|
||||
&.blue {
|
||||
background: #242831;
|
||||
|
@ -48,7 +47,7 @@ html, body {
|
|||
line-height: 50px;
|
||||
letter-spacing: 1px;
|
||||
padding-left: 20px;
|
||||
font-size: 80%;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.item {
|
||||
|
@ -57,7 +56,7 @@ html, body {
|
|||
color: #888;
|
||||
letter-spacing: 1px;
|
||||
cursor: pointer;
|
||||
font-size: 90%;
|
||||
font-size: 11px;
|
||||
&.selected {
|
||||
background: #2589DE;
|
||||
color: white !important;
|
||||
|
@ -149,7 +148,7 @@ html, body {
|
|||
text-align: right;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
font-size: 80%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.raw {
|
||||
|
@ -160,7 +159,7 @@ html, body {
|
|||
border-top: 1px dotted #333;
|
||||
border-bottom: 1px dotted #333;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 0px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.white {
|
||||
|
@ -209,7 +208,7 @@ html, body {
|
|||
margin-right: 3px;
|
||||
white-space: pre;
|
||||
margin-left: 5px;
|
||||
font-size: 60%;
|
||||
font-size: 10px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
@ -272,7 +271,7 @@ html, body {
|
|||
margin-right: 3px;
|
||||
height: 12px;
|
||||
text-align: center;
|
||||
font-size: 60%;
|
||||
font-size: 10px;
|
||||
display: inline-block;
|
||||
&.rotate {
|
||||
transform: rotate(-90deg);
|
||||
|
@ -298,7 +297,7 @@ html, body {
|
|||
min-width: 10px;
|
||||
position: relative;
|
||||
left: -15px;
|
||||
font-size: 80%;
|
||||
font-size: 11px;
|
||||
top: -1px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@ -356,7 +355,7 @@ html, body {
|
|||
background: #2589DE;
|
||||
border-radius: 2px;
|
||||
color: #FFF;
|
||||
font-size: 70%;
|
||||
font-size: 9px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
text-align: center;
|
||||
|
@ -511,7 +510,7 @@ html, body {
|
|||
content: '';
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
font-size: 80%;
|
||||
font-size: 10px;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
line-height: 14px;
|
||||
|
@ -588,4 +587,8 @@ a {
|
|||
|
||||
.arrow-expand:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.momentum {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
import onFinish from 'on-finished'
|
||||
import time from '../libs/time';
|
||||
|
||||
export default class ExpressLogger {
|
||||
export default class ExpressRequestLogger {
|
||||
constructor(scribe) {
|
||||
this.options = scribe.module('middleware/ExpressLogger').options;
|
||||
this.options = scribe.module('middleware/ExpressRequestLogger').options;
|
||||
this.scribe = scribe;
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
export {default as ExpressLogger} from './ExpressLogger';
|
||||
export {default as ExpressRequestLogger} from './ExpressRequestLogger';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import stack from 'callsite'
|
||||
import async from 'async'
|
||||
import stack from 'callsite';
|
||||
import async from 'async';
|
||||
import Promise from 'bluebird'
|
||||
|
||||
export default class {
|
||||
constructor(config) {
|
||||
|
|
|
@ -26,7 +26,6 @@ function getObject(d, def) {
|
|||
}
|
||||
|
||||
const viewer = jade.compileFile(`${__dirname}/../../views/viewer.jade`);
|
||||
const login = jade.compileFile(`${__dirname}/../../views/login.jade`);
|
||||
|
||||
export default class Viewer {
|
||||
constructor(scribe) {
|
||||
|
|
|
@ -31,8 +31,10 @@ export function resolvePipeline(scribe, pipeline) {
|
|||
return resolved;
|
||||
}
|
||||
|
||||
const defaultOpts = fs.readFileSync(`${__dirname}/../.scriberc`, 'utf8');
|
||||
|
||||
export function create(opts) {
|
||||
opts = extend(true, rc('scribe', {}), opts);
|
||||
opts = extend(true, rc('scribe', JSON.parse(defaultOpts)), opts);
|
||||
|
||||
// create default console
|
||||
const console = new Reader.BasicConsole(opts);
|
||||
|
|
|
@ -7,7 +7,11 @@ export default class SocketIO {
|
|||
this.options = scribe.module('writer/SocketIO').options;
|
||||
|
||||
if (!sio) {
|
||||
sio = io(this.options.port, this.options.options);
|
||||
if (typeof this.options.server === 'object') {
|
||||
sio = io.listen(this.options.server, this.options.options);
|
||||
} else {
|
||||
sio = io(this.options.port, this.options.options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ describe('Basic Scribe', ()=> {
|
|||
|
||||
const app = express();
|
||||
let count = 0, did404 = 0;
|
||||
const logger = new Scribe.Middleware.ExpressLogger(console);
|
||||
const logger = new Scribe.Middleware.ExpressRequestLogger(console);
|
||||
|
||||
app.use(logger.getMiddleware());
|
||||
app.get('/test', (req, res) => {
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
import {Readable,Writable, Transform} from 'stream'
|
||||
import {inspect} from 'util'
|
||||
|
||||
class Console extends Readable {
|
||||
constructor(options = {}, stream) {
|
||||
super(Object.assign(options, {objectMode: true}), stream);
|
||||
}
|
||||
|
||||
_read() {
|
||||
if (Array.isArray(this.content)) {
|
||||
this.push(this.content);
|
||||
this.content = null;
|
||||
}
|
||||
}
|
||||
|
||||
out(...args) {
|
||||
this.content = args;
|
||||
this.read();
|
||||
}
|
||||
}
|
||||
|
||||
class Sink extends Writable {
|
||||
constructor(options = {}) {
|
||||
super(Object.assign(options, {objectMode: true}));
|
||||
}
|
||||
|
||||
_write(data, enc, next) {
|
||||
console.log(...data);
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
class Inspect extends Transform {
|
||||
constructor(options = {}) {
|
||||
super(Object.assign(options, {objectMode: true}))
|
||||
}
|
||||
|
||||
_transform(chunk, encoding, callback) {
|
||||
this.push(inspect(chunk, {colors: true}) + '\n');
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
describe('Simple Streams', ()=> {
|
||||
const s = new Console();
|
||||
s.pipe(new Sink());
|
||||
s.pipe(new Inspect()).pipe(process.stdout);
|
||||
|
||||
it('should use streams to transfer data', done => {
|
||||
s.out("new Testing", "multi-arg");
|
||||
s.out("How now brown cow?");
|
||||
done();
|
||||
});
|
||||
});
|
|
@ -1,15 +0,0 @@
|
|||
doctype html
|
||||
html
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
link(rel='stylesheet', type='text/css', href='styles/login.min.css')
|
||||
script(src='scripts/three.min.js',defer=true)
|
||||
script(src='scripts/TweenMax.min.js',defer=true)
|
||||
script(src='scripts/login/Bootstrap.min.js',defer=true)
|
||||
style.
|
||||
body,.full {width:100%;height:100%;position:relative;}
|
||||
body
|
||||
#app.full
|
||||
footer#footer(style='display:none')
|
||||
| Animation by
|
||||
a(target='_blank', href='https://twitter.com/QuentinHocde') Quentin Hocdé
|
|
@ -3,6 +3,7 @@ html
|
|||
head
|
||||
title Scribe.js
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1")
|
||||
link(rel='stylesheet', type='text/css', href='styles/viewer.min.css')
|
||||
script.
|
||||
window.config = !{config};
|
||||
|
|
Loading…
Add table
Reference in a new issue