@uipath/flow-tool 1.203.0-preview.205 → 1.204.0-preview.206

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.
Files changed (117) hide show
  1. package/README.md +4 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +237 -2
  3. package/dist/authoring-4kyzh1tf.js +23 -0
  4. package/dist/{binding-service-ft8mabkr.js → binding-service-815skxfx.js} +28 -30
  5. package/dist/{connector-service-qnpnwzpv.js → connector-service-xw4f8a7v.js} +34 -31
  6. package/dist/{conversion-FQTRFHRX-xh98wp2q.js → conversion-FQTRFHRX-1q7rk0te.js} +5 -5
  7. package/dist/{debug-conversation-trigger-fy19ygsm.js → debug-conversation-trigger-qdgvrekh.js} +14 -16
  8. package/dist/{debug-http-client-53qk6pc5.js → debug-http-client-s78gbtbn.js} +3 -3
  9. package/dist/{debug-service-nyk0s6mc.js → debug-service-0ppdzgzv.js} +4 -4
  10. package/dist/{edge-service-an71q4ry.js → edge-service-ttzfnxkf.js} +13 -14
  11. package/dist/{embedded-file-reader-0sjt4nkj.js → embedded-file-reader-v8c2yj2a.js} +2 -2
  12. package/dist/{flow-api-2phdajnk.js → flow-api-b7k5dtpm.js} +8 -8
  13. package/dist/{flow-debug-service-bnzgj53b.js → flow-debug-service-4we602jx.js} +38 -35
  14. package/dist/{flow-eval-node-target-2mjben3g.js → flow-eval-node-target-331vzbkw.js} +14 -15
  15. package/dist/{flow-eval-run-api-1bw5e0k4.js → flow-eval-run-api-yq18x5rb.js} +4 -4
  16. package/dist/{flow-eval-run-service-qv8j8fd1.js → flow-eval-run-service-36h1bnm8.js} +40 -37
  17. package/dist/{flow-eval-service-amd02ctw.js → flow-eval-service-ndtk9f9j.js} +19 -20
  18. package/dist/flow-init-sdk-source-9fy9p8ap.js +58 -0
  19. package/dist/{flow-init-service-rnygj5f8.js → flow-init-service-kwhbdtpc.js} +19 -18
  20. package/dist/{flow-io-hddhkve5.js → flow-io-pt392xct.js} +13 -14
  21. package/dist/{flow-migrate-service-e3hm99gp.js → flow-migrate-service-xvz8pbmp.js} +14 -15
  22. package/dist/{flow-pack-service-g8jebcts.js → flow-pack-service-wg1kt2bt.js} +72 -39
  23. package/dist/flow-validate-service-xbhrj47n.js +64 -0
  24. package/dist/{governance-fetcher-cswx2cw7.js → governance-fetcher-5yy89pfd.js} +6 -5
  25. package/dist/{headless-mmnrkzve.js → headless-1pdmae01.js} +2 -2
  26. package/dist/{hitl-service-a4fmjrzh.js → hitl-service-q2d39v5s.js} +13 -14
  27. package/dist/{index-3ts7y9d3.js → index-2s8rmmw6.js} +5 -3
  28. package/dist/index-3jpjaq1g.js +26 -0
  29. package/dist/{index-t5zedby6.js → index-41vyzws2.js} +59 -27
  30. package/dist/{index-b46bavh7.js → index-5yw15y73.js} +2 -2
  31. package/dist/{index-212q16sv.js → index-7qw3ttge.js} +416 -87
  32. package/dist/{index-t8e0ft8r.js → index-c1q6mnw1.js} +3 -3
  33. package/dist/{index-xa7gm52r.js → index-dqqg54v6.js} +601 -61
  34. package/dist/index.js +10 -10
  35. package/dist/init.d.ts +1 -1
  36. package/dist/init.js +19 -18
  37. package/dist/{input-reader-tw0j373f.js → input-reader-bv7kt19c.js} +2 -2
  38. package/dist/{known-types-b64as10y.js → known-types-jhyhnkt6.js} +4 -4
  39. package/dist/{maestro-automate-entry-pqy9xqm3.js → maestro-automate-entry-qak46eg0.js} +2 -2
  40. package/dist/node-2whm5wkf.js +4823 -0
  41. package/dist/{node-service-qnny15cm.js → node-service-js01ft95.js} +31 -30
  42. package/dist/{node-strategy-gc4sg6a2.js → node-strategy-fdnkvq4a.js} +1 -1
  43. package/dist/{node-sync-service-f1x1ak6q.js → node-sync-service-pb3m4dp2.js} +9 -9
  44. package/dist/{packager-tool-et7wj8kr.js → packager-tool-0w4es6rz.js} +2 -2
  45. package/dist/{packager-tool-dph5p2f5.js → packager-tool-1mnq1c97.js} +1 -1
  46. package/dist/packager-tool-225z77w9.js +52 -0
  47. package/dist/{packager-tool-de2txaxx.js → packager-tool-2hzsf1rc.js} +5 -5
  48. package/dist/{packager-tool-vbser1d9.js → packager-tool-2qr8z5ke.js} +4 -4
  49. package/dist/{packager-tool-0egkaa38.js → packager-tool-32czz9mq.js} +2 -2
  50. package/dist/{packager-tool-0v3s8r01.js → packager-tool-3h2ktz6q.js} +2 -2
  51. package/dist/{packager-tool-h9d8c9rf.js → packager-tool-4zdhy0c3.js} +2 -2
  52. package/dist/{packager-tool-afd1wwf2.js → packager-tool-53c81nnr.js} +440 -29
  53. package/dist/{packager-tool-2c688mdj.js → packager-tool-57fak54h.js} +4 -4
  54. package/dist/{packager-tool-qa2xzxez.js → packager-tool-59s95scr.js} +1 -1
  55. package/dist/{packager-tool-n8p9cay6.js → packager-tool-6azk3rex.js} +1 -1
  56. package/dist/{packager-tool-26ydwf12.js → packager-tool-6h69pd2a.js} +23 -8
  57. package/dist/{packager-tool-mnrbdn6a.js → packager-tool-6scjsgh6.js} +55 -17
  58. package/dist/{packager-tool-xzf4xc65.js → packager-tool-70cta0be.js} +4 -4
  59. package/dist/{packager-tool-tw3j5h3z.js → packager-tool-8hj7w7em.js} +5 -5
  60. package/dist/{packager-tool-795gzq9k.js → packager-tool-8pmgk4f6.js} +1 -1
  61. package/dist/{packager-tool-321a1806.js → packager-tool-8vmx4j2w.js} +1 -1
  62. package/dist/{packager-tool-cnftzx4c.js → packager-tool-a6ph7149.js} +40 -11
  63. package/dist/{packager-tool-s0mzv3sx.js → packager-tool-aw60v0et.js} +1 -1
  64. package/dist/{packager-tool-e89k4pjj.js → packager-tool-c0rtxezv.js} +1 -1
  65. package/dist/{packager-tool-1w4f09cq.js → packager-tool-d0ny3x3b.js} +141 -96
  66. package/dist/{packager-tool-gzpvdcnw.js → packager-tool-da1cmt0q.js} +2 -2
  67. package/dist/{packager-tool-p8j4zvrq.js → packager-tool-dp8vjby4.js} +4829 -1364
  68. package/dist/packager-tool-e5hj89zm.js +6 -0
  69. package/dist/{packager-tool-fwp34rqp.js → packager-tool-ev80vk13.js} +8 -8
  70. package/dist/{packager-tool-gctpkdzs.js → packager-tool-hhy1gr2k.js} +1 -1
  71. package/dist/{packager-tool-sf9f6jft.js → packager-tool-hygq2wy6.js} +1 -1
  72. package/dist/{packager-tool-0v3tzseq.js → packager-tool-jeb6xmgw.js} +2 -2
  73. package/dist/packager-tool-krzxg3ga.js +804 -0
  74. package/dist/{packager-tool-1r5dnt9q.js → packager-tool-mv4jav1h.js} +1 -1
  75. package/dist/{packager-tool-pppzgwfw.js → packager-tool-n4vdjmjx.js} +18079 -18079
  76. package/dist/{packager-tool-t9c77psy.js → packager-tool-p1tb6d4f.js} +955 -150
  77. package/dist/{packager-tool-gs28y1eq.js → packager-tool-qhhrq12s.js} +2 -2
  78. package/dist/{packager-tool-6k8s7pt9.js → packager-tool-r7xy9sew.js} +1090 -545
  79. package/dist/{packager-tool-b1xs6aty.js → packager-tool-stq8800d.js} +902 -897
  80. package/dist/{packager-tool-61r38k4d.js → packager-tool-t57d6pzz.js} +320 -200
  81. package/dist/{packager-tool-a7t9v5ss.js → packager-tool-v9v9ch04.js} +2 -2
  82. package/dist/{packager-tool-cdn59g60.js → packager-tool-ve5t7317.js} +2 -2
  83. package/dist/{packager-tool-yxv9mm8s.js → packager-tool-vtaqtf7f.js} +10 -10
  84. package/dist/{packager-tool-t39edv0g.js → packager-tool-w3dy6vnj.js} +184 -193
  85. package/dist/{packager-tool-9kx94sj5.js → packager-tool-x5qafkb7.js} +2 -2
  86. package/dist/{packager-tool-s841bbkr.js → packager-tool-yednpbbw.js} +2 -2
  87. package/dist/{packager-tool-yxnepq2j.js → packager-tool-ysbskrta.js} +1 -1
  88. package/dist/packager-tool-zgsvggdr.js +50 -0
  89. package/dist/packager-tool.js +12 -13
  90. package/dist/{serialization-BXU6AKAN-rhgmwp06.js → serialization-BXU6AKAN-c2ge8yvb.js} +5 -5
  91. package/dist/services/flow-init-sdk-source.d.ts +28 -0
  92. package/dist/services/flow-init-service.d.ts +25 -0
  93. package/dist/services/inline-activity-service.d.ts +135 -0
  94. package/dist/services/node-service.d.ts +14 -0
  95. package/dist/services/node-validators/index.d.ts +2 -0
  96. package/dist/services/node-validators/inline-activity-validator.d.ts +18 -0
  97. package/dist/services/node-validators/types.d.ts +6 -0
  98. package/dist/services/node-validators/unresolved-binding-placeholder-validator.d.ts +2 -0
  99. package/dist/services/preview-id-rule.d.ts +33 -0
  100. package/dist/services/ui-only-node-types.d.ts +1 -0
  101. package/dist/{shared-utils-wv356cvj.js → shared-utils-9vfmrxtx.js} +2 -2
  102. package/dist/{packager-tool-es0a755k.js → tidy-service-q2wwwans.js} +33 -7
  103. package/dist/tool.js +10 -10
  104. package/dist/utils/flow-io.d.ts +3 -16
  105. package/dist/validation.js +35 -36
  106. package/dist/{variable-service-bc7920kx.js → variable-service-nm9fdwsw.js} +13 -14
  107. package/dist/{wait-for-flow-job-v0njb0dk.js → wait-for-flow-job-yzyamptd.js} +8 -8
  108. package/package.json +2 -2
  109. package/dist/authoring-tv4dh80p.js +0 -360
  110. package/dist/flow-validate-service-x9dtdrc7.js +0 -65
  111. package/dist/node-xdgxafqs.js +0 -15600
  112. package/dist/packager-tool-2513jrxr.js +0 -898
  113. package/dist/packager-tool-5kt8tsq4.js +0 -85
  114. package/dist/packager-tool-w0kr4mbc.js +0 -996
  115. package/dist/services/tidy-service.d.ts +0 -26
  116. package/dist/tidy-service-8y2tjmb5.js +0 -39
  117. /package/dist/{localization-y790z9vm.js → localization-xecwjpe2.js} +0 -0
