@uipath/flow-tool 1.204.0-preview.255 → 1.205.0-preview.256
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 +9 -9
- package/dist/THIRD-PARTY-NOTICES.md +36 -12
- package/dist/{authoring-bppe07p0.js → authoring-e1k40hyw.js} +6 -5
- package/dist/{binding-service-fw3rzae4.js → binding-service-yw91615m.js} +38 -30
- package/dist/{connector-service-2z7s7qtd.js → connector-service-ttm75a4n.js} +224 -47
- package/dist/de-UZI7FJDO-awjpqfz0.js +200 -0
- package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
- package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
- package/dist/debug-conversation-trigger-xsm3ycqx.js +30 -0
- package/dist/{debug-http-client-p4kf38yt.js → debug-http-client-yqjzsnhw.js} +5 -4
- package/dist/{debug-service-893erynq.js → debug-service-nra3n02y.js} +6 -5
- package/dist/{edge-service-6zr5f09c.js → edge-service-8fv0m681.js} +16 -12
- package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
- package/dist/en-EJCBA3LK-0wb3b1xy.js +146 -0
- package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
- package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
- package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
- package/dist/es-4UBUTCQA-t7hsackg.js +200 -0
- package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
- package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
- package/dist/es-MX-5RELIXKI-jtjbcxbb.js +200 -0
- package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
- package/dist/filter-engine-7ep90g7f.js +11 -0
- package/dist/{flow-api-kjvpsxhw.js → flow-api-sat010z1.js} +16 -10
- package/dist/{flow-debug-service-9q9k756w.js → flow-debug-service-cgawm96k.js} +96 -58
- package/dist/{flow-eval-node-target-zvk7fcb2.js → flow-eval-node-target-dah1gmmh.js} +17 -17
- package/dist/flow-eval-run-api-xdygjzfv.js +13 -0
- package/dist/{flow-eval-run-service-2hfqyadh.js → flow-eval-run-service-03j1szf6.js} +73 -80
- package/dist/{flow-eval-service-m5n2svke.js → flow-eval-service-9j46ta9k.js} +167 -415
- package/dist/{flow-init-sdk-source-z9qx1zkt.js → flow-init-sdk-source-xvdvkq7d.js} +6 -5
- package/dist/{flow-init-service-8y8b76zm.js → flow-init-service-0a4y3a46.js} +19 -15
- package/dist/{flow-io-w11yspjx.js → flow-io-1wabd32s.js} +15 -11
- package/dist/{flow-migrate-service-v7ch4t3h.js → flow-migrate-service-mkqpbwtv.js} +16 -12
- package/dist/{flow-pack-service-xs8v5mba.js → flow-pack-service-7dj2hhyz.js} +47 -38
- package/dist/flow-validate-service-1ktjayjv.js +70 -0
- package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
- package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
- package/dist/fr-VBM5WRC2-707ha692.js +200 -0
- package/dist/{governance-fetcher-18pk0mgv.js → governance-fetcher-76hxssjm.js} +7 -6
- package/dist/{hitl-service-ehnfkwhp.js → hitl-service-vcbhd4cb.js} +15 -11
- package/dist/{index-aaq9rwfv.js → index-1b2je9n2.js} +1088 -233
- package/dist/index-d090f35d.js +66 -0
- package/dist/{index-yj4xk2aw.js → index-dgdnbb2g.js} +7 -5
- package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
- package/dist/{index-9hqj0ee4.js → index-hz008fep.js} +6 -5
- package/dist/{index-vrhcbxnk.js → index-nsn889vf.js} +6 -5
- package/dist/{index-2s8rmmw6.js → index-sqhbn7ew.js} +4 -4
- package/dist/{index-tnz5ks4t.js → index-wycgq0ff.js} +65 -2230
- package/dist/index.js +17 -14
- package/dist/init.js +19 -15
- package/dist/inline-entity-resolver-64pqwk86.js +45 -0
- package/dist/input-reader-n7kzdrev.js +12 -0
- package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
- package/dist/ja-43QL7CGO-h6qfxfay.js +200 -0
- package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
- package/dist/{known-types-q6fcyq2e.js → known-types-3025scz1.js} +5 -5
- package/dist/ko-TLL6Z6CD-ag6gjynr.js +200 -0
- package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
- package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
- package/dist/{maestro-automate-entry-qak46eg0.js → maestro-automate-entry-6f9act3w.js} +2 -2
- package/dist/{node-cvwqsgg0.js → node-hz6cvp9d.js} +29 -15
- package/dist/{node-service-544fv7as.js → node-service-7wz8gx7h.js} +41 -30
- package/dist/{node-strategy-fdnkvq4a.js → node-strategy-1dmmhvf3.js} +1 -1
- package/dist/node-sync-service-yvyf7chw.js +61 -0
- package/dist/packager-tool-10vc8pq4.js +2 -0
- package/dist/{packager-tool-29b6r6eg.js → packager-tool-2h15x2kb.js} +6 -6
- package/dist/{packager-tool-h7cjs093.js → packager-tool-2z0r1f32.js} +668 -57
- package/dist/packager-tool-4kr6g0zw.js +16 -0
- package/dist/packager-tool-4x7tzvv0.js +1176 -0
- package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
- package/dist/packager-tool-7hw344bt.js +107 -0
- package/dist/{packager-tool-pb7wzsn4.js → packager-tool-7wnxyvf9.js} +519 -437
- package/dist/{packager-tool-m8xtf5ej.js → packager-tool-8g5931fz.js} +7 -4
- package/dist/{packager-tool-h9tzz0qd.js → packager-tool-961vsbsc.js} +15 -10
- package/dist/packager-tool-9era57c0.js +28 -0
- package/dist/packager-tool-9gprvfcy.js +23 -0
- package/dist/packager-tool-9jxzgsxc.js +14 -0
- package/dist/{packager-tool-zxp4hya4.js → packager-tool-a5afh1dc.js} +34 -13
- package/dist/{packager-tool-02f63a08.js → packager-tool-apawc11t.js} +88 -762
- package/dist/{packager-tool-tf3d2y8z.js → packager-tool-aw9v0raw.js} +2 -2
- package/dist/packager-tool-cqtsj6yh.js +2 -0
- package/dist/{packager-tool-5nqhxb9e.js → packager-tool-dwd6cc01.js} +16110 -13031
- package/dist/{packager-tool-t605qewm.js → packager-tool-dxgrhfq5.js} +2 -2
- package/dist/{packager-tool-awkq26v0.js → packager-tool-e7kvq8hf.js} +5 -3
- package/dist/{packager-tool-2y2mmdnq.js → packager-tool-fjqpf1y6.js} +6 -24
- package/dist/{packager-tool-3dc9gz35.js → packager-tool-frjt46rb.js} +1 -1
- package/dist/{packager-tool-y8egb0fa.js → packager-tool-gqq3vkgh.js} +2573 -535
- package/dist/{packager-tool-w5a1hhyj.js → packager-tool-hxyjn885.js} +13 -2
- package/dist/packager-tool-j3228zs9.js +35 -0
- package/dist/{packager-tool-hhy1gr2k.js → packager-tool-jgfzfqjm.js} +1 -1
- package/dist/{packager-tool-5csvkk54.js → packager-tool-kb520rm5.js} +172 -71
- package/dist/{packager-tool-k04k2rnq.js → packager-tool-kmv2p8z4.js} +20 -8
- package/dist/{packager-tool-6h69pd2a.js → packager-tool-kn86394c.js} +127 -61
- package/dist/packager-tool-mgcz986r.js +143 -0
- package/dist/{packager-tool-3h2ktz6q.js → packager-tool-myhbp761.js} +11 -1
- package/dist/{packager-tool-5tk1eg46.js → packager-tool-ns9xn7zq.js} +13 -13
- package/dist/{packager-tool-vbfz8k7w.js → packager-tool-p8gab24q.js} +52 -32
- package/dist/{packager-tool-stq8800d.js → packager-tool-pacrqxv2.js} +17 -4
- package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
- package/dist/packager-tool-phw8ydjx.js +331 -0
- package/dist/{packager-tool-mx0gg6yh.js → packager-tool-q8akejne.js} +6 -4
- package/dist/packager-tool-qcqb9hf8.js +26 -0
- package/dist/{packager-tool-n89vrpex.js → packager-tool-skcjythd.js} +10907 -25608
- package/dist/{packager-tool-v37kemg5.js → packager-tool-sphnextf.js} +5 -6
- package/dist/{packager-tool-1ca047de.js → packager-tool-sqpesv2e.js} +12 -56
- package/dist/packager-tool-t7ahhaer.js +877 -0
- package/dist/{packager-tool-zgm9mqrh.js → packager-tool-thnkpqwc.js} +1802 -378
- package/dist/{packager-tool-peawy22c.js → packager-tool-tqjfdpda.js} +53 -8
- package/dist/{packager-tool-gb4sm499.js → packager-tool-vd3rn4fj.js} +463 -327
- package/dist/{packager-tool-5tjzg56t.js → packager-tool-wh660fny.js} +1 -1
- package/dist/{packager-tool-tyg399d6.js → packager-tool-wze74wyk.js} +74 -47
- package/dist/{packager-tool-zbhqrk3p.js → packager-tool-x20684x5.js} +1 -1
- package/dist/packager-tool-xj0agqpk.js +11 -0
- package/dist/packager-tool-xk78j7dz.js +1256 -0
- package/dist/{packager-tool-py93409h.js → packager-tool-ymma2s85.js} +2 -2
- package/dist/packager-tool-z0yxfhdj.js +40 -0
- package/dist/packager-tool.js +13 -10
- package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
- package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
- package/dist/pt-BR-USP2T7GD-rppy42ym.js +200 -0
- package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
- package/dist/pt-RMIAKZB4-t80exmp7.js +200 -0
- package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
- package/dist/ro-GHOBYW2S-4zevc9dy.js +200 -0
- package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
- package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
- package/dist/ru-WBLQ5B2U-dpqvtfwr.js +10 -0
- package/dist/services/connector-request-buckets.d.ts +1 -0
- package/dist/services/flow-eval-file-store.d.ts +1 -11
- package/dist/services/flow-eval-utils.d.ts +1 -32
- package/dist/services/flow-validate-service.d.ts +51 -0
- package/dist/services/inline-entity-resolver.d.ts +22 -0
- package/dist/services/node-service.d.ts +21 -1
- package/dist/services/packaging-utils.d.ts +15 -2
- package/dist/{shared-utils-pnbvyyb2.js → shared-utils-tqnx96mg.js} +4 -3
- package/dist/solution-auth-8qz5pw7z.js +14 -0
- package/dist/solution-discovery-vqravtkh.js +44 -0
- package/dist/{tidy-service-j70ccg27.js → tidy-service-tqjea6g2.js} +143 -39
- package/dist/tool.js +17 -14
- package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
- package/dist/tr-GDTLECMM-kngksm3r.js +200 -0
- package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
- package/dist/utils/flow-io.d.ts +2 -1
- package/dist/validation.js +39 -33
- package/dist/{variable-service-86t2r5m9.js → variable-service-kqnqxmx2.js} +16 -12
- package/dist/{wait-for-flow-job-d8m6mqb4.js → wait-for-flow-job-b0vj8828.js} +15 -12
- package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
- package/dist/zh-CN-I5D7WHBD-ge92tbx9.js +200 -0
- package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
- package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
- package/dist/zh-TW-2AVLM723-xsmap3gk.js +200 -0
- package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
- package/package.json +2 -2
- package/dist/debug-conversation-trigger-hgszjdhx.js +0 -44
- package/dist/flow-eval-run-api-byx3cacw.js +0 -13
- package/dist/flow-validate-service-12v3bz1b.js +0 -64
- package/dist/input-reader-vhar4g0k.js +0 -11
- package/dist/node-sync-service-ccwgtyte.js +0 -40
- package/dist/packager-tool-4g5hk66k.js +0 -454
- package/dist/packager-tool-kg35b9s6.js +0 -15
- package/dist/packager-tool-pz5nqg0s.js +0 -64
- package/dist/packager-tool-t3ysatjd.js +0 -521
- package/dist/packager-tool-vd6jt4n8.js +0 -208
- package/dist/packager-tool-vscvjrhn.js +0 -265
- package/dist/services/flow-debug-service.d.ts +0 -320
- package/dist/services/flow-eval-schema/deterministic-evaluators.d.ts +0 -110
- package/dist/services/flow-eval-schema/evaluator-fields.d.ts +0 -66
- package/dist/services/flow-eval-schema/helpers.d.ts +0 -9
- package/dist/services/flow-eval-schema/index.d.ts +0 -4
- package/dist/services/flow-eval-schema/llm-judge-evaluators.d.ts +0 -174
- package/dist/services/flow-eval-schema/prompts.d.ts +0 -2
- package/dist/services/flow-eval-schema/registry.d.ts +0 -375
- package/dist/services/flow-eval-schema/tool-call-evaluators.d.ts +0 -93
- package/dist/services/flow-eval-schema/types.d.ts +0 -95
- package/dist/services/flow-eval-types.d.ts +0 -6
- package/dist/utils/write-resolved-flow.d.ts +0 -7
- /package/dist/{headless-45dypanh.js → headless-fw8pwyzm.js} +0 -0
- /package/dist/{localization-xecwjpe2.js → localization-d6gjmrsw.js} +0 -0
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getAgentProjectMetadataReader
|
|
3
|
+
} from "./packager-tool-8qp60s20.js";
|
|
4
|
+
import {
|
|
5
|
+
extractIOFromEntryPoints,
|
|
6
|
+
getServiceType,
|
|
7
|
+
taskDefinitionsToNodeManifests,
|
|
8
|
+
withErrorHandles
|
|
9
|
+
} from "./packager-tool-dwd6cc01.js";
|
|
10
|
+
import {
|
|
11
|
+
logger,
|
|
12
|
+
quoteForShell
|
|
13
|
+
} from "./packager-tool-apawc11t.js";
|
|
14
|
+
import {
|
|
15
|
+
catchError
|
|
16
|
+
} from "./packager-tool-t7ahhaer.js";
|
|
17
|
+
import {
|
|
18
|
+
getFileSystem
|
|
19
|
+
} from "./packager-tool-myhbp761.js";
|
|
20
|
+
|
|
21
|
+
// ../maestro-sdk/src/registry/solution-discovery.ts
|
|
22
|
+
function isRecord(value) {
|
|
23
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
24
|
+
}
|
|
25
|
+
var EMPTY_IO = {
|
|
26
|
+
inputs: {},
|
|
27
|
+
outputs: {}
|
|
28
|
+
};
|
|
29
|
+
function findEnclosingProjectId(solutionDir, projects, cwd) {
|
|
30
|
+
const fs = getFileSystem();
|
|
31
|
+
for (const p of projects) {
|
|
32
|
+
const projDir = fs.path.resolve(solutionDir, fs.path.dirname(p.ProjectRelativePath));
|
|
33
|
+
if (cwd === projDir)
|
|
34
|
+
return p.Id;
|
|
35
|
+
const rel = fs.path.relative(projDir, cwd);
|
|
36
|
+
if (rel !== "" && !rel.startsWith("..") && !fs.path.isAbsolute(rel)) {
|
|
37
|
+
return p.Id;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
function solutionSearchDirs() {
|
|
43
|
+
const fs = getFileSystem();
|
|
44
|
+
const cwd = fs.env.cwd();
|
|
45
|
+
return [cwd, fs.path.resolve(cwd, ".."), fs.path.resolve(cwd, "../..")];
|
|
46
|
+
}
|
|
47
|
+
async function readSolutionAt(dir) {
|
|
48
|
+
const fs = getFileSystem();
|
|
49
|
+
const [readErr, entries] = await catchError(fs.readdir(dir));
|
|
50
|
+
if (readErr)
|
|
51
|
+
return null;
|
|
52
|
+
const uipxName = entries.find((e) => e.endsWith(".uipx"));
|
|
53
|
+
if (!uipxName)
|
|
54
|
+
return null;
|
|
55
|
+
const uipxPath = fs.path.join(dir, uipxName);
|
|
56
|
+
const [fileErr, content] = await catchError(fs.readFile(uipxPath, "utf-8"));
|
|
57
|
+
if (fileErr || !content)
|
|
58
|
+
return null;
|
|
59
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(content));
|
|
60
|
+
if (parseErr || !parsed.SolutionId)
|
|
61
|
+
return null;
|
|
62
|
+
return {
|
|
63
|
+
solutionId: parsed.SolutionId,
|
|
64
|
+
solutionDir: dir,
|
|
65
|
+
projects: parsed.Projects ?? []
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
async function findSolutionFromCwd() {
|
|
69
|
+
const cwd = getFileSystem().env.cwd();
|
|
70
|
+
for (const dir of solutionSearchDirs()) {
|
|
71
|
+
const solution = await readSolutionAt(dir);
|
|
72
|
+
if (solution === null)
|
|
73
|
+
continue;
|
|
74
|
+
return {
|
|
75
|
+
...solution,
|
|
76
|
+
currentProjectId: findEnclosingProjectId(dir, solution.projects, cwd)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
async function resolveProjectEntryPointIO(projectDir) {
|
|
82
|
+
const fs = getFileSystem();
|
|
83
|
+
const fromSource = await readEntryPointsFile(fs.path.join(projectDir, "entry-points.json"), fs.path.join(projectDir, "content", "entry-points.json"));
|
|
84
|
+
if (fromSource.io)
|
|
85
|
+
return { io: fromSource.io, contract: "known" };
|
|
86
|
+
const fromFlow = await readProjectIOFromFlowVariables(projectDir);
|
|
87
|
+
if (fromFlow.io)
|
|
88
|
+
return { io: fromFlow.io, contract: "known" };
|
|
89
|
+
const fromBuild = await readEntryPointsFile(fs.path.join(projectDir, ".local", "content", "entry-points.json"));
|
|
90
|
+
if (fromBuild.io)
|
|
91
|
+
return { io: fromBuild.io, contract: "known" };
|
|
92
|
+
const states = [fromSource.state, fromFlow.state, fromBuild.state];
|
|
93
|
+
const contract = states.includes("valid") ? "known" : states.includes("invalid") ? "unreadable" : "missing";
|
|
94
|
+
return { io: EMPTY_IO, contract };
|
|
95
|
+
}
|
|
96
|
+
async function readEntryPointsFile(...candidates) {
|
|
97
|
+
const fs = getFileSystem();
|
|
98
|
+
let state = "absent";
|
|
99
|
+
for (const filePath of candidates) {
|
|
100
|
+
const [err, content] = await catchError(fs.readFile(filePath, "utf-8"));
|
|
101
|
+
if (err || content === null)
|
|
102
|
+
continue;
|
|
103
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(content));
|
|
104
|
+
const entryPoints = parsed?.entryPoints;
|
|
105
|
+
if (parseErr || !Array.isArray(entryPoints) || entryPoints.length > 0 && !isRecord(entryPoints[0])) {
|
|
106
|
+
if (state === "absent")
|
|
107
|
+
state = "invalid";
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
state = "valid";
|
|
111
|
+
if (entryPoints.length === 0)
|
|
112
|
+
continue;
|
|
113
|
+
return { io: extractIOFromEntryPoints({ entryPoints }), state };
|
|
114
|
+
}
|
|
115
|
+
return { state };
|
|
116
|
+
}
|
|
117
|
+
async function readProjectIOFromFlowVariables(projectDir) {
|
|
118
|
+
const fs = getFileSystem();
|
|
119
|
+
const [readErr, entries] = await catchError(fs.readdir(projectDir));
|
|
120
|
+
if (readErr || !Array.isArray(entries))
|
|
121
|
+
return { state: "absent" };
|
|
122
|
+
const flowFileName = entries.find((entry) => entry.endsWith(".flow"));
|
|
123
|
+
if (!flowFileName)
|
|
124
|
+
return { state: "absent" };
|
|
125
|
+
const flowPath = fs.path.join(projectDir, flowFileName);
|
|
126
|
+
const [readFileErr, content] = await catchError(fs.readFile(flowPath, "utf-8"));
|
|
127
|
+
if (readFileErr || !content)
|
|
128
|
+
return { state: "invalid" };
|
|
129
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(content));
|
|
130
|
+
if (parseErr || !isRecord(parsed))
|
|
131
|
+
return { state: "invalid" };
|
|
132
|
+
const variables = parsed.variables;
|
|
133
|
+
if (variables !== undefined && !isRecord(variables))
|
|
134
|
+
return { state: "invalid" };
|
|
135
|
+
const globals = variables?.globals;
|
|
136
|
+
if (globals !== undefined && (!Array.isArray(globals) || !globals.every(isRecord)))
|
|
137
|
+
return { state: "invalid" };
|
|
138
|
+
if (!globals || globals.length === 0)
|
|
139
|
+
return { state: "valid" };
|
|
140
|
+
const inputProps = {};
|
|
141
|
+
const outputProps = {};
|
|
142
|
+
for (const variable of globals) {
|
|
143
|
+
if (!variable.id || !variable.direction)
|
|
144
|
+
continue;
|
|
145
|
+
const schema = {
|
|
146
|
+
type: variable.type ?? "string"
|
|
147
|
+
};
|
|
148
|
+
if (variable.description) {
|
|
149
|
+
schema.description = variable.description;
|
|
150
|
+
}
|
|
151
|
+
if (variable.direction === "in" || variable.direction === "inout") {
|
|
152
|
+
inputProps[variable.id] = schema;
|
|
153
|
+
}
|
|
154
|
+
if (variable.direction === "out" || variable.direction === "inout") {
|
|
155
|
+
outputProps[variable.id] = schema;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const hasInputs = Object.keys(inputProps).length > 0;
|
|
159
|
+
const hasOutputs = Object.keys(outputProps).length > 0;
|
|
160
|
+
if (!hasInputs && !hasOutputs)
|
|
161
|
+
return { state: "valid" };
|
|
162
|
+
const synthetic = {
|
|
163
|
+
entryPoints: [
|
|
164
|
+
{
|
|
165
|
+
filePath: flowFileName,
|
|
166
|
+
input: hasInputs ? { type: "object", properties: inputProps } : undefined,
|
|
167
|
+
output: hasOutputs ? { type: "object", properties: outputProps } : undefined
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
};
|
|
171
|
+
return { io: extractIOFromEntryPoints(synthetic), state: "valid" };
|
|
172
|
+
}
|
|
173
|
+
async function readProjectName(projectDir) {
|
|
174
|
+
const fs = getFileSystem();
|
|
175
|
+
const uiprojPath = fs.path.join(projectDir, "project.uiproj");
|
|
176
|
+
const [err, content] = await catchError(fs.readFile(uiprojPath, "utf-8"));
|
|
177
|
+
if (!err && content) {
|
|
178
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(content));
|
|
179
|
+
if (!parseErr && isRecord(parsed) && typeof parsed.Name === "string" && parsed.Name.length > 0) {
|
|
180
|
+
return parsed.Name;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return fs.path.basename(projectDir);
|
|
184
|
+
}
|
|
185
|
+
async function loadResourceKeyMap(solutionDir) {
|
|
186
|
+
const fs = getFileSystem();
|
|
187
|
+
const map = new Map;
|
|
188
|
+
const processDir = fs.path.join(solutionDir, "resources", "solution_folder", "process");
|
|
189
|
+
const [dirErr, typeDirs] = await catchError(fs.readdir(processDir));
|
|
190
|
+
if (dirErr)
|
|
191
|
+
return map;
|
|
192
|
+
for (const typeDir of typeDirs) {
|
|
193
|
+
const typePath = fs.path.join(processDir, typeDir);
|
|
194
|
+
const [filesErr, files] = await catchError(fs.readdir(typePath));
|
|
195
|
+
if (filesErr)
|
|
196
|
+
continue;
|
|
197
|
+
for (const file of files) {
|
|
198
|
+
if (!file.endsWith(".json"))
|
|
199
|
+
continue;
|
|
200
|
+
const filePath = fs.path.join(typePath, file);
|
|
201
|
+
const [readErr, content] = await catchError(fs.readFile(filePath, "utf-8"));
|
|
202
|
+
if (readErr || !content)
|
|
203
|
+
continue;
|
|
204
|
+
const [parseErr, parsed] = catchError(() => JSON.parse(content));
|
|
205
|
+
if (parseErr || !isRecord(parsed))
|
|
206
|
+
continue;
|
|
207
|
+
const resource = parsed.resource;
|
|
208
|
+
if (!isRecord(resource))
|
|
209
|
+
continue;
|
|
210
|
+
const projectKey = resource.projectKey;
|
|
211
|
+
const resourceKey = resource.key;
|
|
212
|
+
if (typeof projectKey === "string" && projectKey.length > 0 && typeof resourceKey === "string" && resourceKey.length > 0) {
|
|
213
|
+
map.set(projectKey.toLowerCase(), resourceKey);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return map;
|
|
218
|
+
}
|
|
219
|
+
function invokableSiblings(ctx) {
|
|
220
|
+
const fs = getFileSystem();
|
|
221
|
+
const currentId = ctx.currentProjectId?.toLowerCase();
|
|
222
|
+
return ctx.projects.flatMap((project) => {
|
|
223
|
+
const serviceType = getServiceType(project.Type);
|
|
224
|
+
if (!serviceType)
|
|
225
|
+
return [];
|
|
226
|
+
if (typeof project.Id !== "string")
|
|
227
|
+
return [];
|
|
228
|
+
if (project.Id.toLowerCase() === currentId)
|
|
229
|
+
return [];
|
|
230
|
+
const projectDir = fs.path.resolve(ctx.solutionDir, fs.path.dirname(project.ProjectRelativePath));
|
|
231
|
+
return [{ project, serviceType, projectDir }];
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
async function buildInSolutionNodes(ctx) {
|
|
235
|
+
const manifests = [];
|
|
236
|
+
const unknownContracts = [];
|
|
237
|
+
const resourceKeyMap = await loadResourceKeyMap(ctx.solutionDir);
|
|
238
|
+
for (const { project, serviceType, projectDir } of invokableSiblings(ctx)) {
|
|
239
|
+
const resourceKey = resourceKeyMap.get(project.Id.toLowerCase());
|
|
240
|
+
if (!resourceKey)
|
|
241
|
+
continue;
|
|
242
|
+
const reader = getAgentProjectMetadataReader();
|
|
243
|
+
const [name, { io, contract }, projectMetadata] = await Promise.all([
|
|
244
|
+
readProjectName(projectDir),
|
|
245
|
+
resolveProjectEntryPointIO(projectDir),
|
|
246
|
+
reader ? reader(projectDir, project.Type).catch((err) => {
|
|
247
|
+
logger.debug(`Agent metadata reader failed for ${projectDir}: ${String(err)}`);
|
|
248
|
+
return {};
|
|
249
|
+
}) : Promise.resolve({})
|
|
250
|
+
]);
|
|
251
|
+
const task = {
|
|
252
|
+
name,
|
|
253
|
+
type: serviceType,
|
|
254
|
+
resourceKey,
|
|
255
|
+
inputs: io.inputs,
|
|
256
|
+
outputs: io.outputs,
|
|
257
|
+
metadata: {
|
|
258
|
+
...projectMetadata,
|
|
259
|
+
description: `(In-solution) ${name}`,
|
|
260
|
+
key: resourceKey,
|
|
261
|
+
name,
|
|
262
|
+
tags: ["in-solution", "local"],
|
|
263
|
+
projectId: project.Id,
|
|
264
|
+
entryPointUniqueId: io.entryPointUniqueId,
|
|
265
|
+
inputProperties: io.inputProperties
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const nodes = taskDefinitionsToNodeManifests({ [resourceKey]: task }, project.Type);
|
|
269
|
+
manifests.push(...nodes);
|
|
270
|
+
if (contract !== "known") {
|
|
271
|
+
unknownContracts.push({
|
|
272
|
+
name,
|
|
273
|
+
type: project.Type,
|
|
274
|
+
projectDir,
|
|
275
|
+
nodeTypes: nodes.map((n) => n.nodeType).filter((t) => typeof t === "string"),
|
|
276
|
+
contract
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return { manifests: withErrorHandles(manifests), unknownContracts };
|
|
281
|
+
}
|
|
282
|
+
function unknownContractWarning(projects) {
|
|
283
|
+
if (projects.length === 0)
|
|
284
|
+
return;
|
|
285
|
+
const describe = (p) => `'${p.name}' (${p.type}, ${p.projectDir}): ${p.contract === "missing" ? "no entry-points.json yet" : "its entry-points.json or .flow file could not be read"}`;
|
|
286
|
+
const one = projects.length === 1;
|
|
287
|
+
const steps = [];
|
|
288
|
+
if (projects.some((p) => p.contract === "missing"))
|
|
289
|
+
steps.push("build the project so it writes entry-points.json");
|
|
290
|
+
if (projects.some((p) => p.contract === "unreadable"))
|
|
291
|
+
steps.push("fix the file that could not be read");
|
|
292
|
+
const next = steps.join(", and ");
|
|
293
|
+
return `No usable argument contract for ${projects.map(describe).join("; ")}. ` + `${one ? "Its node shows" : "Their nodes show"} no inputs or outputs; the arguments are unknown, not empty. ` + `${next[0].toUpperCase()}${next.slice(1)}, then run this command again.`;
|
|
294
|
+
}
|
|
295
|
+
async function findProjectsWithoutProcessResource(ctx) {
|
|
296
|
+
const resourceKeyMap = await loadResourceKeyMap(ctx.solutionDir);
|
|
297
|
+
return Promise.all(invokableSiblings(ctx).filter(({ project }) => !resourceKeyMap.has(project.Id.toLowerCase())).map(async ({ project, projectDir }) => ({
|
|
298
|
+
id: project.Id,
|
|
299
|
+
name: await readProjectName(projectDir),
|
|
300
|
+
type: project.Type
|
|
301
|
+
})));
|
|
302
|
+
}
|
|
303
|
+
function describeProjectsWithoutProcessResource(projects, solutionDir) {
|
|
304
|
+
if (projects.length === 0)
|
|
305
|
+
return {};
|
|
306
|
+
const names = projects.map((p) => `${p.name} (${p.type})`).join(", ");
|
|
307
|
+
return {
|
|
308
|
+
Warning: projects.length === 1 ? `Left out 1 project that has no process resource yet: ${names}.` : `Left out ${projects.length} projects that have no process resource yet: ${names}.`,
|
|
309
|
+
Instructions: `Create the missing process resources, then list the in-solution nodes again to get their node types. Run: ${resourcesRefreshCommand(solutionDir)}`
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
async function explainNodeTypeWithoutProcessResource(nodeType) {
|
|
313
|
+
const ctx = await findSolutionFromCwd();
|
|
314
|
+
if (!ctx)
|
|
315
|
+
return;
|
|
316
|
+
const lowerNodeType = nodeType.toLowerCase();
|
|
317
|
+
const project = (await findProjectsWithoutProcessResource(ctx)).find((p) => lowerNodeType.endsWith(`.${p.id.toLowerCase()}`));
|
|
318
|
+
if (!project)
|
|
319
|
+
return;
|
|
320
|
+
return {
|
|
321
|
+
message: `Project '${project.name}' has no process resource yet, so it has no node type.`,
|
|
322
|
+
instructions: `Create its process resource, then list the in-solution nodes to get its node type. Run: ${resourcesRefreshCommand(ctx.solutionDir)}`
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
function resourcesRefreshCommand(solutionDir) {
|
|
326
|
+
return `uip solution resources refresh --solution-folder ${quoteForShell(solutionDir)}`;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export { solutionSearchDirs, readSolutionAt, findSolutionFromCwd, resolveProjectEntryPointIO, loadResourceKeyMap, buildInSolutionNodes, unknownContractWarning, findProjectsWithoutProcessResource, describeProjectsWithoutProcessResource, explainNodeTypeWithoutProcessResource, resourcesRefreshCommand };
|
|
330
|
+
|
|
331
|
+
//# debugId=37AAA458DDB8A49264756E2164756E21
|
|
@@ -3,7 +3,7 @@ var package_default = {
|
|
|
3
3
|
name: "@uipath/flow-tool",
|
|
4
4
|
author: "UiPath",
|
|
5
5
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.205.0-preview.256",
|
|
7
7
|
description: "Create, debug, and run UiPath Flow projects and jobs.",
|
|
8
8
|
private: false,
|
|
9
9
|
repository: {
|
|
@@ -52,15 +52,17 @@ var package_default = {
|
|
|
52
52
|
"@uipath/auth": "workspace:*",
|
|
53
53
|
"@uipath/builder-sdk": "workspace:*",
|
|
54
54
|
"@uipath/common": "workspace:*",
|
|
55
|
+
"@uipath/eval-sdk": "workspace:*",
|
|
55
56
|
"@uipath/filesystem": "workspace:*",
|
|
56
57
|
"@uipath/flow-converter": "0.69.3",
|
|
57
|
-
"@uipath/flow-core": "0.
|
|
58
|
+
"@uipath/flow-core": "^0.129.1",
|
|
58
59
|
"@uipath/flow-expression-model": "0.11.4",
|
|
59
|
-
"@uipath/flow-migrations": "0.
|
|
60
|
+
"@uipath/flow-migrations": "^0.71.1",
|
|
60
61
|
"@uipath/flow-schema": "0.68.0",
|
|
61
62
|
"@uipath/integrationservice-sdk": "workspace:*",
|
|
62
63
|
"@uipath/maestro-sdk": "workspace:*",
|
|
63
64
|
"@uipath/orchestrator-sdk": "workspace:*",
|
|
65
|
+
"@uipath/packager-tool-datafabric": "workspace:*",
|
|
64
66
|
"@uipath/packager-tool-flow": "workspace:*",
|
|
65
67
|
"@uipath/project-packager": "workspace:*",
|
|
66
68
|
"@uipath/solution-sdk": "workspace:*",
|
|
@@ -75,4 +77,4 @@ var package_default = {
|
|
|
75
77
|
|
|
76
78
|
export { package_default };
|
|
77
79
|
|
|
78
|
-
//# debugId=
|
|
80
|
+
//# debugId=0A4388A16196E3FD64756E2164756E21
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isStartEventNode
|
|
3
|
+
} from "./packager-tool-bhqx9kez.js";
|
|
4
|
+
|
|
5
|
+
// ../packager/packager-tool-flow/src/entry-point-triggers.ts
|
|
6
|
+
function isRecord(value) {
|
|
7
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8
|
+
}
|
|
9
|
+
function entryPointTriggers(nodes) {
|
|
10
|
+
return nodes.filter((node) => isRecord(node) && typeof node.id === "string" && typeof node.type === "string" && isStartEventNode({
|
|
11
|
+
id: node.id,
|
|
12
|
+
type: node.type,
|
|
13
|
+
typeVersion: typeof node.typeVersion === "string" ? node.typeVersion : "1.0"
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
function isDefaultEntryPoint(node) {
|
|
17
|
+
return isRecord(node.inputs) && node.inputs.isDefaultEntryPoint === true || isRecord(node.model) && node.model.isDefaultEntryPoint === true;
|
|
18
|
+
}
|
|
19
|
+
function defaultEntryPointNodeId(nodes) {
|
|
20
|
+
const triggers = entryPointTriggers(nodes);
|
|
21
|
+
return (triggers.find(isDefaultEntryPoint) ?? triggers[0])?.id;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { entryPointTriggers, defaultEntryPointNodeId };
|
|
25
|
+
|
|
26
|
+
//# debugId=5CDC1671D6970ABC64756E2164756E21
|