@uipath/maestro-builder-sdk 6.120.31 → 6.120.33

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.
@@ -10,7 +10,7 @@ import { type ResourceResolutions } from './core/resource-resolution.js';
10
10
  import type { SolutionProjects } from './core/solution-projects.js';
11
11
  import type { NodeCatalog } from './core/node-catalog.js';
12
12
  import type { DefinitionReference } from './core/node-classes.js';
13
- import type { BuiltFlow } from './flow-sdk.js';
13
+ import type { BuiltFlow, Step } from './flow-sdk.js';
14
14
  import type { Library } from './library.js';
15
15
  import { type BindingRefusalCode, type BindingsView } from './core/binding-messages.js';
16
16
  import { CONNECTOR_INPUT_MISSING, connectorInputErrors as coreConnectorInputErrors } from './core/connector-inputs.js';
@@ -47,6 +47,16 @@ export interface DraftFinding {
47
47
  /** The sentence the strict compile refuses with. */
48
48
  message: string;
49
49
  }
50
+ /** One emitted graph level (see {@link SerializeOpts.scopes}). */
51
+ export interface EmittedScope {
52
+ /** The body's key in `subflows`; absent for the root. */
53
+ subflow?: string;
54
+ /** The calling steps' names, outermost first. */
55
+ callers: readonly string[];
56
+ steps: readonly Step[];
57
+ /** Step name to the node id compile gave it in this graph level. */
58
+ stepNodeId: ReadonlyMap<string, string>;
59
+ }
50
60
  /** A refusal a collect-mode serialize reported instead of throwing (see {@link SerializeOpts.collect}). */
51
61
  export interface CollectedRefusal {
52
62
  code: string;
@@ -167,6 +177,15 @@ export interface SerializeOpts {
167
177
  * both, each on its own step, where an ordinary compile stops at the first.
168
178
  */
169
179
  collect?: (refusal: CollectedRefusal) => void;
180
+ /**
181
+ * Each graph level the compile emitted, with the node id it gave each step:
182
+ * the root (`subflow` undefined), and every subflow body under its key in
183
+ * `subflows`. `callers` are the calling steps' names, outermost first.
184
+ * A subflow's ids can carry a prefix (`call_cd` for step `cd` of the child
185
+ * `call` runs), so a reader of the compiled graph maps nodes to steps here,
186
+ * not by name.
187
+ */
188
+ scopes?: (scope: EmittedScope) => void;
170
189
  /**
171
190
  * Filled in by `serialize` with the extra files the flow needs beside the
172
191
  * `.flow`, relative to it: one `<source>/agent.json` per inline agent, plus a
package/dist/serialize.js CHANGED
@@ -2036,6 +2036,7 @@ function serializeFlow(built, opts) {
2036
2036
  scope.variableUpdates[startId] = [...(scope.variableUpdates[startId] ?? []), ...renderUpdates(startUpdates, scope.rename)];
2037
2037
  }
2038
2038
  const tails = emit(child.steps, [{ node: startId, port: 'output' }], scope);
2039
+ opts.scopes?.({ subflow: nodeId, callers: [...subflowPath], steps: child.steps, stepNodeId: scope.stepNodeId });
2039
2040
  // Same as the root's implicit End — mapped against the SUBFLOW's own
2040
2041
  // outputs, which is the scope the product validates a subflow body in.
2041
2042
  const capped = tailsToCap(scope, tails);
@@ -3659,6 +3660,7 @@ function serializeFlow(built, opts) {
3659
3660
  }
3660
3661
  }
3661
3662
  }
3663
+ opts.scopes?.({ callers: [], steps: [...built.steps, ...(built.entryPoints ?? []).flatMap((ep) => ep.steps)], stepNodeId: root.stepNodeId });
3662
3664
  // ── Shared root inputs (#924) ────────────────────────────────────────────
3663
3665
  // An input marked `{ shared: '<var>' }` is copied into that variable on its
3664
3666
  // root's TRIGGER node: a `variableUpdates[<triggerId>]` row, the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.120.31",
3
+ "version": "6.120.33",
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": "46720c412da2f4824a584641d0360bd70eccb952"
127
+ "gitref": "5da397eb5e83bdd6f38bdbc72b4f63f572170647"
128
128
  }