@uipath/maestro-builder-sdk 6.51.0 → 6.51.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.
Files changed (2) hide show
  1. package/dist/case/check.js +29 -0
  2. package/package.json +2 -2
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.51.0",
3
+ "version": "6.51.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",
@@ -92,5 +92,5 @@
92
92
  "@types/node": "^22.7.0",
93
93
  "esbuild": "^0.28.1"
94
94
  },
95
- "gitref": "5647b4660231b68f1a5c44badd9edc030e36729a"
95
+ "gitref": "c337d613dbdd47c336bac7e128bca86a54032c95"
96
96
  }