Merge branch 'master' into fips

This commit is contained in:
Jayson Hurst
2024-02-16 17:53:30 -07:00
committed by GitHub
68 changed files with 4637 additions and 133 deletions

View File

@@ -212,6 +212,7 @@ class Subflow extends Flow {
var subflowInstanceConfig = {
id: this.subflowInstance.id,
type: this.subflowInstance.type,
g: this.subflowInstance.g,
z: this.subflowInstance.z,
name: this.subflowInstance.name,
wires: [],

View File

@@ -374,7 +374,12 @@ async function start(type,diff,muteLog,isDeploy) {
// A modified-type deploy means restarting things that have changed
// Update the global flow
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
if (activeFlows['global']) {
activeFlows['global'].update(activeFlowConfig,activeFlowConfig);
} else {
log.debug("red/nodes/flows.start : starting flow : global");
activeFlows['global'] = Flow.create(flowAPI,activeFlowConfig);
}
for (id in activeFlowConfig.flows) {
if (activeFlowConfig.flows.hasOwnProperty(id)) {
if (!activeFlowConfig.flows[id].disabled) {

View File

@@ -384,7 +384,8 @@ var api = module.exports = {
}
}
} else if (nodeType === "global-config") {
const existingCredentialKeys = Object.keys(savedCredentials?.map || [])
savedCredentials.map = savedCredentials.map || {}
const existingCredentialKeys = Object.keys(savedCredentials.map)
const newCredentialKeys = Object.keys(newCreds?.map || [])
existingCredentialKeys.forEach(key => {
if (!newCreds.map?.[key]) {
@@ -396,7 +397,7 @@ var api = module.exports = {
})
newCredentialKeys.forEach(key => {
if (!/^has_/.test(key)) {
if (!savedCredentials.map?.[key] || newCreds.map[key] !== '__PWRD__') {
if (!savedCredentials.map[key] || newCreds.map[key] !== '__PWRD__') {
// This key either doesn't exist in current saved, or the
// value has been changed
savedCredentials.map[key] = newCreds.map[key]