From 0a6b1e44423046076a40e188bedf3f7078d83bb5 Mon Sep 17 00:00:00 2001 From: c9bot Date: Wed, 8 Apr 2015 20:32:42 +0200 Subject: [PATCH 1/9] c9-auto-bump 3.0.1180 --- package.json | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 18807e8b..dc9e1cb9 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ }, "dependencies": { "acorn": ">=0.11.0", - "amd-loader": "~0.0.5", "async": "^0.9.0", "base64id": "~0.1.0", "c9": "0.1.0", @@ -49,53 +48,55 @@ }, "licenses": [], "c9plugins": { - "c9.ide.language": "#afda452919", - "c9.ide.language.css": "#afda1f867c", - "c9.ide.language.generic": "#87a4a44671", - "c9.ide.language.html": "#fa4833e117", + "c9.ide.language": "#2755277da0", + "c9.ide.language.css": "#ef8a28943e", + "c9.ide.language.generic": "#32986699ac", + "c9.ide.language.html": "#bbe81afed1", "c9.ide.language.html.diff": "#a7311cfc9f", "c9.ide.language.javascript": "#8479d0a9c1", "c9.ide.language.javascript.immediate": "#9a2cce9121", "c9.ide.language.javascript.eslint": "#8832423ad1", "c9.ide.language.javascript.tern": "#7aab8b0b6a", - "c9.ide.language.javascript.infer": "#ebb2daf81a", - "c9.ide.language.jsonalyzer": "#efa4426f1f", - "c9.ide.collab": "#7009f69cb0", + "c9.ide.language.javascript.infer": "#cfec494a3c", + "c9.ide.language.jsonalyzer": "#ba3e0d298c", + "c9.ide.collab": "#f38dcd432e", "c9.ide.local": "#2bfd7ff051", - "c9.ide.find": "#989c06e6a7", - "c9.ide.find.infiles": "#1b83cf12f1", + "c9.ide.find": "#6cc6d3379d", + "c9.ide.find.infiles": "#72582de3cd", "c9.ide.find.replace": "#e4daf722b8", "c9.ide.run.debug": "#638e6b00b3", + "c9.automate": "#47e2c429c9", "c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.gotoline": "#4d1a93172c", - "c9.ide.ace.keymaps": "#6c4bb65b1f", + "c9.ide.ace.keymaps": "#43445d6306", "c9.ide.ace.repl": "#ada99852fa", "c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.statusbar": "#d7b45bb7c3", "c9.ide.ace.stripws": "#34426a03d1", "c9.ide.behaviors": "#6aad7006a0", "c9.ide.closeconfirmation": "#a28bfd8272", - "c9.ide.configuration": "#b8470f4107", - "c9.ide.dialog.wizard": "#a588b64050", + "c9.ide.configuration": "#adf50fdaa2", + "c9.ide.dialog.wizard": "#7667ec79a8", "c9.ide.fontawesome": "#781602c5d8", "c9.ide.format": "#f51451ac57", "c9.ide.help.support": "#60e88f5680", "c9.ide.imgeditor": "#08bbc53578", "c9.ide.immediate": "#6845a93705", - "c9.ide.installer": "#24e7d6f399", + "c9.ide.installer": "#c36540bd61", "c9.ide.mount": "#32e79866ee", "c9.ide.navigate": "#64156c7f4a", - "c9.ide.newresource": "#9a7464cc47", + "c9.ide.newresource": "#f1f0624768", "c9.ide.openfiles": "#28a4f5af16", - "c9.ide.preview": "#dba2f4214d", + "c9.ide.preview": "#0bd8dd6e8c", "c9.ide.preview.browser": "#ac18aaf31d", "c9.ide.preview.markdown": "#ab8d30ad9f", "c9.ide.pubsub": "#92ec19ed3a", "c9.ide.readonly": "#f6f07bbe42", "c9.ide.recentfiles": "#7c099abf40", - "c9.ide.remote": "#f531d62cfb", - "c9.ide.run": "#d07c872ee1", - "c9.ide.run.build": "#915e48b363", + "c9.ide.remote": "#301d2ab519", + "c9.ide.processlist": "#bc11818bb5", + "c9.ide.run": "#567ad01865", + "c9.ide.run.build": "#ad45874c88", "c9.ide.run.debug.xdebug": "#b91d23f48b", "c9.ide.save": "#b876d87d55", "c9.ide.terminal.monitor": "#b0b4d03280", From 39ffe965596df42e2274672395e2d55090785213 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Mon, 13 Apr 2015 10:00:48 +0000 Subject: [PATCH 2/9] Merge remote-tracking branch 'origin/master' into clone-workspaces --- .gitignore | 4 +- configs/client-default.js | 31 ++++- configs/standalone.js | 1 + .../ace_tree/lib/ace_tree/data_provider.js | 1 - .../ace_tree/lib/ace_tree/layer/cells.js | 1 + .../lib/ace_tree/mouse/default_handlers.js | 8 ++ node_modules/vfs-local/localfs.js | 4 +- package.json | 2 +- plugins/c9.cli.publish/publish.js | 25 +++- plugins/c9.core/c9.js | 6 + plugins/c9.fs/mock/test.browser.js | 7 + plugins/c9.fs/mock/test.js | 2 +- plugins/c9.fs/proc.js | 20 +++ plugins/c9.fs/proc2pty.js | 27 ++++ plugins/c9.ide.ace/ace.js | 35 +++-- plugins/c9.ide.dialog/dialog.js | 52 +++++--- .../c9.ide.layout.classic/less/bk-window.less | 19 ++- .../themes/default-dark-gray.less | 12 +- .../themes/default-dark.less | 12 +- .../themes/flat-light.less | 21 +++ plugins/c9.ide.metrics/metrics.js | 121 ++++++++++++++++++ plugins/c9.ide.plugins/mock/c9.ide.example | 1 - plugins/c9.ide.terminal/terminal.js | 2 +- plugins/c9.ide.ui/{style.css => style.less} | 0 plugins/c9.ide.ui/ui.js | 2 +- plugins/c9.ide.ui/widgets.datagrid.js | 5 +- plugins/c9.ide.ui/widgets.less | 21 ++- plugins/c9.ide.ui/widgets.list.js | 69 +++++++++- plugins/c9.vfs.client/vfs_client.js | 28 +--- plugins/c9.vfs.standalone/standalone.js | 3 +- plugins/c9.vfs.standalone/www/install.html | 1 + plugins/c9.vfs.standalone/www/test.js | 4 +- scripts/install-sdk.sh | 2 +- settings/standalone.js | 1 + 34 files changed, 455 insertions(+), 95 deletions(-) create mode 100644 plugins/c9.fs/mock/test.browser.js create mode 100644 plugins/c9.fs/proc2pty.js create mode 100644 plugins/c9.ide.metrics/metrics.js delete mode 160000 plugins/c9.ide.plugins/mock/c9.ide.example rename plugins/c9.ide.ui/{style.css => style.less} (100%) diff --git a/.gitignore b/.gitignore index 1d4bcfff..fd61aa37 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ build/installer/ -build/win32 +build/sdk +build/win32* build/node.exe build/node*.zip build/Cloud9-dev.app @@ -77,3 +78,4 @@ plugins/c9.proxy/haproxy-* npm-debug.log foo.js hello.js +plugins/c9.docker/containers/ci/files/github_c9_newclient \ No newline at end of file diff --git a/configs/client-default.js b/configs/client-default.js index ea4f66e0..69da96b9 100644 --- a/configs/client-default.js +++ b/configs/client-default.js @@ -1,6 +1,5 @@ var assert = require("assert"); - module.exports = function(options) { assert(options.staticPrefix, "Option 'staticPrefix' must be set"); assert(options.workspaceDir, "Option 'workspaceDir' must be set"); @@ -47,6 +46,7 @@ module.exports = function(options) { env: options.env || "devel", home: options.home, platform: options.platform, + arch: options.arch, installed: options.installed, projectId: options.project.id, projectName: options.projectName || "Project", @@ -92,7 +92,6 @@ module.exports = function(options) { "plugins/c9.vfs.client/vfs.ping", { packagePath: "plugins/c9.vfs.client/vfs_client", - withInstall: false, debug: debug, installPath: options.installPath, dashboardUrl: options.dashboardUrl, @@ -223,7 +222,10 @@ module.exports = function(options) { autoInit: !options.local }, "plugins/c9.ide.ui/forms", - "plugins/c9.ide.ui/widgets.list", + { + packagePath: "plugins/c9.ide.ui/widgets.list", + staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" + }, "plugins/c9.ide.ui/widgets.tree", "plugins/c9.ide.ui/widgets.datagrid", "plugins/c9.ide.ui/focus", @@ -495,7 +497,28 @@ module.exports = function(options) { }, "plugins/c9.ide.panels/panel", "plugins/c9.ide.panels/area", - "plugins/c9.ide.installer/installer_mock", + + // Installer + { + packagePath: "plugins/c9.ide.installer/gui", + staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", + }, + "plugins/c9.automate/automate", + "plugins/c9.ide.installer/commands/centos", + "plugins/c9.ide.installer/commands/bash", + "plugins/c9.ide.installer/commands/npm", + "plugins/c9.ide.installer/commands/symlink", + { + packagePath: "plugins/c9.ide.installer/commands/tar.gz", + bashBin: options.bashBin + }, + "plugins/c9.ide.installer/commands/ubuntu", + { + packagePath: "plugins/c9.ide.installer/installer", + homeDir: options.homeDir, + installSelfCheck: true, + installPath: options.installPath + }, // Previewer { diff --git a/configs/standalone.js b/configs/standalone.js index 7cad6942..40a6cd7f 100644 --- a/configs/standalone.js +++ b/configs/standalone.js @@ -139,6 +139,7 @@ module.exports = function(config, optimist) { whitelist: { "c9.core": true, "c9.fs": true, + "c9.automate": true, "c9.login.client": true, "c9.vfs.client": true, "c9.cli.bridge": true, diff --git a/node_modules/ace_tree/lib/ace_tree/data_provider.js b/node_modules/ace_tree/lib/ace_tree/data_provider.js index b57d6a77..1f4926c3 100644 --- a/node_modules/ace_tree/lib/ace_tree/data_provider.js +++ b/node_modules/ace_tree/lib/ace_tree/data_provider.js @@ -319,7 +319,6 @@ var DataProvider = function(root) { index = Math.min(Math.max(0, index), this.visibleItems.length - 1); return this.visibleItems[index]; }; - this.getIconHTML = function(node) { return ""; }; diff --git a/node_modules/ace_tree/lib/ace_tree/layer/cells.js b/node_modules/ace_tree/lib/ace_tree/layer/cells.js index 58721e89..fa583eff 100644 --- a/node_modules/ace_tree/lib/ace_tree/layer/cells.js +++ b/node_modules/ace_tree/lib/ace_tree/layer/cells.js @@ -98,6 +98,7 @@ var Cells = function(parentEl) { ? (provider.isOpen(datarow) ? "open" : "closed") : "empty") + "'>" + + (provider.getCheckboxHTML ? provider.getCheckboxHTML(datarow) : "") + provider.getIconHTML(datarow) + ( provider.getContentHTML ? provider.getContentHTML(datarow) : "" diff --git a/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js b/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js index 2cab0499..7fd87c06 100644 --- a/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js +++ b/node_modules/ace_tree/lib/ace_tree/mouse/default_handlers.js @@ -136,6 +136,14 @@ function DefaultHandlers(mouseHandler) { } } this.$clickNode = null; + } else if (dom.hasCssClass(target, "checkbox")) { + node.isChecked = !node.isChecked; + if (inSelection) { + var nodes = editor.selection.getSelectedNodes(); + nodes.forEach(function(n){ n.isChecked = node.isChecked }); + } + provider._signal(node.isChecked ? "check" : "uncheck", inSelection ? nodes : [node]); + provider._signal("change") } else if (dom.hasCssClass(target, "icon-ok")) { if (ev.getShiftKey()) { editor.selection.expandSelection(node, null, true); diff --git a/node_modules/vfs-local/localfs.js b/node_modules/vfs-local/localfs.js index 6168cdd1..2ecf079e 100644 --- a/node_modules/vfs-local/localfs.js +++ b/node_modules/vfs-local/localfs.js @@ -211,7 +211,7 @@ module.exports = function setup(fsOptions) { var args = Array.prototype.slice.apply(arguments); var d = domain.create(); d.on("error", function(e) { - console.error("VFS Exception in function '" + func + "':\n" + e.stack); + console.error("VFS Exception in function '" + func + "':\n", (e.stack || e)); vfs.emit("error", { message: e.message, func: func, @@ -220,7 +220,7 @@ module.exports = function setup(fsOptions) { }); console.log("Scheduling process exit"); setTimeout(function() { - console.log("Exiting after uncaught exception in '" + func + "':\n" + e.stack) + console.log("Exiting after uncaught exception in '" + func + "':\n", (e.stack || e)) process.exit(1); }, 2000); }); diff --git a/package.json b/package.json index dc9e1cb9..a398693f 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "c9.ide.pubsub": "#92ec19ed3a", "c9.ide.readonly": "#f6f07bbe42", "c9.ide.recentfiles": "#7c099abf40", - "c9.ide.remote": "#301d2ab519", + "c9.ide.remote": "#cd45e81d2f", "c9.ide.processlist": "#bc11818bb5", "c9.ide.run": "#567ad01865", "c9.ide.run.build": "#ad45874c88", diff --git a/plugins/c9.cli.publish/publish.js b/plugins/c9.cli.publish/publish.js index 17ebcd32..476bb923 100644 --- a/plugins/c9.cli.publish/publish.js +++ b/plugins/c9.cli.publish/publish.js @@ -740,10 +740,29 @@ define(function(require, exports, module) { var err = code !== 0 ? new Error("Failed to unpack package") : null; + if (err) return callback(err); - // Done - callback(err, { - version: version + proc.spawn(join(process.env.HOME, ".c9/node/bin/npm"), { + args: ["install"], + cwd: packagePath + }, function(err, p){ + if (err) return callback(err); + + if (verbose) { + p.stdout.on("data", function(c){ + process.stdout.write(c.toString("utf8")); + }); + p.stderr.on("data", function(c){ + process.stderr.write(c.toString("utf8")); + }); + } + + p.on("exit", function(code){ + // Done + callback(err, { + version: version + }); + }); }); }); }); diff --git a/plugins/c9.core/c9.js b/plugins/c9.core/c9.js index 502871af..0e310961 100644 --- a/plugins/c9.core/c9.js +++ b/plugins/c9.core/c9.js @@ -24,6 +24,7 @@ define(function(require, module, exports) { var loaded = false; var loggedIn = false; + var isReady = false; var state = 0; var STORAGE = 1 << 1; @@ -109,6 +110,7 @@ define(function(require, module, exports) { } function ready(){ + isReady = true; emit.sticky("ready"); } @@ -284,6 +286,10 @@ define(function(require, module, exports) { */ get startLoadTime(){ return startLoadTime; }, set startLoadTime(v){ startLoadTime = v; }, + /** + * + */ + get isReady(){ return isReady; }, _events: [ /** diff --git a/plugins/c9.fs/mock/test.browser.js b/plugins/c9.fs/mock/test.browser.js new file mode 100644 index 00000000..6a2a0e65 --- /dev/null +++ b/plugins/c9.fs/mock/test.browser.js @@ -0,0 +1,7 @@ +function onClick() { + say("hi"); +} + +function say(text) { + alert(text); +} \ No newline at end of file diff --git a/plugins/c9.fs/mock/test.js b/plugins/c9.fs/mock/test.js index 94948eaf..b07b88ff 100644 --- a/plugins/c9.fs/mock/test.js +++ b/plugins/c9.fs/mock/test.js @@ -28,4 +28,4 @@ var i = 0; console.log(greeter(user), Date.now(), i++); setInterval(function(){ console.log(greeter(user), Date.now(), i++); -}, 1000); \ No newline at end of file +}, 10000); diff --git a/plugins/c9.fs/proc.js b/plugins/c9.fs/proc.js index 2ce7ece1..9aac1923 100644 --- a/plugins/c9.fs/proc.js +++ b/plugins/c9.fs/proc.js @@ -7,11 +7,14 @@ define(function(require, exports, module) { var vfs = imports.vfs; var Plugin = imports.Plugin; + var ProcessToPty = require("./proc2pty"); + /***** Initialization *****/ var plugin = new Plugin("Ajax.org", main.consumes); var emit = plugin.getEmitter(); + var installMode; var tmuxName = options.tmuxName; /***** Register and define API *****/ @@ -171,6 +174,15 @@ define(function(require, exports, module) { * @singleton **/ plugin.freezePublicAPI({ + /** + * @ignore + */ + get installMode(){ return installMode; }, + set installMode(_vfs) { + vfs = _vfs || imports.vfs; + installMode = _vfs ? true : false; + }, + _events: [ /** * @event beforeSpawn Fires right before a file is executed @@ -334,6 +346,14 @@ define(function(require, exports, module) { * @fires afterPty */ pty: function(path, options, callback) { + if (installMode) { + plugin.spawn(path, options, function(err, process){ + if (err) return callback(err); + callback(null, new ProcessToPty(process)); + }); + return; + } + emit("beforePty", {path: path, options: options}); if (!options.encoding) diff --git a/plugins/c9.fs/proc2pty.js b/plugins/c9.fs/proc2pty.js new file mode 100644 index 00000000..249cda20 --- /dev/null +++ b/plugins/c9.fs/proc2pty.js @@ -0,0 +1,27 @@ +define(function(require, exports, module) { + var EventEmitter = require("events").EventEmitter; + + module.exports = function(process){ + var pty = new EventEmitter(); + pty.write = function(data){ + process.stdin.write(data); + }; + pty.resize = function(){}; + pty.destroy = + pty.end = function(){ + process.kill(); + }; + + process.stdout.on("data", function(chunk){ + pty.emit("data", chunk); + }); + process.stderr.on("data", function(chunk){ + pty.emit("data", chunk); + }); + process.on("exit", function(code){ + pty.emit("exit", code); + }); + + return pty; + } +}); \ No newline at end of file diff --git a/plugins/c9.ide.ace/ace.js b/plugins/c9.ide.ace/ace.js index ceff85f9..43d2ea37 100644 --- a/plugins/c9.ide.ace/ace.js +++ b/plugins/c9.ide.ace/ace.js @@ -534,7 +534,7 @@ define(function(require, exports, module) { editor = apf.activeElement; if (!isAce(editor, true)) return false; - if (!editor.ace.commands.byName[command.name]) + if (!editor.ace.commands.byName[command.name] && !command.shared) return false; return isAvailable ? isAvailable(editor.ace) : true; @@ -582,7 +582,29 @@ define(function(require, exports, module) { commands.addCommand(commands.commands.togglerecording, handle); commands.addCommand(commands.commands.replaymacro, handle); + // when event for cmd-z in textarea is not canceled + // chrome tries to find another textarea with pending undo and focus it + // we do not want this to happen when ace instance is focused commands.addCommand(fnWrap({ + name: "cancelBrowserUndoInAce", + bindKey: { + mac: "Cmd-Z|Cmd-Shift-Z|Cmd-Y", + win: "Ctrl-Z|Ctrl-Shift-Z|Ctrl-Y", + position: -10000 + }, + group: "ignore", + exec: function(e) {}, + readOnly: true, + shared: true + }), handle); + function sharedCommand(command) { + command.isAvailable = function(editor) { + return editor && editor.type == "ace"; + }; + command.group = "Code Editor"; + return command; + } + commands.addCommand(sharedCommand({ name: "syntax", exec: function(_, syntax) { if (typeof syntax == "object") @@ -597,7 +619,7 @@ define(function(require, exports, module) { commands: modes.caption }), handle); - commands.addCommand(fnWrap({ + commands.addCommand(sharedCommand({ name: "largerfont", bindKey: { mac : "Command-+|Command-=", win : "Ctrl-+|Ctrl-=" }, exec: function(e) { @@ -606,7 +628,7 @@ define(function(require, exports, module) { } }), handle); - commands.addCommand(fnWrap({ + commands.addCommand(sharedCommand({ name: "smallerfont", bindKey: { mac : "Command--", win : "Ctrl--" }, exec: function(e) { @@ -615,16 +637,13 @@ define(function(require, exports, module) { } }), handle); - commands.addCommand({ + commands.addCommand(sharedCommand({ name: "toggleWordWrap", bindKey: {win: "Ctrl-Q", mac: "Ctrl-W"}, exec: function(editor) { editor.setOption("wrap", editor.getOption("wrap") == "off"); - }, - isAvailable: function(editor) { - return editor && editor.type == "ace"; } - }, handle); + }), handle); } /***** Preferences *****/ diff --git a/plugins/c9.ide.dialog/dialog.js b/plugins/c9.ide.dialog/dialog.js index 452bf1e8..c2b5da11 100644 --- a/plugins/c9.ide.dialog/dialog.js +++ b/plugins/c9.ide.dialog/dialog.js @@ -67,26 +67,21 @@ define(function(require, module, exports) { var left = options.left; var top = options.top; var width = options.width || 512; + var height = options.height; var title = options.title; var heading = options.heading; var body = options.body; - var custom = options.custom; + var className = options.class; var modal = options.modal; var zindex = options.zindex; var allowClose = options.allowClose; var elements = options.elements || []; - var resizable = options.resizable || false; + var resizable = false; var widths = options.widths || {}; var count = 0; var dialog, buttons, titles; - var loaded; - function load(){ - if (loaded) return; - loaded = true; - } - var drawn = false; function draw(htmlNode) { if (drawn) return; @@ -101,9 +96,13 @@ define(function(require, module, exports) { modal: modal, buttons: allowClose ? "close" : "", width: width, + height: height, zindex: zindex || "", skin: "bk-window2", - class: "relative" + (options.dark ? " dark" : ""), + class: "dialog " + + (height ? "" : "relative") + + (options.dark ? " dark" : "") + + (className ? " " + className : ""), childNodes: [ new ui.vbox({ id: "titles", @@ -162,8 +161,8 @@ define(function(require, module, exports) { html: titles.$int }); - if (resizable) - plugin.resizable = resizable; + if (options.resizable) + plugin.resizable = options.resizable; } /***** Method *****/ @@ -359,6 +358,11 @@ define(function(require, module, exports) { return node; } + plugin.on("unload", function(){ + drawn = false; + resizable = false; + }); + /***** Register and define API *****/ plugin.freezePublicAPI.baseclass(); @@ -437,13 +441,20 @@ define(function(require, module, exports) { resizable = v; if (!dialog) return; - dialog.setAttribute("height", v ? dialog.getHeight() : ""); - dialog.setAttribute("width", v ? dialog.getWidth() : ""); - dialog.setAttribute("class", v ? "" : "relative"); - titles.setAttribute("anchors", v ? "0 0 46 0" : ""); - buttons.setAttribute("bottom", v ? "0" : ""); - buttons.setAttribute("left", v ? "0" : ""); - buttons.setAttribute("right", v ? "0" : ""); + if (!height) + dialog.setAttribute("height", v ? dialog.getHeight() : ""); + if (!width) + dialog.setAttribute("width", v ? dialog.getWidth() : ""); + + dialog.setAttribute("class", "dialog " + + (v ? "" : "relative") + + (options.dark ? " dark" : "") + + (className ? " " + className : "")); + + // titles.setAttribute("anchors", v ? "0 0 46 0" : ""); + // buttons.setAttribute("bottom", v ? "0" : ""); + // buttons.setAttribute("left", v ? "0" : ""); + // buttons.setAttribute("right", v ? "0" : ""); dialog.setAttribute("resizable", v); }, /** @@ -465,6 +476,11 @@ define(function(require, module, exports) { * @readonly */ get modal(){ return modal; }, + /** + * @property {Boolean} visible + * @readonly + */ + get visible(){ return dialog && dialog.visible; }, /** * @property {Boolean} allowClose */ diff --git a/plugins/c9.ide.layout.classic/less/bk-window.less b/plugins/c9.ide.layout.classic/less/bk-window.less index 5f48e02d..4cad75a1 100644 --- a/plugins/c9.ide.layout.classic/less/bk-window.less +++ b/plugins/c9.ide.layout.classic/less/bk-window.less @@ -129,4 +129,21 @@ right: 20px; top: 25px; } - \ No newline at end of file + +.bk-window.dialog .bk-container{ + display: flex; + flex-direction: column; +} +.bk-window.dialog .bk-container > div:first-child{ + flex: 1; + position: relative; +} + +.bk-window.wizard .bk-container > div:first-child > div{ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + padding: 20px; +} \ No newline at end of file diff --git a/plugins/c9.ide.layout.classic/themes/default-dark-gray.less b/plugins/c9.ide.layout.classic/themes/default-dark-gray.less index 1a58adf5..d35f07fc 100644 --- a/plugins/c9.ide.layout.classic/themes/default-dark-gray.less +++ b/plugins/c9.ide.layout.classic/themes/default-dark-gray.less @@ -1599,11 +1599,11 @@ // Installer @installer-font-smoothing: true; -@installer-background: #272727; -@installer-border-top: 1px solid rgba(255, 255, 255, 0.1); -@installer-box-shadow: 0 -1px black; -@installer-color: rgb(182, 182, 182); -@installer-text-shadow: 1px 1px 0 rgb(10, 10, 10); +@installer-background: transparent; +@installer-border-top: 0; +@installer-box-shadow: none; +@installer-color: #333; +@installer-text-shadow: none; @installer-font-family: Arial; @installer-log-color: #fff; @@ -1612,7 +1612,7 @@ @installer-log-border-color: rgba(255,255,255,0.06) rgba(0,0,0,0.3) rgba(0,0,0,0.3) rgba(255,255,255,0.06); @installer-log-border-radius: 0; @installer-log-box-shadow: 1px 0 0 rgba(255,255,255,0.06), 0 1px 0 rgba(255,255,255,0.06), -1px 0 0 rgba(0,0,0,0.3), 0 -1px 0 rgba(0,0,0,0.3); -@installer-log-checkbox-color: #f1f1f1; +@installer-log-checkbox-color: #333; @installer-log-progress-color: white; // Notification diff --git a/plugins/c9.ide.layout.classic/themes/default-dark.less b/plugins/c9.ide.layout.classic/themes/default-dark.less index ec2edd6a..3ef3edf0 100644 --- a/plugins/c9.ide.layout.classic/themes/default-dark.less +++ b/plugins/c9.ide.layout.classic/themes/default-dark.less @@ -1599,11 +1599,11 @@ // Installer @installer-font-smoothing: true; -@installer-background: #272727; -@installer-border-top: 1px solid rgba(255, 255, 255, 0.1); -@installer-box-shadow: 0 -1px black; -@installer-color: rgb(182, 182, 182); -@installer-text-shadow: 1px 1px 0 rgb(10, 10, 10); +@installer-background: transparent; +@installer-border-top: 0; +@installer-box-shadow: none; +@installer-color: #333; +@installer-text-shadow: none; @installer-font-family: Arial; @installer-log-color: #fff; @@ -1612,7 +1612,7 @@ @installer-log-border-color: rgba(255,255,255,0.06) rgba(0,0,0,0.3) rgba(0,0,0,0.3) rgba(255,255,255,0.06); @installer-log-border-radius: 0; @installer-log-box-shadow: 1px 0 0 rgba(255,255,255,0.06), 0 1px 0 rgba(255,255,255,0.06), -1px 0 0 rgba(0,0,0,0.3), 0 -1px 0 rgba(0,0,0,0.3); -@installer-log-checkbox-color: #f1f1f1; +@installer-log-checkbox-color: #333; @installer-log-progress-color: white; // Notification diff --git a/plugins/c9.ide.layout.classic/themes/flat-light.less b/plugins/c9.ide.layout.classic/themes/flat-light.less index 4608a79a..81b10dda 100644 --- a/plugins/c9.ide.layout.classic/themes/flat-light.less +++ b/plugins/c9.ide.layout.classic/themes/flat-light.less @@ -390,6 +390,27 @@ padding : 5px 3px 1px 5px; } +.ace_tree .tree-row .checkbox{ + outline: 1px solid rgba(0, 0, 0, 0.16); + background: white; + width: 13px; + height: 13px; + margin: -2px 5px 0 0px; + display: inline-block; + vertical-align: middle; + pointer-events: auto; +} +.ace_tree .tree-row .checkbox.checked{ + background-position: -2px -2px; +} +.ace_tree .tree-row .checkbox.half-checked{ + background-color: #DDDDDD; + background-position: -2px -2px; +} +.installer .execute .progress{ + bottom: -44px; +} + @media print, (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx) { .listBP .checked .checkbox { background-position: 0px -61px !important; diff --git a/plugins/c9.ide.metrics/metrics.js b/plugins/c9.ide.metrics/metrics.js new file mode 100644 index 00000000..ff19b8f3 --- /dev/null +++ b/plugins/c9.ide.metrics/metrics.js @@ -0,0 +1,121 @@ +/** + * Stub for collecting workspace/service metrics. + * + * For logging metrics to a service like datadog. + * + * Actual metrics are implemented by an external plugin that has + * many dependencies, including dependencies on VFS. + * VFS and other plugins have dependencies on "metrics". + * This stub plugin breaks the dependency cycle. + */ +define(function(require, exports, module) { + "use strict"; + + main.consumes = ["Plugin"]; + main.provides = ["metrics"]; + return main; + + /** + * Collects workspace/service metrics. + */ + function main(options, imports, register) { + var Plugin = imports.Plugin; + var plugin = new Plugin("Ajax.org", main.consumes); + + var api; + var delayedCalls = []; + + var apiFunction = options.hosted + ? function(apiName, varArgs) { + var args = [].slice.apply(arguments); + + if (!api) + return arguments[1] && delayedCalls.push(args); + + var name = args.shift(); + return api[name].apply(api, args); + } + : function() {}; + + function publishApi(newApi) { + api = newApi; + delayedCalls.forEach(function(args) { + var name = args.shift(); + api[name].apply(api, args); + }); + delayedCalls = []; + } + + plugin.freezePublicAPI({ + /** + * @internal @ignore + */ + $publishApi: publishApi, + + $setRequestApi: apiFunction.bind(null, "$setRequestApi"), + + /** + * Increment a metric value for this user/workspace, + * e.g. increment the number of times the user was disconnected by 1. + * + * These metrics get logged to a service like datadog, + * namespaced in c9.ide.metrics. + * + * Example: + * + * metrics.increment("disconnected", 1, true); + * + * @param {String} name + * @param {Number} [value] + * @param {Boolean} [now] + * Whether to send it within 50ms (or + * when we have a connection) or some time between now + * and up to 5 min or so. + */ + increment: apiFunction.bind(null, "increment"), + + /** + * Set a metric value for this user/workspace, + * e.g. the time it takes to load this workspace. + * + * These metrics get logged to a service like datadog, + * namespaced in c9.ide.metrics. + * + * Example: + * + * metrics.log("load_workspace", Date.now() - start, [500, 1000, 5000]); + * + * @param {String} name + * @param {Number} value + * @param {Number[]} [levels] + * If specified, splits up the metric into different levels, e.g. + * for [500, 1000, 5000], a 'value' of 600 would + * log a load_workspace_500 metric. A 'value' of 6000 + * would log a load_workspace_over_5000 metric. + * @param {Boolean} [now] + * Whether to send within 50ms (or + * when we have a connection) or some time between now + * and up to 5 min or so. + */ + log: apiFunction.bind(null, "log"), + + /** + * Get the latest metrics collected, or null if not available yet. + * + * @internal + * @ignore + * @return {Number} + */ + getLatest: apiFunction.bind(null, "getLatest"), + + /** + * Get the last vfs ping time. + * + * @return {Object} + */ + getLastPing: apiFunction.bind(null, "getLastPing"), + }); + + register(null, { metrics: plugin }); + } +}); \ No newline at end of file diff --git a/plugins/c9.ide.plugins/mock/c9.ide.example b/plugins/c9.ide.plugins/mock/c9.ide.example deleted file mode 160000 index 35a5deda..00000000 --- a/plugins/c9.ide.plugins/mock/c9.ide.example +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 35a5dedaeb20cf6f8a9f1021de23d8dd96860f11 diff --git a/plugins/c9.ide.terminal/terminal.js b/plugins/c9.ide.terminal/terminal.js index 606e211f..dcc8e9a0 100644 --- a/plugins/c9.ide.terminal/terminal.js +++ b/plugins/c9.ide.terminal/terminal.js @@ -778,7 +778,7 @@ define(function(require, exports, module) { + "installed. Would you like to open the installer " + "to update to the latest version?", function(){ // Yes - installer.show(); + installer.reinstall("Cloud9 IDE"); }, function(){ // No // Do nothing diff --git a/plugins/c9.ide.ui/style.css b/plugins/c9.ide.ui/style.less similarity index 100% rename from plugins/c9.ide.ui/style.css rename to plugins/c9.ide.ui/style.less diff --git a/plugins/c9.ide.ui/ui.js b/plugins/c9.ide.ui/ui.js index 311cd574..ab26b6f4 100644 --- a/plugins/c9.ide.ui/ui.js +++ b/plugins/c9.ide.ui/ui.js @@ -8,7 +8,7 @@ define(function(require, module, exports) { require("plugins/c9.ide.ui/codebox")(imports.apf); var settings; - var packed = require("text!./style.css").length === 0; + var packed = require("text!./style.less").length === 0; var less = require("./lib_less1.5"); if (less) less.async = true; var packedThemes = packed || options.packedThemes !== false; diff --git a/plugins/c9.ide.ui/widgets.datagrid.js b/plugins/c9.ide.ui/widgets.datagrid.js index fbf087ee..329c3764 100644 --- a/plugins/c9.ide.ui/widgets.datagrid.js +++ b/plugins/c9.ide.ui/widgets.datagrid.js @@ -16,9 +16,10 @@ define(function(require, exports, module) { if (!options) throw new Error("options are required"); if (!options.baseName) - options.baseName = "tree"; + options.baseName = "datagrid"; + if (!options.theme) - options.theme = "blackdg"; + options.theme = "blackdg ace-tree-" + (options.baseName || "datagrid"); var model = new TreeModel(); model.columns = options.columns; diff --git a/plugins/c9.ide.ui/widgets.less b/plugins/c9.ide.ui/widgets.less index f70ce2f8..8fcfbef4 100644 --- a/plugins/c9.ide.ui/widgets.less +++ b/plugins/c9.ide.ui/widgets.less @@ -1,7 +1,7 @@ .custom-tree.ace_tree { background: transparent; border: none; - font: 11px Tahoma, Arial; + // font: @general-font-size @general-font-family; .font-smoothing(@tree-font-smoothing) } @@ -43,6 +43,25 @@ line-height: 1.5em; } +.ace_tree .tree-row .checkbox{ + outline: 1px solid rgba(255, 255, 255, 0.35); + background: #2D2D2D; + width: 13px; + height: 13px; + margin: 1px 5px 0 0px; + display: inline-block; + vertical-align: middle; + pointer-events: auto; +} +.ace_tree .tree-row .checkbox.checked{ + background-image: url("@{image-path}/@{menu-check}"); + background-position: -2px -18px; +} +.ace_tree .tree-row .checkbox.half-checked{ + background-color: #565656; + background-position: -2px -18px; +} + .custom-tree.ace_tree .tree-row .toggler{ .image-2x("@{tree-arrow}", 20px, 10px); margin: 0 1px 0 0; diff --git a/plugins/c9.ide.ui/widgets.list.js b/plugins/c9.ide.ui/widgets.list.js index 1306b2a9..8c62a39c 100644 --- a/plugins/c9.ide.ui/widgets.list.js +++ b/plugins/c9.ide.ui/widgets.list.js @@ -19,7 +19,7 @@ define(function(require, exports, module) { }; ui.on("load", function(){ - ui.insertCss(require("text!./widgets.less"), ui); + ui.insertCss(require("text!./widgets.less"), options.staticPrefix, ui); }); /***** Constructors *****/ @@ -56,6 +56,7 @@ define(function(require, exports, module) { ? new TreeModel() : new ListModel()); model.filterCaseInsensitive = true; + model.$sortNodes = false; if (!options.rowHeight) options.rowHeight = 23; @@ -80,12 +81,14 @@ define(function(require, exports, module) { scrollbarVisibilityChanged: acetree.renderer, resize: acetree.renderer, expand: model, - collapse: model + collapse: model, + check: model, + uncheck: model }; emit.sticky("draw"); } - + plugin.on("load", function(){ if (options.container) plugin.attachTo(options.container); @@ -254,6 +257,35 @@ define(function(require, exports, module) { ? new AceTreeEditor(acetree) : null; }, + /** + * + */ + get enableCheckboxes(){ return model.getCheckboxHTML ? true : false; }, + set enableCheckboxes(value){ + model.getCheckboxHTML = value + ? function(node){ + return ""; + } + : null; + + if (value) { + acetree.commands.bindKey("Space", function(e) { + var nodes = acetree.selection.getSelectedNodes(); + var node = acetree.selection.getCursor(); + node.isChecked = !node.isChecked; + nodes.forEach(function(n){ n.isChecked = node.isChecked }); + model._signal(node.isChecked ? "check" : "uncheck", nodes); + model._signal("change"); + }); + } + else { + acetree.commands.bindKey("Space", null); + } + }, /** * */ @@ -339,11 +371,16 @@ define(function(require, exports, module) { */ get getIconHTML(){ return model.getIconHTML; }, set getIconHTML(fn){ model.getIconHTML = fn; }, + /** + * + */ + get getCheckboxHTML(){ return model.getCheckboxHTML; }, + set getCheckboxHTML(fn){ model.getCheckboxHTML = fn; }, /** * */ get sort(){ return model.sort; }, - set sort(fn){ + set sort(fn){ debugger; model.$sortNodes = fn ? true : false; model.$sorted = fn ? true : false; model.sort = fn; @@ -417,6 +454,14 @@ define(function(require, exports, module) { * @event afterRename Fires */ "afterRename", + /** + * @event check Fires + */ + "check", + /** + * @event uncheck Fires + */ + "uncheck", /** * @event select Fires */ @@ -494,6 +539,22 @@ define(function(require, exports, module) { disable: function(){ return acetree.enable(); }, + /** + * + */ + check: function(node, half){ + node.isChecked = half ? -1 : true; + model._signal("check", node); + model._signal("change"); + }, + /** + * + */ + uncheck: function(node){ + node.isChecked = false; + model._signal("uncheck", node); + model._signal("change"); + }, /** * */ diff --git a/plugins/c9.vfs.client/vfs_client.js b/plugins/c9.vfs.client/vfs_client.js index 0398223f..a873bce5 100644 --- a/plugins/c9.vfs.client/vfs_client.js +++ b/plugins/c9.vfs.client/vfs_client.js @@ -1,9 +1,3 @@ -/** - * Smith.io client - * - * @copyright 2013, Ajax.org B.V. - */ - define(function(require, exports, module) { "use strict"; @@ -58,7 +52,6 @@ define(function(require, exports, module) { errorDialog.vfs = plugin; var buffer = []; - var installChecked = false; var withInstall = options.withInstall; var dashboardUrl = options.dashboardUrl; var region, vfsBaseUrl, homeUrl, projectUrl, pingUrl, serviceUrl; @@ -287,13 +280,8 @@ define(function(require, exports, module) { return; } - if (!installChecked) { - checkInstall(_vfs, callback); - installChecked = true; - } - else { + if (emit("beforeConnect", { done: callback, vfs: _vfs }) !== false) callback(); - } function callback(shouldReconnect) { if (shouldReconnect) { @@ -320,19 +308,6 @@ define(function(require, exports, module) { }); } - function checkInstall(vfs, callback) { - if (!withInstall) - return callback(false); - - vfs.stat(options.installPath + "/installed", {}, function(err, stat) { - if (err && err.code == "ENOENT") { - emit.sticky("install", { callback: callback, vfs: vfs }); - } - else - callback(); - }); - } - var bufferedVfsCalls = []; function vfsCall(method, path, options, callback) { if (Array.isArray(method)) @@ -354,7 +329,6 @@ define(function(require, exports, module) { id = null; buffer = []; - installChecked = false; region = null; vfsBaseUrl = null; homeUrl = null; diff --git a/plugins/c9.vfs.standalone/standalone.js b/plugins/c9.vfs.standalone/standalone.js index ff449c2f..44dbb35c 100644 --- a/plugins/c9.vfs.standalone/standalone.js +++ b/plugins/c9.vfs.standalone/standalone.js @@ -226,7 +226,7 @@ function plugin(options, imports, register) { options._projects = [options.workspaceDir]; } var wd = options._projects[pid] || options._projects[0]; - console.log(user) + return { workspaceDir: wd, extendOptions: { @@ -316,7 +316,6 @@ function getConfig(requested, options) { try { data = fs.readFileSync(settings[type], "utf8"); } catch (e) { - console.log(e); } settings[type] = data; } diff --git a/plugins/c9.vfs.standalone/www/install.html b/plugins/c9.vfs.standalone/www/install.html index d7e3dce9..0cee36a6 100644 --- a/plugins/c9.vfs.standalone/www/install.html +++ b/plugins/c9.vfs.standalone/www/install.html @@ -35,6 +35,7 @@ app.on("ready", function(){ // if (app.services.c9.debug) window.app = app.services; + app.services.c9.ready(); }); }); }); diff --git a/plugins/c9.vfs.standalone/www/test.js b/plugins/c9.vfs.standalone/www/test.js index 414b1b37..276a6ce0 100644 --- a/plugins/c9.vfs.standalone/www/test.js +++ b/plugins/c9.vfs.standalone/www/test.js @@ -400,6 +400,7 @@ require([ console.warn(msg); } }, + "installer": { createSession : function(){}, reinstall: function(){} }, "run.gui": { getElement : function(){} }, "debugger": {debug: function() {}, stop: function(){}}, "focusManager": { @@ -412,9 +413,6 @@ require([ getLastest: function() { throw Error("Not implemented"); }, }, error_handler: {reportError: function(){}}, - installer: { - show: function(){} - }, proc: { execFile: function() {}, spawn: function() {} diff --git a/scripts/install-sdk.sh b/scripts/install-sdk.sh index 88794bf0..ebfd1b48 100755 --- a/scripts/install-sdk.sh +++ b/scripts/install-sdk.sh @@ -93,7 +93,7 @@ updateCore() { } installGlobalDeps() { - if ! [[ -f ~/.c9/installed ]]; then + if ! [[ -f ~/.c9/installed ]] && ! [[ $os == "windows" ]]; then curl https://raw.githubusercontent.com/c9/install/master/install.sh | bash fi } diff --git a/settings/standalone.js b/settings/standalone.js index d7cf1d34..c65482db 100644 --- a/settings/standalone.js +++ b/settings/standalone.js @@ -44,6 +44,7 @@ module.exports = function(manifest, installPath) { host: process.env.IP || "0.0.0.0", testing: false, platform: process.platform, + arch: process.arch, tmux: path.join(installPath, "bin/tmux"), nakBin: path.join(__dirname, "../node_modules/nak/bin/nak"), bashBin: "bash", From e592c05f740c1b56a5527a4c568fb31edb068741 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Fri, 24 Apr 2015 13:52:40 +0000 Subject: [PATCH 3/9] Adding error logging to raygun for failed cloning. Fixed bugs with registering project api functions --- node_modules/c9/rest_client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node_modules/c9/rest_client.js b/node_modules/c9/rest_client.js index 0ff3db0c..ddd67536 100644 --- a/node_modules/c9/rest_client.js +++ b/node_modules/c9/rest_client.js @@ -51,6 +51,9 @@ function RestClient(host, port, config) { var req = proto.request(options, onResponse(done, options, body)); + /** Keep requests alive for long running requests **/ + req.setSocketKeepAlive(true); + req.on("error", function(e) { log("ERROR %s %s://%s:%s%s %s", options.method, From adcf5092a83a9769bc94048a405d77a4d218d9f2 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Sun, 3 May 2015 15:56:23 +0000 Subject: [PATCH 4/9] Removing account from services list --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d8b5732f..d578e349 100755 --- a/server.js +++ b/server.js @@ -19,7 +19,7 @@ var DEFAULT_CONFIG = "s"; var DEFAULT_SETTINGS = getDefaultSettings(); var shortcuts = { - "dev" : ["ide", "preview", "vfs", "api", "sapi", "proxy", "redis", "account", "oldclient", "homepage", "apps-proxy", "-s", "devel"], + "dev" : ["ide", "preview", "vfs", "api", "sapi", "proxy", "redis", "oldclient", "homepage", "apps-proxy", "-s", "devel"], "odev" : ["ide", "preview", "vfs", "api", "proxy", "oldclient", "homepage", "apps-proxy", "worker", "-s", "onlinedev"], "bill" : ["ide", "preview", "vfs", "api", "proxy", "oldclient", "homepage", "apps-proxy", "account", "-s", "billing"], "beta" : ["ide", "preview", "vfs", "proxy", "-s", "beta"], From 429814667d7d10c4eb38ed289e7e0d3b94148569 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 16 Jun 2015 12:52:21 +0000 Subject: [PATCH 5/9] cleanup --- node_modules/c9/rest_client.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/node_modules/c9/rest_client.js b/node_modules/c9/rest_client.js index 90705c40..8f42b1d0 100644 --- a/node_modules/c9/rest_client.js +++ b/node_modules/c9/rest_client.js @@ -51,9 +51,6 @@ function RestClient(host, port, config) { var req = proto.request(options, onResponse(done, options, body)); - /** Keep requests alive for long running requests **/ - req.setSocketKeepAlive(true); - /** Keep requests alive for long running requests **/ req.setSocketKeepAlive(true); From 9bdf747902c0da6bf1f0dc4e45be0c036dd68334 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Tue, 16 Jun 2015 13:48:41 +0000 Subject: [PATCH 6/9] Don't replace path of URLs --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index dcc14738..cffd2de1 100755 --- a/server.js +++ b/server.js @@ -125,7 +125,7 @@ function start(configName, options, callback) { for (var s in settings) { if (settings[s]) settings[s].baseUrl = settings[s].baseUrl - && settings[s].baseUrl.replace(/[^./]+\.[^.]+$/, argv.domain); + && settings[s].baseUrl.replace(/[^./]+\.[^.\/]+/, argv.domain); } } From 6da11ccf88f121e5bb8aa680292a74b245fb87d3 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 17 Jun 2015 10:41:57 +0000 Subject: [PATCH 7/9] fix odev for profile --- server.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index cffd2de1..fba2884f 100755 --- a/server.js +++ b/server.js @@ -50,6 +50,12 @@ function getDefaultSettings() { module.exports.getDefaultSettings = getDefaultSettings; function main(argv, config, onLoaded) { + + var defaultDomain = ""; + if (process.env.C9_HOSTNAME && process.env.C9_HOSTNAME.match(/-\d+$/)) { + defaultDomain = process.env.C9_HOSTNAME; + } + var options = optimist(argv) .usage("Usage: $0 [CONFIG_NAME] [--help]") .alias("s", "settings") @@ -58,7 +64,7 @@ function main(argv, config, onLoaded) { .describe("dump", "dump config file as JSON") .describe("domain", "Top-level domain to use (e.g, c9.io)") .describe("exclude", "Exclude specified service") - .default("domain", process.env.C9_HOSTNAME) + .default("domain", defaultDomain) .boolean("help") .describe("help", "Show command line options."); From 1e96aef75e434776c4c44b9a87b4181fe43418ae Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 17 Jun 2015 14:07:14 +0000 Subject: [PATCH 8/9] resolve merge conflict --- server.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server.js b/server.js index b627d149..70e0bb7e 100755 --- a/server.js +++ b/server.js @@ -125,14 +125,8 @@ function start(configName, options, callback) { if (argv.domain) { settings.c9.domain = argv.domain; for (var s in settings) { -<<<<<<< HEAD - if (settings[s]) - settings[s].baseUrl = settings[s].baseUrl - && settings[s].baseUrl.replace(/[^./]+\.[^.\/]+/, argv.domain); -======= if (settings[s] && settings[s].baseUrl) settings[s].baseUrl = replaceDomain(settings[s].baseUrl, argv.domain); ->>>>>>> origin/master } } From 5bc91acbcaacc79fc78c3390280d17b30b3381e7 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 17 Jun 2015 14:20:46 +0000 Subject: [PATCH 9/9] cleanup --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 70e0bb7e..69f1f445 100755 --- a/server.js +++ b/server.js @@ -60,7 +60,7 @@ function main(argv, config, onLoaded) { .describe("dump", "dump config file as JSON") .describe("domain", "Top-level domain to use (e.g, c9.io)") .describe("exclude", "Exclude specified service") - .default("domain", defaultDomain) + .default("domain", inContainer && process.env.C9_HOSTNAME) .boolean("help") .describe("help", "Show command line options.");