@uipath/maestro-builder-sdk 6.120.12 → 6.120.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.
- package/dist/case/connector-saved-rows.js +20 -3
- package/dist/case/decompile.d.ts +6 -0
- package/dist/case/decompile.js +28 -0
- package/dist/case/preserve.d.ts +12 -0
- package/dist/case/preserve.js +7 -0
- package/dist/case/rule-names.d.ts +14 -6
- package/dist/case/rule-names.js +88 -17
- package/dist/case/serialize.js +64 -1
- package/package.json +2 -2
|
@@ -331,18 +331,35 @@ function counterpartOf(builtOwn, row) {
|
|
|
331
331
|
* 'responseRow', var: 'responseRow', originalVar: 'response', source:
|
|
332
332
|
* '=response' }`). The extract that writes the saved row's variable is its
|
|
333
333
|
* counterpart, and having no id it says nothing about renumbering, so the
|
|
334
|
-
* ids are compared only when the counterpart has one.
|
|
334
|
+
* ids are compared only when the counterpart has one ({@link writesSameVariable}).
|
|
335
335
|
*/
|
|
336
336
|
function outputsDiverge(builtOwn, set, caseVariables) {
|
|
337
337
|
return set.rows.some((row) => {
|
|
338
338
|
const counterpart = counterpartOf(builtOwn, row);
|
|
339
|
-
if (!counterpart)
|
|
339
|
+
if (!counterpart || writesSameVariable(counterpart, row))
|
|
340
340
|
return false;
|
|
341
341
|
if (counterpart.id !== undefined && counterpart.id !== row.id)
|
|
342
342
|
return true;
|
|
343
|
-
return
|
|
343
|
+
return !reassignedToCaseVariable(row, counterpart, caseVariables);
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Whether the built `counterpart` of saved own row `saved` writes the variable
|
|
348
|
+
* the saved row wrote.
|
|
349
|
+
*
|
|
350
|
+
* Compile writes an element's own row with `id == var`, so the id names the
|
|
351
|
+
* variable. An event trigger's declared output (`eventTrigger({ outputs: {
|
|
352
|
+
* caseRecord: { source: "=response" } } })`) is written with no id: its `var`
|
|
353
|
+
* names the variable. Decompile declares a trigger's own row that way when
|
|
354
|
+
* Studio Web saved it without `elementId`, and the saved row may still have
|
|
355
|
+
* its slot id (`{ id: "caseRecord", var: "caseRecord" }`), which an id-less
|
|
356
|
+
* row cannot match.
|
|
357
|
+
*/
|
|
358
|
+
function writesSameVariable(counterpart, saved) {
|
|
359
|
+
if (counterpart.id === undefined)
|
|
360
|
+
return saved.var === undefined ? saved.id === undefined : counterpart.var === saved.var;
|
|
361
|
+
return counterpart.id === saved.id && (saved.var === undefined || counterpart.var === saved.var);
|
|
362
|
+
}
|
|
346
363
|
/**
|
|
347
364
|
* The saved outputs over the built ones: the saved own rows in saved order,
|
|
348
365
|
* where compile put its first own row, around the rows compile writes for the
|
package/dist/case/decompile.d.ts
CHANGED
|
@@ -260,6 +260,12 @@ type Preservation = {
|
|
|
260
260
|
trigger: string;
|
|
261
261
|
companion?: string;
|
|
262
262
|
}>;
|
|
263
|
+
bridgeFields?: Array<{
|
|
264
|
+
slot: string;
|
|
265
|
+
trigger: string;
|
|
266
|
+
fields: Record<string, unknown>;
|
|
267
|
+
keys: string[];
|
|
268
|
+
}>;
|
|
263
269
|
omitMetadata?: Array<'caseAppEnabled' | 'caseIdentifierType' | 'publishVersion' | 'intsvcActivityConfig'>;
|
|
264
270
|
publishVersion?: number;
|
|
265
271
|
nodeFields?: Record<string, Record<string, unknown>>;
|
package/dist/case/decompile.js
CHANGED
|
@@ -2036,6 +2036,31 @@ function triggerlessInArgs(plan) {
|
|
|
2036
2036
|
return [{ name: input.name, elementId: input.elementId, trigger, ...(companion !== undefined ? { companion } : {}) }];
|
|
2037
2037
|
});
|
|
2038
2038
|
}
|
|
2039
|
+
/** The fields compile writes on a bridge row (`appendTriggerBridge` in serialize.ts). */
|
|
2040
|
+
const BRIDGE_ROW_FIELDS = new Set(['name', 'type', 'source', 'var']);
|
|
2041
|
+
/**
|
|
2042
|
+
* Each In-arg bridge row that carries a field compile does not write (Studio
|
|
2043
|
+
* Web saves an array In-arg's bridge with the In-arg's `subType`), keyed by the
|
|
2044
|
+
* In-arg's slot id and its trigger, with the row's key order.
|
|
2045
|
+
*
|
|
2046
|
+
* Example: `{ name: "Items", type: "array", subType: "string", source: "=vars.vX", var: "items" }`
|
|
2047
|
+
* records `{ slot: "vX", trigger: "trigger_1", fields: { subType: "string" }, keys: [...] }`.
|
|
2048
|
+
*/
|
|
2049
|
+
function bridgeFields(plan) {
|
|
2050
|
+
const triggers = new Map((plan.nodes ?? []).filter(isTrigger).map((node) => [node.id, node]));
|
|
2051
|
+
return (plan.variables?.inputs ?? []).flatMap((input) => {
|
|
2052
|
+
const node = typeof input.elementId === 'string' ? triggers.get(input.elementId) : undefined;
|
|
2053
|
+
if (!node || typeof node.id !== 'string' || typeof input.id !== 'string')
|
|
2054
|
+
return [];
|
|
2055
|
+
const row = (triggerData(node).bag?.outputs ?? []).find((candidate) => candidate?.source === `=vars.${input.id}`);
|
|
2056
|
+
if (!row)
|
|
2057
|
+
return [];
|
|
2058
|
+
const fields = Object.fromEntries(Object.entries(row).filter(([key]) => !BRIDGE_ROW_FIELDS.has(key)));
|
|
2059
|
+
if (!Object.keys(fields).length)
|
|
2060
|
+
return [];
|
|
2061
|
+
return [{ slot: input.id, trigger: node.id, fields, keys: Object.keys(row) }];
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2039
2064
|
function emitVariables(out, depth, plan, triggerNameById, triggerIsTimer) {
|
|
2040
2065
|
const variables = plan.variables ?? {};
|
|
2041
2066
|
const produced = producedVariableNames(plan);
|
|
@@ -3293,6 +3318,9 @@ export function collectPreservation(plan) {
|
|
|
3293
3318
|
const triggerless = triggerlessInArgs(plan);
|
|
3294
3319
|
if (triggerless.length)
|
|
3295
3320
|
preservation.triggerlessInArgs = triggerless;
|
|
3321
|
+
const bridged = bridgeFields(plan);
|
|
3322
|
+
if (bridged.length)
|
|
3323
|
+
preservation.bridgeFields = bridged;
|
|
3296
3324
|
if (Object.keys(variableFields).length)
|
|
3297
3325
|
preservation.variableFields = variableFields;
|
|
3298
3326
|
if (Object.keys(legacyVariableDefaults).length)
|
package/dist/case/preserve.d.ts
CHANGED
|
@@ -432,6 +432,18 @@ export interface CaseJsonPreservation {
|
|
|
432
432
|
trigger: string;
|
|
433
433
|
companion?: string;
|
|
434
434
|
}>;
|
|
435
|
+
/**
|
|
436
|
+
* In-arg bridge rows that carried fields compile does not write (an array
|
|
437
|
+
* In-arg's `subType`), keyed by the In-arg's slot id and trigger, with the
|
|
438
|
+
* row's key order. Compile puts the fields back on that In-arg's bridge row
|
|
439
|
+
* only while the In-arg is still bound to that trigger.
|
|
440
|
+
*/
|
|
441
|
+
bridgeFields?: Array<{
|
|
442
|
+
slot: string;
|
|
443
|
+
trigger: string;
|
|
444
|
+
fields: Record<string, unknown>;
|
|
445
|
+
keys: string[];
|
|
446
|
+
}>;
|
|
435
447
|
/**
|
|
436
448
|
* Opaque V30 layout side-car. Decompile folds a node's inline
|
|
437
449
|
* {@link CASE_NODE_LAYOUT_FIELDS} into it, the platform's disk form.
|
package/dist/case/preserve.js
CHANGED
|
@@ -362,6 +362,13 @@ export function caseJsonPreservationErrors(payload) {
|
|
|
362
362
|
&& (entry.companion === undefined || (typeof entry.companion === 'string' && entry.companion !== ''))
|
|
363
363
|
&& Object.keys(entry).every((key) => ['name', 'elementId', 'trigger', 'companion'].includes(key)))))
|
|
364
364
|
errors.push('preserved "triggerlessInArgs" must be an array of { name, elementId, trigger, companion? } with non-empty strings, elementId not the trigger');
|
|
365
|
+
if (payload.bridgeFields !== undefined
|
|
366
|
+
&& (!Array.isArray(payload.bridgeFields) || !payload.bridgeFields.every((entry) => entry !== null && typeof entry === 'object'
|
|
367
|
+
&& typeof entry.slot === 'string' && entry.slot !== '' && typeof entry.trigger === 'string' && entry.trigger !== ''
|
|
368
|
+
&& entry.fields !== null && typeof entry.fields === 'object' && !Array.isArray(entry.fields)
|
|
369
|
+
&& !['name', 'type', 'source', 'var'].some((key) => Object.prototype.hasOwnProperty.call(entry.fields, key))
|
|
370
|
+
&& Array.isArray(entry.keys) && entry.keys.every((key) => typeof key === 'string'))))
|
|
371
|
+
errors.push('preserved "bridgeFields" must be an array of { slot, trigger, fields, keys } carrying no compiled bridge field');
|
|
365
372
|
if (payload.legacyTriggerIds !== undefined
|
|
366
373
|
&& (!Array.isArray(payload.legacyTriggerIds) || !payload.legacyTriggerIds.every((id) => typeof id === 'string')))
|
|
367
374
|
errors.push('preserved "legacyTriggerIds" must be an array of trigger id strings');
|
|
@@ -24,13 +24,21 @@
|
|
|
24
24
|
* exit conditions, then its tasks' entry conditions set by set), then
|
|
25
25
|
* `metadata.caseExitRules`, then a preserved Case Manager configuration's tasks.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
27
|
+
* The platform's numbered templates are localized (68 of them, in nine
|
|
28
|
+
* languages), and all are mirrored here: a decompiled pre-V32 document saved
|
|
29
|
+
* by a localized Designer repeats them (`開始ルール 1` on every task of a
|
|
30
|
+
* Japanese plan), and the platform renumbers each repeat (`開始ルール 2`). With
|
|
31
|
+
* the English list only, compile suffixed them instead (`開始ルール 1 2`), so an
|
|
32
|
+
* unedited round trip renamed every such condition.
|
|
33
|
+
* `tests/case-v32-native.test.ts` checks the list against the pin's.
|
|
33
34
|
*/
|
|
35
|
+
/**
|
|
36
|
+
* The Designer's numbered condition names, every language
|
|
37
|
+
* (`NUMBERED_RULE_NAME_TEMPLATES` in `CaseManagementRuleNameTemplates.ts`,
|
|
38
|
+
* `@uipath/case-schema` 0.1173.0), verbatim: `{{number}}` is the counter, and
|
|
39
|
+
* the French ones put a no-break space (U+00A0) before it.
|
|
40
|
+
*/
|
|
41
|
+
export declare const NUMBERED_RULE_NAME_TEMPLATES: readonly string[];
|
|
34
42
|
/**
|
|
35
43
|
* Rename repeated condition names in place, first occurrence wins, so the
|
|
36
44
|
* document carries the names the platform's V31 -> V32 and V32 -> V32.0.1
|
package/dist/case/rule-names.js
CHANGED
|
@@ -24,24 +24,95 @@
|
|
|
24
24
|
* exit conditions, then its tasks' entry conditions set by set), then
|
|
25
25
|
* `metadata.caseExitRules`, then a preserved Case Manager configuration's tasks.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
27
|
+
* The platform's numbered templates are localized (68 of them, in nine
|
|
28
|
+
* languages), and all are mirrored here: a decompiled pre-V32 document saved
|
|
29
|
+
* by a localized Designer repeats them (`開始ルール 1` on every task of a
|
|
30
|
+
* Japanese plan), and the platform renumbers each repeat (`開始ルール 2`). With
|
|
31
|
+
* the English list only, compile suffixed them instead (`開始ルール 1 2`), so an
|
|
32
|
+
* unedited round trip renamed every such condition.
|
|
33
|
+
* `tests/case-v32-native.test.ts` checks the list against the pin's.
|
|
33
34
|
*/
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
'
|
|
35
|
+
/**
|
|
36
|
+
* The Designer's numbered condition names, every language
|
|
37
|
+
* (`NUMBERED_RULE_NAME_TEMPLATES` in `CaseManagementRuleNameTemplates.ts`,
|
|
38
|
+
* `@uipath/case-schema` 0.1173.0), verbatim: `{{number}}` is the counter, and
|
|
39
|
+
* the French ones put a no-break space (U+00A0) before it.
|
|
40
|
+
*/
|
|
41
|
+
export const NUMBERED_RULE_NAME_TEMPLATES = [
|
|
42
|
+
'Abschlussregel {{number}}',
|
|
43
|
+
'Austrittsregel {{number}}',
|
|
44
|
+
'Bedingung {{number}}',
|
|
45
|
+
'Case completion rule {{number}}',
|
|
46
|
+
'Case exit {{number}}',
|
|
47
|
+
'Completion rule {{number}}',
|
|
48
|
+
'Condición {{number}}',
|
|
49
|
+
'Condition {{number}}',
|
|
50
|
+
'Condição {{number}}',
|
|
51
|
+
'Condiție {{number}}',
|
|
52
|
+
'Eintrittsregel {{number}}',
|
|
53
|
+
'Entry rule {{number}}',
|
|
54
|
+
'Exit rule {{number}}',
|
|
55
|
+
'Fallabschlussregel {{number}}',
|
|
56
|
+
'Fallaustritt {{number}}',
|
|
57
|
+
'Giriş kuralı {{number}}',
|
|
58
|
+
'Ieșire din caz {{number}}',
|
|
59
|
+
'Koşul {{number}}',
|
|
60
|
+
'Regla de entrada {{number}}',
|
|
61
|
+
'Regla de finalización de caso {{number}}',
|
|
62
|
+
'Regla de finalización del caso {{number}}',
|
|
63
|
+
'Regla de finalización {{number}}',
|
|
64
|
+
'Regla de salida {{number}}',
|
|
65
|
+
'Regra de conclusão de caso {{number}}',
|
|
66
|
+
'Regra de conclusão do caso {{number}}',
|
|
67
|
+
'Regra de conclusão {{number}}',
|
|
68
|
+
'Regra de entrada {{number}}',
|
|
69
|
+
'Regra de saída {{number}}',
|
|
70
|
+
'Regulă de finalizare a cazului {{number}}',
|
|
71
|
+
'Regulă de finalizare {{number}}',
|
|
72
|
+
'Regulă de ieșire {{number}}',
|
|
73
|
+
'Regulă de intrare {{number}}',
|
|
74
|
+
'Règle de fin du cas\u00A0{{number}}',
|
|
75
|
+
'Règle de fin\u00A0{{number}}',
|
|
76
|
+
'Règle d’entrée\u00A0{{number}}',
|
|
77
|
+
'Règles de sortie\u00A0{{number}}',
|
|
78
|
+
'Salida de caso {{number}}',
|
|
79
|
+
'Salida del caso {{number}}',
|
|
80
|
+
'Saída de caso {{number}}',
|
|
81
|
+
'Saída do caso: {{number}}',
|
|
82
|
+
'Sortie de cas\u00A0{{number}}',
|
|
83
|
+
'Tamamlama kuralı {{number}}',
|
|
84
|
+
'Çıkış kuralı {{number}}',
|
|
85
|
+
'İşlem birimi tamamlama kuralı {{number}}',
|
|
86
|
+
'İşlem birimi çıkışı {{number}}',
|
|
87
|
+
'ケースの終了 {{number}}',
|
|
88
|
+
'ケース完了ルール {{number}}',
|
|
89
|
+
'完了ルール {{number}}',
|
|
90
|
+
'完成規則 {{number}}',
|
|
91
|
+
'完成规则 {{number}}',
|
|
92
|
+
'条件 {{number}}',
|
|
93
|
+
'案件完成規則 {{number}}',
|
|
94
|
+
'案件結束 {{number}}',
|
|
95
|
+
'案例完成规则 {{number}}',
|
|
96
|
+
'案例退出 {{number}}',
|
|
97
|
+
'條件 {{number}}',
|
|
98
|
+
'終了ルール {{number}}',
|
|
99
|
+
'輸入規則 {{number}}',
|
|
100
|
+
'进入规则 {{number}}',
|
|
101
|
+
'退出規則 {{number}}',
|
|
102
|
+
'退出规则 {{number}}',
|
|
103
|
+
'開始ルール {{number}}',
|
|
104
|
+
'사례 완료 규칙 {{number}}',
|
|
105
|
+
'사례 종료 {{number}}',
|
|
106
|
+
'완료 규칙 {{number}}',
|
|
107
|
+
'조건 {{number}}',
|
|
108
|
+
'종료 규칙 {{number}}',
|
|
109
|
+
'진입 규칙 {{number}}',
|
|
42
110
|
];
|
|
43
111
|
const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
44
|
-
const numbered = (flags) =>
|
|
112
|
+
const numbered = (flags) => NUMBERED_RULE_NAME_TEMPLATES.map((template) => ({
|
|
113
|
+
template,
|
|
114
|
+
pattern: new RegExp(`^${escapeRegex(template).replace('\\{\\{number\\}\\}', '\\d+')}$`, flags),
|
|
115
|
+
}));
|
|
45
116
|
const NUMBERED_EXACT = numbered('');
|
|
46
117
|
const NUMBERED_LOOSE = numbered('i');
|
|
47
118
|
const TRAILING_NUMBER = /^(.*\D)(\d+)$/;
|
|
@@ -123,8 +194,8 @@ export function dedupeConditionNames(plan) {
|
|
|
123
194
|
};
|
|
124
195
|
// V31 -> V32: only a repeated generated name, renumbered from 1.
|
|
125
196
|
pass((name, taken) => {
|
|
126
|
-
const
|
|
127
|
-
return
|
|
197
|
+
const match = NUMBERED_EXACT.find(({ pattern }) => pattern.test(name));
|
|
198
|
+
return match ? nextNumberedName(taken, (n) => match.template.replace('{{number}}', String(n))) : undefined;
|
|
128
199
|
});
|
|
129
200
|
// V32 -> V32.0.1: every remaining repeat.
|
|
130
201
|
pass((name, taken) => {
|
package/dist/case/serialize.js
CHANGED
|
@@ -556,8 +556,10 @@ export function applyPreservation(result, preservation, options = {}) {
|
|
|
556
556
|
// After the ids are restored: an unchanged connector element takes its saved own io rows.
|
|
557
557
|
applyConnectorRows(result, preservation.connectorRows);
|
|
558
558
|
applySubscriptionBindings(result, preservation.subscriptionBindings);
|
|
559
|
-
//
|
|
559
|
+
// Once every row has its saved name and the connector rows are back.
|
|
560
560
|
restoreOutputInterleaving(result, preservation.identities);
|
|
561
|
+
// Last: an unchanged task's output rows take their full saved order.
|
|
562
|
+
restoreOutputRowOrder(result, preservation.identities);
|
|
561
563
|
Object.assign(result, preservation.topLevel ?? {});
|
|
562
564
|
Object.assign(result.metadata, preservation.metadata ?? {});
|
|
563
565
|
const metadata = result.metadata;
|
|
@@ -702,6 +704,24 @@ export function applyPreservation(result, preservation, options = {}) {
|
|
|
702
704
|
delete node.data[CASE_FORMAT_PROFILE.triggerBagField];
|
|
703
705
|
}
|
|
704
706
|
restoreTriggerlessInArgs(result, preservation.triggerlessInArgs);
|
|
707
|
+
// A bridge row's Designer-saved fields (an array In-arg's `subType`), in the
|
|
708
|
+
// row's saved key order, while the In-arg is still bound to that trigger.
|
|
709
|
+
for (const { slot, trigger, fields, keys } of preservation.bridgeFields ?? []) {
|
|
710
|
+
const input = (variables.inputs ?? []).find((candidate) => candidate.id === slot);
|
|
711
|
+
if (!input || input.elementId !== trigger)
|
|
712
|
+
continue;
|
|
713
|
+
const node = result.nodes.find((candidate) => candidate.id === trigger);
|
|
714
|
+
const rows = node?.data?.[CASE_FORMAT_PROFILE.triggerBagField]?.outputs;
|
|
715
|
+
const at = Array.isArray(rows) ? rows.findIndex((row) => row?.source === `=vars.${slot}`) : -1;
|
|
716
|
+
if (at < 0)
|
|
717
|
+
continue;
|
|
718
|
+
const merged = { ...rows[at], ...fields };
|
|
719
|
+
const ordered = {};
|
|
720
|
+
for (const key of [...keys, ...Object.keys(merged)])
|
|
721
|
+
if (key in merged && !(key in ordered))
|
|
722
|
+
ordered[key] = merged[key];
|
|
723
|
+
rows[at] = ordered;
|
|
724
|
+
}
|
|
705
725
|
for (const name of preservation.omitInputDefaults ?? []) {
|
|
706
726
|
const row = (variables.inputs ?? []).find((candidate) => candidate.name === name);
|
|
707
727
|
if (row?.default === '')
|
|
@@ -1300,6 +1320,49 @@ function restoreNoTasks(data, spelling) {
|
|
|
1300
1320
|
}
|
|
1301
1321
|
/** The fields compile writes on a resource task's input that the row can be saved without (decompile's `resourceRowShape`). */
|
|
1302
1322
|
const RESOURCE_INPUT_OMITTABLE = new Set(['id', 'var', 'elementId']);
|
|
1323
|
+
/**
|
|
1324
|
+
* Each task's output rows back in the order they were saved in, while the task
|
|
1325
|
+
* still has exactly the rows it was saved with.
|
|
1326
|
+
*
|
|
1327
|
+
* Compile writes a connector task's rows as `uip maestro case sdd convert`
|
|
1328
|
+
* does: `response`, `Error`, then the author's extracts. The Case Designer
|
|
1329
|
+
* writes the extracts before `Error`:
|
|
1330
|
+
*
|
|
1331
|
+
* saved: response4, createdById, id, updatedById, error12
|
|
1332
|
+
* compiled: response4, error12, createdById, id, updatedById
|
|
1333
|
+
*
|
|
1334
|
+
* Row order is part of the plan the Designer reads, so an unedited round trip
|
|
1335
|
+
* keeps it. The saved order is the identity's `outputs`, read once every id is
|
|
1336
|
+
* final. A task whose rows the edit changed (a row added or removed, or one
|
|
1337
|
+
* with no id to match on) keeps compile's order.
|
|
1338
|
+
*/
|
|
1339
|
+
function restoreOutputRowOrder(result, identities) {
|
|
1340
|
+
const savedOrder = new Map();
|
|
1341
|
+
for (const stage of identities?.stages ?? [])
|
|
1342
|
+
for (const lane of stage.tasks ?? [])
|
|
1343
|
+
for (const task of lane)
|
|
1344
|
+
if (typeof task.id === 'string' && task.outputs?.length && task.outputs.every((row) => typeof row.id === 'string'))
|
|
1345
|
+
savedOrder.set(task.id, task.outputs.map((row) => row.id));
|
|
1346
|
+
if (!savedOrder.size)
|
|
1347
|
+
return;
|
|
1348
|
+
for (const node of result.nodes ?? []) {
|
|
1349
|
+
if (!String(node?.type ?? '').endsWith('Stage'))
|
|
1350
|
+
continue;
|
|
1351
|
+
for (const task of (node.data?.tasks ?? []).flat()) {
|
|
1352
|
+
const order = savedOrder.get(task?.id);
|
|
1353
|
+
const rows = task?.data?.outputs;
|
|
1354
|
+
if (!order || !Array.isArray(rows) || rows.length !== order.length)
|
|
1355
|
+
continue;
|
|
1356
|
+
const at = new Map(order.map((id, index) => [id, index]));
|
|
1357
|
+
if (at.size !== order.length)
|
|
1358
|
+
continue;
|
|
1359
|
+
const ids = rows.map((row) => row?.id);
|
|
1360
|
+
if (!ids.every((id) => typeof id === 'string' && at.has(id)) || new Set(ids).size !== ids.length)
|
|
1361
|
+
continue;
|
|
1362
|
+
rows.sort((left, right) => at.get(left.id) - at.get(right.id));
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1303
1366
|
/**
|
|
1304
1367
|
* A task entry condition's saved `isInterrupting`, and the absence of a name
|
|
1305
1368
|
* it was saved with (`ConditionIdentity`), by position. The name goes only
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.120.
|
|
3
|
+
"version": "6.120.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",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"@types/node": "^22.7.0",
|
|
125
125
|
"esbuild": "^0.28.1"
|
|
126
126
|
},
|
|
127
|
-
"gitref": "
|
|
127
|
+
"gitref": "b126ca0f2e2b557042de4037b6241d75c08e5265"
|
|
128
128
|
}
|