@uipath/maestro-builder-sdk 6.82.1 → 6.82.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.
@@ -2,8 +2,12 @@
2
2
  * What the rule families share: the CLI commit they were ported from, and the
3
3
  * next step for a field compile writes itself.
4
4
  */
5
- /** The `UiPath/cli` commit the rules in this directory were read from. */
6
- export declare const CLI_PORTED_FROM = "b37f32997c";
5
+ /**
6
+ * The `UiPath/cli` commit the rules in this directory were last read against.
7
+ * The first 19 were ported at b37f32997c; TIMER_TASK_OUTPUTS_IGNORED, and the
8
+ * not-ported list in `tests/_case-plan-not-ported.ts`, were read at this one.
9
+ */
10
+ export declare const CLI_PORTED_FROM = "7dbaa6b9e";
7
11
  /**
8
12
  * The next step for a field `serialize` writes itself. From a source alone it
9
13
  * is an SDK bug; from a decompiled source it can be the plan's preserved data,
@@ -2,8 +2,12 @@
2
2
  * What the rule families share: the CLI commit they were ported from, and the
3
3
  * next step for a field compile writes itself.
4
4
  */
5
- /** The `UiPath/cli` commit the rules in this directory were read from. */
6
- export const CLI_PORTED_FROM = 'b37f32997c';
5
+ /**
6
+ * The `UiPath/cli` commit the rules in this directory were last read against.
7
+ * The first 19 were ported at b37f32997c; TIMER_TASK_OUTPUTS_IGNORED, and the
8
+ * not-ported list in `tests/_case-plan-not-ported.ts`, were read at this one.
9
+ */
10
+ export const CLI_PORTED_FROM = '7dbaa6b9e';
7
11
  /**
8
12
  * The next step for a field `serialize` writes itself. From a source alone it
9
13
  * is an SDK bug; from a decompiled source it can be the plan's preserved data,
@@ -1,4 +1,5 @@
1
1
  import { asRecord, planTasks } from '../walk.js';
2
+ import { WRITTEN_BY_COMPILE } from './common.js';
2
3
  /** The CLI's `RECIPIENT_PREFIXES`: a value still carrying one is `STRICT_RECIPIENT_PREFIX_LEFT`'s, not ported. */
3
4
  const RECIPIENT_PREFIXES = ['User:', 'UserGroup:', 'Role:', 'Email:', 'Expression:'];
4
5
  const recipientExpressionType = {
@@ -57,4 +58,53 @@ const actionCatalogNamed = {
57
58
  return found;
58
59
  },
59
60
  };
60
- export const TASK_RULES = [recipientExpressionType, actionCatalogNamed];
61
+ const timerOutputsIgnored = {
62
+ code: 'TIMER_TASK_OUTPUTS_IGNORED',
63
+ class: 'lint',
64
+ why: 'A timer task carries outputs only when the source gives it a custom `.outputs({ v: { assign } })`, written as authored.',
65
+ level: 'warning',
66
+ cli: 'case-validators/timer-validator.ts:77',
67
+ find(plan) {
68
+ const found = [];
69
+ for (const t of planTasks(plan)) {
70
+ if (t.task.type !== 'wait-for-timer')
71
+ continue;
72
+ if (!Array.isArray(t.data?.outputs) || t.data.outputs.length === 0)
73
+ continue;
74
+ found.push({
75
+ path: `nodes[${t.stageId}].data.tasks[${t.taskId}].data`,
76
+ message: `Timer task "${t.taskLabel}" declares "data.outputs", but pack drops them on a wait-for-timer task, so no variable is written.`,
77
+ fix: 'Drop `.outputs()` from the `.waitForTimer()` task and set the variable from a script task placed after the timer.',
78
+ where: t.taskLabel,
79
+ nodeId: t.taskId,
80
+ });
81
+ }
82
+ return found;
83
+ },
84
+ };
85
+ const taskMissingElementId = {
86
+ code: 'TASK_MISSING_ELEMENT_ID',
87
+ class: 'lint',
88
+ why: "Compile stamps every task's elementId, but a decompiled plan that omitted it records the omission and compile drops it again; until the contract decides the preserved case (D6), only check reports it.",
89
+ level: 'warning',
90
+ cli: 'case-validators/task-hygiene-validator.ts:18',
91
+ find(plan) {
92
+ const found = [];
93
+ for (const t of planTasks(plan)) {
94
+ if (t.task.elementId !== undefined)
95
+ continue;
96
+ const hasRows = (key) => Array.isArray(t.data?.[key]) && t.data[key].length > 0;
97
+ if (!hasRows('inputs') && !hasRows('outputs'))
98
+ continue;
99
+ found.push({
100
+ path: `nodes[${t.stageId}].data.tasks[${t.taskId}]`,
101
+ message: `Task "${t.taskLabel}" carries inputs or outputs but has no "elementId", so those variables do not resolve to it.`,
102
+ fix: `The elementId is "${t.stageId}-${t.taskId}"; ${WRITTEN_BY_COMPILE}`,
103
+ where: t.taskLabel,
104
+ nodeId: t.taskId,
105
+ });
106
+ }
107
+ return found;
108
+ },
109
+ };
110
+ export const TASK_RULES = [recipientExpressionType, actionCatalogNamed, timerOutputsIgnored, taskMissingElementId];
@@ -204,6 +204,8 @@ export declare const REFUSALS: {
204
204
  readonly STRICT_JS_EXPRESSION_INVALID: "lint";
205
205
  readonly STRICT_RECIPIENT_EXPRESSION_TYPE: "lint";
206
206
  readonly STRICT_ACTION_CATALOG_NAMED: "lint";
207
+ readonly TIMER_TASK_OUTPUTS_IGNORED: "lint";
208
+ readonly TASK_MISSING_ELEMENT_ID: "lint";
207
209
  readonly CASE_NO_DEFAULT_EXPORT: "lowering";
208
210
  readonly CASE_SOURCE_NOT_FOUND: "lowering";
209
211
  readonly CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: "lowering";
@@ -274,6 +274,8 @@ export const REFUSALS = {
274
274
  STRICT_JS_EXPRESSION_INVALID: 'lint',
275
275
  STRICT_RECIPIENT_EXPRESSION_TYPE: 'lint',
276
276
  STRICT_ACTION_CATALOG_NAMED: 'lint',
277
+ TIMER_TASK_OUTPUTS_IGNORED: 'lint',
278
+ TASK_MISSING_ELEMENT_ID: 'lint',
277
279
  CASE_NO_DEFAULT_EXPORT: 'lowering',
278
280
  CASE_SOURCE_NOT_FOUND: 'lowering',
279
281
  CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: 'lowering',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.82.1",
3
+ "version": "6.82.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",
@@ -103,5 +103,5 @@
103
103
  "@types/node": "^22.7.0",
104
104
  "esbuild": "^0.28.1"
105
105
  },
106
- "gitref": "cd9e43c9e5505bd7691f83cf7cce2283a190ec7b"
106
+ "gitref": "73a1011c5e63e206f2c92ec533af173c62af6d3f"
107
107
  }