Merge branch 'master' of github.com:c9/newclient

pull/290/head
Fabian Jakobs 2016-04-08 10:54:16 +00:00
commit 365d5f0d36
12 zmienionych plików z 107 dodań i 7 usunięć

Wyświetl plik

@ -109,6 +109,7 @@ module.exports = function(options) {
// VFS
"plugins/c9.vfs.client/vfs.ping",
"plugins/c9.vfs.client/vfs.log",
{
packagePath: "plugins/c9.vfs.client/vfs_client",
debug: debug,

Wyświetl plik

@ -75,7 +75,7 @@ var ColdfusionHighlightRules = function() {
this.$rules[s].unshift(cfTag);
}, this);
this.embedTagRules(new JavaScriptHighlightRules({noJSX: true}).getRules(), "cfjs-", "cfscript");
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "cfjs-", "cfscript");
this.normalizeRules();
};

Wyświetl plik

@ -99,7 +99,7 @@ var HtmlHighlightRules = function() {
});
this.embedTagRules(CssHighlightRules, "css-", "style");
this.embedTagRules(new JavaScriptHighlightRules({noJSX: true}).getRules(), "js-", "script");
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
if (this.constructor === HtmlHighlightRules)
this.normalizeRules();

Wyświetl plik

@ -383,7 +383,7 @@ var JavaScriptHighlightRules = function(options) {
}]
});
if (!options || !options.noJSX)
if (!options || options.jsx != false)
JSX.call(this);
}

Wyświetl plik

@ -86,7 +86,7 @@ var TypeScriptHighlightRules = function(options) {
}
];
var JSRules = new JavaScriptHighlightRules({jsx: options && options.jsx}).getRules();
var JSRules = new JavaScriptHighlightRules({jsx: (options && options.jsx) == true}).getRules();
JSRules.start = tsRules.concat(JSRules.start);
this.$rules = JSRules;

1
node_modules/c9/ssh.js wygenerowano vendored
Wyświetl plik

@ -123,6 +123,7 @@ exports.generateKeyPair = function(email, callback) {
var phrase = "";
var command = "ssh-keygen -t rsa " +
"-b 4096 " +
"-f \"" + filename + "\" " +
"-P \"" + phrase + "\" " +
"-C \"" + email + "\" ";

Wyświetl plik

@ -1,7 +1,7 @@
{
"name": "c9",
"description": "New Cloud9 Client",
"version": "3.1.2111",
"version": "3.1.2129",
"author": "Ajax.org B.V. <info@ajax.org>",
"private": true,
"main": "bin/c9",
@ -67,7 +67,7 @@
"c9.ide.language.javascript.infer": "#18acb93a3a",
"c9.ide.language.jsonalyzer": "#4b329741b1",
"c9.ide.language.codeintel": "#2b18c5ccb1",
"c9.ide.collab": "#728ad2bde2",
"c9.ide.collab": "#33263e74c3",
"c9.ide.local": "#10eb45842a",
"c9.ide.find": "#e33fbaed2f",
"c9.ide.find.infiles": "#c0a13737ef",
@ -108,7 +108,7 @@
"c9.ide.run": "#6bd4996a4e",
"c9.ide.run.build": "#0598fff697",
"c9.ide.run.debug.xdebug": "#9956689819",
"c9.ide.save": "#4cda35bfdb",
"c9.ide.save": "#25a63f31e2",
"c9.ide.scm": "#637a68cd04",
"c9.ide.terminal.monitor": "#affa33572f",
"c9.ide.test": "#102942ae4e",

Wyświetl plik

@ -0,0 +1,10 @@
module.exports = function(vfs, options, register) {
register(null, {
log: function (message, callback) {
callback = callback || function(){};
console.log(message);
callback();
}
})
}

Wyświetl plik

@ -0,0 +1,82 @@
/** Sends client side logs to vfs via the websocket connection **/
define(function (require, exports, module) {
"use strict";
main.consumes = ["Plugin", "ext", "c9"];
main.provides = ["vfs.log"];
return main;
function main(options, imports, register) {
var Plugin = imports.Plugin;
var c9 = imports.c9;
var ext = imports.ext;
var plugin = new Plugin("Ajax.org", main.consumes);
var loaded = false;
var server = null;
function load() {
if (loaded) return false;
loaded = true;
ext.loadRemotePlugin("log", {
code: require("text!./log-service.js"),
redefine: true
}, function(err, remote) {
if (err) return console.error(err);
server = remote;
});
c9.on("stateChange", function(e) {
if (e.state & c9.NETWORK) {
load();
}
else {
loaded = false;
server = null;
}
}, plugin);
}
function log() {
if (!server) return console.error("Cannot log, client is offline");
var callback = function(){};
var args = Array.prototype.slice.call(arguments);
if (typeof args[args.length-1] === "function") {
callback = args.splice(args.length-1, 1);
}
var message = "";
args.forEach(function (arg) {
if (typeof arg === "object") {
return message += JSON.stringify(arg);
}
message += arg;
});
server.log(message, callback);
}
plugin.on("load", function() {
load();
});
plugin.on("unload", function() {
loaded = false;
server = null;
});
plugin.freezePublicAPI({
log: log
});
register(null, {
"vfs.log": plugin
});
}
})

Wyświetl plik

@ -146,6 +146,7 @@ define(function(require, exports, module) {
function rest(path, options, callback) {
if (!vfs || !connection || connection.readyState != "open") {
console.error("[vfs-client] Cannot perform rest action for ", path, " vfs is disconnected");
var stub = { abort: function(){ buffer[this.id]= null; } };
stub.id = buffer.push([path, options, callback, stub]) - 1;
return stub;

Wyświetl plik

@ -94,6 +94,9 @@ require([
var x = new EventEmitter();
return x;
})(),
"vfs.log": {
log: function(){}
},
anims: (function(){
var x = new EventEmitter();
x.animateSplitBoxNode = function(node, opt) {

Wyświetl plik

@ -168,6 +168,8 @@ function loadSettings(settingsName) {
return settings;
}
module.exports.loadSettings = loadSettings;
function start(configName, options, callback) {
console.log("Starting", configName);