@@ -5,10 +5,10 @@ import {
5
5
  registerFlowMigrationsI18n,
6
6
  runtimeMigrations,
7
7
  runtimeVersion
8
- } from "./packager-tool-afd1wwf2.js";
8
+ } from "./packager-tool-53c81nnr.js";
9
9
  import {
10
10
  instance
11
- } from "./packager-tool-pppzgwfw.js";
11
+ } from "./packager-tool-n4vdjmjx.js";
12
12
 
13
13
  // src/services/flow-migration-check.ts
14
14
  if (!instance.isInitialized) {
@@ -10,7 +10,7 @@ import {
10
10
  require_ajv,
11
11
  require_dist,
12
12
  require_index_cjs
13
- } from "./packager-tool-pppzgwfw.js";
13
+ } from "./packager-tool-n4vdjmjx.js";
14
14
  import {
15
15
  __toESM
16
16
  } from "./packager-tool-1yh8g550.js";
@@ -0,0 +1,50 @@
1
+ import {
2
+ UI_ONLY_NODE_TYPES
3
+ } from "./packager-tool-e5hj89zm.js";
4
+
5
+ // src/services/preview-id-rule.ts
6
+ function previewIdIssues(graph) {
7
+ const issues = [];
8
+ for (const node of graph.nodes ?? []) {
9
+ if (UI_ONLY_NODE_TYPES.has(node.type ?? ""))
10
+ continue;
11
+ if (node.id.startsWith("preview")) {
12
+ issues.push({
13
+ path: `nodes[${node.id}].id`,
14
+ message: `Node ID "${node.id}" starts with "preview", which the BPMN converter reserves: the node is left out of the packed flow and "flow pack" / "flow debug" fail. Rename the node so its ID does not start with "preview", and update its edges and $vars references.`,
15
+ severity: "error"
16
+ });
17
+ }
18
+ }
19
+ for (const edge of graph.edges ?? []) {
20
+ if (edge.id.startsWith("preview")) {
21
+ issues.push({
22
+ path: `edges[${edge.id}].id`,
23
+ message: `Edge ID "${edge.id}" starts with "preview", which the BPMN converter reserves: the edge is left out of the packed flow. Rename the edge so its ID does not start with "preview".`,
24
+ severity: "error"
25
+ });
26
+ }
27
+ }
28
+ return issues;
29
+ }
30
+ function assertNoPreviewIds(workflow) {
31
+ const subflows = workflow.subflows ?? {};
32
+ const issues = [
33
+ ...previewIdIssues(workflow),
34
+ ...Object.entries(subflows).flatMap(([subflowId, graph]) => previewIdIssues(graph).map((issue) => ({
35
+ ...issue,
36
+ path: `subflows[${subflowId}].${issue.path}`
37
+ })))
38
+ ];
39
+ if (issues.length === 0)
40
+ return;
41
+ throw new Error([
42
+ "The flow cannot be converted to BPMN:",
43
+ ...issues.map((issue) => ` - [${issue.path}] ${issue.message}`)
44
+ ].join(`
45
+ `));
46
+ }
47
+
48
+ export { previewIdIssues, assertNoPreviewIds };
49
+
50
+ //# debugId=68C64DCF11797BEA64756E2164756E21
@@ -1,29 +1,28 @@
1
1
  import {
2
2
  registerPackagerFactories
3
- } from "./packager-tool-tw3j5h3z.js";
4
- import"./packager-tool-w0kr4mbc.js";
5
- import"./packager-tool-afd1wwf2.js";
6
- import"./packager-tool-n8p9cay6.js";
7
- import"./packager-tool-gctpkdzs.js";
8
- import"./packager-tool-2513jrxr.js";
9
- import"./packager-tool-b1xs6aty.js";
3
+ } from "./packager-tool-8hj7w7em.js";
4
+ import"./packager-tool-53c81nnr.js";
5
+ import"./packager-tool-6azk3rex.js";
6
+ import"./packager-tool-hhy1gr2k.js";
7
+ import"./packager-tool-stq8800d.js";
10
8
  import"./packager-tool-nkrmjr3a.js";
