From e6b379358aa1278d261bc7bee2a1be09f9fc41f0 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Thu, 29 Sep 2022 21:28:13 +0100 Subject: [PATCH] better logging of set with no types --- .../@node-red/registry/lib/registry.js | 15 ++++++++------- .../node_modules/@node-red/runtime/lib/index.js | 2 ++ .../@node-red/runtime/locales/en-US/runtime.json | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/node_modules/@node-red/registry/lib/registry.js b/packages/node_modules/@node-red/registry/lib/registry.js index 6e3ed6d5b..b0ca22717 100644 --- a/packages/node_modules/@node-red/registry/lib/registry.js +++ b/packages/node_modules/@node-red/registry/lib/registry.js @@ -185,17 +185,18 @@ function loadNodeConfigs() { function addModule(module) { moduleNodes[module.name] = []; moduleConfigs[module.name] = module; - for (var setName in module.nodes) { + for (const setName in module.nodes) { if (module.nodes.hasOwnProperty(setName)) { - var set = module.nodes[setName]; + const set = module.nodes[setName]; + if(setName === 'lower-case') { + delete set.types + } if (!set.types) { - const err = new Error("Node has no types") - err.code = "has_no_types" + const err = new Error("Set has no types") + err.code = "set_has_no_types" err.details = { - setName: set.name, - set: { ...set } + ...set } - console.warn(err) set.err = err } moduleNodes[module.name].push(set.name); diff --git a/packages/node_modules/@node-red/runtime/lib/index.js b/packages/node_modules/@node-red/runtime/lib/index.js index 88b3b8293..a886cd2ca 100644 --- a/packages/node_modules/@node-red/runtime/lib/index.js +++ b/packages/node_modules/@node-red/runtime/lib/index.js @@ -161,6 +161,8 @@ function start() { for (i=0;i