@uipath/maestro-builder-sdk 6.34.0 → 6.35.1
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/api-index.md +77 -73
- package/dist/api-members.md +266 -251
- package/dist/check.js +6 -2
- package/dist/core/actions.d.ts +103 -18
- package/dist/core/form-field-type.d.ts +77 -29
- package/dist/core/form-field-type.js +264 -46
- package/dist/decompile.js +57 -18
- package/dist/flow-node-type.d.ts +6 -0
- package/dist/merge.js +18 -6
- package/dist/nodes/hitl/flow/check.js +8 -4
- package/dist/nodes/hitl/flow/node-type.js +20 -20
- package/dist/serialize.js +7 -4
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* every edge out of an outcome-handle node to.
|
|
14
14
|
*/
|
|
15
15
|
import { Expr, toExpr } from '../../../core/expr.js';
|
|
16
|
-
import { formFieldJsonSchema,
|
|
16
|
+
import { formFieldJsonSchema, formFieldRowLoss, formFieldRowLossMessage, formFieldSettingsSource, formFieldSettingsWire, liftFormFieldSettings, sourceFormFieldType, wireFormFieldType, } from '../../../core/form-field-type.js';
|
|
17
17
|
import { isAnswerField } from '../../../core/hitl-answers.js';
|
|
18
18
|
import { OUTCOME_HANDLE_NODE_TYPES, hitlExitModel, outcomeIdOf, outcomeSlug } from '../../../core/hitl-routing.js';
|
|
19
19
|
import { jsonClone } from '../../../core/json-clone.js';
|
|
@@ -75,23 +75,23 @@ function hitlInputs(inputs, nodeType, ctx) {
|
|
|
75
75
|
// contract flow-v1's serializer reads), and the WRITE target is the field
|
|
76
76
|
// id itself — deliberately decoupled from the binding, so no `variable`.
|
|
77
77
|
base.binding = bindingPath(f.value, ctx);
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
const required = f.required;
|
|
79
|
+
if (typeof required === 'boolean')
|
|
80
|
+
base.required = required;
|
|
80
81
|
}
|
|
81
82
|
else {
|
|
82
83
|
// The answer's landing variable. The platform falls back to the field id
|
|
83
84
|
// when this is absent; naming it keeps the emitted flow explicit and
|
|
84
85
|
// matches what the designer writes.
|
|
85
86
|
base.variable = `vars.${f.id}`;
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
const required = f.required;
|
|
88
|
+
if (typeof required === 'boolean')
|
|
89
|
+
base.required = required;
|
|
88
90
|
}
|
|
89
|
-
//
|
|
90
|
-
// canvas stores them on the
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
base.options = options;
|
|
94
|
-
return base;
|
|
91
|
+
// The field's settings — `controlType`, a picker's `options`,
|
|
92
|
+
// `defaultValue`, `colSpan`, `rules`, … — as the canvas stores them on the
|
|
93
|
+
// row, in the platform's key order (#1235, #1250).
|
|
94
|
+
return { ...base, ...formFieldSettingsWire(f) };
|
|
95
95
|
});
|
|
96
96
|
const outcomes = (inputs?.outcomes ?? []).map((o, i) => {
|
|
97
97
|
const name = typeof o === 'string' ? o : o?.name;
|
|
@@ -331,7 +331,11 @@ function liftHitl(node, typeName, ctx) {
|
|
|
331
331
|
const id = String(f.id ?? '');
|
|
332
332
|
const direction = String(f.direction ?? 'output');
|
|
333
333
|
const value = direction === 'input' || direction === 'inOut' ? bindingExpr(f.binding) : undefined;
|
|
334
|
-
|
|
334
|
+
// Every row key the source cannot carry is reported, never dropped
|
|
335
|
+
// silently: a warning, an error under --strict (#1250).
|
|
336
|
+
const loss = formFieldRowLoss(f, 'human task');
|
|
337
|
+
if (loss.length > 0)
|
|
338
|
+
ctx.lossy(formFieldRowLossMessage(`human task ${JSON.stringify(n.id)}`, id, loss));
|
|
335
339
|
return {
|
|
336
340
|
id,
|
|
337
341
|
// serialize defaults a row's label to its id.
|
|
@@ -341,8 +345,8 @@ function liftHitl(node, typeName, ctx) {
|
|
|
341
345
|
type: sourceFormFieldType(f.type ?? 'string'),
|
|
342
346
|
direction,
|
|
343
347
|
...(value !== undefined ? { value } : {}),
|
|
344
|
-
...(f.required ===
|
|
345
|
-
...(
|
|
348
|
+
...(typeof f.required === 'boolean' && direction !== 'input' ? { required: f.required } : {}),
|
|
349
|
+
...liftFormFieldSettings(f),
|
|
346
350
|
};
|
|
347
351
|
});
|
|
348
352
|
const outcomeRows = (Array.isArray(schema.outcomes) ? schema.outcomes : []);
|
|
@@ -504,12 +508,8 @@ function printHitl({ inputs }, ctx) {
|
|
|
504
508
|
['type', ctx.string(f.type)],
|
|
505
509
|
['direction', ctx.string(f.direction)],
|
|
506
510
|
['value', f.value !== undefined ? ctx.value(f.value) : undefined],
|
|
507
|
-
['required', f.required ?
|
|
508
|
-
|
|
509
|
-
['id', ctx.string(o.id)],
|
|
510
|
-
['value', ctx.string(o.value)],
|
|
511
|
-
['label', ctx.string(o.label)],
|
|
512
|
-
], ctx)).join(', ')}]` : undefined],
|
|
511
|
+
['required', f.required !== undefined ? String(f.required) : undefined],
|
|
512
|
+
...formFieldSettingsSource(f, ctx.value),
|
|
513
513
|
], ctx));
|
|
514
514
|
const outcomes = h.outcomes.map((o) => (typeof o === 'string' ? ctx.string(o) : obj([
|
|
515
515
|
['name', ctx.string(o.name)],
|
package/dist/serialize.js
CHANGED
|
@@ -20,7 +20,7 @@ import { FLOW_NODE_TYPES } from './flow-node-registry.js';
|
|
|
20
20
|
import { stepExits } from './flow-step-exits.js';
|
|
21
21
|
import { resolveVersionCarried } from './core/nodes/versioned.js';
|
|
22
22
|
import { indexCarriedDefinitions } from './core/carried-definitions.js';
|
|
23
|
-
import { formFieldJsonSchema,
|
|
23
|
+
import { formFieldJsonSchema, formFieldSettingsWire, wireFormFieldType } from './core/form-field-type.js';
|
|
24
24
|
import { ConnectorResolveError } from './core/connector-resolve-error.js';
|
|
25
25
|
import { connectionConnectors } from './bindings-v2.js';
|
|
26
26
|
import { BindingRefusal, GUID_RE, bindingLabelRefusal, bindingMissingMessage, missingBindingLabels } from './core/binding-messages.js';
|
|
@@ -5751,14 +5751,17 @@ export function serialize(built, opts = {}) {
|
|
|
5751
5751
|
qnode.display = { ...qnode.display, shape: 'circle' };
|
|
5752
5752
|
delete qnode.model;
|
|
5753
5753
|
const rows = (esc.fields ?? []).map((f) => {
|
|
5754
|
-
const
|
|
5754
|
+
const required = f.direction === 'input' ? undefined : f.required;
|
|
5755
5755
|
return {
|
|
5756
5756
|
id: f.id,
|
|
5757
5757
|
label: f.label ?? f.id,
|
|
5758
5758
|
type: wireFormFieldType(f.type),
|
|
5759
5759
|
direction: f.direction,
|
|
5760
|
-
|
|
5761
|
-
|
|
5760
|
+
...(typeof required === 'boolean' ? { required } : {}),
|
|
5761
|
+
// The field's settings (`controlType`, a picker's `options`,
|
|
5762
|
+
// `defaultValue`, `colSpan`, …), as the human task's rows carry
|
|
5763
|
+
// them (#1235, #1250).
|
|
5764
|
+
...formFieldSettingsWire(f),
|
|
5762
5765
|
};
|
|
5763
5766
|
});
|
|
5764
5767
|
const qsource = esc.source ?? derivedEscalationSource(built.id, step.name, esc.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.35.1",
|
|
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",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"@types/node": "^22.7.0",
|
|
94
94
|
"esbuild": "^0.28.1"
|
|
95
95
|
},
|
|
96
|
-
"gitref": "
|
|
96
|
+
"gitref": "cd7797fa2a6443158edfc8920b2e764e34ac6e71"
|
|
97
97
|
}
|