mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge branch 'master' into dev
This commit is contained in:
@@ -136,8 +136,6 @@ function getCurrentLocale() {
|
||||
|
||||
function init(settings) {
|
||||
if (!initPromise) {
|
||||
// Keep this as a 'when' promise as top-level red.js uses 'otherwise'
|
||||
// and embedded users of NR may have copied that.
|
||||
initPromise = new Promise((resolve,reject) => {
|
||||
i18n.use(MessageFileLoader);
|
||||
var opt = {
|
||||
@@ -146,6 +144,8 @@ function init(settings) {
|
||||
defaultNS: "runtime",
|
||||
ns: [],
|
||||
fallbackLng: defaultLang,
|
||||
keySeparator: ".",
|
||||
nsSeparator: ":",
|
||||
interpolation: {
|
||||
unescapeSuffix: 'HTML',
|
||||
escapeValue: false,
|
||||
|
12
packages/node_modules/@node-red/util/lib/util.js
vendored
12
packages/node_modules/@node-red/util/lib/util.js
vendored
@@ -526,10 +526,11 @@ function getSetting(node, name, flow_) {
|
||||
if (flow) {
|
||||
if (node && node.g) {
|
||||
const group = flow.getGroupNode(node.g);
|
||||
const result = flow.getGroupEnvSetting(node, group, name);
|
||||
const [result, newName] = flow.getGroupEnvSetting(node, group, name);
|
||||
if (result) {
|
||||
return result.val;
|
||||
}
|
||||
name = newName;
|
||||
}
|
||||
return flow.getSetting(name);
|
||||
}
|
||||
@@ -842,6 +843,9 @@ function encodeObject(msg,opts) {
|
||||
length: msg.msg.size
|
||||
}
|
||||
needsStringify = true;
|
||||
} else if (msg.msg && msg.msg.constructor.name === "RegExp") {
|
||||
msg.format = 'regexp';
|
||||
msg.msg = msg.msg.toString();
|
||||
}
|
||||
if (needsStringify || (msg.format === "Object")) {
|
||||
msg.msg = safeJSONStringify(msg.msg, function(key, value) {
|
||||
@@ -907,6 +911,12 @@ function encodeObject(msg,opts) {
|
||||
data: Object.fromEntries(Array.from(value.entries()).slice(0,debuglength)),
|
||||
length: value.size
|
||||
}
|
||||
} else if (value.constructor.name === "RegExp") {
|
||||
value = {
|
||||
__enc__: true,
|
||||
type: "regexp",
|
||||
data: value.toString()
|
||||
}
|
||||
}
|
||||
} else if (value === undefined) {
|
||||
value = {
|
||||
|
@@ -16,10 +16,10 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"fs-extra": "10.0.0",
|
||||
"i18next": "21.3.1",
|
||||
"i18next": "21.5.4",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"jsonata": "1.8.5",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"moment-timezone": "0.5.33"
|
||||
"moment-timezone": "0.5.34"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user