@uipath/maestro-builder-sdk 6.9.4 → 6.9.5

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
@@ -161,7 +161,6 @@ The UiPath CLI is the authoring front door. Beyond the two verbs the quick start
161
161
  uses:
162
162
 
163
163
  ```bash
164
- uip maestro flow check HelloWorld.flow --compiled # deep validation of the ARTIFACT
165
164
  uip maestro flow validate HelloWorld.flow # the product validator
166
165
  uip maestro flow debug HelloWorld.flow # run it
167
166
  ```
@@ -193,11 +192,6 @@ argv grammar, or exit meanings are semver-governed. The package also declares th
193
192
  `@uipath/maestro-builder-sdk/cli` export for tooling that needs to verify this surface; normal
194
193
  authors should invoke it through `uip maestro`.
195
194
 
196
- For `uip maestro flow check --compiled --uip`, the SDK's checker starts a nested
197
- `uip maestro flow registry get` process to resolve missing schemas. This is
198
- intentional and does not recurse into `check`. Set `UIP_BIN` to an alternate uip
199
- executable when the desired binary is not the one on `PATH`.
200
-
201
195
  ## What you can express
202
196
 
203
197
  Every node type the platform runs has a builder form. Control flow and data:
@@ -1,4 +1,4 @@
1
- import { addValue, inferCheckMode, invoke, loadTool } from '../common.js';
1
+ import { addValue, inferCheckMode, invoke, loadTool, retiredCompiledOption } from '../common.js';
2
2
  export function registerBpmnCommands(program) {
3
3
  const family = program.command('bpmn').description('Build, inspect, and merge BPMN artifacts.');
4
4
  family.command('compile')
@@ -15,10 +15,10 @@ export function registerBpmnCommands(program) {
15
15
  await invoke('bpmn compile', () => loadTool(import.meta.url, '../../bpmn/compile-cli.js'), argv);
16
16
  });
17
17
  family.command('check')
18
- .description('Check authored TypeScript; use the product CLI for compiled BPMN.')
19
- .argument('<input>', 'source or .bpmn artifact')
18
+ .description('Check authored TypeScript. Check a .bpmn with `uip maestro bpmn validate`.')
19
+ .argument('<input>', 'a .bpmn.ts path or bare name')
20
20
  .option('--source', 'check authored TypeScript')
