@uipath/maestro-builder-sdk 6.120.23 → 6.120.25

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.
@@ -950,6 +950,15 @@ export interface RetrySpec {
950
950
  * multiplies it by {@link RetrySpec.exponentialBase} each time.
951
951
  */
952
952
  backoffType?: 'static' | 'exponential';
953
+ /**
954
+ * The `retryBackoffType` attribute exactly as an imported file spells it, for a
955
+ * spelling `backoffType` does not write (`'Static'` / `'Exponential'`). Real
956
+ * exports also carry `'exponential'`, `'Linear'` and `'fixed'`; decompile fills
957
+ * this field with such a value so compile writes it back unchanged instead of
958
+ * turning it into `'Static'`. When set, it wins over `backoffType`. Authoring
959
+ * code should use `backoffType`.
960
+ */
961
+ backoffTypeAsWritten?: string;
953
962
  /** Multiplier for `'exponential'` backoff, e.g. `2` for 1s → 2s → 4s. */
954
963
  exponentialBase?: number;
955
964
  /** Retry every failure, not only the ones the platform marks retryable. */
@@ -1298,7 +1298,8 @@ function checkActivityFields(n, diags) {
1298
1298
  where: n.id,
1299
1299
  });
1300
1300
  }
1301
- if (retry.exponentialBase !== undefined && retry.backoffType !== 'exponential')
1301
+ // A carried product spelling (`backoffTypeAsWritten`) is not judged here: the warning is about `backoffType`.
1302
+ if (retry.exponentialBase !== undefined && retry.backoffType !== 'exponential' && retry.backoffTypeAsWritten === undefined)
1302
1303
  diags.push({
1303
1304
  level: 'warning',
1304
1305
  code: 'RETRY_BASE_WITHOUT_EXPONENTIAL',
@@ -637,6 +637,15 @@ function emitRetry(retry) {
637
637
  ['maxRetries', String(count)],
638
638
  ['backoff', retry.retryBackoff ? tsText(retry.retryBackoff) : undefined],
639
639
  ['backoffType', retry.retryBackoffType === 'Exponential' ? tsText('exponential') : undefined],
640
+ // Any spelling compile does not write for `backoffType` (`exponential`, `Linear`, `fixed`
641
+ // are all in real exports) is carried as written; reading it as the static default would
642
+ // change the policy on a no-edit round trip.
643
+ [
644
+ 'backoffTypeAsWritten',
645
+ retry.retryBackoffType !== undefined && retry.retryBackoffType !== 'Exponential' && retry.retryBackoffType !== 'Static'
646
+ ? tsText(String(retry.retryBackoffType))
647
+ : undefined,
648
+ ],
640
649
  ['exponentialBase', retry.exponentialBase !== undefined ? String(Number(retry.exponentialBase)) : undefined],
641
650
  ['allErrors', retry.retryAllErrors === 'true' || retry.retryAllErrors === true ? 'true' : undefined],
642
651
  ['maxDuration', retry.maxDuration ? tsText(retry.maxDuration) : undefined],
@@ -1324,7 +1324,7 @@ export function folderCompanionKeys(built, sink) {
1324
1324
  function buildRetryExt(ctx, retry) {
1325
1325
  const props = {
1326
1326
  maxRetryCount: String(retry.maxRetries),
1327
- retryBackoffType: retry.backoffType === 'exponential' ? 'Exponential' : 'Static',
1327
+ retryBackoffType: retry.backoffTypeAsWritten ?? (retry.backoffType === 'exponential' ? 'Exponential' : 'Static'),
1328
1328
  };
1329
1329
  if (retry.backoff !== undefined)
1330
1330
  props.retryBackoff = retry.backoff;
package/dist/bpmn-api.md CHANGED
@@ -1002,6 +1002,7 @@ Retry an activity that fails (`uipath:retry`).
1002
1002
  - `RetrySpec.maxRetries: number` — How many times to retry AFTER the first attempt — so `3` means up to four runs in total.
1003
1003
  - `RetrySpec.backoff?: string` — Wait this long before retrying, as an ISO-8601 duration (`'PT30S'`, `'PT1M'`, `'P1DT12H'`).
1004
1004
  - `RetrySpec.backoffType?: 'static' | 'exponential'` — `'static'` (default) waits `backoff` before every retry; `'exponential'` multiplies it by RetrySpec.exponentialBase each…
1005
+ - `RetrySpec.backoffTypeAsWritten?: string` — The `retryBackoffType` attribute exactly as an imported file spells it, for a spelling `backoffType` does not write…
1005
1006
  - `RetrySpec.exponentialBase?: number` — Multiplier for `'exponential'` backoff, e.g. `2` for 1s → 2s → 4s.
1006
1007
  - `RetrySpec.allErrors?: boolean` — Retry every failure, not only the ones the platform marks retryable.
1007
1008
  - `RetrySpec.maxDuration?: string` — Give up after this much total elapsed time, as an ISO-8601 duration.
@@ -2723,6 +2723,21 @@ function unaliasedOwnNameRow(row, plan) {
2723
2723
  const root = [...(plan.variables?.inputOutputs ?? []), ...(plan.variables?.inputs ?? []), ...(plan.variables?.outputs ?? [])];
2724
2724
  return root.some((entry) => entry?.id === row.id) ? { noAlias: true } : {};
2725
2725
  }
2726
+ /**
2727
+ * An own-name output (`id == var`) saved as the controlled alias
2728
+ * (`originalVar: <id>`) while no root variable has its id. Compile writes the
2729
+ * alias only beside a root variable of that id (serialize's variables merge),
2730
+ * so it writes this row bare. Recorded as `originalVar: <id>`, so compile
2731
+ * writes the saved spelling back. For example a process output `{ id:
2732
+ * 'region', var: 'region', originalVar: 'region' }` in a plan whose
2733
+ * `variables` declare no `region`. The mirror of {@link unaliasedOwnNameRow}.
2734
+ */
2735
+ function rootlessAliasRow(row, plan) {
2736
+ if (row.custom === true || typeof row.id !== 'string' || row.id !== row.var || row.originalVar !== row.id)
2737
+ return {};
2738
+ const root = [...(plan.variables?.inputOutputs ?? []), ...(plan.variables?.inputs ?? []), ...(plan.variables?.outputs ?? [])];
2739
+ return root.some((entry) => entry?.id === row.id) ? {} : { originalVar: row.id };
2740
+ }
2726
2741
  /**
2727
2742
  * A custom (`{ assign }`) output row's saved fields that compile does not
2728
2743
  * write as saved (`customRowShape`): its own `id`, an `elementId` other than
@@ -2812,6 +2827,7 @@ function identityPreservation(plan) {
2812
2827
  // or the variable an own-name extract wrote first (`firstResults`).
2813
2828
  ...(typeof row.originalVar === 'string' && row.originalVar !== row.id && (row.custom !== true || task.type === 'action')
2814
2829
  ? { originalVar: row.originalVar } : {}),
2830
+ ...rootlessAliasRow(row, plan),
2815
2831
  ...unaliasedOwnNameRow(row, plan),
2816
2832
  ...actionOutputShape(task, row),
2817
2833
  ...resourceRowShape(task, row, 'outputs'),
@@ -278,7 +278,7 @@ interface StageIdentity {
278
278
  omit?: string[];
279
279
  taskElementId?: true;
280
280
  }>;
281
- /** `originalVar` only when it is not the row's `id` (the serializer's own spelling). `elementId` when an action form output names another element than its task. `fields` as on an input. `omit`: the fields an action form output (`target`, `_jsonSchema`, `elementId`) or a resource extract (`target`) was saved without that compile writes. `target`: which of the row's variables its saved `target` names when that is not its id (`=<var>` or `=<originalVar>`; compile writes `=<id>`). `bodyCopies`: the extra copies of its `body` an action form output was saved with (`jsonSchema`), which compile writes back from the body. */
281
+ /** `originalVar` only when it is not the row's `id` (the serializer's own spelling), or when it is the `id` of an own-name row with no root variable of that id, which compile writes with none. `elementId` when an action form output names another element than its task. `fields` as on an input. `omit`: the fields an action form output (`target`, `_jsonSchema`, `elementId`) or a resource extract (`target`) was saved without that compile writes. `target`: which of the row's variables its saved `target` names when that is not its id (`=<var>` or `=<originalVar>`; compile writes `=<id>`). `bodyCopies`: the extra copies of its `body` an action form output was saved with (`jsonSchema`), which compile writes back from the body. */
282
282
  /** `var` and `custom: true`: a custom row whose label (`name`) is not the name of the variable it assigns. */
283
283
  /**
284
284
  * `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>`.
@@ -1592,12 +1592,17 @@ function applyPreservedIdentities(result, preservation, warn) {
1592
1592
  // - An output whose `target` names its variable, or the one it wrote before
1593
1593
  // a reassignment, rather than its id gets that spelling back from the
1594
1594
  // row's final names: `{ var: 'status', target: '=status' }`.
1595
+ // - An own-name row saved as the alias of its own id (`originalVar: <id>`)
1596
+ // with no root variable of that id gets the alias back while it still
1597
+ // has that id and compile wrote it bare (`rootlessAliasRow`).
1595
1598
  if (wanted.target || wanted.originalVar !== undefined) {
1596
1599
  const field = wanted.target;
1597
1600
  targetSpellings.push(() => {
1598
1601
  if (wanted.originalVar !== undefined && row.id === row.var && wanted.originalVar !== row.id
1599
1602
  && (row.originalVar === undefined || row.originalVar === row.id))
1600
1603
  row.originalVar = wanted.originalVar;
1604
+ else if (wanted.originalVar !== undefined && row.id === row.var && wanted.originalVar === row.id && row.originalVar === undefined)
1605
+ row.originalVar = row.id;
1601
1606
  if (field && typeof row.target === 'string' && typeof row[field] === 'string' && row[field])
1602
1607
  row.target = `=${row[field]}`;
1603
1608
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.120.23",
3
+ "version": "6.120.25",
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": "e45eca9991259b8d4d10fede3a8c1c2e67ed6d0a"
127
+ "gitref": "24ba858ca7c1b24d2f464a901824441668983a52"
128
128
  }