kopia lustrzana https://github.com/c9/core
Merge branch 'master' of github.com:c9/newclient into fix/log-workspace-loading
Conflicts: plugins/c9.ide.performancestats/stats.js plugins/c9.vfs.server/vfs.performancestats.jspull/9/merge
commit
15115f72c9
|
@ -21,11 +21,10 @@ We have several documentation resources for you:
|
|||
<tr><th>SDK documentation</th><td>http://cloud9-sdk.readme.io/v0.1/docs</td></tr>
|
||||
<tr><th>API documentation</th><td>http://docs.c9.io/api</td></tr>
|
||||
<tr><th>User documentation</th><td>http://docs.c9.io</td></tr>
|
||||
<tr><th>User docs repo</th><td>https://github.com/c9/docs.c9.io</td></tr>
|
||||
</table>
|
||||
|
||||
Please joing the mailinglist to get support or give support to the growing community of plugin developers:
|
||||
https://groups.google.com/forum/#!forum/cloud9-plugin-development
|
||||
https://groups.google.com/forum/#!forum/cloud9-sdk
|
||||
|
||||
#### Installation ####
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"c9.ide.find": "#be3bca94b7",
|
||||
"c9.ide.find.infiles": "#462928475c",
|
||||
"c9.ide.find.replace": "#fe41fa768d",
|
||||
"c9.ide.run.debug": "#b734a2a47f",
|
||||
"c9.ide.run.debug": "#9a05fadc55",
|
||||
"c9.ide.ace.emmet": "#e5f1a92ac3",
|
||||
"c9.ide.ace.gotoline": "#4d1a93172c",
|
||||
"c9.ide.ace.keymaps": "#422e83553b",
|
||||
|
|
|
@ -71,6 +71,11 @@ function plugin(options, imports, register) {
|
|||
email: req.user.email
|
||||
};
|
||||
}
|
||||
else if (req.session) {
|
||||
customData.user = {
|
||||
id: req.session.uid
|
||||
};
|
||||
}
|
||||
|
||||
raygunClient.send(err, customData, function() {}, {
|
||||
host: parsedUrl.hostname,
|
||||
|
|
|
@ -357,7 +357,7 @@ define(function(require, exports, module) {
|
|||
},
|
||||
|
||||
/**
|
||||
* Spawns a child process in a TMUX and returns a stream object.
|
||||
* Spawns a child process in a TMUX session and returns a stream object.
|
||||
* Use this method if the process you wish to start requires a
|
||||
* terminal (for instance VI).
|
||||
*
|
||||
|
|
|
@ -50,6 +50,11 @@ define(function(require, exports, module) {
|
|||
showDisconnect(e);
|
||||
});
|
||||
});
|
||||
vfs.on("away", function(){
|
||||
});
|
||||
vfs.on("back", function(){
|
||||
hideDisconnect();
|
||||
});
|
||||
vfs.on("connect", function(){
|
||||
hideDisconnect();
|
||||
});
|
||||
|
|
|
@ -139,10 +139,12 @@ define(function(require, exports, module) {
|
|||
watch("~/.c9/plugins/" + pluginPath);
|
||||
|
||||
var cfg = options.plugins[path];
|
||||
cfg.packagePath = join(vfs.baseUrl, c9.projectId, "plugins",
|
||||
auth.accessToken, pluginPath.replace(/^plugins\//, ""));
|
||||
cfg.staticPrefix = join(vfs.baseUrl, c9.projectId, "plugins",
|
||||
auth.accessToken, name);
|
||||
var host = vfs.baseUrl + "/";
|
||||
var base = join(String(c9.projectId),
|
||||
"plugins", auth.accessToken);
|
||||
|
||||
cfg.packagePath = host + join(base, pluginPath.replace(/^plugins\//, ""));
|
||||
cfg.staticPrefix = host + join(base, name);
|
||||
cfg.apikey = "0000000000000000000000000000=";
|
||||
|
||||
config.push(cfg);
|
||||
|
|
|
@ -66,9 +66,11 @@ define(function(require, exports, module) {
|
|||
names.push(name);
|
||||
|
||||
var path = options.packagePath + ".js";
|
||||
var base = join(vfs.baseUrl, c9.projectId, "plugins", auth.accessToken);
|
||||
options.packagePath = join(base, path.replace(/^plugins\//, ""));
|
||||
options.staticPrefix = join(base, name);
|
||||
var host = vfs.baseUrl + "/";
|
||||
var base = join(String(c9.projectId), "plugins", auth.accessToken);
|
||||
|
||||
options.packagePath = host + join(base, path.replace(/^plugins\//, ""));
|
||||
options.staticPrefix = host + join(base, name);
|
||||
|
||||
if (!options.setup) {
|
||||
wait++;
|
||||
|
|
|
@ -19,9 +19,11 @@ function Vfs(vfs, master, options) {
|
|||
this.vfs = vfs;
|
||||
this.master = master;
|
||||
this.debug = options.debug || false;
|
||||
this.logger = options.logger || {log: function(){}};
|
||||
this.readonly = options.readonly || false;
|
||||
this.public = options.public || false;
|
||||
this.vfsOptions = options.vfsOptions || {};
|
||||
this.pid = this.vfsOptions.pid;
|
||||
var extendToken = options.extendToken;
|
||||
|
||||
this.homeDir = options.homeDir;
|
||||
|
@ -152,6 +154,7 @@ Vfs.prototype._createEngine = function(vfs, options) {
|
|||
});
|
||||
|
||||
this.keepAliveTimer = null;
|
||||
var listeningForEIOSocketClose = false;
|
||||
|
||||
this.workers = 0;
|
||||
|
||||
|
@ -167,6 +170,35 @@ Vfs.prototype._createEngine = function(vfs, options) {
|
|||
that.socket.disconnect();
|
||||
|
||||
that.socket = socket;
|
||||
/* - socket is the reliablesocket,
|
||||
- socket.socket is the reconnectsocket,
|
||||
- socket.socket.socket is engineio's socket */
|
||||
if (socket.socket) {
|
||||
/* Add listener to core Engine.io socket used for user communication
|
||||
to track and log all reasons causing it to close so when users
|
||||
complain about disconnects we can investigate what's causing them */
|
||||
var listenForEIOSocketClose = function (eioSocket) {
|
||||
if (!eioSocket || listeningForEIOSocketClose) return;
|
||||
eioSocket.once("close", function (reason, description) {
|
||||
var logMetadata = {message: "Socket closed", collab: options.collab, reason: reason, description: description, id: that.id, sid: socket.id, pid: that.pid};
|
||||
console.log(logMetadata);
|
||||
that.logger.log(logMetadata);
|
||||
listeningForEIOSocketClose = false;
|
||||
});
|
||||
listeningForEIOSocketClose = true;
|
||||
};
|
||||
socket.socket.once('away', function() {
|
||||
listenForEIOSocketClose(socket.socket.socket);
|
||||
});
|
||||
socket.socket.once('back', function() {
|
||||
listenForEIOSocketClose(socket.socket.socket);
|
||||
});
|
||||
}
|
||||
socket.on('disconnect', function (err) {
|
||||
var logMetadata = {message: "Socket disconnected", collab: options.collab, err: err, id: that.id, sid: socket.id, pid: that.pid};
|
||||
console.log(logMetadata);
|
||||
that.logger.log(logMetadata);
|
||||
});
|
||||
|
||||
var transport = new smith.EngineIoTransport(socket, true);
|
||||
var worker = new VfsWorker(vfs);
|
||||
|
@ -185,7 +217,10 @@ Vfs.prototype._createEngine = function(vfs, options) {
|
|||
}
|
||||
|
||||
worker.on("disconnect", function() {
|
||||
console.log("VFS socket disconnect:", options.collab, that.id, socket.id);
|
||||
var logMetadata = {collab: options.collab, id: that.id, sid: socket.id, pid: that.pid};
|
||||
console.log("VFS socket disconnect:", logMetadata);
|
||||
logMetadata.message = "VFS socket disconnect";
|
||||
that.logger.log(logMetadata);
|
||||
if (options.collab) {
|
||||
if (collabApi)
|
||||
return disposeCollabClient();
|
||||
|
|
Ładowanie…
Reference in New Issue