@uipath/maestro-builder-sdk 6.51.0 → 6.51.2
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/check.js +29 -0
- package/dist/case/serialize.js +6 -2
- package/package.json +2 -2
package/dist/case/check.js
CHANGED
|
@@ -9,6 +9,17 @@ import { checkEventResolution } from '../core/event-checks.js';
|
|
|
9
9
|
import { EXTERNAL_TASK_DESCRIPTOR_CONTRACT, EXTERNAL_TASK_HYBRID_UNSUPPORTED, externalHybridRefusal, isExternalExecutionMode } from './external.js';
|
|
10
10
|
import { isResourceLabelRefusal, resolveResourceRef } from './resource-identity.js';
|
|
11
11
|
const TYPE_NAMES = new Set(Object.values(types));
|
|
12
|
+
/**
|
|
13
|
+
* Every key an `ActionField` takes. `compile` writes only these onto the form
|
|
14
|
+
* row, so any other key would be dropped without a word (builder-sdk#1422): an
|
|
15
|
+
* author who adds the Designer's row keys (`id`, `var`, `source`) sees `check`
|
|
16
|
+
* and `compile` pass and the row come out unchanged. The `satisfies` keeps this
|
|
17
|
+
* list and the interface in step: a key added to one and not the other fails to
|
|
18
|
+
* type-check.
|
|
19
|
+
*/
|
|
20
|
+
const ACTION_FIELD_KEYS = new Set(Object.keys({
|
|
21
|
+
name: true, type: true, subType: true, displayName: true, value: true, required: true, options: true,
|
|
22
|
+
}));
|
|
12
23
|
// audit-case-coverage: rule-slot table start
|
|
13
24
|
// This runtime table must equal the committed matrix's rejected cells. The audit
|
|
14
25
|
// parses these object literals; the product-pin matrix currently rejects none.
|
|
@@ -628,6 +639,24 @@ function checkStage(stage, diags, refStage, refPlacement, bindings) {
|
|
|
628
639
|
message: `Action field "${emptyRequiredField.name}" in task "${t.name}" is required but has no value. Set its value or remove required: true; required does not mean reviewer-must-fill.`,
|
|
629
640
|
where: t.name,
|
|
630
641
|
});
|
|
642
|
+
for (const [side, fields] of [['input', t.action?.inputs], ['output', t.action?.outputs]])
|
|
643
|
+
for (const field of fields ?? []) {
|
|
644
|
+
const unknown = Object.keys(field)
|
|
645
|
+
.filter((key) => !ACTION_FIELD_KEYS.has(key) && field[key] !== undefined);
|
|
646
|
+
if (!unknown.length)
|
|
647
|
+
continue;
|
|
648
|
+
diags.push({
|
|
649
|
+
level: 'error',
|
|
650
|
+
code: 'ACTION_FIELD_UNKNOWN_KEY',
|
|
651
|
+
message: `Action ${side} field "${String(field.name)}" in task "${t.name}" has ${unknown.length === 1 ? 'a key' : 'keys'} ` +
|
|
652
|
+
`${unknown.map((key) => `"${key}"`).join(', ')} that an action field does not take, so compile would drop ${unknown.length === 1 ? 'it' : 'them'}. ` +
|
|
653
|
+
`An action field takes ${[...ACTION_FIELD_KEYS].join(', ')}. ` +
|
|
654
|
+
(side === 'output'
|
|
655
|
+
? `To choose the case variable an output writes, set value: '<variable>'; compile writes the row's id, var, source and target from it.`
|
|
656
|
+
: `An input's value is the literal or =vars.<name> expression the assignee sees.`),
|
|
657
|
+
where: t.name,
|
|
658
|
+
});
|
|
659
|
+
}
|
|
631
660
|
if (t.entry.length === 0)
|
|
632
661
|
diags.push({
|
|
633
662
|
level: 'error',
|
package/dist/case/serialize.js
CHANGED
|
@@ -989,11 +989,15 @@ function taskData(task, resolver, taskId, stageId, ids) {
|
|
|
989
989
|
}
|
|
990
990
|
return data;
|
|
991
991
|
}
|
|
992
|
+
// The io rows carry the task's own `elementId` ("<stageId>-<taskId>"), as
|
|
993
|
+
// every other kind's do. They once got the bare task id, so the converter's
|
|
994
|
+
// `task.elementId === output.elementId` filter matched none of them and the
|
|
995
|
+
// task's `response` / `Error` never reached a later task (#1419).
|
|
992
996
|
case 'connector':
|
|
993
|
-
return connectorTaskData(task.connector, resolver, taskId
|
|
997
|
+
return connectorTaskData(task.connector, resolver, `${stageId}-${taskId}`, `Connector task "${task.name}"`);
|
|
994
998
|
case 'external-agent':
|
|
995
999
|
case 'external-workflow':
|
|
996
|
-
return externalTaskData(task.kind, task.external, resolver, taskId
|
|
1000
|
+
return externalTaskData(task.kind, task.external, resolver, `${stageId}-${taskId}`, `${task.kind === 'external-agent' ? 'External Agent' : 'External Workflow'} task "${task.name}"`);
|
|
997
1001
|
case 'wait-for-timer': {
|
|
998
1002
|
if (task.timer?.duration)
|
|
999
1003
|
return { timerType: 'timeDuration', timeDuration: task.timer.duration };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.51.
|
|
3
|
+
"version": "6.51.2",
|
|
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",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"@types/node": "^22.7.0",
|
|
93
93
|
"esbuild": "^0.28.1"
|
|
94
94
|
},
|
|
95
|
-
"gitref": "
|
|
95
|
+
"gitref": "19785af943dff491f68e984f2440a196f95bc2c6"
|
|
96
96
|
}
|