From aac904b65e043935a5e845c37c1b300c385dc177 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 28 May 2015 12:35:12 +0000 Subject: [PATCH 1/5] add timeout handler to rest client --- node_modules/c9/rest_client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/node_modules/c9/rest_client.js b/node_modules/c9/rest_client.js index d8910d20..5919e33b 100644 --- a/node_modules/c9/rest_client.js +++ b/node_modules/c9/rest_client.js @@ -111,6 +111,10 @@ function RestClient(host, port, config) { done(e); }); + res.on("timeout", function() { + done(new Error("Request timed out")); + }); + var called = false; function done(err, json) { if (called) From 60360f8598ea09dddaba9d9a7068e3d6016aac89 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Fri, 29 May 2015 08:50:49 +0000 Subject: [PATCH 2/5] document req timeout --- node_modules/c9/request_timeout.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node_modules/c9/request_timeout.js b/node_modules/c9/request_timeout.js index 76f24360..990f8ae4 100644 --- a/node_modules/c9/request_timeout.js +++ b/node_modules/c9/request_timeout.js @@ -1,3 +1,8 @@ +/** + * the default response timeout in node.js is 2min. If a request takes longer + * to process then it needs to be increased + */ + module.exports = function(timeout) { return function(req, res, next) { req.setTimeout(timeout); From 43f73c2013df42442375f0a58adae700f453604b Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 3 Jun 2015 16:23:17 +0400 Subject: [PATCH 3/5] tweak raygun errors --- plugins/c9.ide.errorhandler/raygun.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/c9.ide.errorhandler/raygun.js b/plugins/c9.ide.errorhandler/raygun.js index 63aa3f59..bbd155d5 100644 --- a/plugins/c9.ide.errorhandler/raygun.js +++ b/plugins/c9.ide.errorhandler/raygun.js @@ -1420,7 +1420,9 @@ window.TraceKit = TraceKit; var blackListedErrors = { 'Error with empty message': {}, 'Script error.': {}, - 'DealPly is not defined': { factor: 10e5 } + 'DealPly is not defined': { factor: 10e5 }, + "Cannot read property 'style' of null": { factor: 10e3 }, + "Project with id '' does not exist": { factor: 10e2 }, }; var groupedErrors = [{ regex: /^((?:Project|User) with id ')(\d+)(' does not exist)/i, @@ -1432,7 +1434,7 @@ window.TraceKit = TraceKit; regex: /^(Cannot GET \/)([\s\S]*)/i, pullOut: { 1: 'url' } }, { - regex: /^(Error whilst parsing: Unexpected end whilst parsing xpath \/)([\s\S]*)/i, + regex: /^(Error whilst parsing: Unexpected end whilst parsing (?:xpath|xml|string))([\s\S]*)/i, pullOut: { 1: 'apfStuff' } }]; function processUnhandledException(stackTrace, options) { @@ -1498,6 +1500,7 @@ window.TraceKit = TraceKit; parts.forEach(function(p, i) { if (g.pullOut[i - 1]) { finalCustomData[g.pullOut[i - 1]] = p; + message += "<" + g.pullOut[i - 1] + ">"; } else { message += p; } From fe3be8eff981c3b122e53e67c28465956e53e9e5 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 3 Jun 2015 21:34:59 +0400 Subject: [PATCH 4/5] install node 0.10.28 on arm-pi --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 815aebdb..5197c442 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "c9.ide.help.support": "#6bcfa8ceff", "c9.ide.imgeditor": "#ed89162aa7", "c9.ide.immediate": "#6845a93705", - "c9.ide.installer": "#3e6f7a72c9", + "c9.ide.installer": "#dbfbb98527", "c9.ide.mount": "#250f8d91a2", "c9.ide.navigate": "#f358997d93", "c9.ide.newresource": "#f1f0624768", From 1412e15569b76445f2aa9049c61655b69aa7a105 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 2 Jun 2015 21:06:09 +0400 Subject: [PATCH 5/5] create nw.js shortcuts on windows --- scripts/setup-local-dev.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/setup-local-dev.sh b/scripts/setup-local-dev.sh index e488f8bf..74e27260 100755 --- a/scripts/setup-local-dev.sh +++ b/scripts/setup-local-dev.sh @@ -1,5 +1,7 @@ #!/bin/bash -e +set -e + while [ "$1" ]; do case "$1" in --compress) COMPRESS=1 ;; @@ -111,6 +113,30 @@ if [ "$os" == "windows" ]; then ' > $dest/package.json popd + # create shortcuts + echo ' + var WshShell = WScript.CreateObject("WScript.Shell"); + var strDesktop = WshShell.SpecialFolders("Desktop"); + var cwd = WScript.ScriptFullName.replace(/\\[^\\]+$/, ""); + var link1 = WshShell.CreateShortcut(cwd + "\\Cloud9#.lnk"); + link1.TargetPath = cwd + "\\build\\win32-dev\\bin\\Cloud9.exe"; + link1.IconLocation = cwd + "\\build\\win32\\Cloud9.ico"; + link1.Description = "Cloud9"; + link1.WorkingDirectory = cwd; + link1.Save(); + + var link2 = WshShell.CreateShortcut(cwd + "\\Cloud9#packed.lnk"); + link2.TargetPath = link1.TargetPath; + link2.Arguments = "--packed --no-devtools"; + link2.IconLocation = link1.IconLocation; + link2.Description = "Cloud9"; + link2.WorkingDirectory = cwd; + link2.Save(); + ' > ./shortcut.wscript.js + cscript //NoLogo //B //E:jscript ./shortcut.wscript.js + rm -f ./shortcut.wscript.js + + bash ./makelocal.sh fi