11
- import"./packager-tool-sf9f6jft.js";
9
+ import"./packager-tool-hygq2wy6.js";
12
10
  import"./packager-tool-rs6jm14d.js";
13
11
  import"./packager-tool-hk1gxnth.js";
14
12
  import"./packager-tool-7q6z6npd.js";
15
13
  import"./packager-tool-sc961w0q.js";
16
- import"./packager-tool-et7wj8kr.js";
17
- import"./packager-tool-qa2xzxez.js";
14
+ import"./packager-tool-0w4es6rz.js";
15
+ import"./packager-tool-59s95scr.js";
18
16
  import"./packager-tool-gbgfwx8f.js";
19
17
  import"./packager-tool-d88rqwk8.js";
20
18
  import"./packager-tool-jysvpt8p.js";
21
- import"./packager-tool-yxnepq2j.js";
19
+ import"./packager-tool-ysbskrta.js";
22
20
  import"./packager-tool-p79yh9ww.js";
23
- import"./packager-tool-pppzgwfw.js";
21
+ import"./packager-tool-n4vdjmjx.js";
24
22
  import"./packager-tool-z83pga0z.js";
25
23
  import"./packager-tool-6ejqwbw9.js";
26
24
  import"./packager-tool-mcaf4ewf.js";
25
+ import"./packager-tool-3h2ktz6q.js";
27
26
  import"./packager-tool-4mna26cc.js";
