mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Compare commits
11 Commits
tab-close-
...
4683-prese
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03648dc7e8 | ||
|
|
66a667fe58 | ||
|
|
08927dfb55 | ||
|
|
b27483de9c | ||
|
|
211d420fb2 | ||
|
|
b8ca4665c1 | ||
|
|
960af87fb0 | ||
|
|
de7339ae97 | ||
|
|
0995af62b6 | ||
|
|
c2e03a40b4 | ||
|
|
c855050bcf |
@@ -205,9 +205,10 @@ function genericStrategy(adminApp,strategy) {
|
|||||||
passport.use(new strategy.strategy(options, verify));
|
passport.use(new strategy.strategy(options, verify));
|
||||||
|
|
||||||
adminApp.get('/auth/strategy',
|
adminApp.get('/auth/strategy',
|
||||||
passport.authenticate(strategy.name, {session:false,
|
passport.authenticate(strategy.name, {
|
||||||
|
session:false,
|
||||||
failureMessage: true,
|
failureMessage: true,
|
||||||
failureRedirect: settings.httpAdminRoot
|
failureRedirect: settings.httpAdminRoot + '?session_message=Login Failed'
|
||||||
}),
|
}),
|
||||||
completeGenerateStrategyAuth,
|
completeGenerateStrategyAuth,
|
||||||
handleStrategyError
|
handleStrategyError
|
||||||
@@ -221,7 +222,7 @@ function genericStrategy(adminApp,strategy) {
|
|||||||
passport.authenticate(strategy.name, {
|
passport.authenticate(strategy.name, {
|
||||||
session:false,
|
session:false,
|
||||||
failureMessage: true,
|
failureMessage: true,
|
||||||
failureRedirect: settings.httpAdminRoot
|
failureRedirect: settings.httpAdminRoot + '?session_message=Login Failed'
|
||||||
}),
|
}),
|
||||||
completeGenerateStrategyAuth,
|
completeGenerateStrategyAuth,
|
||||||
handleStrategyError
|
handleStrategyError
|
||||||
|
|||||||
@@ -612,7 +612,10 @@ RED.deploy = (function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
RED.nodes.eachSubflow(function (subflow) {
|
RED.nodes.eachSubflow(function (subflow) {
|
||||||
subflow.changed = false;
|
if (subflow.changed) {
|
||||||
|
subflow.changed = false;
|
||||||
|
RED.events.emit("subflows:change", subflow);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
RED.nodes.eachWorkspace(function (ws) {
|
RED.nodes.eachWorkspace(function (ws) {
|
||||||
if (ws.changed || ws.added) {
|
if (ws.changed || ws.added) {
|
||||||
|
|||||||
@@ -1623,8 +1623,8 @@ RED.editor = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isSameObj(old_env, new_env)) {
|
if (!isSameObj(old_env, new_env)) {
|
||||||
editing_node.env = new_env;
|
|
||||||
editState.changes.env = editing_node.env;
|
editState.changes.env = editing_node.env;
|
||||||
|
editing_node.env = new_env;
|
||||||
editState.changed = true;
|
editState.changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||||||
_monaco.languages.json.jsonDefaults.setDiagnosticsOptions(diagnosticOptions);
|
_monaco.languages.json.jsonDefaults.setDiagnosticsOptions(diagnosticOptions);
|
||||||
if(modeConfiguration) { _monaco.languages.json.jsonDefaults.setModeConfiguration(modeConfiguration); }
|
if(modeConfiguration) { _monaco.languages.json.jsonDefaults.setModeConfiguration(modeConfiguration); }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn("monaco - Error setting up json options", err)
|
console.warn("monaco - Error setting up json options", error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -526,7 +526,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||||||
if(htmlDefaults) { _monaco.languages.html.htmlDefaults.setOptions(htmlDefaults); }
|
if(htmlDefaults) { _monaco.languages.html.htmlDefaults.setOptions(htmlDefaults); }
|
||||||
if(handlebarDefaults) { _monaco.languages.html.handlebarDefaults.setOptions(handlebarDefaults); }
|
if(handlebarDefaults) { _monaco.languages.html.handlebarDefaults.setOptions(handlebarDefaults); }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn("monaco - Error setting up html options", err)
|
console.warn("monaco - Error setting up html options", error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,7 +546,7 @@ RED.editor.codeEditor.monaco = (function() {
|
|||||||
if(lessDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(lessDefaults_modeConfiguration); }
|
if(lessDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(lessDefaults_modeConfiguration); }
|
||||||
if(scssDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(scssDefaults_modeConfiguration); }
|
if(scssDefaults_modeConfiguration) { _monaco.languages.css.cssDefaults.setDiagnosticsOptions(scssDefaults_modeConfiguration); }
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn("monaco - Error setting up CSS/SCSS/LESS options", err)
|
console.warn("monaco - Error setting up CSS/SCSS/LESS options", error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -438,10 +438,9 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
//store the error in msg to be used in flows
|
//store the error in msg to be used in flows
|
||||||
msg.error = err;
|
msg.error = err;
|
||||||
|
|
||||||
var line = 0;
|
|
||||||
var errorMessage;
|
|
||||||
if (stack.length > 0) {
|
if (stack.length > 0) {
|
||||||
|
let line = 0;
|
||||||
|
let errorMessage;
|
||||||
while (line < stack.length && stack[line].indexOf("ReferenceError") !== 0) {
|
while (line < stack.length && stack[line].indexOf("ReferenceError") !== 0) {
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
@@ -455,11 +454,13 @@ module.exports = function(RED) {
|
|||||||
errorMessage += " (line "+lineno+", col "+cha+")";
|
errorMessage += " (line "+lineno+", col "+cha+")";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (errorMessage) {
|
||||||
|
err.message = errorMessage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!errorMessage) {
|
// Pass the whole error object so any additional properties
|
||||||
errorMessage = err.toString();
|
// (such as cause) are preserved
|
||||||
}
|
done(err);
|
||||||
done(errorMessage);
|
|
||||||
}
|
}
|
||||||
else if (typeof err === "string") {
|
else if (typeof err === "string") {
|
||||||
done(err);
|
done(err);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
<h4>Automatic mode</h4>
|
<h4>Automatic mode</h4>
|
||||||
<p>Automatic mode uses the <code>parts</code> property of incoming messages to
|
<p>Automatic mode uses the <code>parts</code> property of incoming messages to
|
||||||
determine how the sequence should be joined. This allows it to automatically
|
determine how the sequence should be joined. This allows it to automatically
|
||||||
reverse the action of a <b>split</b> node.
|
reverse the action of a <b>split</b> node.</p>
|
||||||
|
|
||||||
<h4>Manual mode</h4>
|
<h4>Manual mode</h4>
|
||||||
<p>When configured to join in manual mode, the node is able to join sequences
|
<p>When configured to join in manual mode, the node is able to join sequences
|
||||||
|
|||||||
@@ -678,6 +678,9 @@ class Flow {
|
|||||||
if (logMessage.hasOwnProperty('stack')) {
|
if (logMessage.hasOwnProperty('stack')) {
|
||||||
errorMessage.error.stack = logMessage.stack;
|
errorMessage.error.stack = logMessage.stack;
|
||||||
}
|
}
|
||||||
|
if (logMessage.hasOwnProperty('cause')) {
|
||||||
|
errorMessage.error.cause = logMessage.cause;
|
||||||
|
}
|
||||||
targetCatchNode.receive(errorMessage);
|
targetCatchNode.receive(errorMessage);
|
||||||
handled = true;
|
handled = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -390,7 +390,8 @@ describe('function node', function() {
|
|||||||
msg.should.have.property('level', helper.log().ERROR);
|
msg.should.have.property('level', helper.log().ERROR);
|
||||||
msg.should.have.property('id', 'n1');
|
msg.should.have.property('id', 'n1');
|
||||||
msg.should.have.property('type', 'function');
|
msg.should.have.property('type', 'function');
|
||||||
msg.should.have.property('msg', 'ReferenceError: retunr is not defined (line 2, col 1)');
|
msg.should.have.property('msg')
|
||||||
|
msg.msg.message.should.equal('ReferenceError: retunr is not defined (line 2, col 1)');
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
done(err);
|
done(err);
|
||||||
@@ -659,7 +660,8 @@ describe('function node', function() {
|
|||||||
msg.should.have.property('level', helper.log().ERROR);
|
msg.should.have.property('level', helper.log().ERROR);
|
||||||
msg.should.have.property('id', name);
|
msg.should.have.property('id', name);
|
||||||
msg.should.have.property('type', 'function');
|
msg.should.have.property('type', 'function');
|
||||||
msg.should.have.property('msg', 'Error: Callback must be a function');
|
msg.should.have.property('msg')
|
||||||
|
msg.msg.message.should.equal('Callback must be a function');
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user