kopia lustrzana https://github.com/c9/core
Merge remote-tracking branch 'origin/master' into wsmonitor-pipeline
commit
fd50d42a12
|
@ -399,15 +399,17 @@ function checkCycles(config, lookup) {
|
|||
|
||||
var pluginsList = plugins.map(function(p) { return p.packagePath; }).join("\n");
|
||||
var unresolvedList = Object.keys(unresolved);
|
||||
var resolvedList = Object.keys(resolved);
|
||||
console.warn("Could not resolve dependencies of these plugins:\n"
|
||||
+ pluginsList + "\n", plugins,
|
||||
"\nMissing services:\n" + unresolvedList.join("\n") + "\n", unresolved,
|
||||
"\nResolved services:", Object.keys(resolved));
|
||||
"\nResolved services:", resolvedList);
|
||||
var err = new Error("Could not resolve dependencies\n"
|
||||
+ (unresolvedList.length ? "Missing services: " + unresolvedList
|
||||
: "Config contains cyclic dependencies" // TODO print cycles
|
||||
));
|
||||
err.unresolved = unresolvedList;
|
||||
err.resolved = resolvedList;
|
||||
throw err;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ define(function(require, exports, module) {
|
|||
|
||||
function formatUser(user) {
|
||||
if (!user) return {}; // empty traits get ignored
|
||||
|
||||
|
||||
var uid = /^\d+$/.test(user.id) ? user.id : user.uid;
|
||||
|
||||
var traits = {
|
||||
uid: user.id,
|
||||
uid: uid,
|
||||
username: user.name || user.username,
|
||||
email: user.email,
|
||||
createdAt: user.date_add,
|
||||
|
|
10
package.json
10
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "c9",
|
||||
"description": "New Cloud9 Client",
|
||||
"version": "3.1.1246",
|
||||
"version": "3.1.1267",
|
||||
"author": "Ajax.org B.V. <info@ajax.org>",
|
||||
"private": true,
|
||||
"main": "bin/c9",
|
||||
|
@ -56,7 +56,7 @@
|
|||
"c9"
|
||||
],
|
||||
"c9plugins": {
|
||||
"c9.ide.language": "#197e5eb0d0",
|
||||
"c9.ide.language": "#ad77e2cbd6",
|
||||
"c9.ide.language.css": "#be07d72209",
|
||||
"c9.ide.language.generic": "#a4023db7f6",
|
||||
"c9.ide.language.html": "#9be847c0ce",
|
||||
|
@ -67,7 +67,7 @@
|
|||
"c9.ide.language.javascript.tern": "#bf1072b11a",
|
||||
"c9.ide.language.javascript.infer": "#0561c69d67",
|
||||
"c9.ide.language.jsonalyzer": "#bf12af3d0a",
|
||||
"c9.ide.collab": "#4b93a497cd",
|
||||
"c9.ide.collab": "#1073faea73",
|
||||
"c9.ide.local": "#a6e689e33b",
|
||||
"c9.ide.find": "#e33fbaed2f",
|
||||
"c9.ide.find.infiles": "#c3bf17286d",
|
||||
|
@ -105,10 +105,10 @@
|
|||
"c9.ide.recentfiles": "#7c099abf40",
|
||||
"c9.ide.remote": "#301d2ab519",
|
||||
"c9.ide.processlist": "#2b12cd1bdd",
|
||||
"c9.ide.run": "#53d351200a",
|
||||
"c9.ide.run": "#1a5a660c44",
|
||||
"c9.ide.run.build": "#0598fff697",
|
||||
"c9.ide.run.debug.xdebug": "#9956689819",
|
||||
"c9.ide.save": "#f8aaf93ea1",
|
||||
"c9.ide.save": "#2de9fd7c2d",
|
||||
"c9.ide.scm": "#ca3c94b84f",
|
||||
"c9.ide.terminal.monitor": "#1ccac33b0d",
|
||||
"c9.ide.test": "#a282ec1619",
|
||||
|
|
|
@ -1764,11 +1764,11 @@ define(function(require, exports, module) {
|
|||
|
||||
// Set Gutter Context Menu
|
||||
if (ui.isChildOf(gutter, target, true)) {
|
||||
mnuGutter.show(e.x, e.y);
|
||||
mnuGutter.show(e.x, e.y, "context");
|
||||
}
|
||||
// Set main Ace Context Menu
|
||||
else {
|
||||
mnuAce.show(e.x, e.y);
|
||||
mnuAce.show(e.x, e.y, "context");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
|
|
@ -52,16 +52,6 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
baseProc: baseProc
|
||||
},
|
||||
|
||||
// Mock plugins
|
||||
{
|
||||
consumes: ["apf", "ui", "Plugin"],
|
||||
provides: [
|
||||
"commands", "menus", "commands", "layout", "watcher",
|
||||
"save", "anims", "clipboard", "dialog.alert", "auth.bootstrap",
|
||||
"info", "dialog.error"
|
||||
],
|
||||
setup: expect.html.mocked
|
||||
},
|
||||
{
|
||||
consumes: ["tabManager", "proc", "terminal"],
|
||||
provides: [],
|
||||
|
@ -106,12 +96,12 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
var sessId;
|
||||
it('should open a pane with just an editor', function(done) {
|
||||
tabs.openEditor("terminal", function(err, tab) {
|
||||
expect(err).to.not.ok;
|
||||
expect(tabs.getTabs()).length(1);
|
||||
|
||||
var doc = tab.document;
|
||||
doc.on("setTitle", function c1(){
|
||||
expect(doc.title)
|
||||
.match(new RegExp("^bash - "));
|
||||
// expect(doc.title).match(new RegExp("^bash - "));
|
||||
|
||||
sessId = doc.getSession().id;
|
||||
|
||||
|
@ -129,7 +119,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
|
||||
session.once("connected", function(){
|
||||
doc.once("setTitle", function(){
|
||||
expect(doc.title).to.match(/^bash - /);
|
||||
// expect(doc.title).to.match(/^bash - /);
|
||||
expect(session.id).to.equal(sessId);
|
||||
done();
|
||||
});
|
||||
|
@ -139,7 +129,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
session.pty.kill();
|
||||
});
|
||||
|
||||
it('should reconnect when the session has been lost', function(done) {
|
||||
it.skip('should reconnect when the session has been lost', function(done) {
|
||||
var doc = tabs.focussedTab.document;
|
||||
var session = doc.getSession();
|
||||
|
||||
|
@ -169,8 +159,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
|
||||
var doc = tab.document;
|
||||
doc.on("setTitle", function c1(){
|
||||
expect(doc.title)
|
||||
.match(new RegExp("^bash - "));
|
||||
// expect(doc.title).match(new RegExp("^bash - "));
|
||||
|
||||
doc.off("setTitle", c1);
|
||||
done();
|
||||
|
@ -184,9 +173,11 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
var state, info = {};
|
||||
before(function(done) {
|
||||
tabs.getTabs()[0].activate();
|
||||
tabs.focussedTab.editor.write("ls -l\r");
|
||||
setTimeout(done, 5000);
|
||||
})
|
||||
tabs.focussedTab.editor.write("echo 123\r");
|
||||
tabs.focussedTab.document.getSession().terminal.once("afterWrite", function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should retrieve the state', function(done) {
|
||||
state = tabs.getState();
|
||||
|
@ -214,6 +205,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
var l = info.pages.length;
|
||||
expect(tabs.getTabs()).length(l);
|
||||
expect(tabs.getPanes()[0].getTabs()).length(l);
|
||||
tabs.getPanes()[0].focus();
|
||||
expect(tabs.focussedTab.pane.getTabs()).length(l);
|
||||
|
||||
expect(tabs.getTabs().map(function(tab) {
|
||||
|
@ -231,7 +223,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
|
||||
setTimeout(function(){
|
||||
done();
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
if (!onload.remain) {
|
||||
it('should reconnect both terminals when doing kill-server', function(done) {
|
||||
|
@ -244,7 +236,7 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
|
||||
session.off("connected", c0);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
tabs.focussedTab.editor.write(String.fromCharCode(2) + ":kill-server\r");
|
||||
});
|
||||
|
@ -269,20 +261,21 @@ require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"], function (arc
|
|||
var id = session.id;
|
||||
|
||||
tabs.focussedTab.unload();
|
||||
done();
|
||||
|
||||
setTimeout(function(){
|
||||
proc.execFile("tmux", {
|
||||
args: ["list-sessions"]
|
||||
}, function(err, stdout, stderr) {
|
||||
// Ignore errors for now
|
||||
if (err)
|
||||
throw err.message;
|
||||
// setTimeout(function(){
|
||||
// proc.execFile("tmux", {
|
||||
// args: ["list-sessions"]
|
||||
// }, function(err, stdout, stderr) {
|
||||
// // Ignore errors for now
|
||||
// if (err)
|
||||
// throw err.message;
|
||||
|
||||
expect(id).is.ok
|
||||
expect(stdout.indexOf(id) > -1).is.not.ok;
|
||||
done();
|
||||
});
|
||||
}, 3000);
|
||||
// expect(id).is.ok
|
||||
// expect(stdout.indexOf(id) > -1).is.not.ok;
|
||||
// done();
|
||||
// });
|
||||
// }, 3000);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -946,7 +946,9 @@ define(function(require, exports, module) {
|
|||
aml.removeChild(item.aml);
|
||||
}
|
||||
|
||||
function show(x, y) {
|
||||
function show(x, y, type) {
|
||||
if (type == "context")
|
||||
y++;
|
||||
lastCoords = { x : x, y : y };
|
||||
aml.display(x, y);
|
||||
}
|
||||
|
|
|
@ -374,8 +374,8 @@ define(function(require, exports, module) {
|
|||
function recallVfs() {
|
||||
var vfs;
|
||||
try {
|
||||
vfs = JSON.parse(lastVfs || window.sessionStorage.getItem("vfsid"));
|
||||
if (!lastVfs) {
|
||||
vfs = JSON.parse(lastVfs || window.sessionStorage.getItem("vfsid") || null);
|
||||
if (!lastVfs && vfs) {
|
||||
window.sessionStorage.removeItem("vfsid");
|
||||
lastVfs = JSON.stringify(vfs);
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
mocha.run(done);
|
||||
}
|
||||
};
|
||||
onload.remain = onload.remain == "1";
|
||||
onload.remain = options.remain == "1";
|
||||
|
||||
mocha.timeout(10000);
|
||||
|
||||
|
|
|
@ -489,27 +489,51 @@ require([
|
|||
x.unregister = function(){};
|
||||
return x;
|
||||
})(),
|
||||
"immediate": (function(){
|
||||
var x = new EventEmitter();
|
||||
x.register = function(){};
|
||||
x.unregister = function(){};
|
||||
return x;
|
||||
})(),
|
||||
"c9.analytics": (function(){
|
||||
var x = new EventEmitter();
|
||||
x.register = function(){};
|
||||
x.unregister = function(){};
|
||||
return x;
|
||||
})(),
|
||||
});
|
||||
};
|
||||
|
||||
expect.setupArchitectTest = function(config, _, options) {
|
||||
if (options && options.mockPlugins) {
|
||||
config.push({
|
||||
consumes: [],
|
||||
consumes: options.existingPlugins || [],
|
||||
provides: options.mockPlugins,
|
||||
setup: expect.html.mocked
|
||||
});
|
||||
}
|
||||
architect.resolveConfig(config, function(err, config) {
|
||||
/*global describe it before after = */
|
||||
/*global describe it before after */
|
||||
if (err) throw err;
|
||||
var app = architect.createApp(config, function(err, app) {
|
||||
if (err && err.unresolved && !config.unresolved) {
|
||||
console.warn("Adding mock services for " + err.unresolved);
|
||||
config.unresolved = err.unresolved;
|
||||
return expect.setupArchitectTest(config, architect, {
|
||||
mockPlugins: config.unresolved
|
||||
expect.html.mocked({}, {}, function(a, mockServices) {
|
||||
err.missingMock = err.unresolved.filter(function(x) {
|
||||
return !mockServices[x];
|
||||
});
|
||||
config.unresolved = err.unresolved.filter(function(x) {
|
||||
return mockServices[x];
|
||||
});
|
||||
});
|
||||
if (err.missingMock.length) {
|
||||
console.error("Missing mock services for " + err.missingMock);
|
||||
} else {
|
||||
console.warn("Adding mock services for " + err.unresolved);
|
||||
return expect.setupArchitectTest(config, architect, {
|
||||
mockPlugins: config.unresolved,
|
||||
existingPlugins: err.resolved
|
||||
});
|
||||
}
|
||||
}
|
||||
if (typeof describe == "function") {
|
||||
describe('app', function() {
|
||||
|
|
Ładowanie…
Reference in New Issue