@uipath/maestro-builder-sdk 6.48.0 → 6.49.0

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.
package/README.md CHANGED
@@ -201,8 +201,8 @@ $ npx flow-sdk flow compile Hello -o Hello.flow --json
201
201
  {"ok":true,"path":"/work/Hello.flow","nodes":3,"edges":2,"sidecars":[],"errors":0,"warnings":0,"diagnostics":[]}
202
202
  ```
203
203
 
204
- `check` reports `errors`, `warnings` and `diagnostics`; `compile`, `decompile`,
205
- `merge` and `tidy` report the `path` they wrote. A verb whose plain output is the
204
+ `check` reports `errors`, `warnings` and `diagnostics`; `compile`, `decompile`
205
+ and `merge` report the `path` they wrote. A verb whose plain output is the
206
206
  result itself (`registry search`, `registry path`, `bpmn check --graph`) prints it
207
207
  only as that object under `--json`, never a second copy on stderr. `package.json` lists the optional
208
208
  surface a caller may probe for in `cliCapabilities` (`json-result`).
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * Diagram interchange (`bpmndi`) is intentionally **not** emitted here: BPMN
19
19
  * validation is layout-independent, so the SDK emits semantic-only XML and a
20
- * separate "tidy" step lays it out. See serialize.ts.
20
+ * `uip maestro bpmn format` lays it out. See serialize.ts.
21
21
  */
22
22
  import type { TypeDesc } from '../core/expr.js';
23
23
  import { type ConnectorOpts, type EventFilter } from '../core/actions.js';
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * Runs the fast static check first; if it passes, serializes to Maestro `.bpmn`
15
15
  * XML (semantic-only — no diagram). The authoritative deploy gate is
16
- * `uip maestro bpmn validate`; a separate "tidy" step lays the diagram out.
16
+ * `uip maestro bpmn validate`; `uip maestro bpmn format` lays the diagram out.
17
17
  */
18
18
  import { reportDiagnostics, reportResult, thrownDiagnostic } from '../cli-result.js';
19
19
  import { writeFileSync } from 'node:fs';
@@ -22,8 +22,8 @@
22
22
  * repo-relative for in-tree callers, mirroring the Flow and Case arms.
23
23
  *
24
24
  * Diagram layout is not read or emitted — the SDK emits semantic-only XML and
25
- * `tidy` regenerates `bpmndi`. Run `tidy` on the recompiled artifact when a canvas
26
- * needs one.
25
+ * `uip maestro bpmn format` regenerates `bpmndi`. Run it on the recompiled artifact
26
+ * when a canvas needs one.
27
27
  *
28
28
  * `--style nested` lifts the regions the builder's nesting constructs lower to —
29
29
  * see `BpmnDecompileOptions.style`. It is written only after both sources have been
@@ -16,9 +16,9 @@
16
16
  *
17
17
  * What does NOT survive, and why:
18
18
  *
19
- * - **`bpmndi` diagram layout.** The SDK emits none and `tidy` regenerates it, so
20
- * there is nothing to preserve. A decompiled file recompiles to semantic-only
21
- * XML; re-run `tidy` for a canvas.
19
+ * - **`bpmndi` diagram layout.** The SDK emits none and `uip maestro bpmn format`
20
+ * regenerates it, so there is nothing to preserve. A decompiled file recompiles
21
+ * to semantic-only XML; re-run `format` for a canvas.
22
22
  * - **Comments, method order, and formatting.** Regenerated, not preserved.
23
23
  *
24
24
  * Everything else round-trips: events and their definitions, all four gateways,
@@ -274,7 +274,7 @@ export function mergeBpmn(originalXml, editedXml, options = {}) {
274
274
  originalXml.slice(originalProcess.innerEnd);
275
275
  // The diagram: the original's layout survives, which is strictly better than the
276
276
  // re-layout a bare recompile forces. Shapes and edges for deleted elements go with
277
- // them; anything newly added has no DI yet, which is what `format`/`tidy` is for.
277
+ // them; anything newly added has no DI yet, which is what `format` is for.
278
278
  if (removed.length > 0) {
279
279
  const plane = findByLocal(parseXmlRanges(merged), 'BPMNPlane');
280
280
  if (plane) {
@@ -12,8 +12,7 @@ export declare function serialize(built: BuiltBpmn, opts?: BpmnSerializeOpts): P
12
12
  * an attribute whose value equals the BPMN default, but Studio Web (and the
13
13
  * canvas graders) expect an interrupting boundary event to carry an explicit
14
14
  * `cancelActivity="true"`. Add it wherever a boundary event lacks the attribute
15
- * (its absence already means interrupting). Idempotent; also used by `tidy`,
16
- * which re-serializes through moddle and drops the attribute again.
15
+ * (its absence already means interrupting). Idempotent.
17
16
  *
18
17
  * **This one is a KNOWN divergence from what the product writes, kept on purpose.**
19
18
  * None of the 71 boundary events across the five real Studio Web exports in
@@ -10,8 +10,8 @@
10
10
  * descriptor.
11
11
  *
12
12
  * **Semantic-only, no diagram.** BPMN validation is layout-independent, so no
13
- * `bpmndi:BPMNDiagram` is emitted here; a separate "tidy" step (auto-layout)
14
- * adds geometry when a visual diagram is needed.
13
+ * `bpmndi:BPMNDiagram` is emitted here; `uip maestro bpmn format` adds geometry
14
+ * when a visual diagram is needed.
15
15
  */
16
16
  import BpmnModdle from 'bpmn-moddle';
17
17
  import { createRequire } from 'node:module';
@@ -170,8 +170,7 @@ export async function serialize(built, opts = {}) {
170
170
  * an attribute whose value equals the BPMN default, but Studio Web (and the
171
171
  * canvas graders) expect an interrupting boundary event to carry an explicit
172
172
  * `cancelActivity="true"`. Add it wherever a boundary event lacks the attribute
173
- * (its absence already means interrupting). Idempotent; also used by `tidy`,
174
- * which re-serializes through moddle and drops the attribute again.
173
+ * (its absence already means interrupting). Idempotent.
175
174
  *
176
175
  * **This one is a KNOWN divergence from what the product writes, kept on purpose.**
177
176
  * None of the 71 boundary events across the five real Studio Web exports in
@@ -53,15 +53,6 @@ export function registerBpmnCommands(program) {
53
53
  addValue(argv, '--bindings', options.bindings);
54
54
  await invoke('bpmn check', () => import('../../bpmn/check-cli.js'), argv);
55
55
  });
56
- family.command('tidy')
57
- .description('Add diagram layout to a compiled .bpmn artifact.')
58
- .argument('<input>', 'input .bpmn path')
59
- .option('-o, --output <file>', 'output .bpmn path')
60
- .action(async (input, options) => {
61
- const argv = [input];
62
- addValue(argv, '-o', options.output);
63
- await invoke('bpmn tidy', () => import('../../bpmn/tidy-cli.js'), argv);
64
- });
65
56
  family
66
57
  .command('decompile')
67
58
  .description('Convert a .bpmn artifact to authored TypeScript.')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.48.0",
3
+ "version": "6.49.0",
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",
@@ -84,7 +84,6 @@
84
84
  "check:definitions": "node scripts/sync-core-definitions.mjs --check"
85
85
  },
86
86
  "dependencies": {
87
- "bpmn-auto-layout": "^1.3.0",
88
87
  "bpmn-moddle": "^9.0.4",
89
88
  "commander": "^14.0.0",
90
89
  "typescript": "^5.9.3"
@@ -93,5 +92,5 @@
93
92
  "@types/node": "^22.7.0",
94
93
  "esbuild": "^0.28.1"
95
94
  },
96
- "gitref": "b5eb4fa503b9753a5f3aa2c851c3f00befb13bd1"
95
+ "gitref": "26a34eb76b8f2b38beabdbcf74ef965d2b24a8c4"
97
96
  }
@@ -1,2 +0,0 @@
1
- import { type CliExitCode } from '../cli-run.js';
2
- export declare function run(argv: string[]): Promise<CliExitCode>;
@@ -1,38 +0,0 @@
1
- /**
2
- * tidy-cli — lay out a semantic-only `.bpmn` (add the `bpmndi` diagram).
3
- *
4
- * Usage:
5
- * node --experimental-strip-types tidy-cli.js <file.bpmn> [-o out.bpmn]
6
- *
7
- * The SDK's serializer emits semantic-only BPMN (no diagram) because validation
8
- * is layout-independent. This step runs `bpmn-auto-layout` to synthesize a full
9
- * `bpmndi:BPMNDiagram` — a `BPMNShape` per node and a `BPMNEdge` per flow — so
10
- * the file imports into a visual canvas. The `uipath:*` extension payloads are
11
- * preserved. Overwrites the input unless `-o` is given.
12
- */
13
- import { resolve } from 'node:path';
14
- import { reportResult } from '../cli-result.js';
15
- import { readFileSync, writeFileSync } from 'node:fs';
16
- import { layoutProcess } from 'bpmn-auto-layout';
17
- import { finalizeBpmnXml } from './serialize.js';
18
- import { flagValue, runWhenInvokedDirectly } from '../cli-run.js';
19
- export async function run(argv) {
20
- if (argv.length === 0 || argv[0] === '-h' || argv[0] === '--help') {
21
- console.error('usage: tidy <file.bpmn> [-o out.bpmn]');
22
- return 2;
23
- }
24
- const flags = new Set(['-o']);
25
- const input = argv.find((a, i) => !flags.has(a) && !flags.has(argv[i - 1]));
26
- if (!input) {
27
- console.error('tidy: missing <file.bpmn>');
28
- return 2;
29
- }
30
- const laidOut = finalizeBpmnXml(await layoutProcess(readFileSync(input, 'utf8')));
31
- const out = flagValue(argv, '-o') ?? input;
32
- writeFileSync(out, laidOut.endsWith('\n') ? laidOut : laidOut + '\n');
33
- const shapes = (laidOut.match(/BPMNShape/g) ?? []).length;
34
- console.log(`tidy: laid out ${out} (${shapes} shape(s))`);
35
- reportResult({ path: resolve(out), shapes });
36
- return 0;
37
- }
38
- runWhenInvokedDirectly(import.meta.url, 'tidy', run);