28
27
  import"./packager-tool-c23zrhj8.js";
29
28
  import"./packager-tool-1yh8g550.js";
@@ -31,4 +30,4 @@ export {
31
30
  registerPackagerFactories
32
31
  };
33
32
 
34
- //# debugId=B0A3287E0D3F4EA464756E2164756E21
33
+ //# debugId=5B900B4F04A289AE64756E2164756E21
@@ -3,7 +3,7 @@ import {
3
3
  IDP_PROCESSOR_BINDING_RESOURCE,
4
4
  isContainerNodeManifest,
5
5
  readIdpProcessorKey
6
- } from "./packager-tool-e89k4pjj.js";
6
+ } from "./packager-tool-c0rtxezv.js";
7
7
  import {
8
8
  require_lib
9
9
  } from "./packager-tool-zfrp8ecz.js";
@@ -45,7 +45,7 @@ import {
45
45
  transformExpression,
46
46
  transformNodeExpressions,
47
47
  unwrapScriptBody
48
- } from "./packager-tool-et7wj8kr.js";
48
+ } from "./packager-tool-0w4es6rz.js";
49
49
  import {
50
50
  FIRE_AND_FORGET_INPUT,
51
51
  IN_FILTER_OPERATOR,
@@ -77,7 +77,7 @@ import {
77
77
  stripVarsPrefix,
78
78
  toEngineRefPath,
79
79
  toFilterModel
80
- } from "./packager-tool-qa2xzxez.js";
80
+ } from "./packager-tool-59s95scr.js";
81
81
  import"./packager-tool-gbgfwx8f.js";
82
82
  import {
83
83
  BINDINGS_PATH_PREFIX,
@@ -123,11 +123,11 @@ import {
123
123
  resolveDoWhileLimit,
124
124
  supportsVariableUpdates,
125
125
  validateRelatedPaths
126
- } from "./packager-tool-yxnepq2j.js";
126
+ } from "./packager-tool-ysbskrta.js";
127
127
  import {
128
128
  createI18nRegistrar
129
129
  } from "./packager-tool-p79yh9ww.js";
130
- import"./packager-tool-pppzgwfw.js";
130
+ import"./packager-tool-n4vdjmjx.js";
131
131
  import"./packager-tool-z83pga0z.js";
132
132
  import {
133
133
  init_esm_shims
@@ -0,0 +1,28 @@
1
+ /** Why seeding failed, for the caller's error. */
2
+ export interface SdkSourceFailure {
3
+ message: string;
4
+ instructions: string;
5
+ }
6
+ /** What the preflight found: an explicit target, or none for the default. */
7
+ export interface SdkSourcePreflight {
8
+ /** Absolute explicit target; absent means `<projectDir>/.flow-sdk/<name>.flow.ts`. */
9
+ target?: string;
10
+ }
11
+ /**
12
+ * Fail before anything is scaffolded when `--sdk-source` cannot succeed: the
13
+ * builder SDK is missing or too old, or an explicit target exists and
14
+ * `--force` was not given.
15
+ */
16
+ export declare function checkSdkSource(baseDir: string, sdkSource: string | true, force: boolean | undefined): Promise<SdkSourcePreflight>;
17
+ /**
18
+ * Decompile the freshly written trigger-only `.flow` into `target`, creating
19
+ * its folder first. Returns `true`, or why it failed.
20
+ */
21
+ export declare function seedSdkSource(baseDir: string, flowFile: string, target: string): Promise<true | SdkSourceFailure>;
22
+ /**
23
+ * Quote a path for the POSIX-shell recovery command `init` prints. Plain
24
+ * paths stay bare; anything else goes in double quotes with the characters
25
+ * a POSIX shell still expands there escaped, so `/work/My Shop` stays one
26
+ * argument.
27
+ */
28
+ export declare function shellQuote(value: string): string;
@@ -26,6 +26,17 @@ export interface FlowInitOptions {
26
26
  * values are the enum's.
27
27
  */
28
28
  profile?: "Lite" | "Standard";
29
+ /**
30
+ * When set (`--sdk-source [file]`), also seed the builder-SDK source: the
31
+ * new `<name>.flow` is decompiled into a `.flow.ts`, creating its folder.
32
+ * `true` writes `<projectDir>/.flow-sdk/<name>.flow.ts`, inside the
33
+ * project, so each Flow project in a solution keeps its own work
34
+ * directory (pack, upload and debug leave `.flow-sdk/` out). A string is
35
+ * an explicit path, resolved against `cwd`. The seed carries the flow id
36
+ * and name `init` just assigned, so it replaces a separate
37
+ * `uip maestro flow decompile <name>.flow -o <file> --no-pipeline` call.
38
+ */
39
+ sdkSource?: string | true;
29
40
  }
30
41
  /**
31
42
  * Inlined mirror of solution-sdk's `ProjectSolutionRegistration`, kept local so the
@@ -63,6 +74,20 @@ export interface FlowInitResult {
63
74
  * project was already registered or wasn't registered in a solution at all.
64
75
  */
65
76
  projectArtifacts?: ProjectArtifactsResult;
77
+ /** Absolute path to the seeded `.flow.ts`, when `sdkSource` was set. */
78
+ sdkSource?: string;
79
+ }
80
+ /**
81
+ * The project was scaffolded, but seeding the builder-SDK source failed.
82
+ *
83
+ * Separate from a scaffold failure because the project now exists on disk:
84
+ * the remedy is to seed the source, not to re-run `init`.
85
+ */
86
+ export declare class FlowInitSdkSourceError extends Error {
87
+ readonly instructions: string;
88
+ readonly projectDir: string;
89
+ readonly flowFile: string;
90
+ constructor(message: string, instructions: string, projectDir: string, flowFile: string);
66
91
  }
