@uipath/maestro-builder-sdk 6.94.3 → 6.94.4

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.
@@ -1471,14 +1471,20 @@ function carriedResource(task, plan) {
1471
1471
  return ref ? { resource: { kind: String(task.type), ...ref } } : {};
1472
1472
  }
1473
1473
  /**
1474
- * The io lists a resource task saved empty (`inputs: []`), which compile
1475
- * omits when the task binds none; recorded as `emptyIo: ['inputs']`.
1474
+ * The io lists a task saved empty (`inputs: []`), which compile omits when the
1475
+ * task has no row there; recorded as `emptyIo: ['inputs']`, with the task's
1476
+ * saved `type` as `emptyIoType`. Any task kind: the
1477
+ * Designer saves `inputs: []` on an action form with no field and on a timer
1478
+ * as well as on a resource task.
1476
1479
  */
1477
1480
  function emptyIoLists(task) {
1478
- if (!ownEntry(TASK_KIND_METHOD, task.type))
1481
+ // A connector placeholder compiles to `data: {}` on purpose (#1354), its empty lists included.
1482
+ if (connectorPlaceholderKindOf(task.type, task.data))
1479
1483
  return {};
1480
1484
  const empty = ['inputs', 'outputs'].filter((side) => Array.isArray(task.data?.[side]) && task.data[side].length === 0);
1481
- return empty.length ? { emptyIo: [...empty] } : {};
1485
+ // The kind it was saved on: an edit that makes the task another kind (a
1486
+ // connector placeholder, say) gets compile's lists, not this one's.
1487
+ return empty.length ? { emptyIo: [...empty], ...(typeof task.type === 'string' ? { emptyIoType: task.type } : {}) } : {};
1482
1488
  }
1483
1489
  function ioArg(rows, kind, task, varKeyById) {
1484
1490
  const valueField = kind === 'inputs' ? 'value' : 'source';
@@ -222,8 +222,10 @@ interface StageIdentity {
222
222
  /** `var` and `custom: true`: a custom row whose label (`name`) is not the name of the variable it assigns. */
223
223
  /** `noAlias: true`: an own-name row saved with no `originalVar` beside a root variable of its id, which compile writes as the alias `originalVar: <id>`. */
224
224
  outputs?: PreservedOutputRow[];
225
- /** The io lists a resource task saved empty (`inputs: []`), which compile writes only when it binds a row. */
225
+ /** The io lists a task saved empty (`inputs: []`), which compile writes only when it has a row there. */
226
226
  emptyIo?: Array<'inputs' | 'outputs'>;
227
+ /** The task `type` `emptyIo` was saved on: compile restores the lists only while the task is still that kind. */
228
+ emptyIoType?: string;
227
229
  /** `taskFingerprint`, for a task a sibling shares its row names with. */
228
230
  fingerprint?: string;
229
231
  /** Fields of `TASK_EMPTY_LISTS` the read task spelled `[]`. */
@@ -45,7 +45,7 @@ import { taskShapeProblems } from './task-shape.js';
45
45
  import { SCRIPT_INPUTS, scriptOutputMappings, scriptOutputs, storedScript } from './script.js';
46
46
  import { DOCUMENT_EXTRACTION_NAME, DOCUMENT_EXTRACTION_RESOURCE, DOCUMENT_EXTRACTION_SERVICE_TYPE, DOCUMENT_EXTRACTION_VERSION, documentExtractionContext, documentExtractionInputs, documentExtractionOutputMappings, documentExtractionOutputs, documentExtractionRefusal, } from './document-extraction.js';
47
47
  import { HTTP_REQUEST_CONNECTION_NAME, HTTP_REQUEST_IMPLICIT_BINDING_ID, HTTP_REQUEST_IMPLICIT_CONNECTION, HTTP_REQUEST_SERVICE_TYPE, httpRequestBody, httpRequestContext, httpRequestInputs, httpRequestOutputMappings, httpRequestOutputs, httpRequestRefusal, writeHttpRequestMetadata, } from './http-request.js';
48
- import { connectorPlaceholderData, isConnectorPlaceholder } from './connector-placeholder.js';
48
+ import { connectorPlaceholderData, connectorPlaceholderKindOf, isConnectorPlaceholder } from './connector-placeholder.js';
49
49
  import { lowerTaskOutputRefs, planTaskOutputs, resolveInPlan, unresolvedTaskOutputRef } from './task-output-ref.js';
50
50
  /** The ids a serialize pass hashed from element ids, by the document it returned. */
51
51
  const ELEMENT_SEEDED_IDS = new WeakMap();
@@ -1695,9 +1695,14 @@ function applyPreservedIdentities(result, preservation, warn) {
1695
1695
  const isAction = task?.type === 'action';
1696
1696
  takeOutputRows(task?.data?.outputs ?? [], (taskIdentity.outputs ?? [])
1697
1697
  .map((row) => ({ ...row, ...(!isAction && !resourceKept ? { fields: undefined, omit: undefined } : {}) })), isAction);
1698
- for (const side of taskIdentity.emptyIo ?? [])
1699
- if ((side === 'inputs' || side === 'outputs') && task?.data && task.data[side] === undefined)
1700
- task.data[side] = [];
1698
+ // Only on the kind the lists were saved on (`emptyIoType`; a payload from
1699
+ // before it was recorded was written for resource tasks only), and never
1700
+ // on a connector placeholder, whose `data: {}` is its contract (#1354).
1701
+ const sameKind = taskIdentity.emptyIoType === undefined || taskIdentity.emptyIoType === task?.type;
1702
+ if (sameKind && task?.data && !connectorPlaceholderKindOf(task.type, task.data))
1703
+ for (const side of taskIdentity.emptyIo ?? [])
1704
+ if ((side === 'inputs' || side === 'outputs') && task.data[side] === undefined)
1705
+ task.data[side] = [];
1701
1706
  }));
1702
1707
  }
1703
1708
  const metadata = result.metadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.94.3",
3
+ "version": "6.94.4",
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",
@@ -111,5 +111,5 @@
111
111
  "@types/node": "^22.7.0",
112
112
  "esbuild": "^0.28.1"
113
113
  },
114
- "gitref": "30a156946c9d4247a85f4a7b3442d4167e031843"
114
+ "gitref": "aeb5562cbbd086caf34ab585cfa9ac63b9778333"
115
115
  }