@uipath/maestro-builder-sdk 6.70.3 → 6.70.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/decompile.js CHANGED
@@ -35,6 +35,7 @@ import { DEFAULT_TRIGGER_ID, Expr } from './core/expr.js';
35
35
  import { FLOW_NODE_TYPES } from './flow-node-registry.js';
36
36
  import { SUBFLOW_START_LABEL } from './core/subflow-start.js';
37
37
  import { commentText } from './core/comment-text.js';
38
+ import { escapeRegExp } from './core/escape-regexp.js';
38
39
  import { tsKey as key, tsLiteral, tsNumber, tsObject as objLit, tsOptions as opts, tsText } from './core/ts-literal.js';
39
40
  import { wireExprBody } from './core/wire-expr.js';
40
41
  import { hasExits } from './core/step-ports.js';
@@ -2864,7 +2865,7 @@ function emitChildFlow(name, childFile, ctx) {
2864
2865
  */
2865
2866
  function readChildStartAsStart(child, startId) {
2866
2867
  const renamed = renameVarRoot(child, startId, DEFAULT_TRIGGER_ID);
2867
- const path = new RegExp(`^(=?vars\\.)${startId.replace(/[$]/g, '\\$&')}(?![A-Za-z0-9_$])`);
2868
+ const path = new RegExp(`^(=?vars\\.)${escapeRegExp(startId)}(?![A-Za-z0-9_$])`);
2868
2869
  const walk = (x, key, parentKey) => {
2869
2870
  if (typeof x === 'string')
2870
2871
  return key === 'binding' || parentKey === 'appInputBindings' ? x.replace(path, `$1${DEFAULT_TRIGGER_ID}`) : x;
@@ -2954,8 +2955,9 @@ const RAW_JS_FIELDS = new Set(['script', 'expression', 'condition', 'completionC
2954
2955
  * script stays as written, the way `serialize` left it (#1092 review).
2955
2956
  */
2956
2957
  function renameVarRoot(v, from, to) {
2957
- const re = new RegExp(`\\$vars\\.${from.replace(/[$]/g, '\\$&')}(?![A-Za-z0-9_$])`, 'g');
2958
- const inCode = (js) => mapJsCode(js, (code) => code.replace(re, `$vars.${to}`));
2958
+ const re = new RegExp(`\\$vars\\.${escapeRegExp(from)}(?![A-Za-z0-9_$])`, 'g');
2959
+ // a function: `$&` in `to` is data
2960
+ const inCode = (js) => mapJsCode(js, (code) => code.replace(re, () => `$vars.${to}`));
2959
2961
  const walk = (x, key) => {
2960
2962
  if (typeof x === 'string') {
2961
2963
  if (x.startsWith('=js:'))
@@ -233,7 +233,8 @@ const JSON_TEXT_NEGATIONS = new Set(['not', 'never', 'no', 'dont', 'without', 'r
233
233
  const isJsonTextNegation = (w) => JSON_TEXT_NEGATIONS.has(w) || w.endsWith("n't") || w.endsWith('n’t');
234
234
  const JSON_TEXT_WORD = "[A-Za-z][\\w'’-]*";
235
235
  /** Words are separated by spaces, tabs or a comma — never a newline or a full stop. */
236
- const JSON_TEXT_SEP = '[ \\t]*,?[ \\t]+';
236
+ // A comma binds to the spaces before it, so a space run matches one way.
237
+ const JSON_TEXT_SEP = '(?:[ \\t]*,)?[ \\t]+';
237
238
  const JSON_TEXT_QUAL = `(?:${[...JSON_TEXT_QUALIFIERS].sort((a, b) => b.length - a.length).join('|')})\\b`;
238
239
  // `(?<![-\w])` skips `--output json`; `(?!\.\w)` skips `JSON.parse` / `JSON.stringify`;
239
240
  // `(?!-(?:ld|rpc)\b)` skips JSON-LD / JSON-RPC (`\b` matches before the hyphen);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.70.3",
3
+ "version": "6.70.5",
4
4
  "description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.uipath.com/maestro",
@@ -100,5 +100,5 @@
100
100
  "@types/node": "^22.7.0",
101
101
  "esbuild": "^0.28.1"
102
102
  },
103
- "gitref": "6b61cee8ad9385d18ac7eb4276abeed39246874e"
103
+ "gitref": "fa9dc7bf7b81b8dfd7fe6090beb21100879d79f6"
104
104
  }