kopia lustrzana https://github.com/c9/core
Merge remote-tracking branch 'origin/master' into fix-retry
Conflicts: plugins/c9.ide.language/worker.jssmf-sdk
commit
c3786c9951
|
@ -324,7 +324,10 @@ module.exports = function(options) {
|
|||
"plugins/c9.ide.language.javascript.tern/tern",
|
||||
"plugins/c9.ide.language.javascript.tern/architect_resolver",
|
||||
"plugins/c9.ide.language.javascript.eslint/eslint",
|
||||
"plugins/c9.ide.language.python/python",
|
||||
{
|
||||
packagePath: "plugins/c9.ide.language.python/python",
|
||||
pythonPath: "/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python3.4/dist-packages",
|
||||
},
|
||||
{
|
||||
packagePath: "plugins/c9.ide.language.jsonalyzer/jsonalyzer",
|
||||
extendToken: extendToken,
|
||||
|
|
|
@ -74,7 +74,7 @@ exports.copyArray = function(array){
|
|||
var copy = [];
|
||||
for (var i=0, l=array.length; i<l; i++) {
|
||||
if (array[i] && typeof array[i] == "object")
|
||||
copy[i] = this.copyObject( array[i] );
|
||||
copy[i] = this.copyObject(array[i]);
|
||||
else
|
||||
copy[i] = array[i];
|
||||
}
|
||||
|
@ -92,14 +92,12 @@ exports.deepCopy = function deepCopy(obj) {
|
|||
}
|
||||
return copy;
|
||||
}
|
||||
var cons = obj.constructor;
|
||||
if (cons === RegExp)
|
||||
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
||||
return obj;
|
||||
|
||||
copy = cons();
|
||||
for (var key in obj) {
|
||||
copy = {};
|
||||
for (var key in obj)
|
||||
copy[key] = deepCopy(obj[key]);
|
||||
}
|
||||
return copy;
|
||||
};
|
||||
|
||||
|
|
|
@ -93,3 +93,8 @@ z=<div {...this.props} x={1 + 2} y="z{a}b&" t={
|
|||
1 <a> { ++x } </a>
|
||||
</div>
|
||||
|
||||
var o = {
|
||||
t:`${[].map(x => {
|
||||
return x
|
||||
})}`
|
||||
};
|
|
@ -686,5 +686,45 @@
|
|||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
"start",
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","o"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
["start","no_regex","start","string.quasi.start","string.quasi.start","no_regex"],
|
||||
["text"," "],
|
||||
["identifier","t"],
|
||||
["punctuation.operator",":"],
|
||||
["string.quasi.start","`"],
|
||||
["paren.quasi.start","${"],
|
||||
["paren.lparen","["],
|
||||
["paren.rparen","]"],
|
||||
["punctuation.operator","."],
|
||||
["identifier","map"],
|
||||
["paren.lparen","("],
|
||||
["identifier","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","=>"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
["#tmp","no_regex","start","no_regex","start","string.quasi.start","string.quasi.start","no_regex"],
|
||||
["text"," "],
|
||||
["keyword","return"],
|
||||
["text"," "],
|
||||
["identifier","x"]
|
||||
],[
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","})"],
|
||||
["paren.quasi.end","}"],
|
||||
["string.quasi.end","`"]
|
||||
],[
|
||||
"start",
|
||||
["paren.rparen","}"],
|
||||
["punctuation.operator",";"]
|
||||
]]
|
|
@ -354,9 +354,8 @@ var JavaScriptHighlightRules = function(options) {
|
|||
this.next = val == "{" ? this.nextState : "";
|
||||
if (val == "{" && stack.length) {
|
||||
stack.unshift("start", state);
|
||||
return "paren";
|
||||
}
|
||||
if (val == "}" && stack.length) {
|
||||
else if (val == "}" && stack.length) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
|
||||
|
|
|
@ -245,6 +245,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.$loop.schedule(this.CHANGE_FULL);
|
||||
// this.session.$setFontMetrics(this.$fontMetrics);
|
||||
this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
|
||||
|
||||
this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
|
||||
this.onChangeNewLineMode()
|
||||
|
|
|
@ -277,11 +277,9 @@ else (function () {
|
|||
});
|
||||
}
|
||||
|
||||
function resolveConfig(config, base, callback) {
|
||||
if (typeof base == "function") {
|
||||
callback = base;
|
||||
base = "";
|
||||
}
|
||||
function resolveConfig(config, base, callback, errback) {
|
||||
if (typeof base == "function")
|
||||
return resolveConfig(config, "", arguments[1], arguments[2]);
|
||||
|
||||
var paths = [], pluginIndexes = {};
|
||||
config.forEach(function (plugin, index) {
|
||||
|
@ -306,7 +304,7 @@ else (function () {
|
|||
plugin.consumes = module.consumes || [];
|
||||
});
|
||||
callback(null, config);
|
||||
});
|
||||
}, errback);
|
||||
}
|
||||
}());
|
||||
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
if (define === undefined) {
|
||||
var define = function(fn) {
|
||||
fn(require, exports, module);
|
||||
};
|
||||
}
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
function formatUser(user) {
|
||||
if (!user) return {}; // empty traits get ignored
|
||||
|
||||
var traits = {
|
||||
uid: user.id || user.uid,
|
||||
username: user.name || user.username,
|
||||
email: user.email,
|
||||
createdAt: user.date_add,
|
||||
active: !!user.active,
|
||||
firstName: getFirstName(user),
|
||||
lastName: getLastName(user),
|
||||
name: user.fullname || user.name,
|
||||
pricingPlan: user.premium ? "Premium" : "Free",
|
||||
region: user.region
|
||||
};
|
||||
|
||||
return traits;
|
||||
}
|
||||
|
||||
function getFirstName(user){
|
||||
if (user.firstname) return user.firstname;
|
||||
|
||||
if (!user.fullname) return undefined;
|
||||
|
||||
return user.fullname.split(' ').slice(0, 1).join(' ');
|
||||
}
|
||||
|
||||
function getLastName(user){
|
||||
if (user.lastname) return user.lastname;
|
||||
|
||||
if (!user.fullname) return undefined;
|
||||
|
||||
return user.fullname.split(' ').slice(1).join(' ');
|
||||
}
|
||||
|
||||
module.exports = formatUser;
|
||||
});
|
14
package.json
14
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "c9",
|
||||
"description": "New Cloud9 Client",
|
||||
"version": "3.1.864",
|
||||
"version": "3.1.909",
|
||||
"author": "Ajax.org B.V. <info@ajax.org>",
|
||||
"private": true,
|
||||
"main": "bin/c9",
|
||||
|
@ -55,7 +55,7 @@
|
|||
"c9"
|
||||
],
|
||||
"c9plugins": {
|
||||
"c9.ide.language": "#4aa5041f83",
|
||||
"c9.ide.language": "#7dac83b4e2",
|
||||
"c9.ide.language.css": "#8a77f72326",
|
||||
"c9.ide.language.generic": "#378d8a2127",
|
||||
"c9.ide.language.html": "#d831388dd2",
|
||||
|
@ -63,10 +63,10 @@
|
|||
"c9.ide.language.javascript": "#720a876edd",
|
||||
"c9.ide.language.javascript.immediate": "#54173370a8",
|
||||
"c9.ide.language.javascript.eslint": "#a7d10ddf32",
|
||||
"c9.ide.language.javascript.tern": "#2d9cb639ed",
|
||||
"c9.ide.language.javascript.tern": "#f9ba3813d7",
|
||||
"c9.ide.language.javascript.infer": "#5036f68fe6",
|
||||
"c9.ide.language.jsonalyzer": "#6cec566be4",
|
||||
"c9.ide.collab": "#30efed939e",
|
||||
"c9.ide.language.jsonalyzer": "#1454bd1ed7",
|
||||
"c9.ide.collab": "#10c224f9b8",
|
||||
"c9.ide.local": "#a6e689e33b",
|
||||
"c9.ide.find": "#e33fbaed2f",
|
||||
"c9.ide.find.infiles": "#c3bf17286d",
|
||||
|
@ -90,7 +90,7 @@
|
|||
"c9.ide.imgeditor": "#612e75ef4f",
|
||||
"c9.ide.immediate": "#a962119bec",
|
||||
"c9.ide.installer": "#0fde9f0067",
|
||||
"c9.ide.language.python": "#46c4069e72",
|
||||
"c9.ide.language.python": "#85edff7f88",
|
||||
"c9.ide.mount": "#befb8188d5",
|
||||
"c9.ide.navigate": "#38ae100ea1",
|
||||
"c9.ide.newresource": "#981a408a7b",
|
||||
|
@ -103,7 +103,7 @@
|
|||
"c9.ide.recentfiles": "#7c099abf40",
|
||||
"c9.ide.remote": "#301d2ab519",
|
||||
"c9.ide.processlist": "#2b12cd1bdd",
|
||||
"c9.ide.run": "#d37ffe17d5",
|
||||
"c9.ide.run": "#e449c6c0f8",
|
||||
"c9.ide.run.build": "#0598fff697",
|
||||
"c9.ide.run.debug.xdebug": "#70aeb327c0",
|
||||
"c9.ide.save": "#9461acd953",
|
||||
|
|
|
@ -629,6 +629,14 @@ define(function(require, exports, module) {
|
|||
});
|
||||
} else if (key === "children" || key === "isSelected") {
|
||||
prop = null;
|
||||
} else if (Object.prototype.toString.call(node[key]) == "[object Date]") {
|
||||
// why Date ends up here?
|
||||
reportError(new Error("Date in fs cache"), {
|
||||
key: key,
|
||||
value: node[key],
|
||||
path: node.path,
|
||||
hasParentProp: !!node.parent,
|
||||
});
|
||||
} else {
|
||||
prop = lang.deepCopy(node[key]);
|
||||
}
|
||||
|
@ -637,9 +645,9 @@ define(function(require, exports, module) {
|
|||
return copy;
|
||||
}
|
||||
|
||||
function clear(){
|
||||
function clear() {
|
||||
var all = model.visibleItems;
|
||||
for (var i = all.length; i--; ) {
|
||||
for (var i = all.length; i--;) {
|
||||
if (model.isOpen(all[i]))
|
||||
model.collapse(all[i]);
|
||||
}
|
||||
|
|
|
@ -68,10 +68,10 @@ define(function(require, exports, module) {
|
|||
bindKey: {win: "Ctrl-Delete", mac: "Option-Delete"},
|
||||
name: "\u001bd" // "alt-d"
|
||||
}, {
|
||||
bindKey: {win: "Alt-Backspace|Shift-Backspace", mac: "Ctrl-Backspace|Shift-Backspace"},
|
||||
bindKey: {win: "Alt-Backspace", mac: "Ctrl-Backspace"},
|
||||
name: "\u0015" // "ctrl-u"
|
||||
}, {
|
||||
bindKey: {win: "Alt-Delete|Shift-Delete", mac: "Ctrl-Delete|Shift-Delete"},
|
||||
bindKey: {win: "Alt-Delete", mac: "Ctrl-Delete"},
|
||||
name: "\u000b" // "ctrl-k"
|
||||
}, {
|
||||
bindKey: {win: "Ctrl-z", mac: "Cmd-z"},
|
||||
|
|
|
@ -109,8 +109,11 @@
|
|||
if (window.hideLoader)
|
||||
window.hideLoader();
|
||||
}
|
||||
}, function loadError(mod) {
|
||||
if (mod.id === "plugins/c9.ide.clipboard/html5")
|
||||
return alert("Unable to load html5.js.\n\nThis may be caused by a false positive in your virus scanner. Please try reloading with ?packed=1 added to the URL.");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -84,6 +84,7 @@ function main(argv, config, onLoaded) {
|
|||
.describe("domains", "Primary and any secondary top-level domains to use (e.g, c9.io,c9.dev)")
|
||||
.describe("exclude", "Exclude specified service")
|
||||
.describe("include", "Include only specified service")
|
||||
.describe("helpWithSudo", "Ask for sudo password on startup")
|
||||
.default("domains", inContainer && process.env.C9_HOSTNAME || process.env.C9_DOMAINS)
|
||||
.boolean("help")
|
||||
.describe("help", "Show command line options.");
|
||||
|
@ -107,7 +108,7 @@ function main(argv, config, onLoaded) {
|
|||
var delayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) !== -1 });
|
||||
var notDelayed = expanded.filter(function(c) { return delayLoadConfigs.indexOf(c) === -1 });
|
||||
|
||||
if (options.helpWithSudo)
|
||||
if (options.argv.helpWithSudo)
|
||||
return child_process.execFile("sudo", ["echo -n"], main.bind(null, argv.filter(function(a) {
|
||||
return a !== "--helpWithSudo";
|
||||
}), config, onLoaded));
|
||||
|
@ -204,4 +205,4 @@ function start(configName, options, callback) {
|
|||
plugin.name = name;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue