kopia lustrzana https://github.com/c9/core
Thu Jan 18 05:00:57 CET 2018
rodzic
b85aacfaa5
commit
e9f4d4ce22
|
@ -49833,7 +49833,7 @@ module.exports.prototype = new EventEmitter();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
define("text!plugins/c9.cli.bridge/bridge-service.js",[],"module.exports = function (vfs, options, register) { \n var stream;\n \n var net = require(\"net\");\n var Stream = require('stream');\n var path = require(\"path\");\n \n var SOCKET = process.platform == \"win32\"\n ? \"\\\\\\\\.\\\\pipe\\\\.c9\\\\bridge.socket\"\n : process.env.HOME + \"/.c9/bridge.socket\";\n\n function createListenClient(api) {\n var client = net.connect(SOCKET, function(data) {\n api.onConnect(client);\n });\n client.setEncoding(\"utf8\");\n client.unref();\n \n client.on(\"data\", function(data) {\n if (data) api.onData(data);\n });\n \n client.on(\"error\", function(err) {\n if (err.code == \"ECONNREFUSED\") {\n require(\"fs\").unlink(SOCKET, function() { \n createListenServer(api);\n });\n }\n else if (err.code == \"ENOENT\") {\n createListenServer(api);\n }\n else\n api.onError(err);\n });\n \n client.on(\"end\", function() {\n createListenServer(api);\n });\n \n \n api.disconnect = function() {\n client.end();\n };\n \n return client;\n }\n \n function createListenServer(api) {\n function broadcast(data, client) {\n clients.forEach(function(c) {\n if (c != client)\n c.write(data);\n });\n }\n function registerClient(client) {\n if (client.setEncoding)\n client.setEncoding(\"utf8\");\n \n client.on(\"data\", function(data) {\n broadcast(data, client);\n });\n function cleanup(e) {\n var i = clients.indexOf(client);\n if (i != -1)\n clients.splice(i, 1);\n\n client.removeListener(\"end\", cleanup);\n client.removeListener(\"error\", cleanup);\n }\n client.on(\"end\", cleanup);\n client.on(\"error\", cleanup);\n \n\n clients.push(client);\n }\n\n var clients = [];\n var stream = new Stream();\n stream.readable = true;\n stream.writable = true;\n stream.write = function(e) {\n api.onData(e);\n };\n registerClient(stream);\n api.onConnect({ write: function(e) { \n stream.emit(\"data\", e); }\n });\n var unixServer = net.createServer(registerClient);\n unixServer.listen(SOCKET);\n \n var socketDirExists = false;\n unixServer.on(\"error\", function(err) {\n if (err.code == \"EADDRINUSE\") {\n createListenClient(api);\n }\n else if (err.code == \"EACCES\" && !socketDirExists) {\n vfs.mkdirP(path.dirname(SOCKET), {}, function() {\n socketDirExists = true;\n unixServer.listen(SOCKET);\n });\n }\n else\n api.onError(err);\n });\n \n api.disconnect = function() {\n unixServer.close();\n };\n }\n \n register(null, {\n connect: function (callback) {\n if (stream) return callback(null, { stream: stream });\n \n stream = new Stream();\n stream.readable = true;\n stream.writable = true;\n stream.write = function(data) {\n if (client) client.write(data);\n };\n \n var client;\n var sent = false;\n var api = this.api = {\n id: Math.random(), \n onConnect: function(c) {\n client = c;\n if (sent) return;\n \n callback(null, { stream: stream });\n sent = true;\n },\n onData: function(data) {\n stream && stream.emit(\"data\", data);\n },\n onError: function(err) {\n stream && stream.emit(\"error\", err);\n }\n };\n createListenClient(api);\n },\n \n disconnect: function() {\n try { this.api && this.api.disconnect(); }\n catch (e) {}\n \n stream = null;\n delete this.api;\n },\n \n destroy: function() {\n this.disconnect();\n }\n });\n};");
|
define("text!plugins/c9.cli.bridge/bridge-service.js",[],"module.exports = function (vfs, options, register) { \n var stream;\n \n var net = require(\"net\");\n var Stream = require('stream');\n var path = require(\"path\");\n \n var SOCKET = process.platform == \"win32\"\n ? \"\\\\\\\\.\\\\pipe\\\\.c9\\\\bridge.socket\"\n : process.env.HOME + \"/.c9/bridge.socket\";\n\n function createListenClient(api) {\n var client = net.connect(SOCKET, function(data) {\n api.onConnect(client);\n });\n client.setEncoding(\"utf8\");\n client.unref();\n \n client.on(\"data\", function(data) {\n if (data) api.onData(data);\n });\n \n client.on(\"error\", function(err) {\n if (err.code == \"ECONNREFUSED\" && process.platform !== \"win32\") {\n require(\"fs\").unlink(SOCKET, function() { \n createListenServer(api);\n });\n }\n else if (err.code == \"ENOENT\") {\n createListenServer(api);\n }\n else\n api.onConnectError(err);\n });\n \n client.on(\"end\", function() {\n createListenServer(api);\n });\n \n \n api.disconnect = function() {\n client.end();\n };\n \n return client;\n }\n \n function createListenServer(api) {\n function broadcast(data, client) {\n clients.forEach(function(c) {\n if (c != client)\n c.write(data);\n });\n }\n function registerClient(client) {\n if (client.setEncoding)\n client.setEncoding(\"utf8\");\n \n client.on(\"data\", function(data) {\n broadcast(data, client);\n });\n function cleanup(e) {\n var i = clients.indexOf(client);\n if (i != -1)\n clients.splice(i, 1);\n\n client.removeListener(\"end\", cleanup);\n client.removeListener(\"error\", cleanup);\n }\n client.on(\"end\", cleanup);\n client.on(\"error\", cleanup);\n \n\n clients.push(client);\n }\n\n var clients = [];\n var stream = new Stream();\n stream.readable = true;\n stream.writable = true;\n stream.write = function(e) {\n api.onData(e);\n };\n registerClient(stream);\n api.onConnect({ write: function(e) { \n stream.emit(\"data\", e); }\n });\n var unixServer = net.createServer(registerClient);\n unixServer.listen(SOCKET);\n \n var socketDirExists = false;\n unixServer.on(\"error\", function(err) {\n if (err.code == \"EADDRINUSE\") {\n createListenClient(api);\n }\n else if (err.code == \"EACCES\" && !socketDirExists) {\n vfs.mkdirP(path.dirname(SOCKET), {}, function() {\n socketDirExists = true;\n unixServer.listen(SOCKET);\n });\n }\n else\n api.onConnectError(err);\n });\n \n api.disconnect = function() {\n unixServer.close();\n };\n }\n \n register(null, {\n connect: function (callback) {\n if (stream) return callback(null, { stream: stream });\n \n stream = new Stream();\n stream.readable = true;\n stream.writable = true;\n stream.write = function(data) {\n if (client) client.write(data);\n };\n \n var client;\n var sent = false;\n var api = this.api = {\n id: Math.random(), \n onConnect: function(c) {\n client = c;\n if (sent) return;\n \n callback(null, { stream: stream });\n sent = true;\n },\n onData: function(data) {\n stream && stream.emit(\"data\", data);\n },\n onConnectError: function(err) {\n callback(err);\n }\n };\n createListenClient(api);\n },\n \n disconnect: function() {\n try { this.api && this.api.disconnect(); }\n catch (e) {}\n \n stream = null;\n delete this.api;\n },\n \n destroy: function() {\n this.disconnect();\n }\n });\n};");
|
||||||
|
|
||||||
define("plugins/c9.cli.bridge/bridge",[], function(require, exports, module) {
|
define("plugins/c9.cli.bridge/bridge",[], function(require, exports, module) {
|
||||||
main.consumes = ["c9", "Plugin", "ext"];
|
main.consumes = ["c9", "Plugin", "ext"];
|
||||||
|
@ -82635,7 +82635,7 @@ define("plugins/c9.ide.run.debug.ikpdb/ikpdb",[], function(require, exports, mod
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setVariable(variable, parents, value, frame, callback) {
|
function setVariable(variable, value, frame, callback) {
|
||||||
var args = {
|
var args = {
|
||||||
"frame": frame.id,
|
"frame": frame.id,
|
||||||
"name": variable.name,
|
"name": variable.name,
|
||||||
|
@ -82696,8 +82696,8 @@ define("plugins/c9.ide.run.debug.ikpdb/ikpdb",[], function(require, exports, mod
|
||||||
function getProxySource(process) {
|
function getProxySource(process) {
|
||||||
return PROXY.replace(/\/\/.*/g, "")
|
return PROXY.replace(/\/\/.*/g, "")
|
||||||
.replace(/[\n\r]/g, "")
|
.replace(/[\n\r]/g, "")
|
||||||
.replace(/\{DEBUGGED_PROCESS_PORT\}/, (process.runner[0] || process.runner).debugport)
|
.replace(/\{DEBUGGED_PROCESS_PORT\}/, process.runner.debugport)
|
||||||
.replace(/\{DEBUGGED_PROCESS_HOST\}/, (process.runner[0] || process.runner).debughost || "127.0.0.1");
|
.replace(/\{DEBUGGED_PROCESS_HOST\}/, process.runner.debughost || "127.0.0.1");
|
||||||
}
|
}
|
||||||
function getSources(callback) {
|
function getSources(callback) {
|
||||||
var sources = [new Source()];
|
var sources = [new Source()];
|
||||||
|
@ -83159,9 +83159,9 @@ define("plugins/c9.ide.run.debug/debuggers/gdb/gdbdebugger",[], function(require
|
||||||
var socketpath = Path.join(c9.home, "/.c9/gdbdebugger.socket");
|
var socketpath = Path.join(c9.home, "/.c9/gdbdebugger.socket");
|
||||||
return {
|
return {
|
||||||
source: null,
|
source: null,
|
||||||
socketpath: process.runner[0].socketpath || socketpath,
|
socketpath: process.runner.socketpath || socketpath,
|
||||||
retryInverval: process.runner[0].retryInterval || 300,
|
retryInverval: process.runner.retryInterval || 300,
|
||||||
retries: process.runner[0].retryCount || 1000
|
retries: process.runner.retryCount || 1000
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83351,7 +83351,7 @@ define("plugins/c9.ide.run.debug/debuggers/gdb/gdbdebugger",[], function(require
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setVariable(variable, parents, value, frame, callback) {
|
function setVariable(variable, value, frame, callback) {
|
||||||
var args = {
|
var args = {
|
||||||
"name": variable.ref,
|
"name": variable.ref,
|
||||||
"val": value
|
"val": value
|
||||||
|
@ -85508,7 +85508,7 @@ define("plugins/c9.ide.run.debug.xdebug/xdebug",[], function(require, exports, m
|
||||||
callback(null, emit("getBreakpoints"));
|
callback(null, emit("getBreakpoints"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setVariable(variable, parents, value, frame, callback) {
|
function setVariable(variable, value, frame, callback) {
|
||||||
var scope = findScope(variable);
|
var scope = findScope(variable);
|
||||||
|
|
||||||
session.setPropertyValue(variable.ref, frame.index, scope.index, value, function(err) {
|
session.setPropertyValue(variable.ref, frame.index, scope.index, value, function(err) {
|
||||||
|
@ -85533,8 +85533,8 @@ define("plugins/c9.ide.run.debug.xdebug/xdebug",[], function(require, exports, m
|
||||||
return PROXY
|
return PROXY
|
||||||
.replace(/\/\/.*/g, "")
|
.replace(/\/\/.*/g, "")
|
||||||
.replace(/[\n\r]/g, "")
|
.replace(/[\n\r]/g, "")
|
||||||
.replace(/\{HOST\}/, process.runner[0].debughost || "")
|
.replace(/\{HOST\}/, process.runner.debughost || "")
|
||||||
.replace(/\{PORT\}/, process.runner[0].debugport);
|
.replace(/\{PORT\}/, process.runner.debugport);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setBreakpoints(breakpoints, callback) {
|
function setBreakpoints(breakpoints, callback) {
|
||||||
|
@ -86470,8 +86470,7 @@ define("plugins/c9.ide.run.debug/watches",[], function(require, exports, module)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dbg.setVariable(variable, parents,
|
dbg.setVariable(variable, value, debug.activeFrame, function(err) {
|
||||||
value, debug.activeFrame, function(err) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
variable.value = oldValue;
|
variable.value = oldValue;
|
||||||
updateVariable(variable, [], node, true);
|
updateVariable(variable, [], node, true);
|
||||||
|
@ -86693,8 +86692,7 @@ define("plugins/c9.ide.run.debug/variables",[], function(require, exports, modul
|
||||||
var node = e.node;
|
var node = e.node;
|
||||||
var value = e.value;
|
var value = e.value;
|
||||||
|
|
||||||
var parents = [];
|
var variable = node;
|
||||||
var variable = activeFrame.findVariable(node, null, parents);
|
|
||||||
var oldValue = variable.value;
|
var oldValue = variable.value;
|
||||||
|
|
||||||
model.setAttribute(variable, "value", value);
|
model.setAttribute(variable, "value", value);
|
||||||
|
@ -86702,11 +86700,11 @@ define("plugins/c9.ide.run.debug/variables",[], function(require, exports, modul
|
||||||
function undo() {
|
function undo() {
|
||||||
model.setAttribute(variable, "value", oldValue);
|
model.setAttribute(variable, "value", oldValue);
|
||||||
}
|
}
|
||||||
dbg.setVariable(variable, parents,
|
dbg.setVariable(variable, value, debug.activeFrame, function(err) {
|
||||||
value, debug.activeFrame, function(err) {
|
if (err)
|
||||||
if (err)
|
|
||||||
return undo();
|
return undo();
|
||||||
updateVariable(variable, variable.properties, node);
|
dbg.getProperties(variable.parent, function() {
|
||||||
|
updateVariable(variable.parent);
|
||||||
|
|
||||||
emit("variableEdit", {
|
emit("variableEdit", {
|
||||||
value: value,
|
value: value,
|
||||||
|
@ -86714,8 +86712,8 @@ define("plugins/c9.ide.run.debug/variables",[], function(require, exports, modul
|
||||||
node: node,
|
node: node,
|
||||||
variable: variable,
|
variable: variable,
|
||||||
frame: activeFrame,
|
frame: activeFrame,
|
||||||
parents: parents
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92573,7 +92571,7 @@ define("plugins/c9.ide.run.debug/debuggers/v8/v8debugger",[], function(require,
|
||||||
return debug.proxySource
|
return debug.proxySource
|
||||||
.replace(/\/\/.*/g, "")
|
.replace(/\/\/.*/g, "")
|
||||||
.replace(/[\n\r]/g, "")
|
.replace(/[\n\r]/g, "")
|
||||||
.replace(/\{PORT\}/, (process.runner[0] || process.runner).debugport);
|
.replace(/\{PORT\}/, process.runner.debugport);
|
||||||
}
|
}
|
||||||
|
|
||||||
function attach(s, reconnect, callback) {
|
function attach(s, reconnect, callback) {
|
||||||
|
@ -92920,15 +92918,12 @@ define("plugins/c9.ide.run.debug/debuggers/v8/v8debugger",[], function(require,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setVariable(variable, parents, value, frame, callback) {
|
function setVariable(variable, value, frame, callback) {
|
||||||
var names = [], scopeNumber, frameIndex = frame.index;
|
var isScope = false, scopeNumber, frameIndex = frame.index;
|
||||||
parents.reverse().forEach(function(p) {
|
if (variable.parent && !variable.parent.ref) {
|
||||||
if (p.tagName == "variable")
|
scopeNumber = variable.parent.index;
|
||||||
names.push(p.name.replace(/"/g, '\\"'));
|
isScope = true;
|
||||||
else if (p.tagName == "scope")
|
}
|
||||||
scopeNumber = p.index;
|
|
||||||
});
|
|
||||||
names.push(variable.name);
|
|
||||||
|
|
||||||
function handler(err, body) {
|
function handler(err, body) {
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -92939,6 +92934,7 @@ define("plugins/c9.ide.run.debug/debuggers/v8/v8debugger",[], function(require,
|
||||||
variable.ref = body.handle;
|
variable.ref = body.handle;
|
||||||
variable.properties = body.properties || [];
|
variable.properties = body.properties || [];
|
||||||
variable.children = (body.properties || "").length ? true : false;
|
variable.children = (body.properties || "").length ? true : false;
|
||||||
|
|
||||||
if (variable.children) {
|
if (variable.children) {
|
||||||
lookup(body.properties, false, function(err, properties) {
|
lookup(body.properties, false, function(err, properties) {
|
||||||
variable.properties = properties;
|
variable.properties = properties;
|
||||||
|
@ -92949,10 +92945,10 @@ define("plugins/c9.ide.run.debug/debuggers/v8/v8debugger",[], function(require,
|
||||||
callback(null, variable);
|
callback(null, variable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (parents.length == (typeof scopeNumber == "number" ? 1 : 0))
|
if (isScope)
|
||||||
setLocalVariable(variable, value, scopeNumber || 0, frameIndex, handler);
|
setLocalVariable(variable, value, scopeNumber || 0, frameIndex, handler);
|
||||||
else
|
else
|
||||||
setAnyVariable(variable, parents[0], value, handler);
|
setAnyVariable(variable, frame, value, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLocalVariable(variable, value, scopeNumber, frameIndex, callback) {
|
function setLocalVariable(variable, value, scopeNumber, frameIndex, callback) {
|
||||||
|
@ -92978,14 +92974,14 @@ define("plugins/c9.ide.run.debug/debuggers/v8/v8debugger",[], function(require,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAnyVariable(variable, parent, value, callback) {
|
function setAnyVariable(variable, frame, value, callback) {
|
||||||
var expression = "(function(a, b) { this[a] = b; })"
|
var expression = "(function(a, b) { this[a] = b; })"
|
||||||
+ ".call(__cloud9_debugger_self__, \""
|
+ ".call(__cloud9_debugger_self__, \""
|
||||||
+ variable.name + "\", " + value + ")";
|
+ variable.name + "\", " + value + ")";
|
||||||
|
|
||||||
v8dbg.simpleevaluate(expression, null, true, [{
|
v8dbg.simpleevaluate(expression, frame, false, [{
|
||||||
name: "__cloud9_debugger_self__",
|
name: "__cloud9_debugger_self__",
|
||||||
handle: parent.ref
|
handle: variable.parent.ref
|
||||||
}], function(body, refs, error) {
|
}], function(body, refs, error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
var err = new Error(error.message);
|
var err = new Error(error.message);
|
||||||
|
@ -95386,7 +95382,6 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
var STARTING = 1;
|
var STARTING = 1;
|
||||||
var STARTED = 2;
|
var STARTED = 2;
|
||||||
|
|
||||||
var STATIC = options.staticPrefix;
|
|
||||||
var installPath = options.installPath || "~/.c9";
|
var installPath = options.installPath || "~/.c9";
|
||||||
var TMUX = options.tmux || installPath + "/bin/tmux";
|
var TMUX = options.tmux || installPath + "/bin/tmux";
|
||||||
var BASH = "bash";
|
var BASH = "bash";
|
||||||
|
@ -95482,7 +95477,7 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
return re.test(file);
|
return re.test(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (selector instanceof Array) {
|
else if (Array.isArray(selector)) {
|
||||||
return selector.some(function(n) {
|
return selector.some(function(n) {
|
||||||
return matchSelector(n, path);
|
return matchSelector(n, path);
|
||||||
});
|
});
|
||||||
|
@ -95555,12 +95550,11 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
if (!name)
|
if (!name)
|
||||||
name = "output";
|
name = "output";
|
||||||
|
|
||||||
(options instanceof Array ? options : [options]).forEach(function(a) {
|
|
||||||
a.relPath = a.path;
|
options.relPath = options.path;
|
||||||
a.path = makeAbsolutePath(a.path);
|
options.path = makeAbsolutePath(options.path);
|
||||||
a.path = c9.toExternalPath(a.path, "/");
|
options.path = c9.toExternalPath(options.path, "/");
|
||||||
a.cwd = makeAbsolutePath(a.cwd);
|
options.cwd = makeAbsolutePath(options.cwd);
|
||||||
});
|
|
||||||
|
|
||||||
var proc = new Process(name, runner, options, callback);
|
var proc = new Process(name, runner, options, callback);
|
||||||
processes.push(proc);
|
processes.push(proc);
|
||||||
|
@ -95629,54 +95623,49 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
|
|
||||||
emit("starting");
|
emit("starting");
|
||||||
|
|
||||||
if (!(runner instanceof Array))
|
|
||||||
runner = [runner];
|
|
||||||
|
|
||||||
if (!(options instanceof Array))
|
|
||||||
options = [options];
|
|
||||||
|
|
||||||
if (deferred)
|
if (deferred)
|
||||||
return setTimeout(callback);
|
return setTimeout(callback);
|
||||||
|
|
||||||
cmd = runner.map(function(runner, idx) {
|
options.debugport = options.debugport || runner.debugport;
|
||||||
var cmd = "";
|
options.debughost = options.debughost || runner.debughost;
|
||||||
if (runner.info)
|
|
||||||
cmd += "printf '\\033[1m" + runner.info.replace(/%/g, "%%") + "\\033[m\n' ; ";
|
|
||||||
if (runner.path)
|
|
||||||
cmd += "export PATH=" + runner.path + " ; ";
|
|
||||||
|
|
||||||
var env = util.extend({}, options[idx].env, runner.env);
|
|
||||||
for (var name in env) {
|
|
||||||
var value = /^["'].*["']$/.test(env[name])
|
|
||||||
? env[name]
|
|
||||||
: env[name].replace(/'/g, "'\\''");
|
|
||||||
cmd += "export " + name + "='" + value + "'; ";
|
|
||||||
}
|
|
||||||
if (runner.script) {
|
|
||||||
cmd = insertVariables(cmd, options[idx]);
|
|
||||||
cmd += typeof runner.script == "string" ? runner.script : runner.script.join("\n");
|
|
||||||
var matches = cmd.match(/\$[\w\-]+/g) || [];
|
|
||||||
var seen = {};
|
|
||||||
cmd = matches.map(function(key) {
|
|
||||||
if (seen[key])
|
|
||||||
return "";
|
|
||||||
seen[key] = 1;
|
|
||||||
var val = getVariable(key.slice(1), options[idx]);
|
|
||||||
if (val == key)
|
|
||||||
return "";
|
|
||||||
return key.slice(1) + "=" + bashQuote([val]) + ";";
|
|
||||||
}).join("") + "\n" + cmd;
|
|
||||||
} else {
|
|
||||||
cmd += bashQuote(options[idx].debug && runner["cmd-debug"] || runner.cmd);
|
|
||||||
cmd = insertVariables(cmd, options[idx]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return cmd;
|
|
||||||
}).join("; ");
|
|
||||||
options = options[0];
|
|
||||||
|
|
||||||
var cwd = options.cwd || runner[0].working_dir
|
var cmd = "";
|
||||||
|
if (runner.info)
|
||||||
|
cmd += "printf '\\033[1m" + runner.info.replace(/%/g, "%%") + "\\033[m\n' ; ";
|
||||||
|
if (runner.path)
|
||||||
|
cmd += "export PATH=" + runner.path + " ; ";
|
||||||
|
|
||||||
|
var env = util.extend({}, options.env, runner.env);
|
||||||
|
for (var name in env) {
|
||||||
|
var value = /^["'].*["']$/.test(env[name])
|
||||||
|
? env[name]
|
||||||
|
: env[name].replace(/'/g, "'\\''");
|
||||||
|
cmd += "export " + name + "='" + value + "'; ";
|
||||||
|
}
|
||||||
|
if (runner.script) {
|
||||||
|
cmd = insertVariables(cmd, options);
|
||||||
|
cmd += typeof runner.script == "string" ? runner.script : runner.script.join("\n");
|
||||||
|
var matches = cmd.match(/\$[\w\-]+/g) || [];
|
||||||
|
var argRe = /\$args(?=\s|$|[&|>;])/g;
|
||||||
|
var seen = { args: argRe.test(cmd) };
|
||||||
|
cmd = matches.map(function(key) {
|
||||||
|
if (seen[key])
|
||||||
|
return "";
|
||||||
|
seen[key] = 1;
|
||||||
|
var val = getVariable(key.slice(1), options);
|
||||||
|
if (val == key)
|
||||||
|
return "";
|
||||||
|
return key.slice(1) + "=" + bashQuote([val]) + ";";
|
||||||
|
}).join("") + "\n" + cmd;
|
||||||
|
cmd = cmd.replace(argRe, options.args);
|
||||||
|
} else {
|
||||||
|
cmd += bashQuote(options.debug && runner["cmd-debug"] || runner.cmd);
|
||||||
|
cmd = insertVariables(cmd, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
var cwd = options.cwd || runner.working_dir
|
||||||
|| options.path && dirname(c9.toInternalPath(options.path)) || "/";
|
|| options.path && dirname(c9.toInternalPath(options.path)) || "/";
|
||||||
|
|
||||||
cwd = insertVariables(cwd, options);
|
cwd = insertVariables(cwd, options);
|
||||||
console.log(cmd);
|
console.log(cmd);
|
||||||
proc.tmux(cmd, {
|
proc.tmux(cmd, {
|
||||||
|
@ -95741,6 +95730,10 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
idx = fnme.lastIndexOf(".");
|
idx = fnme.lastIndexOf(".");
|
||||||
return idx == -1 ? fnme : fnme.substr(0, idx);
|
return idx == -1 ? fnme : fnme.substr(0, idx);
|
||||||
}
|
}
|
||||||
|
if (name == "debugport")
|
||||||
|
return (parseInt(options.debugport) || 0) + "";
|
||||||
|
if (name == "debughost")
|
||||||
|
return bashQuote(options.debughost);
|
||||||
if (name == "packages")
|
if (name == "packages")
|
||||||
return installPath + "/packages";
|
return installPath + "/packages";
|
||||||
if (name == "project_path")
|
if (name == "project_path")
|
||||||
|
@ -95887,7 +95880,7 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
if (c9.platform === "win32")
|
if (c9.platform === "win32")
|
||||||
return proc.execFile("kill", { args: [pid]}, done);
|
return proc.execFile("kill", { args: [pid]}, done);
|
||||||
|
|
||||||
var runCfg = runner && runner[0];
|
var runCfg = runner;
|
||||||
|
|
||||||
if (runCfg && runCfg.cmdStop) {
|
if (runCfg && runCfg.cmdStop) {
|
||||||
return proc.execFile("bash", { args: ["-c", bashQuote(runCfg.cmdStop)]}, done);
|
return proc.execFile("bash", { args: ["-c", bashQuote(runCfg.cmdStop)]}, done);
|
||||||
|
@ -95897,9 +95890,9 @@ define("plugins/c9.ide.run/run",[], function(require, module, exports) {
|
||||||
if (runCfg && runCfg.cmdCleanup) {
|
if (runCfg && runCfg.cmdCleanup) {
|
||||||
proc.execFile("bash", { args: ["-c", bashQuote(runCfg.cmdCleanup)]}, done);
|
proc.execFile("bash", { args: ["-c", bashQuote(runCfg.cmdCleanup)]}, done);
|
||||||
}
|
}
|
||||||
else if (meta.debug && runner && runner[0].debugport) {
|
else if (meta.debug && runner && runner.debugport) {
|
||||||
var kill = "kill -9 $(lsof -i:" + runner[0].debugport + " -t);"
|
var kill = "kill -9 $(lsof -i:" + runner.debugport + " -t);"
|
||||||
+ "if sudo -n true; then sudo kill -9 $(sudo lsof -i:" + runner[0].debugport + " -t); fi";
|
+ "if sudo -n true; then sudo kill -9 $(sudo lsof -i:" + runner.debugport + " -t); fi";
|
||||||
proc.execFile("sh", { args: ["-c", kill]}, done);
|
proc.execFile("sh", { args: ["-c", kill]}, done);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"${debug?--nocrankshaft}",
|
"${debug?--nocrankshaft}",
|
||||||
"${debug?--nolazy}",
|
"${debug?--nolazy}",
|
||||||
"${debug?`node --version | grep -vqE \"v0\\..\\.\" && echo --nodead_code_elimination`}",
|
"${debug?`node --version | grep -vqE \"v0\\..\\.\" && echo --nodead_code_elimination`}",
|
||||||
"${debug?--debug-brk=15454}",
|
"${debug?--debug-brk=$debugport}",
|
||||||
"$file",
|
"$file",
|
||||||
"$args"
|
"$args"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"cmd": [
|
|
||||||
"iojs",
|
|
||||||
"${debug?--nocrankshaft}",
|
|
||||||
"${debug?--nolazy}",
|
|
||||||
"${debug?--nodead_code_elimination}",
|
|
||||||
"${debug?--debug-brk=15455}",
|
|
||||||
"$file",
|
|
||||||
"$args"
|
|
||||||
],
|
|
||||||
"debugger": "v8",
|
|
||||||
"debugport": 15455
|
|
||||||
}
|
|
|
@ -58,5 +58,6 @@
|
||||||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||||
},
|
},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"readme": "ERROR: No README data found!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/ternjs/tern#readme",
|
"homepage": "https://github.com/ternjs/tern#readme",
|
||||||
"_id": "tern@0.16.1",
|
"_id": "tern@0.16.1",
|
||||||
"_shasum": "085b9ac31c2ca9b293f345175d65273b5d9d2865",
|
"_shasum": "e0cb65de042e35940589bdb0b98ccb25eec077cf",
|
||||||
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
||||||
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"_id": "tern_from_ts@0.0.1",
|
"_id": "tern_from_ts@0.0.1",
|
||||||
"_shasum": "e706c2b010e6d0877e9970edf0e1fb404165f89e",
|
"_shasum": "928d41a0f190915bc9406d6fe55e4d4ea26853e6",
|
||||||
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
||||||
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,5 @@
|
||||||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||||
},
|
},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||||
"readme": "ERROR: No README data found!"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/gjtorikian/nak#readme",
|
"homepage": "https://github.com/gjtorikian/nak#readme",
|
||||||
"_id": "nak@0.3.3",
|
"_id": "nak@0.3.3",
|
||||||
"_shasum": "0e047baa3d480ec9ec47be3ed5dafced04688ed6",
|
"_shasum": "3f3148a9a2bbf0f11abff30802c0df5dbc013fbd",
|
||||||
"_from": "git+https://github.com/cloud9ide/nak.git#6deef931594",
|
"_from": "git+https://github.com/cloud9ide/nak.git#6deef931594",
|
||||||
"_resolved": "git+https://github.com/cloud9ide/nak.git#6deef931594787edd167040f7352e3e7533430e4"
|
"_resolved": "git+https://github.com/cloud9ide/nak.git#6deef931594787edd167040f7352e3e7533430e4"
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,5 +58,6 @@
|
||||||
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
"tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328"
|
||||||
},
|
},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"readme": "ERROR: No README data found!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/ternjs/tern#readme",
|
"homepage": "https://github.com/ternjs/tern#readme",
|
||||||
"_id": "tern@0.16.1",
|
"_id": "tern@0.16.1",
|
||||||
"_shasum": "085b9ac31c2ca9b293f345175d65273b5d9d2865",
|
"_shasum": "e0cb65de042e35940589bdb0b98ccb25eec077cf",
|
||||||
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
"_from": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e",
|
||||||
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
"_resolved": "git+https://github.com/cloud9ide/tern.git#39015d544d4c00c7899fea4c95c2e5bc2720e68e"
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
"readme": "# tern_from_ts\n\nTern signatures extracted from typescript signatures.\n\nLicense: MIT\n\nSee also https://github.com/marijnh/tern and https://github.com/borisyankov/DefinitelyTyped\n",
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"_id": "tern_from_ts@0.0.1",
|
"_id": "tern_from_ts@0.0.1",
|
||||||
"_shasum": "e706c2b010e6d0877e9970edf0e1fb404165f89e",
|
"_shasum": "928d41a0f190915bc9406d6fe55e4d4ea26853e6",
|
||||||
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
"_from": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c",
|
||||||
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
"_resolved": "git+https://github.com/cloud9ide/tern_from_ts.git#66df507986bbdd63f3bc4f0c53edb39169ce4f1c"
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,5 +49,5 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"licenses": [],
|
"licenses": [],
|
||||||
"revision": "5500cd5b8ab55975ee24310e522c74e14f038d82"
|
"revision": "718f53d835008733866e48503b78213052aa8cbd"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"${debug?--nocrankshaft}",
|
"${debug?--nocrankshaft}",
|
||||||
"${debug?--nolazy}",
|
"${debug?--nolazy}",
|
||||||
"${debug?`node --version | grep -vqE \"v0\\..\\.\" && echo --nodead_code_elimination`}",
|
"${debug?`node --version | grep -vqE \"v0\\..\\.\" && echo --nodead_code_elimination`}",
|
||||||
"${debug?--debug-brk=15454}",
|
"${debug?--debug-brk=$debugport}",
|
||||||
"$file",
|
"$file",
|
||||||
"$args"
|
"$args"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"cmd": [
|
|
||||||
"iojs",
|
|
||||||
"${debug?--nocrankshaft}",
|
|
||||||
"${debug?--nolazy}",
|
|
||||||
"${debug?--nodead_code_elimination}",
|
|
||||||
"${debug?--debug-brk=15455}",
|
|
||||||
"$file",
|
|
||||||
"$args"
|
|
||||||
],
|
|
||||||
"debugger": "v8",
|
|
||||||
"debugport": 15455
|
|
||||||
}
|
|
2
version
2
version
|
@ -1 +1 @@
|
||||||
1516161646
|
1516248053
|
||||||
|
|
Ładowanie…
Reference in New Issue