21
- .option('--compiled', 'identify a compiled artifact')
21
+ .addOption(retiredCompiledOption())
22
22
  .action(async (input, options) => {
23
23
  let mode;
24
24
  try {
@@ -1,4 +1,4 @@
1
- import { addValue, inferCheckMode, invoke, loadTool } from '../common.js';
1
+ import { addValue, inferCheckMode, invoke, loadTool, retiredCompiledOption } from '../common.js';
2
2
  export function registerCaseCommands(program) {
3
3
  const family = program.command('case').description('Build, check, and merge Case artifacts.');
4
4
  family.command('compile')
@@ -17,10 +17,10 @@ export function registerCaseCommands(program) {
17
17
  await invoke('case compile', () => loadTool(import.meta.url, '../../case/compile-cli.js'), argv);
18
18
  });
19
19
  family.command('check')
20
- .description('Check authored TypeScript; use the product CLI for caseplan.json.')
21
- .argument('<input>', 'source or caseplan.json')
20
+ .description('Check authored TypeScript. Check a caseplan.json with `uip maestro case validate`.')
21
+ .argument('<input>', 'a .case.ts path or bare name')
22
22
  .option('--source', 'check authored TypeScript')
23
- .option('--compiled', 'identify a compiled artifact')
23
+ .addOption(retiredCompiledOption())
24
24
  .action(async (input, options) => {
25
25
  let mode;
26
26
  try {
@@ -1,2 +1,2 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
2
  export declare function registerFlowCommands(program: Command): void;
@@ -1,4 +1,20 @@
1
- import { addValue, emitOnlyEnabled, inferCheckMode, invoke, loadTool } from '../common.js';
1
+ import { Option } from 'commander';
2
+ import { addValue, emitOnlyEnabled, inferCheckMode, invoke, loadTool, retiredCompiledOption } from '../common.js';
3
+ /** The retired compiled check's flags: `[commander flags, option key, description]`. One table, so hiding and warning cannot drift. */
4
+ const RETIRED_COMPILED_CHECK_FLAGS = [
5
+ ['--json', 'json', 'retired: compiled-check diagnostics as JSON'],
6
+ ['--uip', 'uip', 'retired: resolve missing schemas with the UiPath CLI'],
7
+ ['--max-errors <count>', 'maxErrors', 'retired: stop after this many compiled-check errors'],
8
+ ['--script-determinism', 'scriptDeterminism', 'retired: check script blocks for non-deterministic calls'],
9
+ ['--quiet', 'quiet', 'retired: suppress warnings and information'],
10
+ ['--debug-internal', 'debugInternal', 'retired: include internal compile context'],
11
+ ['--dump-ir', 'dumpIr', 'retired: print the generated intermediate representation'],
12
+ ];
13
+ function retiredFlagsPassed(options) {
14
+ return RETIRED_COMPILED_CHECK_FLAGS
15
+ .filter(([, key]) => options[key] !== undefined && options[key] !== false)
16
+ .map(([flags]) => flags.split(' ')[0]);
17
+ }
2
18
  export function registerFlowCommands(program) {
3
19
  const flow = program.command('flow').description('Build and check Flow artifacts.');
4
20
  flow.command('compile')
@@ -19,20 +35,18 @@ export function registerFlowCommands(program) {
19
35
  argv.push('--no-check');
20
36
  await invoke('flow compile', () => loadTool(import.meta.url, '../../compile-cli.js'), argv);
21
37
  });
22
- flow.command('check')
23
- .description('Check authored TypeScript or a compiled .flow artifact.')
24
- .argument('<input>', 'source or compiled artifact')
38
+ const check = flow.command('check')
39
+ .description('Check authored TypeScript. Check a compiled .flow with `uip maestro flow validate`.')
40
+ .argument('<input>', 'a .flow.ts path or bare name')
25
41
  .option('--source', 'check authored TypeScript')
26
- .option('--compiled', 'check the emitted artifact')
42
+ .addOption(retiredCompiledOption())
27
43
  .option('--library <dir>', 'connector library directory')
28
- .option('--connectors-local <dir>', 'connection-resolved connector overlay')
29
- .option('--json', 'print compiled-check diagnostics as JSON')
30
- .option('--uip', 'resolve missing schemas with the UiPath CLI')
31
- .option('--max-errors <count>', 'stop after this many compiled-check errors')
32
- .option('--script-determinism', 'check script blocks for non-deterministic calls')
33
- .option('--quiet', 'suppress warnings and information')
34
- .option('--debug-internal', 'include internal compile context')
35
- .option('--dump-ir', 'print the generated intermediate representation')
44
+ .option('--connectors-local <dir>', 'connection-resolved connector overlay');
45
+ // Hidden, not removed: scripts that pass these keep parsing.
46
+ for (const [flags, , description] of RETIRED_COMPILED_CHECK_FLAGS) {
47
+ check.addOption(new Option(flags, description).hideHelp());
48
+ }
49
+ check
36
50
  .action(async (input, options) => {
37
51
  if (emitOnlyEnabled()) {
38
52
  console.error('flow-sdk flow check: disabled by emit-only mode; use `uip maestro flow validate` or `uip maestro flow debug`');
@@ -49,6 +63,12 @@ export function registerFlowCommands(program) {
49
63
  return;
50
64
  }
51
65
  if (mode === 'source') {
66
+ const ignored = retiredFlagsPassed(options);
67
+ // Not under `--quiet`: a caller asking for less output (an older
68
+ // `uip` still forwards it) must not get a new line because of it.
69
+ if (ignored.length > 0 && options.quiet !== true) {
70
+ console.error(`flow-sdk flow check: ignoring ${ignored.join(', ')} (used only by the retired compiled check)`);
71
+ }
52
72
  const argv = [input];
53
73
  addValue(argv, '--library', options.library);
54
74
  addValue(argv, '--connectors-local', options.connectorsLocal);
@@ -1,3 +1,4 @@
1
+ import { Option } from 'commander';
1
2
  export type ToolRun = (argv: string[]) => Promise<number> | number;
2
3
  export declare function loadTool(baseUrl: string, relativePath: string): Promise<{
3
4
  run: ToolRun;
@@ -28,3 +29,8 @@ export declare function addValue(argv: string[], flag: string, value: unknown):
28
29
  export declare function emitOnlyEnabled(cwd?: string, env?: NodeJS.ProcessEnv): boolean;
29
30
  export type CheckMode = 'source' | 'compiled';
30
31
  export declare function inferCheckMode(family: 'flow' | 'case' | 'bpmn', input: string, source: boolean, compiled: boolean): CheckMode;
32
+ /**
33
+ * `--compiled` on `<family> check`: hidden from `--help`, still accepted so a
34
+ * script that passes it gets the redirect to `uip maestro <family> validate`.
35
+ */
36
+ export declare function retiredCompiledOption(): Option;
@@ -1,5 +1,6 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import { dirname, join, resolve } from 'node:path';
3
+ import { Option } from 'commander';
3
4
  export function loadTool(baseUrl, relativePath) {
4
5
  return import(new URL(relativePath, baseUrl).href);
5
6
  }
@@ -90,3 +91,10 @@ export function inferCheckMode(family, input, source, compiled) {
90
91
  }
91
92
  return source ? 'source' : compiled ? 'compiled' : inferred;
92
93
  }
94
+ /**
95
+ * `--compiled` on `<family> check`: hidden from `--help`, still accepted so a
96
+ * script that passes it gets the redirect to `uip maestro <family> validate`.
97
+ */
98
+ export function retiredCompiledOption() {
99
+ return new Option('--compiled', 'retired: a compiled artifact is checked by `uip maestro <family> validate`').hideHelp();
100
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.9.4",
3
+ "version": "6.9.5",
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",
@@ -87,5 +87,5 @@
87
87
  "@types/node": "^22.7.0",
88
88
  "esbuild": "^0.28.1"
89
89
  },
90
- "gitref": "ca9f8350a07eaf7ec145b315ad37e75e00a23049"
90
+ "gitref": "00c45d3d66df22a4df5cacf627baa308f7d43532"
91
91
  }