67
92
  /**
68
93
  * Programmatic core of `uip maestro flow init`: scaffolds `project.uiproj` + `<name>.flow`
@@ -0,0 +1,135 @@
1
+ import type { NodeManifest } from "@uipath/flow-core";
2
+ /**
3
+ * Non-catalog ("inline") v4 activities.
4
+ *
5
+ * A catalog activity is registered in Integration Service and Studio's
6
+ * TypeCache, so `node add` can fetch its definition from the registry and
7
+ * `node configure` can fetch its metadata live. A non-catalog activity exists
8
+ * only as the files `uip is activities metadata generate` and
9
+ * `uip is activities script update` produced: `<Name>.json` (the v4 activity
10
+ * metadata) and one `<scriptRef>.js` per action or lookup script. Nothing on
11
+ * the tenant knows it, so everything the flow node needs is built here from
12
+ * those files and embedded in the `.flow`:
13
+ *
14
+ * - the `definitions[]` entry (the node manifest the registry would have
15
+ * returned), built to the same shape flow-core builds for catalog
16
+ * connector nodes;
17
+ * - `inputs.inlineActivityConfiguration`, carrying the metadata verbatim,
18
+ * the main action's `scriptRef`, and the script sources by ref;
19
+ * - `inputs.detail.activityContext.source = "inline"`, written by
20
+ * `node configure`, which is how the runtime knows to read the activity
21
+ * from the node instead of the catalog.
22
+ *
23
+ * Node type: `uipath.connector.custom.<connector-key>.<slug>`. The `custom`
24
+ * segment marks a non-catalog activity; flow-schema's node-type parser is
25
+ * learning it separately, and nothing in this tool parses the type beyond
26
+ * the prefix.
27
+ */
28
+ export declare const INLINE_ACTIVITY_TYPE_PREFIX = "uipath.connector.custom.";
29
+ export declare const INLINE_ACTIVITY_SOURCE = "inline";
30
+ export declare const INLINE_ACTIVITY_VERSION = "4.0.0";
31
+ /** Thrown for an input problem the author can fix; carries the fix. */
32
+ export declare class InlineActivityError extends Error {
33
+ readonly code = "InlineActivityInvalid";
34
+ readonly instructions: string;
35
+ constructor(message: string, instructions: string);
36
+ }
37
+ type Bag = Record<string, unknown>;
38
+ /** The one verb slot of a v4 activity, as `metadata generate` writes it. */
39
+ export interface InlineActivityVerbSlot {
40
+ operation: string;
41
+ method: string;
42
+ path: string;
43
+ scriptRef: string;
44
+ description?: string;
45
+ parameters?: Array<Bag & {
46
+ reference?: Bag;
47
+ }>;
48
+ }
49
+ /**
50
+ * The generated `<Name>.json`, typed only as far as this module reads it.
51
+ * Structurally it is also the `ISMetadata` shape `node configure` consumes
52
+ * (`metadata.method.<VERB>` and `fields`), which is why the configure path
53
+ * can use it in place of a fetched copy.
54
+ */
55
+ export interface InlineActivityMetadata {
56
+ name: string;
57
+ displayName?: string;
58
+ description?: string;
59
+ elementKey: string;
60
+ path: string;
61
+ metadata: {
62
+ primaryKey?: string[];
63
+ method: Record<string, InlineActivityVerbSlot>;
64
+ };
65
+ fields?: Record<string, Bag & {
66
+ reference?: Bag;
67
+ }>;
68
+ }
69
+ /** What `inputs.inlineActivityConfiguration` carries. */
70
+ export interface InlineActivityConfiguration {
71
+ metadata: InlineActivityMetadata;
72
+ scriptRef: string;
73
+ scripts: Record<string, string>;
74
+ }
75
+ export interface InlineActivityInput {
76
+ /** Path to the generated activity metadata (`<Name>.json`). */
77
+ metadataFile: string;
78
+ /** Directory holding `<scriptRef>.js` for the action and every lookup. */
79
+ scriptsDir: string;
80
+ }
81
+ export interface PreparedInlineActivity {
82
+ manifest: NodeManifest;
83
+ configuration: InlineActivityConfiguration;
84
+ connectorKey: string;
85
+ }
86
+ /** `uipath.connector.custom.<connector-key>.<slug>` → its two parts. */
87
+ export declare function parseInlineActivityNodeType(nodeType: string): {
88
+ connectorKey: string;
89
+ slug: string;
90
+ };
91
+ /** Read and shape-check the generated `<Name>.json`. */
92
+ export declare function readInlineActivityMetadata(metadataFile: string): Promise<InlineActivityMetadata>;
93
+ /** The single verb slot and its key. */
94
+ export declare function verbSlotOf(metadata: InlineActivityMetadata): {
95
+ verb: string;
96
+ slot: InlineActivityVerbSlot;
97
+ };
98
+ /**
99
+ * Every script the activity needs: the main action first, then each lookup
100
+ * referenced by a parameter or field, in order of appearance, deduplicated.
101
+ */
102
+ export declare function collectScriptRefs(metadata: InlineActivityMetadata): {
103
+ main: string;
104
+ lookups: string[];
105
+ };
106
+ /** Read `<dir>/<ref>.js` for every ref; a missing one is an error naming it. */
107
+ export declare function readInlineScripts(scriptsDir: string, refs: string[]): Promise<Record<string, string>>;
108
+ /**
109
+ * The `definitions[]` entry for a non-catalog activity, in the shape flow-core
110
+ * builds for a catalog connector node (see `createConnectorNodeManifest` in
111
+ * `@uipath/flow-core`) so that `node configure`, `flow validate` and the
112
+ * BPMN converter read it the same way.
113
+ */
114
+ export declare function buildInlineActivityDefinition(args: {
115
+ nodeType: string;
116
+ connectorKey: string;
117
+ metadata: InlineActivityMetadata;
118
+ /** Placeholder until TypeCache (or a published formula) supplies the real id. */
119
+ activityTypeId: string;
120
+ }): NodeManifest;
121
+ /**
122
+ * Read the metadata and scripts for a non-catalog activity and build what
123
+ * `node add` embeds: the definition and `inputs.inlineActivityConfiguration`.
124
+ */
125
+ export declare function prepareInlineActivity(nodeType: string, input: InlineActivityInput): Promise<PreparedInlineActivity>;
126
+ /** The embedded configuration of a node, when it is a non-catalog activity. */
127
+ export declare function getInlineActivityConfiguration(node: {
128
+ inputs?: Record<string, unknown>;
129
+ }): InlineActivityConfiguration | undefined;
130
+ /**
131
+ * `connectorDetail.configuration` of an embedded definition, parsed — used to
132
+ * tell a re-add of the same activity from a clash with different metadata.
133
+ */
134
+ export declare function definitionConfigurationOf(definition: Record<string, unknown>): string | undefined;
135
+ export {};
@@ -1,5 +1,7 @@
1
1
  import type { NodeInstance, Workflow } from "@uipath/flow-core";
