From 8539b036911dbce126b8d8a0d78bb103c5840bff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 04:32:13 +0000 Subject: [PATCH 1/2] Initial plan From 89d85a339a318b55b08f18799ffe68a4d99019f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Feb 2026 04:37:33 +0000 Subject: [PATCH 2/2] fix: replace replaceAll with split().join() for ES2020 compatibility Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- packages/services/service-automation/src/engine.ts | 2 +- .../service-automation/src/plugins/logic-nodes-plugin.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/services/service-automation/src/engine.ts b/packages/services/service-automation/src/engine.ts index ac619e54b0..ca1dc211a7 100644 --- a/packages/services/service-automation/src/engine.ts +++ b/packages/services/service-automation/src/engine.ts @@ -229,7 +229,7 @@ export class AutomationEngine implements IAutomationService { // TODO: Replace with safe expression evaluator (e.g., jexl) for production. let resolved = expression; for (const [key, value] of variables) { - resolved = resolved.replaceAll(`{${key}}`, String(value)); + resolved = resolved.split(`{${key}}`).join(String(value)); } try { return new Function(`return (${resolved})`)() as boolean; diff --git a/packages/services/service-automation/src/plugins/logic-nodes-plugin.ts b/packages/services/service-automation/src/plugins/logic-nodes-plugin.ts index 17d4c98c82..e36bfbbb9b 100644 --- a/packages/services/service-automation/src/plugins/logic-nodes-plugin.ts +++ b/packages/services/service-automation/src/plugins/logic-nodes-plugin.ts @@ -30,7 +30,7 @@ export class LogicNodesPlugin implements Plugin { // TODO: Replace with safe expression evaluator (e.g., jexl) for production. let expr = cond.expression; for (const [k, v] of variables) { - expr = expr.replaceAll(`{${k}}`, String(v)); + expr = expr.split(`{${k}}`).join(String(v)); } try { if (new Function(`return (${expr})`)()) {