From 4be6aa745c421cb8a64aeddb49be06e4216a1100 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 12 Dec 2016 02:41:23 +0400 Subject: [PATCH 1/3] make uses of staticPrefix more consistent --- .../ace/lib/ace/worker/worker_client.js | 56 +++++++-------- .../build_support/mini_require.js | 21 ++++-- node_modules/architect-build/compress.js | 2 +- node_modules/architect-build/module-deps.js | 2 + package.json | 69 +------------------ plugins/c9.ide.editors/metadata.js | 4 +- plugins/c9.ide.layout.classic/preload.js | 3 +- plugins/c9.ide.server/plugins.js | 5 ++ 8 files changed, 52 insertions(+), 110 deletions(-) diff --git a/node_modules/ace/lib/ace/worker/worker_client.js b/node_modules/ace/lib/ace/worker/worker_client.js index 104f198c..8e106486 100644 --- a/node_modules/ace/lib/ace/worker/worker_client.js +++ b/node_modules/ace/lib/ace/worker/worker_client.js @@ -36,6 +36,28 @@ var net = require("../lib/net"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var config = require("../config"); +function $workerBlob(workerUrl) { + // workerUrl can be protocol relative + // importScripts only takes fully qualified urls + var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; + try { + return new Blob([script], {"type": "application/javascript"}); + } catch (e) { // Backwards-compatibility + var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; + var blobBuilder = new BlobBuilder(); + blobBuilder.append(script); + return blobBuilder.getBlob("application/javascript"); + } +} + +function createWorker(workerUrl) { + var blob = $workerBlob(workerUrl); + var URL = window.URL || window.webkitURL; + var blobURL = URL.createObjectURL(blob); + // calling URL.revokeObjectURL before worker is terminated breaks it on IE Edge + return new Worker(blobURL); +} + var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) { this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); @@ -58,23 +80,7 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, impor }); } - try { - this.$worker = new Worker(workerUrl); - } catch(e) { - if (e instanceof window.DOMException) { - // Likely same origin problem. Use importScripts from a shim Worker - var blob = this.$workerBlob(workerUrl); - var URL = window.URL || window.webkitURL; - var blobURL = URL.createObjectURL(blob); - - this.$worker = new Worker(blobURL); - setTimeout(function() { // IE EDGE needs a timeout here - URL.revokeObjectURL(blobURL); - }); - } else { - throw e; - } - } + this.$worker = createWorker(workerUrl); if (importScripts) { this.send("importScripts", importScripts); } @@ -189,20 +195,6 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, impor this.emit("change", {data: q}); }; - this.$workerBlob = function(workerUrl) { - // workerUrl can be protocol relative - // importScripts only takes fully qualified urls - var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; - try { - return new Blob([script], {"type": "application/javascript"}); - } catch (e) { // Backwards-compatibility - var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; - var blobBuilder = new BlobBuilder(); - blobBuilder.append(script); - return blobBuilder.getBlob("application/javascript"); - } - }; - }).call(WorkerClient.prototype); @@ -260,5 +252,7 @@ UIWorkerClient.prototype = WorkerClient.prototype; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; +exports.createWorker = createWorker; + }); diff --git a/node_modules/architect-build/build_support/mini_require.js b/node_modules/architect-build/build_support/mini_require.js index f3787bb8..ab5db0ac 100644 --- a/node_modules/architect-build/build_support/mini_require.js +++ b/node_modules/architect-build/build_support/mini_require.js @@ -14,7 +14,7 @@ function getInlineDeps(fn) { fn.toString().replace(commentRegExp, "") .replace(cjsRequireRegExp, function (match, dep, index, str) { var i = index; - while (str.charCodeAt(i-=1) <= 32) {} + while (str.charCodeAt(i -= 1) <= 32) {} if (str.charAt(i) !== ".") deps.push(dep); }); @@ -293,10 +293,15 @@ var config = require.config = function(cfg) { if (cfg.baseUrlLoadBalancers) config.baseUrlLoadBalancers = cfg.baseUrlLoadBalancers; }; -config.packages = Object.create(null); -config.paths = Object.create(null); -config.baseUrl = ""; -config.useCache = false; + +require.resetConfig = function() { + config.packages = Object.create(null); + config.paths = Object.create(null); + config.baseUrl = ""; + config.useCache = false; +}; + +require.resetConfig(); define.undef = require.undef = function(module, recursive) { if (recursive) { @@ -503,7 +508,9 @@ function checkCache() { ideCache = ideCache_; return ideCache.keys(); }).then(function(keys) { - baseUrl = host + config.baseUrl; + baseUrl = config.baseUrl; + if (baseUrl[0] == "/") + baseUrl = host + baseUrl; var val = keys.map(function(r) { var url = r.url; if (url.startsWith(baseUrl)) @@ -520,7 +527,7 @@ function checkCache() { var checked = 0; var buffer = ""; var toDelete = []; - post("/static/__check__", val, function(t) { + post(baseUrl + "__check__", val, function(t) { var e = t.slice(checked); checked = t.length; var parts = (buffer + e).split("\n"); diff --git a/node_modules/architect-build/compress.js b/node_modules/architect-build/compress.js index 75cf9808..d00a320f 100644 --- a/node_modules/architect-build/compress.js +++ b/node_modules/architect-build/compress.js @@ -15,7 +15,7 @@ function compress(sources, opts) { return literals.push(pkg.source); } - if (pkg.file) console.log("Adding '" + pkg.file + "'."); + // if (pkg.file) console.log("Adding '" + pkg.file + "'."); toplevel = UglifyJS.parse(pkg.source, { filename: (pkg.file || pkg.id).replace(new RegExp("^" + opts.basepath + "/"), ""), //@todo remove prefix diff --git a/node_modules/architect-build/module-deps.js b/node_modules/architect-build/module-deps.js index a591513e..da4b5add 100644 --- a/node_modules/architect-build/module-deps.js +++ b/node_modules/architect-build/module-deps.js @@ -329,6 +329,8 @@ function resolveModulePath(id, pathMap) { tail = testPath.substr(i) + tail; testPath = testPath.slice(0, i); } + if (!testPath && pathMap["/"]) + return pathMap["/"] + tail; return id; } diff --git a/package.json b/package.json index 5c94c00d..e6fb0c69 100644 --- a/package.json +++ b/package.json @@ -56,72 +56,5 @@ "architect-build", "msgpack-js", "c9" - ], - "c9plugins": { - "c9.ide.language": "#9843fc4875", - "c9.ide.language.core": "#208159eda7", - "c9.ide.language.css": "#5827caacda", - "c9.ide.language.generic": "#809e6994e6", - "c9.ide.language.html": "#ae00c111da", - "c9.ide.language.html.diff": "#33ac0f78aa", - "c9.ide.language.javascript": "#6f86fc7900", - "c9.ide.language.javascript.immediate": "#efc3518d0a", - "c9.ide.language.javascript.eslint": "#004c86f8ef", - "c9.ide.language.javascript.tern": "#cc569cfa6f", - "c9.ide.language.javascript.infer": "#d9f6dc5e51", - "c9.ide.language.jsonalyzer": "#6d0ed9fbf6", - "c9.ide.language.codeintel": "#435e084066", - "c9.ide.collab": "#5a2071f4ea", - "c9.ide.local": "#976ad9fca0", - "c9.ide.find": "#5c1d1ea078", - "c9.ide.find.infiles": "#d4762d1382", - "c9.ide.find.replace": "#1f96b87bf7", - "c9.ide.run.debug": "#91bc33714f", - "c9.automate": "#1c6006046e", - "c9.ide.ace.emmet": "#06791647c5", - "c9.ide.ace.gotoline": "#636d426035", - "c9.ide.ace.keymaps": "#832302482c", - "c9.ide.ace.repl": "#623561ecff", - "c9.ide.ace.split": "#d2143d8336", - "c9.ide.ace.statusbar": "#102340271c", - "c9.ide.ace.stripws": "#0aaa293283", - "c9.ide.behaviors": "#cc04e94c62", - "c9.ide.closeconfirmation": "#6b758eb957", - "c9.ide.configuration": "#5d8c381035", - "c9.ide.dialog.wizard": "#c8200c6ad1", - "c9.ide.fontawesome": "#96cb342a4a", - "c9.ide.format": "#660cf065ac", - "c9.ide.help.support": "#42d843e0db", - "c9.ide.imgeditor": "#353308ec1b", - "c9.ide.immediate": "#909e6f0bd1", - "c9.ide.installer": "#5f8f75eb2c", - "c9.ide.language.python": "#102398b335", - "c9.ide.language.go": "#e018761e24", - "c9.ide.navigate": "#992381bbf6", - "c9.ide.newresource": "#8ce79bb66c", - "c9.ide.openfiles": "#8ab1e2c85f", - "c9.ide.preview": "#a337636943", - "c9.ide.preview.browser": "#339cc3c10d", - "c9.ide.preview.markdown": "#df4b12c34c", - "c9.ide.pubsub": "#2accad6c0f", - "c9.ide.readonly": "#59bd0c4961", - "c9.ide.recentfiles": "#e8a52f2015", - "c9.ide.remote": "#14f717a0d5", - "c9.ide.processlist": "#99111d40fd", - "c9.ide.run": "#9dfbcebf81", - "c9.ide.run.build": "#652cd18587", - "c9.ide.run.debug.xdebug": "#def07a584b", - "c9.ide.run.debug.ikpdb": "#a223b727e0", - "c9.ide.save": "#9b06b29d7e", - "c9.ide.scm": "#a2dd947ed5", - "c9.ide.terminal.monitor": "#9dfda63972", - "c9.ide.test": "#4a56c01f66", - "c9.ide.test.mocha": "#ceace59aaf", - "c9.ide.theme.flat": "#6f9382edeb", - "c9.ide.threewaymerge": "#7a3a0dd1ad", - "c9.ide.undo": "#0e47e11192", - "c9.ide.upload": "#7ceff1a51d", - "c9.ide.welcome": "#b352446b17", - "c9.ide.guide": "#4249f58769" - } + ] } \ No newline at end of file diff --git a/plugins/c9.ide.editors/metadata.js b/plugins/c9.ide.editors/metadata.js index d683991f..51f149a6 100644 --- a/plugins/c9.ide.editors/metadata.js +++ b/plugins/c9.ide.editors/metadata.js @@ -17,6 +17,8 @@ define(function(require, exports, module) { var showError = imports["dialog.error"].show; var prefs = imports.preferences; + var createWorker = require("ace/worker/worker_client").createWorker; + /***** Initialization *****/ var plugin = new Plugin("Ajax.org", main.consumes); @@ -521,7 +523,7 @@ define(function(require, exports, module) { hash.counter = 0; function hash(data, callback) { if (!worker) { - worker = new Worker('/static/lib/rusha/rusha.min.js'); + worker = createWorker((options.staticPrefix || "/static") + "/lib/rusha/rusha.min.js"); worker.addEventListener("message", function(e) { // @todo security? diff --git a/plugins/c9.ide.layout.classic/preload.js b/plugins/c9.ide.layout.classic/preload.js index 9059d211..2210ba63 100644 --- a/plugins/c9.ide.layout.classic/preload.js +++ b/plugins/c9.ide.layout.classic/preload.js @@ -1,12 +1,11 @@ define(function(require, exports, module) { - main.consumes = ["Plugin", "http", "ui", "settings"]; + main.consumes = ["Plugin", "ui", "settings"]; main.provides = ["layout.preload"]; return main; function main(options, imports, register) { var settings = imports.settings; var Plugin = imports.Plugin; - var http = imports.http; var ui = imports.ui; var async = require("async"); diff --git a/plugins/c9.ide.server/plugins.js b/plugins/c9.ide.server/plugins.js index 22589ab0..8a5f9fad 100644 --- a/plugins/c9.ide.server/plugins.js +++ b/plugins/c9.ide.server/plugins.js @@ -132,6 +132,11 @@ define(function(require, exports, module) { ); } + statics.addStatics([{ + path: __dirname + "/../../configs/ide", + mount: "/configs/ide" + }]); + statics.addStatics([{ path: __dirname + "/www", mount: "/" From 9072cb90c8b0a591907bba15ea8d5b7dbfc66cb5 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 13 Dec 2016 00:09:55 +0400 Subject: [PATCH 2/3] add static ide page --- plugins/c9.vfs.standalone/standalone.js | 7 + plugins/c9.vfs.standalone/www/ide.html | 194 ++++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 plugins/c9.vfs.standalone/www/ide.html diff --git a/plugins/c9.vfs.standalone/standalone.js b/plugins/c9.vfs.standalone/standalone.js index 9813ba1f..48955e9e 100644 --- a/plugins/c9.vfs.standalone/standalone.js +++ b/plugins/c9.vfs.standalone/standalone.js @@ -89,6 +89,11 @@ function plugin(options, imports, register) { source: "query", optional: true }, + config: { + type: "number", + source: "query", + optional: true + }, } }, function(req, res, next) { @@ -112,6 +117,8 @@ function plugin(options, imports, register) { opts.options.debug = req.params.debug !== undefined; res.setHeader("Cache-Control", "no-cache, no-store"); + if (req.params.config == 1) + return res.json(getConfig(configName, opts)); res.render(__dirname + "/views/standalone.html.ejs", { architectConfig: getConfig(configName, opts), configName: configName, diff --git a/plugins/c9.vfs.standalone/www/ide.html b/plugins/c9.vfs.standalone/www/ide.html new file mode 100644 index 00000000..5a720d14 --- /dev/null +++ b/plugins/c9.vfs.standalone/www/ide.html @@ -0,0 +1,194 @@ + + + + + Cloud9 + + + + + +
+
+
+ + +
+
+ +
+
+ + + + + + From eb3a574f963cde77825e7d419c09cc4fb705d6bb Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 12 Dec 2016 00:21:07 +0400 Subject: [PATCH 3/3] move ide configs into subfolder --- configs/client-config_test.js | 9 +- configs/client-default-local.js | 140 ----- configs/client-default-terminal.js | 45 -- configs/client-default.js | 922 ----------------------------- local/server.js | 2 +- node_modules/c9/setup_paths.js | 11 +- plugins/c9.static/build.js | 2 +- 7 files changed, 18 insertions(+), 1113 deletions(-) delete mode 100644 configs/client-default-local.js delete mode 100644 configs/client-default-terminal.js delete mode 100644 configs/client-default.js diff --git a/configs/client-config_test.js b/configs/client-config_test.js index 180f521a..6b21bc06 100755 --- a/configs/client-config_test.js +++ b/configs/client-config_test.js @@ -6,6 +6,7 @@ require("amd-loader"); +require("c9/setup_paths") require("c9/inline-mocha")(module); var assert = require("assert"); @@ -25,9 +26,11 @@ describe("client config consistency", function(){ }); }); - fs.readdirSync(root + "/configs").forEach(function(name) { - if (!/client-(workspace|ssh|default)/.test(name)) return; - + fs.readdirSync(root + "/configs").filter(function(name) { + return /client-(workspace|ssh|default)/.test(name); + }).concat( + fs.readdirSync(root + "/configs/ide").map(function(n) { return "ide/" + n }) + ).forEach(function(name) { it("should not have missing plugins in config " + name, function(next) { fetchClientOptions(function(err, clientOptions) { if (err) return next(); diff --git a/configs/client-default-local.js b/configs/client-default-local.js deleted file mode 100644 index f94cf36f..00000000 --- a/configs/client-default-local.js +++ /dev/null @@ -1,140 +0,0 @@ -var join = require("path").join; - -module.exports = function(options) { - options.collab = false; - var config = require("./client-default")(options); - return module.exports.makeLocal(config, options); -}; - -module.exports.makeLocal = function(config, options) { - var c9Ws = options.remoteWorkspace; // true when opening c9 workspace as local - var root = options.workspaceDir; - - var nodeBin = options.nodeBin || ["node"]; - var settingDir = options.settingDir || options.installPath; - - if (!c9Ws) { - // Local version - options.local = true; - options.projectName = root.substr(root.lastIndexOf("/") + 1); - options.debug = 2; - options.env = "local"; - options.defaultTheme = "dark"; - } - - for (var i = config.length - 1; i >= 0; i--) { - // if (config[i].packagePath == "plugins/c9.cli.bridge/bridge") - // config[i].port = 55556; - if (config[i].packagePath == "plugins/c9.ide.welcome/welcome" && !c9Ws) { - config[i].intro = - "Welcome to your brand new Cloud9. Use this welcome screen " - + "to tweak the look & feel of the Cloud9 user interface. " - + "If you prefer a more advanced IDE experience, you can choose " - + "to change the layout below. " - + "\n\n" - + "On the right you can find videos and documentation for Cloud9 " - + "IDE. Happy Coding!"; - } - // else if (config[i].packagePath == "plugins/c9.ide.login/login") { - // config.splice(i, 1); - // } - else if (config[i].packagePath == "plugins/c9.ide.run/run" && !c9Ws) { - config[i].runnerPath = join(settingDir, "/runners"); - } - else if (config[i].packagePath == "plugins/c9.ide.ui/menus") { - config[i].autoInit = false; - } - else if (config[i].packagePath == "plugins/c9.ide.save/autosave") { - config[i].slowChangeTimeout = 500; - } - else if (config[i].packagePath == "plugins/c9.ide.run.build/build" && !c9Ws) { - config[i].builderPath = join(settingDir, "/builders"); - } - else if (config[i].packagePath == "plugins/c9.ide.editors/metadata" && !c9Ws) { - config[i].path = join(settingDir, "/metadata"); - config[i].changeCheckInterval = 2000; - } - - else if (config[i].packagePath == "plugins/c9.core/c9") { - config[i].local = true; - } - else if (config[i].packagePath == "plugins/c9.ide.clipboard/html5") - config[i].packagePath = "plugins/c9.ide.local/clipboard"; - else if (config[i].packagePath == "plugins/c9.ide.configuration/configure") - config[i].pathFromFavorite = true; - else if (config[i].packagePath == "plugins/c9.core/settings" && !c9Ws) { - // todo: Don't show console when opening a file? - // config[i].template = ; - config[i].projectConfigPath = join(settingDir, ""); - config[i].userConfigPath = join(settingDir, ""); - config[i].stateConfigPath = join(settingDir, ""); - } else if (config[i].packagePath == "plugins/c9.ide.info/info" && c9Ws) { - config[i].packagePath = "plugins/c9.ide.local/info"; - } else if (config[i].packagePath == "plugins/c9.ide.ui/menus" && c9Ws) { - config[i].autoInit = false; - } else if (config[i].packagePath == "plugins/c9.ide.tree/tree") { - config[i].defaultExpanded = !config.hosted; - } else if (config[i].packagePath == "plugins/c9.ide.errorhandler/raygun_error_handler") { - // TODO fix cycle introduced by local/info and raygun_error_handler - config[i].packagePath = "plugins/c9.ide.errorhandler/simple_error_handler"; - } - } - - // Add local modules - var includes = [{ - packagePath: "plugins/c9.ide.local/local", - options: options, - }, { - packagePath: "plugins/c9.ide.local/windowframe", - staticPrefix: options.staticPrefix + "/plugins/c9.ide.local" - }, { - packagePath: "plugins/c9.ide.local/update", - host: options.update && options.update.host || "localhost", // "update.c9.io", - port: options.update && options.update.port || "8888", // "443" - path: options.update && options.update.path, - protocol: options.update && options.update.protocol, - installPath: options.correctedInstallPath, - bashBin: options.bashBin, - nodeBin: nodeBin - }, { - packagePath: "plugins/c9.ide.local/projectmanager" - }, { - packagePath: "plugins/c9.ide.local/open" - }, { - packagePath: "plugins/c9.ide.local/nativemenus" - }, !c9Ws && { - packagePath: "plugins/c9.ide.local/info", - installPath: options.correctedInstallPath, - settingDir: settingDir, - cookie: options.user.cookie, - user: { - id: options.user.id, - name: options.user.name, - fullname: options.user.fullname, - email: options.user.email, - }, - project: { - id: options.project.id, - name: options.project.name, - contents: options.project.contents, - descr: options.project.descr - } - }, - c9Ws && "plugins/c9.ide.analytics/mock_analytics", - ].filter(Boolean); - - var excludes = c9Ws ? { - "plugins/c9.ide.analytics/analytics": true, - } : { - "plugins/c9.ide.newresource/open": true, - "plugins/c9.ide.info/info": true, - // "plugins/c9.ide.login/login": true, - "plugins/c9.ide.download/download": true - }; - - config = config.concat(includes).filter(function (p) { - return !excludes[p] && !excludes[p.packagePath]; - }); - - return config; -}; diff --git a/configs/client-default-terminal.js b/configs/client-default-terminal.js deleted file mode 100644 index 8621f32d..00000000 --- a/configs/client-default-terminal.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -module.exports = function(options) { - var plugins = require("./client-default")(options); - - // TODO: cleanup unneeded plugins? - var includes = []; - var excludes = {}; - - plugins.forEach(function(p) { - if (p.packagePath && p.packagePath.indexOf("c9.core/settings") >= 0) { - p.settings = "defaults"; - p.template = { - user: {}, - project: {}, - state: { - console: { - "@maximized": true, - type: "pane", - nodes: [] - } - } - }; - } - else if (p.packagePath == "plugins/c9.ide.console/console") { - p.defaultState = { - type: "pane", - nodes: [{ - type: "tab", - editorType: "terminal", - active: "true" - }] - }; - } - }); - - plugins = plugins - .concat(includes) - .filter(function (p) { - return !excludes[p] && !excludes[p.packagePath]; - }); - - return plugins; -}; - diff --git a/configs/client-default.js b/configs/client-default.js deleted file mode 100644 index 3008d094..00000000 --- a/configs/client-default.js +++ /dev/null @@ -1,922 +0,0 @@ -var assert = require("assert"); - -module.exports = function(options) { - assert(options.staticPrefix, "Option 'staticPrefix' must be set"); - assert(options.workspaceDir, "Option 'workspaceDir' must be set"); - assert(options.workspaceId, "Option 'workspaceId' must be set"); - assert(options.workspaceName, "Option 'workspaceName' must be set"); - assert(options.home, "Option 'home' must be set"); - assert(options.platform, "Option 'platform' must be set"); - - // normalize workspacedir and home paths - function normalize(path) { - path = path.replace(/([^/])\/$/, "$1"); - if (options.platform == "win32") - path = path.replace(/\\/g, "/"); - return path; - } - options.workspaceDir = normalize(options.workspaceDir); - options.installPath = normalize(options.installPath); - options.home = normalize(options.home); - - var workspaceDir = options.workspaceDir; - var debug = options.debug !== undefined ? options.debug : false; - - var collab = options.collab; - var packaging = options.packaging; - var staticPrefix = options.staticPrefix; - - var nodeBin = options.nodeBin || ["node"]; - var nodePath = options.nodePath || ""; - - var runners = options.runners || {}; - var builders = options.builders || {}; - var hosted = !options.local && !options.dev; - var devel = options.standalone && !options.local || options.mode === "devel" || options.mode == "onlinedev" || options.dev; - - var localExtendFiles = options.localExtend || options.standalone; - - var plugins = [ - // C9 - { - packagePath: "plugins/c9.core/c9", - - startdate: new Date(), - version: options.manifest.version + " (" + options.manifest.revision + ")", - debug: debug, - workspaceId: options.workspaceId, - workspaceDir: workspaceDir, - name: options.workspaceName, - readonly: options.readonly, - isAdmin: options.isAdmin, - staticUrl: staticPrefix, - hosted: hosted, - hostname: options.appHostname, - local: options.local, - env: options.env || "devel", - home: options.home, - platform: options.platform, - arch: options.arch, - installed: options.installed, - projectId: options.project.id, - projectName: options.projectName || "Project", - configName: options.configName, - standalone: options.standalone, - dashboardUrl: options.dashboardUrl - }, - { - packagePath: "plugins/c9.core/settings", - settings: options.settings, - userConfigPath: options.settingDir, - hosted: hosted - }, - "plugins/c9.core/ext", - { - packagePath: "plugins/c9.core/http-xhr", - debug: !options.packed - }, - // { - // packagePath: "plugins/c9.core/client", - // baseUrl: options.apiUrl - // }, - "plugins/c9.core/util", - { - packagePath: "plugins/c9.ide.plugins/loader", - plugins: options.plugins || [], - loadFromDisk: options.standalone - }, - { - packagePath: "plugins/c9.ide.plugins/installer", - updates: options.pluginUpdates || [] - }, - { - packagePath: "plugins/c9.ide.plugins/manager", - staticPrefix: staticPrefix + "/plugins/c9.ide.plugins", - devel: devel - }, - { - packagePath: "plugins/c9.ide.plugins/debug" - }, - { - packagePath: "plugins/c9.ide.plugins/packages" - }, - { - packagePath: "plugins/c9.ide.plugins/test", - staticPrefix: staticPrefix + "/plugins/c9.ide.plugins" - }, - - // VFS - "plugins/c9.vfs.client/vfs.ping", - "plugins/c9.vfs.client/vfs.log", - { - packagePath: "plugins/c9.vfs.client/vfs_client", - debug: debug, - installPath: options.installPath, - dashboardUrl: options.dashboardUrl, - accountUrl: options.accountUrl, - rejectUnauthorized: options.rejectUnauthorized - }, - { - packagePath: "plugins/c9.vfs.client/endpoint", - readonly: options.readonly, - region: options.region, - pid: options.project.id, - servers: options.vfsServers, - updateServers: hosted, - strictRegion: options.strictRegion - || options.mode === "beta" && "beta", - ignoreProtocolVersion: options.ignoreProtocolVersion, - }, - { - packagePath: "plugins/c9.ide.auth/auth", - accessToken: options.accessToken || "token", - ideBaseUrl: options.ideBaseUrl, - apiUrl: options.apiUrl, - userId: options.user.id - }, - { - packagePath: "plugins/c9.core/api", - apiUrl: options.apiUrl, - projectId: options.project.id - }, - - // Editors - "plugins/c9.ide.editors/document", - { - packagePath: "plugins/c9.ide.editors/editors", - defaultEditor: "ace" - }, - "plugins/c9.ide.editors/editor", - "plugins/c9.ide.editors/imgview", - { - packagePath: "plugins/c9.ide.imgeditor/imgeditor", - staticPrefix: staticPrefix + "/plugins/c9.ide.imgeditor" - }, - "plugins/c9.ide.editors/urlview", - // "plugins/c9.ide.editors/htmlview", - "plugins/c9.ide.editors/tab", - { - packagePath: "plugins/c9.ide.editors/tabmanager", - loadFilesAtInit: false - }, - { - packagePath: "plugins/c9.ide.editors/metadata" - }, - "plugins/c9.ide.editors/pane", - "plugins/c9.ide.editors/undomanager", - - "plugins/c9.ide.newresource/newresource", - "plugins/c9.ide.newresource/open", - "plugins/c9.ide.undo/undo", - { - packagePath: "plugins/c9.ide.closeconfirmation/closeconfirmation", - defaultValue: options.local - }, - { - packagePath: "plugins/c9.ide.openfiles/openfiles", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - defaultShow: options.local - }, - { - packagePath: "plugins/c9.ide.metrics/metrics", - hosted: hosted - }, - - // Ace && Commands - "plugins/c9.ide.keys/commands", - "plugins/c9.ide.keys/editor", - { - packagePath: "plugins/c9.ide.ace/ace", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - workerPrefix: options.workerPrefix - }, - "plugins/c9.ide.ace/themes", - "plugins/c9.ide.ace.stripws/stripws", - "plugins/c9.ide.ace.repl/editor", - // "plugins/c9.ide.ace.split/split", - { - packagePath: "plugins/c9.ide.ace.gotoline/gotoline", - staticPrefix: staticPrefix + "/plugins/c9.ide.ace.gotoline" - }, - { - packagePath: "plugins/c9.ide.ace.statusbar/statusbar", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - "plugins/c9.ide.ace.keymaps/keymaps", - "plugins/c9.ide.ace.keymaps/cli", - - - "plugins/c9.ide.ace.emmet/emmet", - // Find - { - packagePath: "plugins/c9.ide.find/find", - basePath: workspaceDir - }, - { - packagePath: "plugins/c9.ide.find/find.nak", - ignore: "", - useHttp: true, - basePath: workspaceDir, - installPath: options.installPath, - nak: options.nakBin || "~/.c9/node_modules/nak/bin/nak", - node: options.nodeBin, - local: options.local, - }, - { - packagePath: "plugins/c9.ide.find.infiles/findinfiles", - staticPrefix: staticPrefix + "/plugins/c9.ide.find.infiles" - }, - { - packagePath: "plugins/c9.ide.find.replace/findreplace", - staticPrefix: staticPrefix + "/plugins/c9.ide.find.replace" - }, - - // UI - { - packagePath: "plugins/c9.ide.ui/ui", - staticPrefix: staticPrefix + "/plugins/c9.ide.ui" - }, - "plugins/c9.ide.ui/anims", - "plugins/c9.ide.ui/tooltip", - { - packagePath: "plugins/c9.ide.ui/menus", - autoInit: !options.local - }, - "plugins/c9.ide.ui/forms", - { - 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/widgets.terminal", - "plugins/c9.ide.ui/focus", - "plugins/c9.ide.ui/lib_apf", - - "plugins/c9.ide.dialog/dialog", - "plugins/c9.ide.dialog.common/alert", - "plugins/c9.ide.dialog.common/alert_internal", - "plugins/c9.ide.dialog.common/confirm", - "plugins/c9.ide.dialog.common/filechange", - "plugins/c9.ide.dialog.common/fileoverwrite", - "plugins/c9.ide.dialog.common/fileremove", - "plugins/c9.ide.dialog.common/info", - "plugins/c9.ide.dialog.common/question", - "plugins/c9.ide.dialog.common/upsell", - { - packagePath: "plugins/c9.ide.dialog.common/error", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - { - packagePath: "plugins/c9.ide.dialog.common/notification", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - { - packagePath: "plugins/c9.ide.dialog.login/login", - noLogout: !options.local - }, - "plugins/c9.ide.dialog.file/file", - "plugins/c9.ide.dialog.wizard/wizard", - - // VFS - "plugins/c9.fs/proc", - "plugins/c9.fs/proc.apigen", // used only by disabled deploy plugins - "plugins/c9.fs/net", - { - packagePath: "plugins/c9.fs/fs", - baseProc: workspaceDir - }, - "plugins/c9.fs/fs.errors", - "plugins/c9.fs/fs.cache.xml", - { - packagePath: "plugins/c9.ide.readonly/access_control", - dashboardUrl: options.dashboardUrl, - readonly: options.readonly - }, - - // Watcher - "plugins/c9.ide.threewaymerge/threewaymerge", - "plugins/c9.ide.watcher/watcher", - { - packagePath: "plugins/c9.ide.watcher/gui", - collab: collab - }, - - // Language - { - packagePath: "plugins/c9.ide.language/language", - workspaceDir: workspaceDir, - staticPrefix: staticPrefix, - workerPrefix: options.CORSWorkerPrefix // "/static/standalone/worker" - }, - "plugins/c9.ide.language.core/keyhandler", - "plugins/c9.ide.language.core/complete", - "plugins/c9.ide.language.core/quickfix", - "plugins/c9.ide.language.core/marker", - "plugins/c9.ide.language.core/refactor", - "plugins/c9.ide.language.core/tooltip", - "plugins/c9.ide.language.core/jumptodef", - "plugins/c9.ide.language/worker_util_helper", - { - packagePath: "plugins/c9.ide.language.generic/generic", - mode_completer: options.ssh, - }, - "plugins/c9.ide.language.css/css", - "plugins/c9.ide.language.html/html", - "plugins/c9.ide.language.javascript/javascript", - "plugins/c9.ide.language.javascript.immediate/immediate", - "plugins/c9.ide.language.javascript.infer/jsinfer", - { - packagePath: "plugins/c9.ide.language.javascript.tern/tern", - plugins: [ - { - name: "angular", - path: "tern/plugin/angular", - enabled: true, - hidden: false, - }, - { - name: "doc_comment", - path: "tern/plugin/doc_comment", - enabled: true, - hidden: true, - }, - { - name: "es_modules", - path: "tern/plugin/es_modules", - enabled: true, - hidden: true, - }, - { - name: "modules", - path: "tern/plugin/modules", - enabled: true, - hidden: true, - }, - { - name: "node", - path: "tern/plugin/node", - enabled: true, - hidden: false, - }, - { - name: "requirejs", - path: "tern/plugin/requirejs", - enabled: true, - hidden: false, - }, - { - name: "architect_resolver", - path: "./architect_resolver_worker", - enabled: true, - hidden: true, - }, - ], - defs: [{ - name: "ecma5", - enabled: true, - experimental: false, - firstClass: true, - path: "lib/tern/defs/ecma5.json" - }, { - name: "jQuery", - enabled: true, - experimental: false, - path: "lib/tern/defs/jquery.json" - }, { - name: "browser", - enabled: true, - experimental: false, - firstClass: true, - path: "lib/tern/defs/browser.json" - }, { - name: "underscore", - enabled: false, - experimental: false, - path: "lib/tern/defs/underscore.json" - }, { - name: "chai", - enabled: false, - experimental: false, - path: "lib/tern/defs/chai.json" - }] - }, - "plugins/c9.ide.language.javascript.tern/ui", - "plugins/c9.ide.language.javascript.tern/architect_resolver", - "plugins/c9.ide.language.javascript.eslint/eslint", - { - packagePath: "plugins/c9.ide.language.python/python", - pythonPath: "/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python3.4/dist-packages:/usr/local/lib/python3.5/dist-packages", - }, - "plugins/c9.ide.language.go/go", - { - packagePath: "plugins/c9.ide.language.jsonalyzer/jsonalyzer", - workspaceDir: workspaceDir, - homeDir: options.home, - bashBin: options.bashBin, - useCollab: collab, - useSend: !collab && (options.local || options.standalone), - maxServerCallInterval: 2000 - }, - - // Run - { - packagePath: "plugins/c9.ide.run/run", - base: workspaceDir, - staticPrefix: staticPrefix + "/plugins/c9.ide.run", - tmux: options.tmux, - runners: runners, - installPath: options.correctedInstallPath, - local: options.local - }, - { - packagePath: "plugins/c9.ide.run/gui", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - defaultConfigs: {} - }, - { - packagePath: "plugins/c9.ide.run.build/build", - base: workspaceDir, - builders: builders - }, - { - packagePath: "plugins/c9.ide.run.build/gui" - }, - // "plugins/c9.ide.run.debug/debuggers/sourcemap", - { - packagePath: "plugins/c9.ide.run.debug/debuggers/debugger", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - { - packagePath: "plugins/c9.ide.run.debug/debuggers/v8/v8debugger", - basePath: workspaceDir - }, - { - packagePath: "plugins/c9.ide.run.debug/debuggers/socket", - nodeBin: nodeBin - }, - "plugins/c9.ide.run.debug/breakpoints", - "plugins/c9.ide.run.debug/debugpanel", - "plugins/c9.ide.run.debug/callstack", - { - packagePath: "plugins/c9.ide.immediate/immediate", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - "plugins/c9.ide.immediate/evaluator", - "plugins/c9.ide.immediate/evaluators/browserjs", - "plugins/c9.ide.immediate/evaluators/debugnode", - "plugins/c9.ide.immediate/evaluators/bash", - "plugins/c9.ide.run.debug/variables", - "plugins/c9.ide.run.debug/watches", - "plugins/c9.ide.run.debug/liveinspect", - - "plugins/c9.ide.run.debug.xdebug/xdebug", - "plugins/c9.ide.run.debug/debuggers/gdb/gdbdebugger", - "plugins/c9.ide.run.debug.ikpdb/ikpdb", - - // Console - { - packagePath: "plugins/c9.ide.terminal/terminal", - tmux: options.tmux, - root: workspaceDir, - tmpdir: options.tmpdir, - shell: options.shell || "", - staticPrefix: staticPrefix + "/plugins/c9.ide.terminal", - installPath: options.correctedInstallPath - }, - { - packagePath: "plugins/c9.ide.terminal/predict_echo" - }, - { - packagePath: "plugins/c9.ide.terminal/link_handler", - previewUrl: options.previewUrl - }, - { - packagePath: "plugins/c9.ide.terminal.monitor/monitor", - bashBin: options.bashBin - }, - { - packagePath: "plugins/c9.ide.terminal.monitor/message_view", - staticPrefix: options.staticPrefix + "/plugins/c9.ide.layout.classic" - }, - "plugins/c9.ide.terminal/opentermhere", - { - packagePath: "plugins/c9.ide.run/output", - staticPrefix: options.staticPrefix + "/plugins/c9.ide.layout.classic", - tmux: options.tmux, - basePath: workspaceDir - }, - { - packagePath: "plugins/c9.ide.console/console", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - defaultState: options.project.scmurl ? { - type: "pane", - nodes: [{ - type: "tab", - editorType: "terminal", - active: "true", - document: { - changed: false, - meta: { - timestamp: Date.now() - }, - filter: true, - title: "bash - \"Cloning ...\"", - tooltip: "bash - \"Cloning ...\"", - terminal: { - id: "clone", - cwd: "" - } - } - }, { - type: "tab", - editorType: "immediate", - document: { - title: "Immediate" - } - }] - } : null - }, - - // Layout & Panels - { - packagePath: "plugins/c9.ide.layout.classic/layout", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - dashboardUrl: options.dashboardUrl, - cdn: options.useCdn - }, - "plugins/c9.ide.theme.flat/flat-light", - "plugins/c9.ide.theme.flat/flat-dark", - { - packagePath: "plugins/c9.ide.layout.classic/preload", - themePrefix: options.themePrefix, - defaultTheme: options.defaultTheme || "dark" - }, - { - packagePath: "plugins/c9.ide.tree/tree", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - defaultExpanded: true - }, - { - packagePath: "plugins/c9.ide.tree/favorites", - startEmpty: options.local, - alwaysScope: options.local, - realRoot: true, - home: options.local ? options.home : "~" - }, - { - packagePath: "plugins/c9.ide.upload/dragdrop", - treeAsPane: options.local - }, - { - packagePath: "plugins/c9.ide.upload/upload", - staticPrefix: staticPrefix + "/plugins/c9.ide.upload" - }, - { - packagePath: "plugins/c9.ide.upload/upload_manager", - workerPrefix: "plugins/c9.ide.upload" - }, - { - packagePath: "plugins/c9.ide.upload/upload_progress", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - { - packagePath: "plugins/c9.ide.navigate/navigate", - loadListAtInit: false - }, - { - packagePath: "plugins/c9.ide.keys/panel" - }, - { - packagePath: "plugins/c9.ide.language.core/outline", - staticPrefix: staticPrefix + "/plugins/c9.ide.language" - }, - { - packagePath: "plugins/c9.ide.panels/panels", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic", - defaultActiveLeft: "tree" - }, - "plugins/c9.ide.panels/panel", - "plugins/c9.ide.panels/area", - "plugins/c9.ide.processlist/processlist", - - // 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/darwin", - "plugins/c9.ide.installer/commands/bash", - "plugins/c9.ide.installer/commands/npm", - "plugins/c9.ide.installer/commands/npm-g", - "plugins/c9.ide.installer/commands/pip", - "plugins/c9.ide.installer/commands/gem", - "plugins/c9.ide.installer/commands/zip", - "plugins/c9.ide.installer/commands/symlink", - "plugins/c9.ide.installer/commands/message", - { - 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 - { - packagePath: "plugins/c9.ide.preview/preview", - staticPrefix: staticPrefix + "/plugins/c9.ide.preview", - defaultPreviewer: "preview.browser", - previewUrl: options.previewUrl, - local: options.local - }, - "plugins/c9.ide.preview/previewer", - "plugins/c9.ide.preview/previewers/raw", - { - packagePath: "plugins/c9.ide.preview.browser/browser", - local: options.local, - staticPrefix: staticPrefix + "/plugins/c9.ide.preview.browser" - }, - { - packagePath: "plugins/c9.ide.preview.markdown/markdown", - staticPrefix: staticPrefix, - htmlPath: "/plugins/c9.ide.preview.markdown/markdown.html", - local: options.local - }, - "plugins/c9.ide.remote/manager", - "plugins/c9.ide.remote/documents/htmldocument", - "plugins/c9.ide.remote/documents/cssdocument", - "plugins/c9.ide.remote/documents/jsdocument", - { - packagePath: "plugins/c9.ide.remote/transports/postmessage", - previewBaseUrl: options.previewBaseUrl - }, - // "plugins/c9.ide.remote/transports/debugger", - // "plugins/c9.ide.remote/transports/websocket", - - // Formatters - "plugins/c9.ide.format/format", - "plugins/c9.ide.format/formatters/jsbeautify", - - // Other - "plugins/c9.ide.download/download", - - { - packagePath: "plugins/c9.ide.info/info", - installPath: options.installPath, - user: { - id: options.user.id, - name: options.user.name, - fullname: options.user.fullname, - email: options.user.email, - date_add: options.user.date_add, - active: options.user.active, - c9version: options.user.c9version, - premium: options.user.premium, - region: options.user.region, - }, - project: { - id: options.project.id, - name: options.project.name, - contents: options.project.contents, - descr: options.project.descr, - remote: options.project.remote, - premium: options.project.premium, - } - }, - { - packagePath: "plugins/c9.ide.welcome/welcome", - staticPrefix: staticPrefix + "/plugins/c9.ide.welcome", - intro: "Welcome to Cloud9. Use this welcome screen " - + "to tweak the look & feel of the Cloud9 user interface. ", - checkOS: true - }, - { - packagePath: "plugins/c9.cli.bridge/bridge", - startBridge: options.startBridge - }, - { - packagePath: "plugins/c9.cli.bridge/bridge_commands", - basePath: workspaceDir - }, - { - packagePath: "plugins/c9.ide.help/help", - staticPrefix: staticPrefix + "/plugins/c9.ide.help", - hosted: hosted - }, - { - packagePath: "plugins/c9.ide.guide/guide", - staticPrefix: staticPrefix + "/plugins/c9.ide.guide" - }, - { - packagePath: "plugins/c9.ide.guide/default" - }, - { - packagePath: "plugins/c9.ide.configuration/configure", - dashboardUrl: options.dashboardUrl, - }, - "plugins/c9.ide.save/save", - "plugins/c9.ide.recentfiles/recentfiles", - { - packagePath: "plugins/c9.ide.save/autosave" - }, - { - packagePath: "plugins/c9.ide.clipboard/clipboard", - local: options.local - }, - { - packagePath: "plugins/c9.ide.clipboard/html5" - }, - "plugins/c9.ide.behaviors/tabs", - // { - // packagePath: "plugins/c9.ide.behaviors/dashboard", - // staticPrefix : staticPrefix + "/plugins/c9.ide.behaviors" - // }, - { - packagePath: "plugins/c9.ide.behaviors/page", - staticPrefix: staticPrefix + "/plugins/c9.ide.behaviors" - }, - { - packagePath: "plugins/c9.ide.preferences/preferences", - staticPrefix: staticPrefix + "/plugins/c9.ide.preferences" - }, - "plugins/c9.ide.preferences/preferencepanel", - { - packagePath: "plugins/c9.ide.preferences/general", - installPath: options.installPath, - local: options.local - }, - { - packagePath: "plugins/c9.ide.preferences/project", - basePath: workspaceDir, - local: options.local - }, - "plugins/c9.ide.preferences/experimental", - { - packagePath: "plugins/c9.ide.login/login", - staticPrefix: staticPrefix + "/plugins/c9.ide.login", - ideBaseUrl: options.ideBaseUrl, - dashboardUrl: options.dashboardUrl, - accountUrl: options.accountUrl, - local: options.local - }, - { - packagePath: "plugins/c9.ide.pubsub/pubsub-client", - }, - { - packagePath: "plugins/c9.ide.collab/notifications/bubble", - staticPrefix: staticPrefix + "/plugins/c9.ide.collab/notifications" - }, - "plugins/c9.ide.behaviors/zentabs", - - // Test - { - packagePath: "plugins/c9.ide.test/test" - }, - "plugins/c9.ide.test/testpanel", - "plugins/c9.ide.test/testrunner", - { - packagePath: "plugins/c9.ide.test/all", - staticPrefix: staticPrefix + "/plugins/c9.ide.test" - }, - "plugins/c9.ide.test/results", - "plugins/c9.ide.test/coverage", - "plugins/c9.ide.test/coverageview", - - "plugins/c9.ide.test.mocha/mocha", - - // git integration v2 - // { - // packagePath: "plugins/c9.ide.scm/scm.commit", - // staticPrefix: staticPrefix + "/plugins/c9.ide.scm" - // }, - // "plugins/c9.ide.scm/scm", - // "plugins/c9.ide.scm/scm.branches", - // "plugins/c9.ide.scm/dialog.localchanges", - // "plugins/c9.ide.scm/scm.log", - // "plugins/c9.ide.scm/git", - // "plugins/c9.ide.scm/diff.split", - // "plugins/c9.ide.scm/diff.unified", - - // // git integration v1 - "plugins/c9.ide.scm/v1/scm", - "plugins/c9.ide.scm/v1/scmpanel", - "plugins/c9.ide.scm/v1/detail", - "plugins/c9.ide.scm/v1/log", - "plugins/c9.ide.scm/v1/git", - "plugins/c9.ide.scm/v1/editor", - - // git integration - "plugins/c9.ide.scm/mergetool" - ]; - - - if (packaging || !devel) { - plugins.push({ - packagePath: "plugins/c9.ide.errorhandler/raygun_error_handler", - version: options.manifest.version, - revision: options.manifest.revision, - apiKey: options.raygun.apiKey - }); - } - if (packaging || devel) { - plugins.push({ - packagePath: "plugins/c9.ide.errorhandler/simple_error_handler", - version: options.manifest.version, - revision: options.manifest.revision - }); - } - if (!hosted) { - plugins.push( - "plugins/c9.ide.analytics/mock_analytics", - "plugins/c9.ide.services/linked-services-mock" - ); - } - - // Collab - if (packaging || !collab) { - plugins.push( - "plugins/c9.ide.language.jsonalyzer/mock_collab" - ); - } - if (packaging || collab) { - plugins.push( - { - packagePath: "plugins/c9.ide.collab/connect", - enable: collab, - debug: debug, - localServerFile: localExtendFiles, - nodeBin: nodeBin, - nodePath: nodePath, - basePath: workspaceDir - }, - "plugins/c9.ide.collab/collab", - "plugins/c9.ide.collab/collabpanel", - { - packagePath: "plugins/c9.ide.collab/workspace", - hosted: hosted, - isAdmin: options.isAdmin - }, - "plugins/c9.ide.collab/util", - { - packagePath: "plugins/c9.ide.collab/ot/document", - minDelay: 500, - maxDelay: 10000 - }, - { - packagePath: "plugins/c9.ide.collab/cursor_layer", - staticPrefix: staticPrefix + "/plugins/c9.ide.collab" - }, - "plugins/c9.ide.collab/author_layer", - { - packagePath: "plugins/c9.ide.collab/timeslider/timeslider", - staticPrefix: staticPrefix + "/plugins/c9.ide.collab/timeslider" - }, - // Collab panels - { - packagePath: "plugins/c9.ide.collab/notifications/notifications", - hosted: hosted, - isAdmin: options.isAdmin - }, - "plugins/c9.ide.collab/members/members_panel", - { - packagePath: "plugins/c9.ide.collab/share/share", - previewUrl: options.previewUrl, - local: options.local - }, - { - packagePath: "plugins/c9.ide.collab/members/members", - staticPrefix: staticPrefix + "/plugins/c9.ide.layout.classic" - }, - { - packagePath: "plugins/c9.ide.collab/chat/chat", - staticPrefix: staticPrefix + "/plugins/c9.ide.collab/chat" - }, - "plugins/c9.ide.format/formatters/custom"); - } - - if (options.platform !== "win32") { - plugins.push({ - packagePath: "plugins/c9.ide.language.codeintel/codeintel", - preinstalled: hosted && !options.ssh, - paths: { - php: ".:./vendor", - }, - }); - } - - return plugins; -}; - - - - - - - diff --git a/local/server.js b/local/server.js index 206a0fe3..400be93c 100644 --- a/local/server.js +++ b/local/server.js @@ -251,7 +251,7 @@ var server = { getPlugins : function(options, cb, restoreWindow) { var windowConfig = options.windowConfig || {}; - var configPath = join(__dirname, "../configs/client-default-local.js"); + var configPath = join(__dirname, "../configs/ide/default-local.js"); var settingsPath = join(__dirname, "../settings/local.js"); var themeDir = join(__dirname, "../build/standalone/skin/" + (windowConfig.isRemote ? "full" : "default-local")); diff --git a/node_modules/c9/setup_paths.js b/node_modules/c9/setup_paths.js index bad8e241..36b7e841 100644 --- a/node_modules/c9/setup_paths.js +++ b/node_modules/c9/setup_paths.js @@ -23,5 +23,14 @@ modules._resolveFilename = function(request, parent) { if (parent.paths.indexOf(p) === -1) parent.paths.push(p); }); - return oldResolve(request, parent); + try { + return oldResolve(request, parent); + } catch (e) { + // handle client- -> ide/ rename for configs + if (/client-[^\\\/]+$/.test(path.basename(request))) { + request = request.replace(/\/client-([^\\\/]+)$/, "/ide/$1"); + return oldResolve(request, parent); + } + throw e; + } }; diff --git a/plugins/c9.static/build.js b/plugins/c9.static/build.js index bd16d441..8cc33f6b 100644 --- a/plugins/c9.static/build.js +++ b/plugins/c9.static/build.js @@ -59,7 +59,7 @@ function main(options, imports, register) { } if (config[0] != "/") - config = path.join(__dirname, "/../../configs/client-" + config); + config = path.join(__dirname, "/../../configs/ide/" + config); if (config.slice(-3) !== ".js") config += ".js";