2
2
  import { type ConnectorInfo } from "@uipath/maestro-sdk";
3
+ import { type InlineActivityInput } from "./inline-activity-service.js";
4
+ export { InlineActivityError } from "./inline-activity-service.js";
3
5
  /**
4
6
  * Thrown when a node type is genuinely absent from the SDK bundle and the
5
7
  * tenant manifest — i.e. a typo or a removed node.
@@ -64,6 +66,13 @@ export interface AddNodeOptions {
64
66
  * See UV-14489.
65
67
  */
66
68
  parent?: string;
69
+ /**
70
+ * Non-catalog (inline) v4 activity: build the definition from the
71
+ * generated activity metadata and embed the scripts, instead of fetching
72
+ * the definition from the registry. The node type must be
73
+ * `uipath.connector.custom.<connector-key>.<slug>`.
74
+ */
75
+ inlineActivity?: InlineActivityInput;
67
76
  }
68
77
  export interface AddNodeResult {
69
78
  node: NodeInstance;
@@ -71,6 +80,11 @@ export interface AddNodeResult {
71
80
  bindingsCreated: number;
72
81
  variableCount: number;
73
82
  connectorInfo?: ConnectorInfo;
83
+ /** Set for a non-catalog activity: the main action and the embedded scripts. */
84
+ inlineActivity?: {
85
+ scriptRef: string;
86
+ scripts: string[];
87
+ };
74
88
  }
75
89
  export interface DeleteNodeResult {
76
90
  deletedNode: NodeSummary;
@@ -5,10 +5,12 @@ export { ceqlQueryValidator, findCeqlFilterIssues, lexCeqlFilterValue, } from ".
5
5
  export { connectorNodeValidator } from "./connector-validator.js";
6
6
  export { crossNodeBindingValidator, findCrossNodeBindingReferences, scanDetailForCrossNodeBindings, } from "./cross-node-binding-validator.js";
7
7
  export { expressionPrefixValidator } from "./expression-prefix-validator.js";
8
+ export { inlineActivityValidator } from "./inline-activity-validator.js";
8
9
  export { ixpNodeValidator } from "./ixp-node-validator.js";
9
10
  export { jsExpressionSyntaxValidator } from "./js-expression-syntax-validator.js";
10
11
  export { modelSourceValidator } from "./model-source-validator.js";
11
12
  export type { FlowNodeValidator, FlowValidatorContext, FlowValidatorNode, ValidationIssue, ValidationIssueSeverity, } from "./types.js";
13
+ export { unresolvedBindingPlaceholderValidator } from "./unresolved-binding-placeholder-validator.js";
12
14
  /**
13
15
  * Validators applied by default in `FlowValidateService`. Downstream tools
14
16
  * can extend this via `FlowValidateOptions.extraNodeValidators`.
@@ -0,0 +1,18 @@
1
+ import type { FlowNodeValidator } from "./types.js";
2
+ /**
3
+ * A non-catalog (inline) v4 activity node carries its whole activity:
4
+ * `inputs.inlineActivityConfiguration` holds the metadata, the main action's
5
+ * `scriptRef` and every script by ref, and `inputs.detail.activityContext`
6
+ * tells the runtime to read it from there. Nothing on the tenant can catch a
7
+ * gap between those parts, so this does, offline:
8
+ *
9
+ * - a `uipath.connector.custom.*` node must carry the configuration, and a
10
+ * node carrying it must have that type;
11
+ * - the main `scriptRef` and every lookup `reference.scriptRef` in the
12
+ * metadata must have a script source under `scripts`;
13
+ * - once configured, `activityContext` must say `source: "inline"` and name
14
+ * the same `scriptRef` — the two are written by different commands.
15
+ *
16
+ * Severity: error. Every issue here is a node the runtime cannot execute.
17
+ */
18
+ export declare const inlineActivityValidator: FlowNodeValidator;
@@ -49,6 +49,12 @@ export interface FlowValidatorContext {
49
49
  * it to `"error"`. Optional for the same reason as `nodeIds`.
50
50
  */
51
51
  strictBindings?: boolean;
52
+ /**
53
+ * The flow's top-level `bindings[]` — what `<bindings.{name}>` placeholders
54
+ * resolve against (see `unresolved-binding-placeholder-validator.ts`).
55
+ * Optional for the same reason as `nodeIds`.
56
+ */
57
+ bindings?: ReadonlyArray<Record<string, unknown>>;
52
58
  }
53
59
  export interface FlowNodeValidator {
54
60
  /** Stable identifier for logging / telemetry. */
@@ -0,0 +1,2 @@
1
+ import type { FlowNodeValidator } from "./types.js";
2
+ export declare const unresolvedBindingPlaceholderValidator: FlowNodeValidator;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Reserved "preview" id prefix (UV-16830).
3
+ *
4
+ * The flow→BPMN serializer in @uipath/flow-converter skips every node and
5
+ * edge whose id starts with "preview" (meant for the canvas's drag-preview
6
+ * placeholder). A user node with such an id — `node add --label "Preview
7
+ * End"` generates `previewEnd1` — is dropped from the BPMN, while edges into
8
+ * it are kept, so `flow pack`/`flow debug` crash in toXml with "Cannot read
9
+ * properties of undefined (reading 'di')". `flow validate` (and so `flow
10
+ * pack`) reports it through `previewIdIssues`; the debug and eval paths call
11
+ * `assertNoPreviewIds` right before converting. Remove both once the
12
+ * converter matches the canvas's exact preview ids.
13
+ */
14
+ import type { Workflow } from "@uipath/flow-core";
15
+ import type { ValidationIssue } from "./node-validators/types.js";
16
+ interface PreviewIdGraph {
17
+ nodes?: {
18
+ id: string;
19
+ type?: string;
20
+ }[];
21
+ edges?: {
22
+ id: string;
23
+ }[];
24
+ }
25
+ /** Issues for one graph (root or a single subflow), paths unprefixed. */
26
+ export declare function previewIdIssues(graph: PreviewIdGraph): ValidationIssue[];
27
+ /**
28
+ * Throw before conversion when the root graph or any subflow has a reserved
29
+ * id, so `flow debug` / eval runs fail with a rename hint instead of the
30
+ * converter's `reading 'di'` crash (or, for an edge, a silently dropped path).
31
+ */
32
+ export declare function assertNoPreviewIds(workflow: Workflow): void;
33
+ export {};
@@ -0,0 +1 @@
1
+ export declare const UI_ONLY_NODE_TYPES: Set<string>;
@@ -6,8 +6,8 @@ import {
6
6
  } from "./packager-tool-eypvc2kv.js";
7
7
  import {
8
8
  readStdin
9
- } from "./packager-tool-6k8s7pt9.js";
10
- import"./packager-tool-0v3s8r01.js";
9
+ } from "./packager-tool-r7xy9sew.js";
10
+ import"./packager-tool-3h2ktz6q.js";
11
11
  import"./packager-tool-1yh8g550.js";
12
12
  export {
13
13
  VALID_PACKAGE_NAME_REGEX,
@@ -2,20 +2,46 @@ import {
2
2
  enableErrorHandlingForErrorEdges,
3
3
  expandHandleIds
4
4
  } from "./packager-tool-1frs4sr4.js";
5
+ import {
6
+ UI_ONLY_NODE_TYPES
7
+ } from "./packager-tool-e5hj89zm.js";
5
8
  import {
6
9
  readFlowWorkflow,
7
10
  writeFlowWorkflow
8
- } from "./packager-tool-5kt8tsq4.js";
11
+ } from "./packager-tool-225z77w9.js";
12
+ import"./packager-tool-53c81nnr.js";
9
13
  import {
10
14
  DEFAULT_LAYOUT_OPTIONS,
11
15
  GRID_SPACING,
12
16
  resolveHeight,
13
17
  resolveWidth,
14
18
  snapToGrid
15
- } from "./packager-tool-n8p9cay6.js";
19
+ } from "./packager-tool-6azk3rex.js";
20
+ import"./packager-tool-hhy1gr2k.js";
21
+ import"./packager-tool-stq8800d.js";
22
+ import"./packager-tool-nkrmjr3a.js";
16
23
  import {
17
24
  generateNodeVariables
18
- } from "./packager-tool-sf9f6jft.js";
25
+ } from "./packager-tool-hygq2wy6.js";
26
+ import"./packager-tool-rs6jm14d.js";
27
+ import"./packager-tool-hk1gxnth.js";
28
+ import"./packager-tool-7q6z6npd.js";
29
+ import"./packager-tool-sc961w0q.js";
30
+ import"./packager-tool-0w4es6rz.js";
31
+ import"./packager-tool-59s95scr.js";
32
+ import"./packager-tool-gbgfwx8f.js";
33
+ import"./packager-tool-d88rqwk8.js";
34
+ import"./packager-tool-jysvpt8p.js";
35
+ import"./packager-tool-ysbskrta.js";
36
+ import"./packager-tool-p79yh9ww.js";
37
+ import"./packager-tool-n4vdjmjx.js";
38
+ import"./packager-tool-z83pga0z.js";
39
+ import"./packager-tool-6ejqwbw9.js";
40
+ import"./packager-tool-mcaf4ewf.js";
41
+ import"./packager-tool-r7xy9sew.js";
42
+ import"./packager-tool-3h2ktz6q.js";
43
+ import"./packager-tool-4mna26cc.js";
44
+ import"./packager-tool-c23zrhj8.js";
19
45
  import {
20
46
  __require,
21
47
  __toESM
@@ -627,7 +653,6 @@ function expandedSizeForShape(shape) {
627
653
  height: COLLAPSED_NODE_SIZE
628
654
  };
629
655
  }
630
- var UI_ONLY_NODE_TYPES = new Set(["stickyNote"]);
631
656
  function identifyArtifactChildIds(edges, portResolver, nodes) {
632
657
  const ids = new Set;
633
658
  for (const edge of edges) {
@@ -1048,7 +1073,8 @@ function regenerateNodeVariables(workflow) {
1048
1073
  }
1049
1074
  return total;
1050
1075
  }
1076
+ export {
1077
+ tidyFlow
1078
+ };
1051
1079
 
1052
- export { UI_ONLY_NODE_TYPES, tidyFlow };
1053
-
1054
- //# debugId=DEA00C408BBCA7A764756E2164756E21
1080
+ //# debugId=0381B64E0226B5AC64756E2164756E21
package/dist/tool.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-1w4f09cq.js";
4
+ } from "./packager-tool-d0ny3x3b.js";
5
5
  import"./packager-tool-tf3d2y8z.js";
6
- import"./packager-tool-0v3tzseq.js";
6
+ import"./packager-tool-jeb6xmgw.js";
7
7
  import"./packager-tool-27avrkyk.js";
8
- import"./packager-tool-yxv9mm8s.js";
9
- import"./packager-tool-h9d8c9rf.js";
10
- import"./packager-tool-9kx94sj5.js";
11
- import"./packager-tool-gzpvdcnw.js";
8
+ import"./packager-tool-vtaqtf7f.js";
9
+ import"./packager-tool-4zdhy0c3.js";
10
+ import"./packager-tool-x5qafkb7.js";
11
+ import"./packager-tool-da1cmt0q.js";
12
12
  import"./packager-tool-w5a1hhyj.js";
13
- import"./packager-tool-s0mzv3sx.js";
13
+ import"./packager-tool-aw60v0et.js";
14
14
  import"./packager-tool-8qp60s20.js";
15
- import"./packager-tool-26ydwf12.js";
15
+ import"./packager-tool-6h69pd2a.js";
16
16
  import"./packager-tool-qa9gftnj.js";
17
17
  import"./packager-tool-0gctz400.js";
18
18
  import"./packager-tool-yc4kw997.js";
19
19
  import"./packager-tool-eypvc2kv.js";
20
- import"./packager-tool-6k8s7pt9.js";
21
- import"./packager-tool-0v3s8r01.js";
20
+ import"./packager-tool-r7xy9sew.js";
21
+ import"./packager-tool-3h2ktz6q.js";
22
22
  import"./packager-tool-1yh8g550.js";
23
23
  export {
24
24
  metadata,
@@ -10,22 +10,9 @@ export declare function readFlowWorkflow(filePath: string): Promise<ReadFlowResu
10
10
  /** Write a workflow back to disk; pass `refMap` from `readFlowWorkflow` to preserve `$ref` chunks. */
11
11
  export declare function writeFlowWorkflow(filePath: string, workflow: Workflow, refMap?: RefMap): Promise<void>;
12
12
  /**
13
- * Resolve the `.flow` a project runs: `MainFile` first, then `<Name>.flow`,
14
- * then any `.flow` in the project. One resolver so the debug run, the
15
- * conversational pre-flight, and local eval preparation all read the same file.
16
- * An unreadable `project.uiproj` degrades to the plain search rather than
17
- * failing.
13
+ * The project `.flow` resolvers, bound to the process file system. They live
14
+ * in `@uipath/packager-tool-flow` because the pack gate resolves the same way;
15
+ * see there for how `MainFile`, `<Name>.flow` and the scan are tried.
18
16
  */
19
17
  export declare function resolveProjectFlowFile(projectPath: string): Promise<string>;
20
- /**
21
- * Locate a flow project's `.flow` source file. Prefers the `project.uiproj`
22
- * `MainFile` when it names a `.flow`, then the first `.flow` found in the
23
- * project root, `content/`, or `flow_files/`.
24
- *
25
- * Studio Web-exported solutions ship the flow as `new.flow` (not
26
- * `<ProjectName>.flow`) with `MainFile: null`, so callers must NOT assume the
27
- * file is named after the project. When a directory holds multiple `.flow`s,
28
- * pass `preferredBaseName` (the project name) to disambiguate to
29
- * `<preferredBaseName>.flow` deterministically. Throws when no `.flow` is found.
30
- */
31
18
  export declare function findProjectFlowFile(projectPath: string, mainFile?: string | null, preferredBaseName?: string): Promise<string>;