From 157da9da7d258786970e4308ea485b6386852651 Mon Sep 17 00:00:00 2001 From: Martin Stamm Date: Fri, 7 Feb 2025 12:52:46 +0100 Subject: [PATCH] deps: update to v0.0.1-alpha.12 - Connects to latest version of the RPA worker - Uses URL instead of host + port --- client/package.json | 2 +- client/src/app/tabs/rpa/RPAEditor.js | 13 +++++++++---- package-lock.json | 18 +++++++++--------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/client/package.json b/client/package.json index 24834b3a3..35bf708dd 100644 --- a/client/package.json +++ b/client/package.json @@ -19,7 +19,7 @@ "@camunda/form-playground": "^0.20.0", "@camunda/improved-canvas": "^1.7.6", "@camunda/linting": "^3.31.0", - "@camunda/rpa-integration": "0.0.1-alpha.4", + "@camunda/rpa-integration": "0.0.1-alpha.12", "@carbon/icons-react": "^11.53.0", "@codemirror/commands": "^6.6.2", "@codemirror/lang-json": "^6.0.1", diff --git a/client/src/app/tabs/rpa/RPAEditor.js b/client/src/app/tabs/rpa/RPAEditor.js index 90adafa01..3aee1d889 100644 --- a/client/src/app/tabs/rpa/RPAEditor.js +++ b/client/src/app/tabs/rpa/RPAEditor.js @@ -196,7 +196,8 @@ export class RPAEditor extends CachedComponent { const { lastXML, - lastWorkerConfig + lastWorkerConfig, + editor } = this.getCached(); if (isXMLChange(lastXML, xml)) { @@ -204,10 +205,10 @@ export class RPAEditor extends CachedComponent { return; } - const rpaConfig = await this.props.getConfig('rpa', {}); - if (rpaConfig.workerConfig !== lastWorkerConfig) { - this.createEditor(); + if (isWorkerConfigChange(rpaConfig.workerConfig, lastWorkerConfig)) { + editor.workerConfig = rpaConfig.workerConfig; + editor.eventBus.fire('config.changed', rpaConfig.workerConfig); return; } } @@ -362,6 +363,10 @@ function isXMLChange(prevXML, xml) { return trim(prevXML) !== trim(xml); } +function isWorkerConfigChange(prevConfig, config) { + return JSON.stringify(prevConfig) !== JSON.stringify(config); +} + function trim(string) { if (isString(string)) { return string.trim(); diff --git a/package-lock.json b/package-lock.json index 9ff4c73cc..01c03a4f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -104,7 +104,7 @@ "@camunda/form-playground": "^0.20.0", "@camunda/improved-canvas": "^1.7.6", "@camunda/linting": "^3.31.0", - "@camunda/rpa-integration": "0.0.1-alpha.4", + "@camunda/rpa-integration": "0.0.1-alpha.12", "@carbon/icons-react": "^11.53.0", "@codemirror/commands": "^6.6.2", "@codemirror/lang-json": "^6.0.1", @@ -3194,10 +3194,10 @@ } }, "node_modules/@camunda/rpa-integration": { - "version": "0.0.1-alpha.4", - "resolved": "https://registry.npmjs.org/@camunda/rpa-integration/-/rpa-integration-0.0.1-alpha.4.tgz", - "integrity": "sha512-yVKhWPlWBWGz6GcqoBA6ocdrfnHJZ/RPrsrozCC3/46G9yr2aIv/+354FLEc6Z9AJOcpdDnDgNXQ5VfvxtxK8g==", - "license": "MIT", + "version": "0.0.1-alpha.12", + "resolved": "https://registry.npmjs.org/@camunda/rpa-integration/-/rpa-integration-0.0.1-alpha.12.tgz", + "integrity": "sha512-5lpZYQMvJ9j3FjPbrS0VSR6c6tPBmzOZIBkA3yXZ/9frhwnm5BvpGtAkb7AE9SBJH7ikZfs9dNTOokcqdrz4Kw==", + "license": "Camunda License 1.0", "dependencies": { "@bpmn-io/properties-panel": "^3.25.0", "@carbon/icons-react": "^11.52.0", @@ -35099,9 +35099,9 @@ } }, "@camunda/rpa-integration": { - "version": "0.0.1-alpha.4", - "resolved": "https://registry.npmjs.org/@camunda/rpa-integration/-/rpa-integration-0.0.1-alpha.4.tgz", - "integrity": "sha512-yVKhWPlWBWGz6GcqoBA6ocdrfnHJZ/RPrsrozCC3/46G9yr2aIv/+354FLEc6Z9AJOcpdDnDgNXQ5VfvxtxK8g==", + "version": "0.0.1-alpha.12", + "resolved": "https://registry.npmjs.org/@camunda/rpa-integration/-/rpa-integration-0.0.1-alpha.12.tgz", + "integrity": "sha512-5lpZYQMvJ9j3FjPbrS0VSR6c6tPBmzOZIBkA3yXZ/9frhwnm5BvpGtAkb7AE9SBJH7ikZfs9dNTOokcqdrz4Kw==", "requires": { "@bpmn-io/properties-panel": "^3.25.0", "@carbon/icons-react": "^11.52.0", @@ -41933,7 +41933,7 @@ "@camunda/form-playground": "^0.20.0", "@camunda/improved-canvas": "^1.7.6", "@camunda/linting": "^3.31.0", - "@camunda/rpa-integration": "0.0.1-alpha.4", + "@camunda/rpa-integration": "0.0.1-alpha.12", "@carbon/icons-react": "^11.53.0", "@codemirror/commands": "^6.6.2", "@codemirror/lang-json": "^6.0.1",