From 8565eee4200009d58383943bba299434728fd3ed Mon Sep 17 00:00:00 2001 From: Hinrich <16142189+hinrichd@users.noreply.github.com> Date: Thu, 3 Jul 2025 13:53:07 +0200 Subject: [PATCH 1/3] Update flow_refresh.py Signed-off-by: Hinrich <16142189+hinrichd@users.noreply.github.com> --- charts/node-red/scripts/flow_refresh.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/node-red/scripts/flow_refresh.py b/charts/node-red/scripts/flow_refresh.py index 0a4b5dcb..6e82923b 100644 --- a/charts/node-red/scripts/flow_refresh.py +++ b/charts/node-red/scripts/flow_refresh.py @@ -109,7 +109,13 @@ def main(): for module in EXTRA_NODE_MODULES: if module not in modules_installed: try: - module_name, version = module.rsplit('/', 1)[-1].split('@', 1) if '@' in module else (module, None) + # SPLIT WILL NOT WORK PROBERLY, IF STRING HAS MORE THAN ONE MATCH. THE ARRAY INDEX WILL FAIL + # MODULE SAMPLE USE CASES: "NODE-RED-NODE-MYSQL, NODE-RED-NODE-MYSQL@2.0.0, NODE-RED-NODE-MYSQL/, @FLOWFUSE/NODE-RED-DASHBOARD, @FLOWFUSE/NODE-RED-DASHBOARD/, @FLOWFUSE/NODE-RED-DASHBOARD@1.2.3, + # OLD SPLIT MODULE_NAME, VERSION = MODULE.RSPLIT('/', 1)[-1].SPLIT('@', 1) IF '@' IN MODULE ELSE (MODULE, NONE) + # TRAILING SLASH - ONLY AT THE END + module = module[:-1] if module.endswith('/') else module + # SPLIT AT LAST @ EVEN IF NONE OR MORE THAN ONE + module_name, version = (module[:module.rfind('@')], module[module.rfind('@') + 1:]) if '@' in module else (module, None) except: module_name, version = module, None payload_node_module = '' From 3774f20cacf291eb52af1d9a242c1800bfbf23aa Mon Sep 17 00:00:00 2001 From: Hinrich <16142189+hinrichd@users.noreply.github.com> Date: Thu, 3 Jul 2025 13:54:42 +0200 Subject: [PATCH 2/3] Update README.md.gotmpl Signed-off-by: Hinrich <16142189+hinrichd@users.noreply.github.com> --- charts/node-red/README.md.gotmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/node-red/README.md.gotmpl b/charts/node-red/README.md.gotmpl index f394c29e..0c802e53 100644 --- a/charts/node-red/README.md.gotmpl +++ b/charts/node-red/README.md.gotmpl @@ -107,9 +107,10 @@ You need to list your flows required 'NODE_MODULES' in the `sidecar.extraNodeMod ```yaml sidecar: extraNodeModules: - - node-red-contrib-xkeys_setunitid - - node-red-contrib-microsoft-teams-tasks - node-red-contrib-json + - node-red-node-mysql@2.0.0 + - @flowfuse/node-red-dashboard + - @flowfuse/node-red-dashboard-2-ui-iframe@1.1.0 ``` To install the node modules successfully, the node red pod needs access to the `npmrc.registry` to download the declaired modules/packages. From 6bb02491032e46a96d0969d4c364d990b9a3bd09 Mon Sep 17 00:00:00 2001 From: Hinrich <16142189+hinrichd@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:04:46 +0000 Subject: [PATCH 3/3] update charts bug fix version Signed-off-by: Hinrich <16142189+hinrichd@users.noreply.github.com> --- charts/node-red/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/node-red/Chart.yaml b/charts/node-red/Chart.yaml index ba2f472c..5e24b172 100644 --- a/charts/node-red/Chart.yaml +++ b/charts/node-red/Chart.yaml @@ -9,7 +9,7 @@ icon: https://nodered.org/about/resources/media/node-red-icon-2.png type: application -version: 0.40.1 +version: 0.40.2 appVersion: 4.1.2 keywords: