@uipath/packager-tool-flow 1.202.1 → 1.203.0-preview.160

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.
@@ -1,5 +1,21 @@
1
- import type { Workflow } from "@uipath/flow-core";
1
+ import type { Binding, Workflow } from "@uipath/flow-core";
2
2
  import type { IToolLogger } from "@uipath/solutionpackager-tool-core";
3
+ export declare function extractProcessGuid(nodeType: string): string;
4
+ /**
5
+ * Create process-style bindings (name + folderPath) for an RPA workflow,
6
+ * API workflow, agent process, or agent node from its registry manifest.
7
+ *
8
+ * Single source of truth for parsing `model.bindings.values` — both the flow
9
+ * packager (this file) and `flow-tool`'s node service consume this function so
10
+ * the object-vs-array shape handling cannot drift between the two packages.
11
+ */
12
+ export declare function createProcessBindings(manifest: {
13
+ nodeType: string;
14
+ model?: Record<string, unknown>;
15
+ }): {
16
+ nameBinding: Binding;
17
+ folderBinding: Binding;
18
+ };
3
19
  /**
4
20
  * Safety net: ensure every process/agent/connector-tool node in the workflow has
5
21
  * corresponding entries in the workflow `bindings` array and that `<bindings.*>`
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { type AgentInputLeaf, canonicalAgentInputPath, collectAgentInputLeaves, leafToBinding, SCHEMA_CONTAINER_MARKER, } from "./agent-input-encoding-utils.js";
2
2
  export { buildInlineAgentContract, type InlineAgentContract, } from "./agents.js";
3
+ export { createProcessBindings, ensureProcessBindings, extractProcessGuid, } from "./ensure-process-bindings.js";
3
4
  export { replaceExporterVersion } from "./exporter-version.js";
4
5
  export { createFlowRefResolver, type FlowIoLogger, migrateRawWorkflow, readFlowWorkflow, resolveAndMigrateWorkflow, resolveWorkflowRefs, } from "./flow-io.js";
5
6
  export { FlowTool } from "./flow-tool.js";
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  // package.json
33
33
  var package_default = {
34
34
  name: "@uipath/packager-tool-flow",
35
- version: "1.202.1",
35
+ version: "1.203.0-preview.160",
36
36
  description: "UiPath Flow tool implementation",
37
37
  type: "module",
38
38
  exports: {
@@ -68,22 +68,22 @@ var package_default = {
68
68
  files: [
69
69
  "dist"
70
70
  ],
71
- author: "",
71
+ author: "UiPath",
72
72
  license: "SEE LICENSE IN LICENSE.txt",
73
73
  peerDependencies: {
74
74
  "@uipath/filesystem": "workspace:*",
75
- "@uipath/flow-converter": "0.55.0-develop",
76
- "@uipath/flow-core": "0.96.0-develop",
77
- "@uipath/flow-migrations": "0.45.0-develop",
78
- "@uipath/flow-schema": "0.57.4-develop",
75
+ "@uipath/flow-converter": "0.69.3",
76
+ "@uipath/flow-core": "0.115.4-develop",
77
+ "@uipath/flow-migrations": "0.56.2",
78
+ "@uipath/flow-schema": "0.68.0",
79
79
  "@uipath/solutionpackager-tool-core": "workspace:*",
80
80
  "@uipath/tool-agent": "^2.0.0"
81
81
  },
82
82
  devDependencies: {
83
83
  "@types/node": "^25.5.2",
84
84
  "@uipath/filesystem": "workspace:*",
85
- "@uipath/flow-converter": "0.55.0-develop",
86
- "@uipath/flow-core": "0.96.0-develop",
85
+ "@uipath/flow-converter": "0.69.3",
86
+ "@uipath/flow-core": "0.115.4-develop",
87
87
  "@uipath/solutionpackager-tool-core": "workspace:*",
88
88
  "@uipath/tool-agent": "^2.0.0",
89
89
  "@vitest/browser": "^4.1.11",
@@ -207,6 +207,9 @@ function isProcessNode(nodeType) {
207
207
  function isConnectorToolNode(nodeType) {
208
208
  return nodeType?.startsWith(CONNECTOR_TOOL_PREFIX) ?? false;
209
209
  }
210
+ function isNodeDefinition(d) {
211
+ return typeof d.nodeType === "string";
212
+ }
210
213
  function extractProcessGuid(nodeType) {
211
214
  const match = nodeType.match(/^(?:uipath\.core\.rpa-workflow|uipath\.agent\.resource\.tool\.process|uipath\.core\.agent|uipath\.core\.api-workflow)\.([0-9a-f-]+)$/i);
212
215
  if (!match) {
@@ -217,8 +220,16 @@ function extractProcessGuid(nodeType) {
217
220
  function createProcessBindings(manifest) {
218
221
  const processGuid = extractProcessGuid(manifest.nodeType);
219
222
  const model = manifest.model;
220
- const processName = model?.bindings?.values?.name ?? "";
221
- const folderPath = model?.bindings?.values?.folderPath;
223
+ const rawValues = model?.bindings?.values;
224
+ let processName;
225
+ let folderPath;
226
+ if (Array.isArray(rawValues)) {
227
+ processName = rawValues.find((v) => v.propertyAttribute === "name")?.default ?? "";
228
+ folderPath = rawValues.find((v) => v.propertyAttribute === "folderPath")?.default;
229
+ } else {
230
+ processName = rawValues?.name ?? "";
231
+ folderPath = rawValues?.folderPath;
232
+ }
222
233
  if (folderPath == null) {
223
234
  throw new Error("Manifest is missing model.bindings.values.folderPath. " + "Cannot create process bindings without a folder path.");
224
235
  }
@@ -299,7 +310,7 @@ function resolveConnectorContextPlaceholders(context, storedConnection, storedFo
299
310
  }
300
311
  function ensureProcessBindings(workflow, logger) {
301
312
  const nodes = workflow.nodes ?? [];
302
- const definitions = workflow.definitions ?? [];
313
+ const definitions = (workflow.definitions ?? []).filter(isNodeDefinition);
303
314
  let bindingsCreated = 0;
304
315
  for (const node of nodes) {
305
316
  const nodeModel = node.model;
@@ -1033,6 +1044,9 @@ export {
1033
1044
  canonicalAgentInputPath,
1034
1045
  collectAgentInputLeaves,
1035
1046
  createFlowRefResolver,
1047
+ createProcessBindings,
1048
+ ensureProcessBindings,
1049
+ extractProcessGuid,
1036
1050
  hydrateInlineAgentInputVariables,
1037
1051
  isInlineAgentNodeType,
1038
1052
  isMaestroAutomateSentinel,
@@ -1052,4 +1066,4 @@ export {
1052
1066
  withRuntimeProfile
1053
1067
  };
1054
1068
 
1055
- //# debugId=836D4B4DD546E6ED64756E2164756E21
1069
+ //# debugId=7F0910BDD84B0EA064756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/packager-tool-flow",
3
- "version": "1.202.1",
3
+ "version": "1.203.0-preview.160",
4
4
  "description": "UiPath Flow tool implementation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -19,16 +19,16 @@
19
19
  "files": [
20
20
  "dist"
21
21
  ],
22
- "author": "",
22
+ "author": "UiPath",
23
23
  "license": "SEE LICENSE IN LICENSE.txt",
24
24
  "peerDependencies": {
25
- "@uipath/filesystem": "1.202.0",
26
- "@uipath/flow-converter": "0.55.0-develop",
27
- "@uipath/flow-core": "0.96.0-develop",
28
- "@uipath/flow-migrations": "0.45.0-develop",
29
- "@uipath/flow-schema": "0.57.4-develop",
30
- "@uipath/solutionpackager-tool-core": "1.202.0",
25
+ "@uipath/filesystem": "1.203.0",
26
+ "@uipath/flow-converter": "0.69.3",
27
+ "@uipath/flow-core": "0.115.4-develop",
28
+ "@uipath/flow-migrations": "0.56.2",
29
+ "@uipath/flow-schema": "0.68.0",
30
+ "@uipath/solutionpackager-tool-core": "1.203.0",
31
31
  "@uipath/tool-agent": "^2.0.0"
32
32
  },
33
- "gitHead": "851398a44b9231a9fd8ac913a24388151bd27692"
33
+ "gitHead": "3a42062ba731afca4595ba9aa8a80afc9667528d"
34
34
  }