diff --git a/configs/client-default.js b/configs/client-default.js index 2462bd1b..5e52d5d2 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -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, diff --git a/node_modules/ace/lib/ace/lib/lang.js b/node_modules/ace/lib/ace/lib/lang.js index f306e3e4..ab3d4d51 100644 --- a/node_modules/ace/lib/ace/lib/lang.js +++ b/node_modules/ace/lib/ace/lib/lang.js @@ -74,7 +74,7 @@ exports.copyArray = function(array){ var copy = []; for (var i=0, l=array.length; i { ++x } +var o = { + t:`${[].map(x => { + return x + })}` +}; \ No newline at end of file diff --git a/node_modules/ace/lib/ace/mode/_test/tokens_javascript.json b/node_modules/ace/lib/ace/mode/_test/tokens_javascript.json index 29098f5a..388c2639 100644 --- a/node_modules/ace/lib/ace/mode/_test/tokens_javascript.json +++ b/node_modules/ace/lib/ace/mode/_test/tokens_javascript.json @@ -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",";"] ]] \ No newline at end of file diff --git a/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js b/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js index 86855f9c..9aa86966 100644 --- a/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js +++ b/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js @@ -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) diff --git a/node_modules/ace/lib/ace/virtual_renderer.js b/node_modules/ace/lib/ace/virtual_renderer.js index a221d46c..a87b7860 100644 --- a/node_modules/ace/lib/ace/virtual_renderer.js +++ b/node_modules/ace/lib/ace/virtual_renderer.js @@ -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() diff --git a/node_modules/architect/architect.js b/node_modules/architect/architect.js index 59d552b2..de683671 100644 --- a/node_modules/architect/architect.js +++ b/node_modules/architect/architect.js @@ -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); } }()); diff --git a/node_modules/c9/format-user-analytics.js b/node_modules/c9/format-user-analytics.js new file mode 100644 index 00000000..b7612ba3 --- /dev/null +++ b/node_modules/c9/format-user-analytics.js @@ -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; +}); \ No newline at end of file diff --git a/package.json b/package.json index 0c9fca31..14ce26ec 100644 --- a/package.json +++ b/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. ", "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", diff --git a/plugins/c9.fs/fs.cache.xml.js b/plugins/c9.fs/fs.cache.xml.js index 9d2a6c6d..9d0babbe 100644 --- a/plugins/c9.fs/fs.cache.xml.js +++ b/plugins/c9.fs/fs.cache.xml.js @@ -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]); } diff --git a/plugins/c9.ide.terminal/aceterm/input.js b/plugins/c9.ide.terminal/aceterm/input.js index cee51cdc..2fb3e2bc 100644 --- a/plugins/c9.ide.terminal/aceterm/input.js +++ b/plugins/c9.ide.terminal/aceterm/input.js @@ -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"}, diff --git a/plugins/c9.vfs.standalone/views/standalone.html.ejs b/plugins/c9.vfs.standalone/views/standalone.html.ejs index cc280dc2..cfdfbe85 100644 --- a/plugins/c9.vfs.standalone/views/standalone.html.ejs +++ b/plugins/c9.vfs.standalone/views/standalone.html.ejs @@ -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."); }); }); - \ No newline at end of file + diff --git a/server.js b/server.js index 2ecaed27..f04bc837 100755 --- a/server.js +++ b/server.js @@ -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; }); }); -} \ No newline at end of file +}