kopia lustrzana https://github.com/c9/core
Fixes +6095. Only see kaefer output with debug=3
rodzic
40648d045f
commit
f9520fa811
|
@ -21,6 +21,7 @@ module.exports = function(options) {
|
||||||
|
|
||||||
var workspaceDir = options.workspaceDir;
|
var workspaceDir = options.workspaceDir;
|
||||||
var debug = options.debug !== undefined ? options.debug : false;
|
var debug = options.debug !== undefined ? options.debug : false;
|
||||||
|
|
||||||
var collab = options.collab;
|
var collab = options.collab;
|
||||||
var packaging = options.packaging;
|
var packaging = options.packaging;
|
||||||
var staticPrefix = options.staticPrefix;
|
var staticPrefix = options.staticPrefix;
|
||||||
|
|
|
@ -7,7 +7,7 @@ var EventEmitter = events.EventEmitter;
|
||||||
|
|
||||||
var exports = {};
|
var exports = {};
|
||||||
|
|
||||||
var DEBUG = typeof location != "undefined" && location.href.match(/debug=[12]/) ? true : false;
|
var DEBUG = typeof location != "undefined" && location.href.match(/debug=[123]/) ? true : false;
|
||||||
|
|
||||||
// Only define Node-style usage using sync I/O if in node.
|
// Only define Node-style usage using sync I/O if in node.
|
||||||
if (typeof module === "object") (function () {
|
if (typeof module === "object") (function () {
|
||||||
|
|
|
@ -39,6 +39,9 @@ define(function(require, exports, module) {
|
||||||
var protocolVersion = require("kaefer/version").protocol;
|
var protocolVersion = require("kaefer/version").protocol;
|
||||||
var smith = require("smith");
|
var smith = require("smith");
|
||||||
var URL = require("url");
|
var URL = require("url");
|
||||||
|
var DEBUG = options.debug
|
||||||
|
&& (typeof location == "undefined"
|
||||||
|
|| location.href.indexOf("debug=3") > -1);
|
||||||
|
|
||||||
// The connected vfs unique id
|
// The connected vfs unique id
|
||||||
var id;
|
var id;
|
||||||
|
@ -76,11 +79,11 @@ define(function(require, exports, module) {
|
||||||
if (loaded) return false;
|
if (loaded) return false;
|
||||||
loaded = true;
|
loaded = true;
|
||||||
|
|
||||||
smith.debug = options.debug;
|
smith.debug = DEBUG;
|
||||||
|
|
||||||
connection = connectClient(connectEngine, {
|
connection = connectClient(connectEngine, {
|
||||||
preConnectCheck: preConnectCheck,
|
preConnectCheck: preConnectCheck,
|
||||||
debug: options.debug
|
debug: DEBUG
|
||||||
});
|
});
|
||||||
|
|
||||||
connection.on("away", emit.bind(null, "away"));
|
connection.on("away", emit.bind(null, "away"));
|
||||||
|
|
|
@ -119,7 +119,7 @@ function plugin(options, imports, register) {
|
||||||
token: req.params.token
|
token: req.params.token
|
||||||
});
|
});
|
||||||
|
|
||||||
opts.options.debug = req.params.debug == 1;
|
opts.options.debug = req.params.debug !== undefined;
|
||||||
res.setHeader("Cache-Control", "no-cache, no-store");
|
res.setHeader("Cache-Control", "no-cache, no-store");
|
||||||
res.render(__dirname + "/views/standalone.html.ejs", {
|
res.render(__dirname + "/views/standalone.html.ejs", {
|
||||||
architectConfig: getConfig(configType, opts),
|
architectConfig: getConfig(configType, opts),
|
||||||
|
|
Ładowanie…
Reference in New Issue