@uipath/maestro-builder-sdk 6.86.13 → 6.86.14

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.
@@ -22,6 +22,16 @@ export declare function liftResourceName(value: unknown, rows: BindingRows): unk
22
22
  * `solution_folder.<name>` key; the builder spells that folder
23
23
  * `solution_folder` (resource-identity.ts).
24
24
  * - A row with a `default` names that folder.
25
+ * - A row whose `default` is itself a `=bindings.<id>` reference (Studio Web
26
+ * chains the task's folderPath row to a second folderPath row) names what
27
+ * that row names, read by these same rules:
28
+ *
29
+ * { id: 'f2', resourceKey: '=bindings.f1.Billing', default: '=bindings.f1' }
30
+ * { id: 'f1', resourceKey: 'Billing' } -> no folder ('')
31
+ *
32
+ * The reference is never the folder itself: written into the source as
33
+ * `folder: '=bindings.f1'`, compile reads it as a bindings.json label, which
34
+ * the project has none of.
25
35
  * - A row with no `default` (V27 Studio Web) writes its folder only in its key,
26
36
  * `<folder>.<name>`: a key equal to the name has no folder. Any other key
27
37
  * names no folder this can read, and the lift fails.
@@ -29,8 +39,9 @@ export declare function liftResourceName(value: unknown, rows: BindingRows): unk
29
39
  * @param value - The task's `data.folderPath`.
30
40
  * @param name - The literal the task's `data.name` lifted to.
31
41
  * @param rows - The plan's root binding rows.
42
+ * @param seen - The rows already read along a chain (a cycle fails the lift).
32
43
  */
33
- export declare function liftResourceFolder(value: unknown, name: unknown, rows: BindingRows): unknown;
44
+ export declare function liftResourceFolder(value: unknown, name: unknown, rows: BindingRows, seen?: ReadonlySet<string>): unknown;
34
45
  /**
35
46
  * The root rows a task's saved `data.name` / `data.folderPath` read, with any
36
47
  * row they chain to (a folderPath row whose `default` or `resourceKey` is
@@ -51,6 +51,16 @@ export function liftResourceName(value, rows) {
51
51
  * `solution_folder.<name>` key; the builder spells that folder
52
52
  * `solution_folder` (resource-identity.ts).
53
53
  * - A row with a `default` names that folder.
54
+ * - A row whose `default` is itself a `=bindings.<id>` reference (Studio Web
55
+ * chains the task's folderPath row to a second folderPath row) names what
56
+ * that row names, read by these same rules:
57
+ *
58
+ * { id: 'f2', resourceKey: '=bindings.f1.Billing', default: '=bindings.f1' }
59
+ * { id: 'f1', resourceKey: 'Billing' } -> no folder ('')
60
+ *
61
+ * The reference is never the folder itself: written into the source as
62
+ * `folder: '=bindings.f1'`, compile reads it as a bindings.json label, which
63
+ * the project has none of.
54
64
  * - A row with no `default` (V27 Studio Web) writes its folder only in its key,
55
65
  * `<folder>.<name>`: a key equal to the name has no folder. Any other key
56
66
  * names no folder this can read, and the lift fails.
@@ -58,17 +68,22 @@ export function liftResourceName(value, rows) {
58
68
  * @param value - The task's `data.folderPath`.
59
69
  * @param name - The literal the task's `data.name` lifted to.
60
70
  * @param rows - The plan's root binding rows.
71
+ * @param seen - The rows already read along a chain (a cycle fails the lift).
61
72
  */
62
- export function liftResourceFolder(value, name, rows) {
73
+ export function liftResourceFolder(value, name, rows, seen = new Set()) {
63
74
  const id = bindingRefId(value);
64
75
  if (id === undefined)
65
76
  return value;
66
- const row = rows.get(id);
77
+ const row = seen.has(id) ? undefined : rows.get(id);
67
78
  const key = row?.resourceKey;
68
79
  if (typeof key === 'string' && isInSolutionKey(key))
69
80
  return SOLUTION_FOLDER;
70
- if (typeof row?.default === 'string')
71
- return row.default;
81
+ if (typeof row?.default === 'string') {
82
+ if (bindingRefId(row.default) === undefined)
83
+ return row.default;
84
+ const next = liftResourceFolder(row.default, name, rows, new Set([...seen, id]));
85
+ return isLiftFailure(next) ? { field: 'folderPath', value: value, id, row } : next;
86
+ }
72
87
  if (row && typeof key === 'string' && typeof name === 'string' && name) {
73
88
  if (key === name)
74
89
  return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.86.13",
3
+ "version": "6.86.14",
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",
@@ -103,5 +103,5 @@
103
103
  "@types/node": "^22.7.0",
104
104
  "esbuild": "^0.28.1"
105
105
  },
106
- "gitref": "a9f27ba26a5984b9391ae2025df3e6c4b5a93c3c"
106
+ "gitref": "29d3614d87d4be34691ea2af7e41ff3a9f8c882f"
107
107
  }