Commit 8803721f by Iwasaki Yudai

Add xterm itegration

* Move to TypeScript from legacy JavaScript
* Add support of xterm.js
* Hterm is still available for backward compatibility
1 parent d6c98866
gotty gotty
bindata bindata
builds builds
js/node_modules/*
[submodule "libapps"] [submodule "libapps"]
path = libapps path = js/libapps
url = https://chromium.googlesource.com/apps/libapps url = https://chromium.googlesource.com/apps/libapps
...@@ -7,7 +7,7 @@ gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go Makefile ...@@ -7,7 +7,7 @@ gotty: server/asset.go main.go server/*.go webtty/*.go backend/*.go Makefile
asset: server/asset.go asset: server/asset.go
server/asset.go: bindata/static/js/hterm.js bindata/static/js/gotty.js bindata/static/index.html bindata/static/favicon.png server/asset.go: bindata/static/js/hterm.js bindata/static/js/bundle.js bindata/static/index.html bindata/static/favicon.png bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css
go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/... go-bindata -prefix bindata -pkg server -ignore=\\.gitkeep -o server/asset.go bindata/...
gofmt -w server/asset.go gofmt -w server/asset.go
...@@ -26,12 +26,30 @@ bindata/static/favicon.png: bindata/static resources/favicon.png ...@@ -26,12 +26,30 @@ bindata/static/favicon.png: bindata/static resources/favicon.png
bindata/static/js: bindata/static bindata/static/js: bindata/static
mkdir -p bindata/static/js mkdir -p bindata/static/js
bindata/static/js/hterm.js: bindata/static/js libapps/hterm/js/*.js bindata/static/js/hterm.js: bindata/static/js js/libapps/hterm/js/*.js
cd libapps && \ cd js/libapps && \
LIBDOT_SEARCH_PATH=`pwd` ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../bindata/static/js/hterm.js LIBDOT_SEARCH_PATH=`pwd` ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../../bindata/static/js/hterm.js
bindata/static/js/bundle.js: bindata/static/js js/dist/bundle.js
cp js/dist/bundle.js bindata/static/js/bundle.js
bindata/static/css: bindata/static
mkdir -p bindata/static/css
bindata/static/css/index.css: bindata/static/css resources/index.css
cp resources/index.css bindata/static/css/index.css
bindata/static/css/xterm_customize.css: bindata/static/css resources/xterm_customize.css
cp resources/xterm_customize.css bindata/static/css/xterm_customize.css
bindata/static/css/xterm.css: bindata/static/css js/node_modules/xterm/dist/xterm.css
cp js/node_modules/xterm/dist/xterm.css bindata/static/css/xterm.css
js/dist/bundle.js:
cd js && \
webpack
bindata/static/js/gotty.js: bindata/static/js resources/gotty.js
cp resources/gotty.js bindata/static/js/gotty.js
tools: tools:
go get github.com/tools/godep go get github.com/tools/godep
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
import * as bare from "hterm";
export declare class TermHterm {
elem: HTMLElement;
term: bare.Terminal;
io: bare.IO;
columns: number;
rows: number;
message: string;
constructor(elem: HTMLElement);
info(): {
columns: number;
rows: number;
};
output(data: string): void;
showMessage(message: string, timeout: number): void;
removeMessage(): void;
setWindowTitle(title: string): void;
setPreferences(value: object): void;
onInput(callback: (input: string) => void): void;
onResize(callback: (colmuns: number, rows: number) => void): void;
deactivate(): void;
reset(): void;
close(): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var bare = require("hterm");
var TermHterm = (function () {
function TermHterm(elem) {
var _this = this;
this.elem = elem;
this.term = new bare.Terminal();
// this.term.defaultStorage = new lib.Storage.Memory();
this.term.getPrefs().set("send-encoding", "raw");
this.term.decorate(this.elem);
this.term.onTerminalReady = function () {
_this.io = _this.term.io.push();
_this.term.installKeyboard();
};
}
;
TermHterm.prototype.info = function () {
return { columns: this.term.screen.getWidth(), rows: this.term.screen.getHeight() };
};
;
TermHterm.prototype.output = function (data) {
if (this.term.io.writeUTF8 != null) {
this.term.io.writeUTF8(data);
}
};
;
TermHterm.prototype.showMessage = function (message, timeout) {
this.term.io.showOverlay(message, timeout);
};
;
TermHterm.prototype.removeMessage = function () {
this.term.io.showOverlay("", 0);
};
TermHterm.prototype.setWindowTitle = function (title) {
this.term.setWindowTitle(title);
};
;
TermHterm.prototype.setPreferences = function (value) {
var _this = this;
Object.keys(value).forEach(function (key) {
_this.term.getPrefs().set(key, value[key]);
});
};
;
TermHterm.prototype.onInput = function (callback) {
this.io.onVTKeystroke = function (data) {
callback(data);
};
this.io.sendString = function (data) {
callback(data);
};
};
;
TermHterm.prototype.onResize = function (callback) {
this.io.onTerminalResize = function (columns, rows) {
callback(columns, rows);
};
};
;
TermHterm.prototype.deactivate = function () {
this.io.onVTKeystroke = null;
this.io.sendString = null;
this.io.onTerminalResize = null;
this.term.uninstallKeyboard();
};
TermHterm.prototype.reset = function () {
this.removeMessage();
// this.term.reset();
};
TermHterm.prototype.close = function () {
this.term.uninstallKeyboard();
};
return TermHterm;
}());
exports.TermHterm = TermHterm;
//# sourceMappingURL=hterm.js.map
\ No newline at end of file
{"version":3,"file":"hterm.js","sourceRoot":"","sources":["../src/hterm.ts"],"names":[],"mappings":"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"}
\ No newline at end of file
File mode changed
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var hterm_1 = require("./hterm");
var xterm_1 = require("./xterm");
var webtty_1 = require("./webtty");
var websocket_1 = require("./websocket");
var elem = document.getElementById("terminal");
if (elem !== null) {
var term_1 = new xterm_1.TermXterm(elem);
var httpsEnabled = window.location.protocol == "https:";
var url = (httpsEnabled ? 'wss://' : 'ws://') + window.location.hostname + ":8080/ws";
var args = window.location.search;
var factory = new websocket_1.ConnectionFactory(url, webtty_1.protocols);
var wt = new webtty_1.WebTTY(term_1, factory, args, "");
var closer_1 = wt.open();
new hterm_1.TermHterm(elem);
window.addEventListener("unload", function () {
closer_1();
term_1.close();
});
}
;
//# sourceMappingURL=main.js.map
\ No newline at end of file
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,iCAAoC;AACpC,iCAAoC;AACpC,mCAA6C;AAC7C,yCAAgD;AAGhD,IAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAA;AAEhD,EAAE,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;IAChB,IAAM,MAAI,GAAG,IAAI,iBAAS,CAAC,IAAI,CAAC,CAAC;IACjC,IAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC;IAC1D,IAAM,GAAG,GAAG,CAAC,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC;IACxF,IAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpC,IAAM,OAAO,GAAG,IAAI,6BAAiB,CAAC,GAAG,EAAE,kBAAS,CAAC,CAAC;IACtD,IAAM,EAAE,GAAG,IAAI,eAAM,CAAC,MAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC/C,IAAM,QAAM,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;IAEzB,IAAI,iBAAS,CAAC,IAAI,CAAC,CAAC;IAEpB,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE;QAC9B,QAAM,EAAE,CAAC;QACT,MAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC;AAAA,CAAC"}
\ No newline at end of file
export declare class ConnectionFactory {
url: string;
protocols: string[];
constructor(url: string, protocols: string[]);
create(): Connection;
}
export declare class Connection {
bare: WebSocket;
constructor(url: string, protocols: string[]);
open(): void;
close(): void;
send(data: string): void;
isOpen(): boolean;
onOpen(callback: () => void): void;
onReceive(callback: (data: string) => void): void;
onClose(callback: () => void): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ConnectionFactory = (function () {
function ConnectionFactory(url, protocols) {
this.url = url;
this.protocols = protocols;
}
;
ConnectionFactory.prototype.create = function () {
return new Connection(this.url, this.protocols);
};
;
return ConnectionFactory;
}());
exports.ConnectionFactory = ConnectionFactory;
var Connection = (function () {
function Connection(url, protocols) {
this.bare = new WebSocket(url, protocols);
}
Connection.prototype.open = function () {
// nothing todo for websocket
};
;
Connection.prototype.close = function () {
this.bare.close();
};
;
Connection.prototype.send = function (data) {
this.bare.send(data);
};
;
Connection.prototype.isOpen = function () {
if (this.bare.readyState == WebSocket.CONNECTING ||
this.bare.readyState == WebSocket.OPEN) {
return true;
}
return false;
};
Connection.prototype.onOpen = function (callback) {
this.bare.onopen = function (event) {
callback();
};
};
;
Connection.prototype.onReceive = function (callback) {
this.bare.onmessage = function (event) {
callback(event.data);
};
};
;
Connection.prototype.onClose = function (callback) {
this.bare.onclose = function (event) {
callback();
};
};
;
return Connection;
}());
exports.Connection = Connection;
//# sourceMappingURL=websocket.js.map
\ No newline at end of file
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../src/websocket.ts"],"names":[],"mappings":";;AAAA;IAII,2BAAY,GAAW,EAAE,SAAmB;QACxC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IAAA,CAAC;IAEF,kCAAM,GAAN;QACI,MAAM,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAAA,CAAC;IACN,wBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,8CAAiB;AAc9B;IAII,oBAAY,GAAW,EAAE,SAAmB;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED,yBAAI,GAAJ;QACI,6BAA6B;IACjC,CAAC;IAAA,CAAC;IAEF,0BAAK,GAAL;QACI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAAA,CAAC;IAEF,yBAAI,GAAJ,UAAK,IAAY;QACb,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAAA,CAAC;IAEF,2BAAM,GAAN;QACI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC,UAAU;YAC5C,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,IAAI,CAAA;QACf,CAAC;QACD,MAAM,CAAC,KAAK,CAAA;IAChB,CAAC;IAED,2BAAM,GAAN,UAAO,QAAoB;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,UAAC,KAAK;YACrB,QAAQ,EAAE,CAAC;QACf,CAAC,CAAA;IACL,CAAC;IAAA,CAAC;IAEF,8BAAS,GAAT,UAAU,QAAgC;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,UAAC,KAAK;YACxB,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAA;IACL,CAAC;IAAA,CAAC;IAEF,4BAAO,GAAP,UAAQ,QAAoB;QACxB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,UAAC,KAAK;YACtB,QAAQ,EAAE,CAAC;QACf,CAAC,CAAC;IACN,CAAC;IAAA,CAAC;IACN,iBAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,gCAAU"}
\ No newline at end of file
export declare const protocols: string[];
export declare const msgInputUnknown = "0";
export declare const msgInput = "1";
export declare const msgPing = "2";
export declare const msgResizeTerminal = "3";
export declare const msgUnknownOutput = "0";
export declare const msgOutput = "1";
export declare const msgPong = "2";
export declare const msgSetWindowTitle = "3";
export declare const msgSetPreferences = "4";
export declare const msgSetReconnect = "5";
export interface Terminal {
info(): {
columns: number;
rows: number;
};
output(data: string): void;
showMessage(message: string, timeout: number): void;
removeMessage(): void;
setWindowTitle(title: string): void;
setPreferences(value: object): void;
onInput(callback: (input: string) => void): void;
onResize(callback: (colmuns: number, rows: number) => void): void;
reset(): void;
deactivate(): void;
close(): void;
}
export interface Connection {
open(): void;
close(): void;
send(data: string): void;
isOpen(): boolean;
onOpen(callback: () => void): void;
onReceive(callback: (data: string) => void): void;
onClose(callback: () => void): void;
}
export interface ConnectionFactory {
create(): Connection;
}
export declare class WebTTY {
term: Terminal;
connectionFactory: ConnectionFactory;
args: string;
authToken: string;
reconnect: number;
constructor(term: Terminal, connectionFactory: ConnectionFactory, args: string, authToken: string);
open(): () => void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.protocols = ["webtty"];
exports.msgInputUnknown = '0';
exports.msgInput = '1';
exports.msgPing = '2';
exports.msgResizeTerminal = '3';
exports.msgUnknownOutput = '0';
exports.msgOutput = '1';
exports.msgPong = '2';
exports.msgSetWindowTitle = '3';
exports.msgSetPreferences = '4';
exports.msgSetReconnect = '5';
var WebTTY = (function () {
function WebTTY(term, connectionFactory, args, authToken) {
this.term = term;
this.connectionFactory = connectionFactory;
this.args = args;
this.authToken = authToken;
this.reconnect = -1;
}
;
WebTTY.prototype.open = function () {
var _this = this;
var connection = this.connectionFactory.create();
var pingTimer;
var reconnectTimeout;
var setup = function () {
connection.onOpen(function () {
var termInfo = _this.term.info();
connection.send(JSON.stringify({
Arguments: _this.args,
AuthToken: _this.authToken,
}));
var resizeHandler = function (colmuns, rows) {
connection.send(exports.msgResizeTerminal + JSON.stringify({
columns: colmuns,
rows: rows
}));
};
_this.term.onResize(resizeHandler);
resizeHandler(termInfo.columns, termInfo.rows);
_this.term.onInput(function (input) {
connection.send(exports.msgInput + input);
});
pingTimer = setInterval(function () {
connection.send(exports.msgPing);
}, 30 * 1000);
});
connection.onReceive(function (data) {
var payload = data.slice(1);
switch (data[0]) {
case exports.msgOutput:
_this.term.output(decodeURIComponent(Array.prototype.map.call(atob(payload), function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join('')));
break;
case exports.msgPong:
break;
case exports.msgSetWindowTitle:
_this.term.setWindowTitle(payload);
break;
case exports.msgSetPreferences:
var preferences = JSON.parse(payload);
_this.term.setPreferences(preferences);
break;
case exports.msgSetReconnect:
var autoReconnect = JSON.parse(payload);
console.log("Enabling reconnect: " + autoReconnect + " seconds");
_this.reconnect = autoReconnect;
break;
}
});
connection.onClose(function () {
clearInterval(pingTimer);
_this.term.deactivate();
_this.term.showMessage("Connection Closed", 0);
if (_this.reconnect > 0) {
reconnectTimeout = setTimeout(function () {
connection = _this.connectionFactory.create();
_this.term.reset();
setup();
}, _this.reconnect * 1000);
}
});
connection.open();
};
setup();
return function () {
clearTimeout(reconnectTimeout);
connection.close();
};
};
;
return WebTTY;
}());
exports.WebTTY = WebTTY;
;
//# sourceMappingURL=webtty.js.map
\ No newline at end of file
{"version":3,"file":"webtty.js","sourceRoot":"","sources":["../src/webtty.ts"],"names":[],"mappings":"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"}
\ No newline at end of file
import * as bare from "xterm";
export declare class TermXterm {
elem: HTMLElement;
message: HTMLElement;
messageTimeout: number;
messageTimer: number;
term: bare;
resizeListener: () => void;
constructor(elem: HTMLElement);
info(): {
columns: number;
rows: number;
};
output(data: string): void;
showMessage(message: string, timeout: number): void;
removeMessage(): void;
setWindowTitle(title: string): void;
setPreferences(value: object): void;
onInput(callback: (input: string) => void): void;
onResize(callback: (colmuns: number, rows: number) => void): void;
deactivate(): void;
reset(): void;
close(): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var bare = require("xterm");
bare.loadAddon("fit");
var TermXterm = (function () {
function TermXterm(elem) {
var _this = this;
this.elem = elem;
this.term = new bare();
this.message = elem.ownerDocument.createElement("div");
this.message.className = "xterm-overlay";
this.messageTimeout = 2000;
this.resizeListener = function () {
_this.term.fit();
_this.term.scrollToBottom();
_this.showMessage(String(_this.term.cols) + "x" + String(_this.term.rows), _this.messageTimeout);
};
this.term.on("open", function () {
_this.term.fit();
_this.term.scrollToBottom();
window.addEventListener("resize", function () { _this.resizeListener(); });
});
this.term.open(elem, true);
}
;
TermXterm.prototype.info = function () {
return { columns: this.term.cols, rows: this.term.rows };
};
;
TermXterm.prototype.output = function (data) {
this.term.write(data);
};
;
TermXterm.prototype.showMessage = function (message, timeout) {
var _this = this;
this.message.textContent = message;
this.elem.appendChild(this.message);
if (this.messageTimer) {
clearTimeout(this.messageTimer);
}
if (timeout > 0) {
this.messageTimer = setTimeout(function () {
_this.elem.removeChild(_this.message);
}, timeout);
}
};
;
TermXterm.prototype.removeMessage = function () {
if (this.message.parentNode == this.elem) {
this.elem.removeChild(this.message);
}
};
TermXterm.prototype.setWindowTitle = function (title) {
document.title = title;
};
;
TermXterm.prototype.setPreferences = function (value) {
};
;
TermXterm.prototype.onInput = function (callback) {
this.term.on("data", function (data) {
callback(data);
});
};
;
TermXterm.prototype.onResize = function (callback) {
this.term.on("resize", function (data) {
callback(data.cols, data.rows);
});
};
;
TermXterm.prototype.deactivate = function () {
this.term.off("data");
this.term.off("resize");
this.term.blur();
};
TermXterm.prototype.reset = function () {
this.removeMessage();
this.term.clear();
};
TermXterm.prototype.close = function () {
window.removeEventListener("resize", this.resizeListener);
this.term.destroy();
};
return TermXterm;
}());
exports.TermXterm = TermXterm;
//# sourceMappingURL=xterm.js.map
\ No newline at end of file
{"version":3,"file":"xterm.js","sourceRoot":"","sources":["../src/xterm.ts"],"names":[],"mappings":"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"}
\ No newline at end of file
libapps @ f05b714d
Subproject commit f05b714d7ff1368b3669b041ae83fcaec1742a61
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"acorn": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.1.1.tgz",
"integrity": "sha512-vOk6uEMctu0vQrvuSqFdJyqj1Q0S5VTDL79qtjo+DhRr+1mmaD+tluFSCZqhvi/JUhXSzoZN2BhtstaPEeE8cw==",
"dev": true
},
"acorn-dynamic-import": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz",
"integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=",
"dev": true,
"requires": {
"acorn": "4.0.13"
},
"dependencies": {
"acorn": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
"integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=",
"dev": true
}
}
},
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"dev": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
}
},
"ajv-keywords": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz",
"integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=",
"dev": true
},
"align-text": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"dev": true,
"requires": {
"kind-of": "3.2.2",
"longest": "1.0.1",
"repeat-string": "1.6.1"
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"anymatch": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz",
"integrity": "sha1-o+Uvo5FoyCX/V7AkgSbOWo/5VQc=",
"dev": true,
"requires": {
"arrify": "1.0.1",
"micromatch": "2.3.11"
}
},
"arr-diff": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
"dev": true,
"requires": {
"arr-flatten": "1.1.0"
}
},
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
"dev": true
},
"array-unique": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
"asn1.js": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz",
"integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"inherits": "2.0.3",
"minimalistic-assert": "1.0.0"
}
},
"assert": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
"integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
"dev": true,
"requires": {
"util": "0.10.3"
}
},
"async": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz",
"integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==",
"dev": true,
"requires": {
"lodash": "4.17.4"
}
},
"async-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"base64-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz",
"integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==",
"dev": true
},
"big.js": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz",
"integrity": "sha1-TK2iGTZS6zyp7I5VyQFWacmAaXg=",
"dev": true
},
"binary-extensions": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.9.0.tgz",
"integrity": "sha1-ZlBsFs5vTWkopbPNajPKQelB43s=",
"dev": true
},
"bn.js": {
"version": "4.11.7",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.7.tgz",
"integrity": "sha512-LxFiV5mefv0ley0SzqkOPR1bC4EbpPx8LkOz5vMe/Yi15t5hzwgO/G+tc7wOtL4PZTYjwHu8JnEiSLumuSjSfA==",
"dev": true
},
"brace-expansion": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"dev": true,
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"dev": true,
"requires": {
"expand-range": "1.8.2",
"preserve": "0.2.0",
"repeat-element": "1.1.2"
}
},
"brorand": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
"dev": true
},
"browserify-aes": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz",
"integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=",
"dev": true,
"requires": {
"buffer-xor": "1.0.3",
"cipher-base": "1.0.4",
"create-hash": "1.1.3",
"evp_bytestokey": "1.0.0",
"inherits": "2.0.3"
}
},
"browserify-cipher": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz",
"integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
"dev": true,
"requires": {
"browserify-aes": "1.0.6",
"browserify-des": "1.0.0",
"evp_bytestokey": "1.0.0"
}
},
"browserify-des": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz",
"integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"des.js": "1.0.0",
"inherits": "2.0.3"
}
},
"browserify-rsa": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
"integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"randombytes": "2.0.5"
}
},
"browserify-sign": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
"integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"browserify-rsa": "4.0.1",
"create-hash": "1.1.3",
"create-hmac": "1.1.6",
"elliptic": "6.4.0",
"inherits": "2.0.3",
"parse-asn1": "5.1.0"
}
},
"browserify-zlib": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz",
"integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=",
"dev": true,
"requires": {
"pako": "0.2.9"
}
},
"buffer": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"dev": true,
"requires": {
"base64-js": "1.2.1",
"ieee754": "1.1.8",
"isarray": "1.0.0"
}
},
"buffer-xor": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"dev": true
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
},
"builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
"integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
"dev": true
},
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
"dev": true
},
"center-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
"dev": true,
"requires": {
"align-text": "0.1.4",
"lazy-cache": "1.0.4"
}
},
"chokidar": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
"integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=",
"dev": true,
"requires": {
"anymatch": "1.3.0",
"async-each": "1.0.1",
"glob-parent": "2.0.0",
"inherits": "2.0.3",
"is-binary-path": "1.0.1",
"is-glob": "2.0.1",
"path-is-absolute": "1.0.1",
"readdirp": "2.1.0"
}
},
"cipher-base": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
"integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
"dev": true,
"requires": {
"inherits": "2.0.3",
"safe-buffer": "5.1.1"
}
},
"cliui": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"dev": true,
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
"wordwrap": "0.0.2"
}
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
},
"colors": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"console-browserify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
"integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
"dev": true,
"requires": {
"date-now": "0.1.4"
}
},
"constants-browserify": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
"integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
"dev": true
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"create-ecdh": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz",
"integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"elliptic": "6.4.0"
}
},
"create-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
"integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"inherits": "2.0.3",
"ripemd160": "2.0.1",
"sha.js": "2.4.8"
}
},
"create-hmac": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz",
"integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=",
"dev": true,
"requires": {
"cipher-base": "1.0.4",
"create-hash": "1.1.3",
"inherits": "2.0.3",
"ripemd160": "2.0.1",
"safe-buffer": "5.1.1",
"sha.js": "2.4.8"
}
},
"crypto-browserify": {
"version": "3.11.1",
"resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.1.tgz",
"integrity": "sha512-Na7ZlwCOqoaW5RwUK1WpXws2kv8mNhWdTlzob0UXulk6G9BDbyiJaGTYBIX61Ozn9l1EPPJpICZb4DaOpT9NlQ==",
"dev": true,
"requires": {
"browserify-cipher": "1.0.0",
"browserify-sign": "4.0.4",
"create-ecdh": "4.0.0",
"create-hash": "1.1.3",
"create-hmac": "1.1.6",
"diffie-hellman": "5.0.2",
"inherits": "2.0.3",
"pbkdf2": "3.0.12",
"public-encrypt": "4.0.0",
"randombytes": "2.0.5"
}
},
"date-now": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
"dev": true
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
},
"des.js": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
"integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
"dev": true,
"requires": {
"inherits": "2.0.3",
"minimalistic-assert": "1.0.0"
}
},
"diffie-hellman": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz",
"integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"miller-rabin": "4.0.0",
"randombytes": "2.0.5"
}
},
"domain-browser": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
"integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
"dev": true
},
"elliptic": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
"integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"brorand": "1.1.0",
"hash.js": "1.1.3",
"hmac-drbg": "1.0.1",
"inherits": "2.0.3",
"minimalistic-assert": "1.0.0",
"minimalistic-crypto-utils": "1.0.1"
}
},
"emojis-list": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
"dev": true
},
"enhanced-resolve": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.3.0.tgz",
"integrity": "sha512-2qbxE7ek3YxPJ1ML6V+satHkzHpJQKWkRHmRx6mfAoW59yP8YH8BFplbegSP+u2hBd6B6KCOpvJQ3dZAP+hkpg==",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"memory-fs": "0.4.1",
"object-assign": "4.1.1",
"tapable": "0.2.7"
}
},
"errno": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz",
"integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=",
"dev": true,
"requires": {
"prr": "0.0.0"
}
},
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"dev": true,
"requires": {
"is-arrayish": "0.2.1"
}
},
"events": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=",
"dev": true
},
"evp_bytestokey": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz",
"integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=",
"dev": true,
"requires": {
"create-hash": "1.1.3"
}
},
"expand-brackets": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
"dev": true,
"requires": {
"is-posix-bracket": "0.1.1"
}
},
"expand-range": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"dev": true,
"requires": {
"fill-range": "2.2.3"
}
},
"extglob": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
},
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=",
"dev": true
},
"fill-range": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
"integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
"dev": true,
"requires": {
"is-number": "2.1.0",
"isobject": "2.1.0",
"randomatic": "1.1.7",
"repeat-element": "1.1.2",
"repeat-string": "1.6.1"
}
},
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"dev": true,
"requires": {
"path-exists": "2.1.0",
"pinkie-promise": "2.0.1"
}
},
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
"dev": true
},
"for-own": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
"dev": true,
"requires": {
"for-in": "1.0.2"
}
},
"get-caller-file": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=",
"dev": true
},
"glob-base": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
"dev": true,
"requires": {
"glob-parent": "2.0.0",
"is-glob": "2.0.1"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"dev": true,
"requires": {
"is-glob": "2.0.1"
}
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
},
"has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
"dev": true
},
"hash-base": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
"integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=",
"dev": true,
"requires": {
"inherits": "2.0.3"
}
},
"hash.js": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
"dev": true,
"requires": {
"inherits": "2.0.3",
"minimalistic-assert": "1.0.0"
}
},
"hmac-drbg": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
"dev": true,
"requires": {
"hash.js": "1.1.3",
"minimalistic-assert": "1.0.0",
"minimalistic-crypto-utils": "1.0.1"
}
},
"hosted-git-info": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
"integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==",
"dev": true
},
"https-browserify": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz",
"integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=",
"dev": true
},
"ieee754": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
"integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=",
"dev": true
},
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
"dev": true
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"interpret": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz",
"integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=",
"dev": true
},
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"dev": true
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
"is-binary-path": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
"integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
"dev": true,
"requires": {
"binary-extensions": "1.9.0"
}
},
"is-buffer": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
"integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
"dev": true
},
"is-builtin-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"dev": true,
"requires": {
"builtin-modules": "1.1.1"
}
},
"is-dotfile": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=",
"dev": true
},
"is-equal-shallow": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
"dev": true,
"requires": {
"is-primitive": "2.0.0"
}
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
"dev": true
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"dev": true,
"requires": {
"is-extglob": "1.0.0"
}
},
"is-number": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
"dev": true,
"requires": {
"kind-of": "3.2.2"
}
},
"is-posix-bracket": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=",
"dev": true
},
"is-primitive": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
"dev": true
},
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"isobject": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
"dev": true,
"requires": {
"isarray": "1.0.0"
}
},
"json-loader": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz",
"integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==",
"dev": true
},
"json-stable-stringify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
"dev": true,
"requires": {
"jsonify": "0.0.0"
}
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
"dev": true
},
"jsonify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
"dev": true
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
"is-buffer": "1.1.5"
}
},
"lazy-cache": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
"dev": true
},
"lcid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"dev": true,
"requires": {
"invert-kv": "1.0.0"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "2.2.0",
"pify": "2.3.0",
"pinkie-promise": "2.0.1",
"strip-bom": "2.0.0"
}
},
"loader-runner": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz",
"integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=",
"dev": true
},
"loader-utils": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
"integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"dev": true,
"requires": {
"big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1"
}
},
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
"dev": true
},
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"dev": true
},
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
"dev": true,
"requires": {
"errno": "0.1.4",
"readable-stream": "2.3.3"
}
},
"micromatch": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
"dev": true,
"requires": {
"arr-diff": "2.0.0",
"array-unique": "0.2.1",
"braces": "1.8.5",
"expand-brackets": "0.1.5",
"extglob": "0.3.2",
"filename-regex": "2.0.1",
"is-extglob": "1.0.0",
"is-glob": "2.0.1",
"kind-of": "3.2.2",
"normalize-path": "2.1.1",
"object.omit": "2.0.1",
"parse-glob": "3.0.4",
"regex-cache": "0.4.3"
}
},
"miller-rabin": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz",
"integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"brorand": "1.1.0"
}
},
"minimalistic-assert": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz",
"integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=",
"dev": true
},
"minimalistic-crypto-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
"dev": true
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"node-libs-browser": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.0.0.tgz",
"integrity": "sha1-o6WeyXAkmFtG6Vg3lkb5bEthZkY=",
"dev": true,
"requires": {
"assert": "1.4.1",
"browserify-zlib": "0.1.4",
"buffer": "4.9.1",
"console-browserify": "1.1.0",
"constants-browserify": "1.0.0",
"crypto-browserify": "3.11.1",
"domain-browser": "1.1.7",
"events": "1.1.1",
"https-browserify": "0.0.1",
"os-browserify": "0.2.1",
"path-browserify": "0.0.0",
"process": "0.11.10",
"punycode": "1.4.1",
"querystring-es3": "0.2.1",
"readable-stream": "2.3.3",
"stream-browserify": "2.0.1",
"stream-http": "2.7.2",
"string_decoder": "0.10.31",
"timers-browserify": "2.0.2",
"tty-browserify": "0.0.0",
"url": "0.11.0",
"util": "0.10.3",
"vm-browserify": "0.0.4"
},
"dependencies": {
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
}
}
},
"normalize-package-data": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
"integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"dev": true,
"requires": {
"hosted-git-info": "2.5.0",
"is-builtin-module": "1.0.0",
"semver": "5.3.0",
"validate-npm-package-license": "3.0.1"
}
},
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"dev": true,
"requires": {
"remove-trailing-separator": "1.0.2"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
"dev": true,
"requires": {
"for-own": "0.1.5",
"is-extendable": "0.1.1"
}
},
"os-browserify": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz",
"integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=",
"dev": true
},
"os-locale": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"dev": true,
"requires": {
"lcid": "1.0.0"
}
},
"pako": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
"integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
"dev": true
},
"parse-asn1": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz",
"integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=",
"dev": true,
"requires": {
"asn1.js": "4.9.1",
"browserify-aes": "1.0.6",
"create-hash": "1.1.3",
"evp_bytestokey": "1.0.0",
"pbkdf2": "3.0.12"
}
},
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
"dev": true,
"requires": {
"glob-base": "0.3.0",
"is-dotfile": "1.0.3",
"is-extglob": "1.0.0",
"is-glob": "2.0.1"
}
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"dev": true,
"requires": {
"error-ex": "1.3.1"
}
},
"path-browserify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
"dev": true
},
"path-exists": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"dev": true,
"requires": {
"pinkie-promise": "2.0.1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"pify": "2.3.0",
"pinkie-promise": "2.0.1"
}
},
"pbkdf2": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.12.tgz",
"integrity": "sha1-vjZ4XFBn6kjYBv+SMojF91C2uKI=",
"dev": true,
"requires": {
"create-hash": "1.1.3",
"create-hmac": "1.1.6",
"ripemd160": "2.0.1",
"safe-buffer": "5.1.1",
"sha.js": "2.4.8"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
},
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
"dev": true
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"dev": true,
"requires": {
"pinkie": "2.0.4"
}
},
"preserve": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=",
"dev": true
},
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
"dev": true
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
"dev": true
},
"prr": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
"integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=",
"dev": true
},
"public-encrypt": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz",
"integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=",
"dev": true,
"requires": {
"bn.js": "4.11.7",
"browserify-rsa": "4.0.1",
"create-hash": "1.1.3",
"parse-asn1": "5.1.0",
"randombytes": "2.0.5"
}
},
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
"dev": true
},
"querystring-es3": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
"integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
"dev": true
},
"randomatic": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
"integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==",
"dev": true,
"requires": {
"is-number": "3.0.0",
"kind-of": "4.0.0"
},
"dependencies": {
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"dev": true,
"requires": {
"kind-of": "3.2.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"requires": {
"is-buffer": "1.1.5"
}
}
}
},
"kind-of": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
"dev": true,
"requires": {
"is-buffer": "1.1.5"
}
}
}
},
"randombytes": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz",
"integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"dev": true,
"requires": {
"load-json-file": "1.1.0",
"normalize-package-data": "2.4.0",
"path-type": "1.1.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"dev": true,
"requires": {
"find-up": "1.1.2",
"read-pkg": "1.1.0"
}
},
"readable-stream": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"readdirp": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
"integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
"dev": true,
"requires": {
"graceful-fs": "4.1.11",
"minimatch": "3.0.4",
"readable-stream": "2.3.3",
"set-immediate-shim": "1.0.1"
}
},
"regex-cache": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
"integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
"dev": true,
"requires": {
"is-equal-shallow": "0.1.3",
"is-primitive": "2.0.0"
}
},
"remove-trailing-separator": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz",
"integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=",
"dev": true
},
"repeat-element": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=",
"dev": true
},
"repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
"dev": true
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true
},
"right-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
"integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
"dev": true,
"requires": {
"align-text": "0.1.4"
}
},
"ripemd160": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
"integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=",
"dev": true,
"requires": {
"hash-base": "2.0.2",
"inherits": "2.0.3"
}
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
"dev": true
},
"semver": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
"dev": true
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
"set-immediate-shim": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
"integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
"dev": true
},
"setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
"dev": true
},
"sha.js": {
"version": "2.4.8",
"resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz",
"integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=",
"dev": true,
"requires": {
"inherits": "2.0.3"
}
},
"source-list-map": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-1.1.2.tgz",
"integrity": "sha1-mIkBnRAkzOVc3AaUmDN+9hhqEaE=",
"dev": true
},
"source-map": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=",
"dev": true
},
"spdx-correct": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
"integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
"dev": true,
"requires": {
"spdx-license-ids": "1.2.2"
}
},
"spdx-expression-parse": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
"integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=",
"dev": true
},
"spdx-license-ids": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
"integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=",
"dev": true
},
"stream-browserify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
"dev": true,
"requires": {
"inherits": "2.0.3",
"readable-stream": "2.3.3"
}
},
"stream-http": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz",
"integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==",
"dev": true,
"requires": {
"builtin-status-codes": "3.0.0",
"inherits": "2.0.3",
"readable-stream": "2.3.3",
"to-arraybuffer": "1.0.1",
"xtend": "4.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"dev": true,
"requires": {
"is-utf8": "0.2.1"
}
},
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"dev": true,
"requires": {
"has-flag": "1.0.0"
}
},
"tapable": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.7.tgz",
"integrity": "sha1-5GwNqsuyuKmLmwzqD0BSEFgX7Vw=",
"dev": true
},
"timers-browserify": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz",
"integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=",
"dev": true,
"requires": {
"setimmediate": "1.0.5"
}
},
"to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
"dev": true
},
"ts-loader": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-2.0.3.tgz",
"integrity": "sha1-ibjIdZjwSN8GV2bgfhU48OrrEWU=",
"dev": true,
"requires": {
"colors": "1.1.2",
"enhanced-resolve": "3.3.0",
"loader-utils": "1.1.0",
"semver": "5.3.0"
}
},
"tty-browserify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
"typescript": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.2.tgz",
"integrity": "sha1-8PBF4Zb2mnLwayX9O9OdAcPOmYQ=",
"dev": true
},
"uglify-js": {
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"dev": true,
"requires": {
"source-map": "0.5.6",
"uglify-to-browserify": "1.0.2",
"yargs": "3.10.0"
},
"dependencies": {
"yargs": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"dev": true,
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
"decamelize": "1.2.0",
"window-size": "0.1.0"
}
}
}
},
"uglify-to-browserify": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
"integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
"dev": true,
"optional": true
},
"url": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
"integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
"dev": true,
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
},
"dependencies": {
"punycode": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
"dev": true
}
}
},
"util": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true,
"requires": {
"inherits": "2.0.1"
},
"dependencies": {
"inherits": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
"dev": true
}
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
"validate-npm-package-license": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
"integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
"dev": true,
"requires": {
"spdx-correct": "1.0.2",
"spdx-expression-parse": "1.0.4"
}
},
"vm-browserify": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"dev": true,
"requires": {
"indexof": "0.0.1"
}
},
"watchpack": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz",
"integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=",
"dev": true,
"requires": {
"async": "2.5.0",
"chokidar": "1.7.0",
"graceful-fs": "4.1.11"
}
},
"webpack": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-2.5.1.tgz",
"integrity": "sha1-YXQvDPivVVuHRgqc2Lui8ePuL84=",
"dev": true,
"requires": {
"acorn": "5.1.1",
"acorn-dynamic-import": "2.0.2",
"ajv": "4.11.8",
"ajv-keywords": "1.5.1",
"async": "2.5.0",
"enhanced-resolve": "3.3.0",
"interpret": "1.0.3",
"json-loader": "0.5.7",
"json5": "0.5.1",
"loader-runner": "2.3.0",
"loader-utils": "0.2.17",
"memory-fs": "0.4.1",
"mkdirp": "0.5.1",
"node-libs-browser": "2.0.0",
"source-map": "0.5.6",
"supports-color": "3.2.3",
"tapable": "0.2.7",
"uglify-js": "2.8.29",
"watchpack": "1.4.0",
"webpack-sources": "0.2.3",
"yargs": "6.6.0"
},
"dependencies": {
"loader-utils": {
"version": "0.2.17",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",
"integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",
"dev": true,
"requires": {
"big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1",
"object-assign": "4.1.1"
}
}
}
},
"webpack-sources": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.2.3.tgz",
"integrity": "sha1-F8Yr+vE8cH+dAsR54Nzd6DgGl/s=",
"dev": true,
"requires": {
"source-list-map": "1.1.2",
"source-map": "0.5.6"
}
},
"which-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
"dev": true
},
"window-size": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
"dev": true
},
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
"dev": true
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true,
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1"
}
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
"dev": true
},
"xterm": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/xterm/-/xterm-2.8.1.tgz",
"integrity": "sha512-AuqLOWpprmhSe4TcGE6Gh2uwkR0wUC95V0Q736OFUmG+84W+w+g6RzcgVhrbOTo/Fzcq9i0TRR5nYksRt2DSIQ=="
},
"y18n": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
"dev": true
},
"yargs": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
"integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=",
"dev": true,
"requires": {
"camelcase": "3.0.0",
"cliui": "3.2.0",
"decamelize": "1.2.0",
"get-caller-file": "1.0.2",
"os-locale": "1.4.0",
"read-pkg-up": "1.0.1",
"require-directory": "2.1.1",
"require-main-filename": "1.0.1",
"set-blocking": "2.0.0",
"string-width": "1.0.2",
"which-module": "1.0.0",
"y18n": "3.2.1",
"yargs-parser": "4.2.1"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
"dev": true
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"dev": true,
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wrap-ansi": "2.1.0"
}
}
}
},
"yargs-parser": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
"integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=",
"dev": true,
"requires": {
"camelcase": "3.0.0"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
"dev": true
}
}
}
}
}
{
"devDependencies": {
"ts-loader": "^2.0.3",
"typescript": "^2.3.2",
"webpack": "^2.5.1"
},
"dependencies": {
"xterm": "^2.7.0"
}
}
import * as bare from "hterm";
import * as bareLib from "htermLib";
export class TermHterm {
elem: HTMLElement;
term: bare.Terminal;
io: bare.IO;
columns: number;
rows: number;
// to "show" the current message when removeMessage() is called
message: string;
constructor(elem: HTMLElement) {
this.elem = elem;
hterm.defaultStorage = new bareLib.Storage.Memory();
this.term = new bare.Terminal();
this.term.getPrefs().set("send-encoding", "raw");
this.term.decorate(this.elem);
this.io = this.term.io.push();
this.term.installKeyboard();
};
info(): { columns: number, rows: number } {
return { columns: this.columns, rows: this.rows };
};
output(data: string) {
if (this.term.io != null) {
this.term.io.writeUTF16(data);
}
};
showMessage(message: string, timeout: number) {
this.message = message;
if (timeout > 0) {
this.term.io.showOverlay(message, timeout);
} else {
this.term.io.showOverlay(message, null);
}
};
removeMessage(): void {
// there is no hideOverlay(), so show the same message with 0 sec
this.term.io.showOverlay(this.message, 0);
}
setWindowTitle(title: string) {
this.term.setWindowTitle(title);
};
setPreferences(value: object) {
Object.keys(value).forEach((key) => {
this.term.getPrefs().set(key, value[key]);
});
};
onInput(callback: (input: string) => void) {
this.io.onVTKeystroke = (data) => {
callback(data);
};
this.io.sendString = (data) => {
callback(data);
};
};
onResize(callback: (colmuns: number, rows: number) => void) {
this.io.onTerminalResize = (columns: number, rows: number) => {
this.columns = columns;
this.rows = rows;
callback(columns, rows);
};
};
deactivate(): void {
this.io.onVTKeystroke = null;
this.io.sendString = null
this.io.onTerminalResize = null;
this.term.uninstallKeyboard();
}
reset(): void {
this.removeMessage();
this.term.installKeyboard();
}
close(): void {
this.term.uninstallKeyboard();
}
}
import { TermHterm } from "./hterm";
import { TermXterm } from "./xterm";
import { Terminal, WebTTY, protocols } from "./webtty";
import { ConnectionFactory } from "./websocket";
// @TODO remove these
declare var gotty_auth_token: string;
declare var gotty_term: string;
const elem = document.getElementById("terminal")
if (elem !== null) {
var term: Terminal;
if (gotty_term == "hterm") {
term = new TermHterm(elem);
} else {
term = new TermXterm(elem);
}
const httpsEnabled = window.location.protocol == "https:";
const url = (httpsEnabled ? 'wss://' : 'ws://') + window.location.host + window.location.pathname + 'ws';
const args = window.location.search;
const factory = new ConnectionFactory(url, protocols);
const wt = new WebTTY(term, factory, args, gotty_auth_token);
const closer = wt.open();
window.addEventListener("unload", () => {
closer();
term.close();
});
};
export class ConnectionFactory {
url: string;
protocols: string[];
constructor(url: string, protocols: string[]) {
this.url = url;
this.protocols = protocols;
};
create(): Connection {
return new Connection(this.url, this.protocols);
};
}
export class Connection {
bare: WebSocket;
constructor(url: string, protocols: string[]) {
this.bare = new WebSocket(url, protocols);
}
open() {
// nothing todo for websocket
};
close() {
this.bare.close();
};
send(data: string) {
this.bare.send(data);
};
isOpen(): boolean {
if (this.bare.readyState == WebSocket.CONNECTING ||
this.bare.readyState == WebSocket.OPEN) {
return true
}
return false
}
onOpen(callback: () => void) {
this.bare.onopen = (event) => {
callback();
}
};
onReceive(callback: (data: string) => void) {
this.bare.onmessage = (event) => {
callback(event.data);
}
};
onClose(callback: () => void) {
this.bare.onclose = (event) => {
callback();
};
};
}
export const protocols = ["webtty"];
export const msgInputUnknown = '0';
export const msgInput = '1';
export const msgPing = '2';
export const msgResizeTerminal = '3';
export const msgUnknownOutput = '0';
export const msgOutput = '1';
export const msgPong = '2';
export const msgSetWindowTitle = '3';
export const msgSetPreferences = '4';
export const msgSetReconnect = '5';
export interface Terminal {
info(): { columns: number, rows: number };
output(data: string): void;
showMessage(message: string, timeout: number): void;
removeMessage(): void;
setWindowTitle(title: string): void;
setPreferences(value: object): void;
onInput(callback: (input: string) => void): void;
onResize(callback: (colmuns: number, rows: number) => void): void;
reset(): void;
deactivate(): void;
close(): void;
}
export interface Connection {
open(): void;
close(): void;
send(data: string): void;
isOpen(): boolean;
onOpen(callback: () => void): void;
onReceive(callback: (data: string) => void): void;
onClose(callback: () => void): void;
}
export interface ConnectionFactory {
create(): Connection;
}
export class WebTTY {
term: Terminal;
connectionFactory: ConnectionFactory;
args: string;
authToken: string;
reconnect: number;
constructor(term: Terminal, connectionFactory: ConnectionFactory, args: string, authToken: string) {
this.term = term;
this.connectionFactory = connectionFactory;
this.args = args;
this.authToken = authToken;
this.reconnect = -1;
};
open() {
let connection = this.connectionFactory.create();
let pingTimer: number;
let reconnectTimeout: number;
const setup = () => {
connection.onOpen(() => {
const termInfo = this.term.info();
connection.send(JSON.stringify(
{
Arguments: this.args,
AuthToken: this.authToken,
}
));
const resizeHandler = (colmuns: number, rows: number) => {
connection.send(
msgResizeTerminal + JSON.stringify(
{
columns: colmuns,
rows: rows
}
)
);
};
this.term.onResize(resizeHandler);
resizeHandler(termInfo.columns, termInfo.rows);
this.term.onInput(
(input: string) => {
connection.send(msgInput + input);
}
);
pingTimer = setInterval(() => {
connection.send(msgPing)
}, 30 * 1000);
});
connection.onReceive((data) => {
const payload = data.slice(1);
switch (data[0]) {
case msgOutput:
this.term.output(
decodeURIComponent(Array.prototype.map.call(atob(payload), function(c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''))
);
break;
case msgPong:
break;
case msgSetWindowTitle:
this.term.setWindowTitle(payload);
break;
case msgSetPreferences:
const preferences = JSON.parse(payload);
this.term.setPreferences(preferences);
break;
case msgSetReconnect:
const autoReconnect = JSON.parse(payload);
console.log("Enabling reconnect: " + autoReconnect + " seconds")
this.reconnect = autoReconnect;
break;
}
});
connection.onClose(() => {
clearInterval(pingTimer);
this.term.deactivate();
this.term.showMessage("Connection Closed", 0);
if (this.reconnect > 0) {
reconnectTimeout = setTimeout(() => {
connection = this.connectionFactory.create();
this.term.reset();
setup();
}, this.reconnect * 1000);
}
});
connection.open();
}
setup();
return () => {
clearTimeout(reconnectTimeout);
connection.close();
}
};
};
import * as bare from "xterm";
bare.loadAddon("fit");
export class TermXterm {
elem: HTMLElement;
message: HTMLElement;
messageTimeout: number;
messageTimer: number;
term: bare;
resizeListener: () => void;
constructor(elem: HTMLElement) {
this.elem = elem;
this.term = new bare();
this.message = elem.ownerDocument.createElement("div");
this.message.className = "xterm-overlay";
this.messageTimeout = 2000;
this.resizeListener = () => {
this.term.fit();
this.term.scrollToBottom();
this.showMessage(String(this.term.cols) + "x" + String(this.term.rows), this.messageTimeout);
};
this.term.on("open", () => {
this.resizeListener();
window.addEventListener("resize", () => { this.resizeListener(); });
});
this.term.open(elem, true);
};
info(): { columns: number, rows: number } {
return { columns: this.term.cols, rows: this.term.rows };
};
output(data: string) {
this.term.write(data);
};
showMessage(message: string, timeout: number) {
this.message.textContent = message;
this.elem.appendChild(this.message);
if (this.messageTimer) {
clearTimeout(this.messageTimer);
}
if (timeout > 0) {
this.messageTimer = setTimeout(() => {
this.elem.removeChild(this.message);
}, timeout);
}
};
removeMessage(): void {
if (this.message.parentNode == this.elem) {
this.elem.removeChild(this.message);
}
}
setWindowTitle(title: string) {
document.title = title;
};
setPreferences(value: object) {
};
onInput(callback: (input: string) => void) {
this.term.on("data", (data) => {
callback(data);
});
};
onResize(callback: (colmuns: number, rows: number) => void) {
this.term.on("resize", (data) => {
callback(data.cols, data.rows);
});
};
deactivate(): void {
this.term.off("data");
this.term.off("resize");
this.term.blur();
}
reset(): void {
this.removeMessage();
this.term.clear();
}
close(): void {
window.removeEventListener("resize", this.resizeListener);
this.term.destroy();
}
}
{
"compilerOptions": {
"strictNullChecks": true,
"noUnusedLocals" : true,
"noImplicitThis": true,
"alwaysStrict": true,
"outDir": "./dist/",
"declaration": true,
"sourceMap": true,
"target": "es5",
"module": "commonJS",
"baseUrl": ".",
"paths": {
"*": ["./typings/*"]
}
},
"exclude": [
"node_modules"
]
}
export interface Terminal {
io: IO;
onTerminalReady: () => void;
getPrefs(): Prefs;
decorate(HTMLElement);
installKeyboard(): void;
uninstallKeyboard(): void;
setWindowTitle(title: string): void;
reset(): void;
softReset(): void;
}
export interface TerminalConstructor {
new (): Terminal;
(): Terminal;
}
export interface IO {
writeUTF8: ((data: string) => void);
writeUTF16: ((data: string) => void);
onVTKeystroke: ((data: string) => void) | null;
sendString: ((data: string) => void) | null;
onTerminalResize: ((columns: number, rows: number) => void) | null;
push(): IO;
writeUTF(data: string);
showOverlay(message: string, timeout: number | null);
}
export interface Prefs {
set(key: string, value: string): void;
}
export interface Storage {
}
export var Terminal: TerminalConstructor;
// @TODO: is there better way?
// exported variables are forced to be read-protected.
declare global {
var hterm: {
defaultStorage: Storage;
};
}
export interface Storage {
}
export interface Memory {
new (): Storage;
Memory(): Storage
}
export var Storage: {
Memory: Memory
};
module.exports = {
entry: "./src/main.ts",
output: {
filename: "./dist/bundle.js"
},
externals: {
"hterm": "hterm",
"htermLib": "lib"
},
devtool: "source-map",
resolve: {
extensions: [".ts", ".tsx", ".js"],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: [/node_modules/],
}
]
}
};
(function() {
var httpsEnabled = window.location.protocol == "https:";
var args = window.location.search;
var url = (httpsEnabled ? 'wss://' : 'ws://') + window.location.host + window.location.pathname + 'ws';
var protocols = ["webtty"];
var autoReconnect = -1;
var openWs = function() {
var ws = new WebSocket(url, protocols);
var term;
var pingTimer;
ws.onopen = function(event) {
ws.send(JSON.stringify({ Arguments: args, AuthToken: gotty_auth_token,}));
pingTimer = setInterval(sendPing, 30 * 1000, ws);
hterm.defaultStorage = new lib.Storage.Memory();
term = new hterm.Terminal();
term.getPrefs().set("send-encoding", "raw");
term.onTerminalReady = function() {
var io = term.io.push();
io.onVTKeystroke = function(str) {
ws.send("1" + str);
};
io.sendString = io.onVTKeystroke;
io.onTerminalResize = function(columns, rows) {
ws.send(
"3" + JSON.stringify(
{
columns: columns,
rows: rows,
}
)
)
};
term.installKeyboard();
};
term.decorate(document.getElementById("terminal"));
};
ws.onmessage = function(event) {
data = event.data.slice(1);
switch(event.data[0]) {
case '1':
term.io.writeUTF8(window.atob(data));
break;
case '2':
// pong
break;
case '3':
term.setWindowTitle(data);
break;
case '4':
preferences = JSON.parse(data);
Object.keys(preferences).forEach(function(key) {
console.log("Setting " + key + ": " + preferences[key]);
term.getPrefs().set(key, preferences[key]);
});
break;
case '5':
autoReconnect = JSON.parse(data);
console.log("Enabling reconnect: " + autoReconnect + " seconds")
break;
}
};
ws.onclose = function(event) {
if (term) {
term.uninstallKeyboard();
term.io.showOverlay("Connection Closed", null);
}
clearInterval(pingTimer);
if (autoReconnect > 0) {
setTimeout(openWs, autoReconnect * 1000);
}
};
}
var sendPing = function(ws) {
ws.send("2");
}
openWs();
})()
html, body, #terminal {
background: black;
height: 100%;
width: 100%;
padding: 0%;
margin: 0%;
}
\ No newline at end of file
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
<html> <html>
<head> <head>
<title>{{ .title }}</title> <title>{{ .title }}</title>
<style>body, #terminal {position: absolute; height: 100%; width: 100%; margin: 0px;}</style>
<link rel="icon" type="image/png" href="favicon.png"> <link rel="icon" type="image/png" href="favicon.png">
<link rel="stylesheet" href="./css/index.css" />
<link rel="stylesheet" href="./css/xterm.css" />
<link rel="stylesheet" href="./css/xterm_customize.css" />
<script src="/js/hterm.js"></script>
</head> </head>
<body> <body>
<div id="terminal"></div> <div id="terminal"></div>
<script src="./js/hterm.js"></script>
<script src="./auth_token.js"></script> <script src="./auth_token.js"></script>
<script src="./js/gotty.js"></script> <script src="./config.js"></script>
<script src="./js/bundle.js"></script>
</body> </body>
</html> </html>
.terminal {
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace;
}
.xterm-overlay {
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace;
border-radius: 15px;
font-size: xx-large;
color: black;
background: white;
opacity: 0.75;
padding: 0.2em 0.5em 0.2em 0.5em;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
user-select: none;
transition: opacity 180ms ease-in;
}
\ No newline at end of file
This diff could not be displayed because it is too large.
...@@ -218,6 +218,11 @@ func (server *Server) handleAuthToken(w http.ResponseWriter, r *http.Request) { ...@@ -218,6 +218,11 @@ func (server *Server) handleAuthToken(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("var gotty_auth_token = '" + server.options.Credential + "';")) w.Write([]byte("var gotty_auth_token = '" + server.options.Credential + "';"))
} }
func (server *Server) handleConfig(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/javascript")
w.Write([]byte("var gotty_term = '" + server.options.Term + "';"))
}
// titleVariables merges maps in a specified order. // titleVariables merges maps in a specified order.
// varUnits are name-keyed maps, whose names will be iterated using order. // varUnits are name-keyed maps, whose names will be iterated using order.
func (server *Server) titleVariables(order []string, varUnits map[string]map[string]interface{}) map[string]interface{} { func (server *Server) titleVariables(order []string, varUnits map[string]map[string]interface{}) map[string]interface{} {
......
...@@ -29,6 +29,7 @@ type Options struct { ...@@ -29,6 +29,7 @@ type Options struct {
Width int `hcl:"width" flagName:"width" flagDescribe:"Static width of the screen, 0(default) means dynamically resize" default:"0"` Width int `hcl:"width" flagName:"width" flagDescribe:"Static width of the screen, 0(default) means dynamically resize" default:"0"`
Height int `hcl:"height" flagName:"height" flagDescribe:"Static height of the screen, 0(default) means dynamically resize" default:"0"` Height int `hcl:"height" flagName:"height" flagDescribe:"Static height of the screen, 0(default) means dynamically resize" default:"0"`
WSOrigin string `hcl:"ws_origin" flagName:"ws-origin" flagDescribe:"A regular expression that matches origin URLs to be accepted by WebSocket. No cross origin requests are acceptable by default" default:""` WSOrigin string `hcl:"ws_origin" flagName:"ws-origin" flagDescribe:"A regular expression that matches origin URLs to be accepted by WebSocket. No cross origin requests are acceptable by default" default:""`
Term string `hcl:"term" flagName:"term" flagDescribe:"Terminal name to use on the browser, one of xterm or hterm." default:"xterm"`
TitleVariables map[string]interface{} TitleVariables map[string]interface{}
} }
......
...@@ -186,7 +186,9 @@ func (server *Server) setupHandlers(ctx context.Context, cancel context.CancelFu ...@@ -186,7 +186,9 @@ func (server *Server) setupHandlers(ctx context.Context, cancel context.CancelFu
siteMux.HandleFunc(url.Path, server.handleIndex) siteMux.HandleFunc(url.Path, server.handleIndex)
siteMux.Handle(url.Path+"js/", http.StripPrefix(url.Path, staticFileHandler)) siteMux.Handle(url.Path+"js/", http.StripPrefix(url.Path, staticFileHandler))
siteMux.Handle(url.Path+"favicon.png", http.StripPrefix(url.Path, staticFileHandler)) siteMux.Handle(url.Path+"favicon.png", http.StripPrefix(url.Path, staticFileHandler))
siteMux.Handle(url.Path+"css/", http.StripPrefix(url.Path, staticFileHandler))
siteMux.HandleFunc(url.Path+"auth_token.js", server.handleAuthToken) siteMux.HandleFunc(url.Path+"auth_token.js", server.handleAuthToken)
siteMux.HandleFunc(url.Path+"config.js", server.handleConfig)
siteHandler := http.Handler(siteMux) siteHandler := http.Handler(siteMux)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!