@uipath/maestro-builder-sdk 6.99.0 → 6.101.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.
@@ -7,6 +7,7 @@
7
7
  * the platform emits, so the result passes `uip maestro flow validate`.
8
8
  */
9
9
  import { type ResourceResolutions } from './core/resource-resolution.js';
10
+ import type { NodeCatalog } from './core/node-catalog.js';
10
11
  import type { DefinitionReference } from './core/node-classes.js';
11
12
  import type { BuiltFlow } from './flow-sdk.js';
12
13
  import type { Library } from './library.js';
@@ -70,6 +71,14 @@ export interface SerializeOpts {
70
71
  * and are refused with the `prepare` command when it has none.
71
72
  */
72
73
  resources?: ResourceResolutions;
74
+ /**
75
+ * The node definitions `uip maestro flow registry pull` cached on this
76
+ * machine. A `rawNode` that omits `manifest` resolves its definition here by
77
+ * `nodeType` + `version`, and is refused (`RAW_NODE_MANIFEST_NOT_CACHED`)
78
+ * when the catalog has none. `uip maestro flow compile` and `check` pass the
79
+ * cache at `~/.uipath/nodes/index.json`; a programmatic caller passes its own.
80
+ */
81
+ nodeCatalog?: NodeCatalog;
73
82
  /**
74
83
  * Receives each {@link SerializeWarning}. `compile-cli` prints them as
75
84
  * `⚠ [CODE] …` after `check()`'s diagnostics; a caller that passes nothing
package/dist/serialize.js CHANGED
@@ -572,9 +572,12 @@ function refuseUnknownTrigger(spec, call) {
572
572
  * CONTRIBUTION_INVALID, so `check` reports it on the node and `compile` names
573
573
  * the code. An `internal SDK error:` is passed on as it is.
574
574
  */
575
- function contributionOf(node, requestedVersion, where) {
575
+ function contributionOf(node, requestedVersion, where, nodeCatalog) {
576
576
  try {
577
- return node.contribute(requestedVersion !== undefined ? { requestedVersion } : {});
577
+ return node.contribute({
578
+ ...(requestedVersion !== undefined ? { requestedVersion } : {}),
579
+ ...(nodeCatalog !== undefined ? { nodeCatalog } : {}),
580
+ });
578
581
  }
579
582
  catch (error) {
580
583
  if (error instanceof CompileRefusal || (error instanceof Error && error.message.startsWith('internal SDK error:')))
@@ -2013,7 +2016,7 @@ function serializeFlow(built, opts) {
2013
2016
  if (built.trigger !== undefined && !customTrigger)
2014
2017
  refuseUnknownTrigger(built.trigger, '.trigger()');
2015
2018
  if (customTrigger) {
2016
- const contribution = contributionOf(customTrigger, built.triggerOptions?.version, 'trigger');
2019
+ const contribution = contributionOf(customTrigger, built.triggerOptions?.version, 'trigger', opts.nodeCatalog);
2017
2020
  const def = resolveContributionDefinition(contribution.definition, built.triggerOptions?.version, 'trigger');
2018
2021
  const node = makeNode(def.nodeType, triggerId, built.triggerOptions?.label ?? def.display?.label ?? 'Start', { def, requestedVersion: built.triggerOptions?.version });
2019
2022
  const inputs = renderDeep(contribution.inputs ?? {}, NO_RENAME);
@@ -2058,7 +2061,7 @@ function serializeFlow(built, opts) {
2058
2061
  */
2059
2062
  function emitContribution(spec, stepName, requestedVersion, tails, scope, parentId) {
2060
2063
  const where = `step "${stepName}"`;
2061
- const contribution = contributionOf(spec, requestedVersion, where);
2064
+ const contribution = contributionOf(spec, requestedVersion, where, opts.nodeCatalog);
2062
2065
  const def = resolveContributionDefinition(contribution.definition, requestedVersion, where);
2063
2066
  // A connector definition reached this path only through a raw or hand-written
2064
2067
  // contribution — `connector()` never does — and would be emitted without
@@ -2970,7 +2973,7 @@ function serializeFlow(built, opts) {
2970
2973
  // no routable fan-out (a human task pinned to 1.0, a variant, an http
2971
2974
  // with no branches) must refuse rather than emit a node and then
2972
2975
  // discover it has one port. `stepExits` carries the reason.
2973
- const declaredExits = stepExits(step.spec, step.options?.version);
2976
+ const declaredExits = stepExits(step.spec, step.options?.version, opts.nodeCatalog);
2974
2977
  if (!hasExits(declaredExits)) {
2975
2978
  refuseOn(scope, step.name, new CompileRefusal('STEP_SWITCH_NO_EXITS', `.stepSwitch("${step.name}"): ${declaredExits.reason}, so there are no exits to route.`, declaredExits.suggestion));
2976
2979
  }
@@ -3500,7 +3503,7 @@ function serializeFlow(built, opts) {
3500
3503
  const epSpec = spec;
3501
3504
  let node;
3502
3505
  if (customEp) {
3503
- const contribution = contributionOf(customEp, requestedVersion, `entryPoint "${ep.id}"`);
3506
+ const contribution = contributionOf(customEp, requestedVersion, `entryPoint "${ep.id}"`, opts.nodeCatalog);
3504
3507
  const def = resolveContributionDefinition(contribution.definition, requestedVersion, `entryPoint "${ep.id}"`);
3505
3508
  node = makeNode(def.nodeType, ep.id, ep.options?.label ?? def.display?.label ?? ep.id, { def, requestedVersion });
3506
3509
  node.inputs = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.99.0",
3
+ "version": "6.101.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",
@@ -78,7 +78,13 @@
78
78
  "bpmn-merge-source",
79
79
  "flow-merge-source",
80
80
  "fetch-definitions",
81
- "bpmn-check-baseline"
81
+ "bpmn-check-baseline",
82
+ "capabilities-command",
83
+ "project-min-version",
84
+ "flow-check-baseline",
85
+ "flow-decompile-scripts",
86
+ "flow-script-metadata",
87
+ "flow-pipeline-strict"
82
88
  ],
83
89
  "files": [
84
90
  "dist",
@@ -115,5 +121,5 @@
115
121
  "@types/node": "^22.7.0",
116
122
  "esbuild": "^0.28.1"
117
123
  },
118
- "gitref": "a882a35fe0c0650eaf61789446cbcb6e5e245335"
124
+ "gitref": "a61a8ae8c2fc41973228083ad52eb07a55eb5893"
119
125
  }