@uipath/flow-tool 1.200.0-preview.120 → 1.201.0-preview.121
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/dist/authoring-rezk32bm.js +312 -0
- package/dist/{browser-strategy-d4zm14fb.js → browser-strategy-rkcvc6tn.js} +1 -1
- package/dist/{conversion-COFE4RVO-6gembcyk.js → conversion-W6HMHBWW-jnk9z7rw.js} +46 -38
- package/dist/{de-JT3SUGT4-msgpbdge.js → de-B2KIY5TC-81f703v3.js} +14 -5
- package/dist/{de-3RMZHIP6-1na18a74.js → de-K6MLR24N-00fjz82b.js} +474 -51
- package/dist/{de-3RMZHIP6-QW5DEMLQ-fw64syvn.js → de-K6MLR24N-5N5XGLH6-gbwpvdz4.js} +476 -53
- package/dist/{de-LVBY3VVG-tc58p3x6.js → de-WMKOGI7B-r1821wpe.js} +16 -7
- package/dist/de-XLT4QPIP-0rtw349w.js +32 -0
- package/dist/{en-ZBJX4WAU-L7DPQ3FB-4saj6t9b.js → en-ILA4HPE5-ALHGESZE-zrv4qss8.js} +325 -7
- package/dist/{en-ZBJX4WAU-5yq8e307.js → en-ILA4HPE5-fhwvq92r.js} +322 -4
- package/dist/{en-H54NJOH6-30ht8n64.js → en-P6PNWNTO-g1f6cjh5.js} +10 -4
- package/dist/en-UNT7BE26-rhh65jry.js +24 -0
- package/dist/{en-4UFXRW7N-mqabr9tf.js → en-X4DLPKLJ-dt1wtdm7.js} +17 -5
- package/dist/{es-GJOELELT-w1d3agm2.js → es-BBX4AUJX-h99fcr53.js} +14 -5
- package/dist/{es-CI4AE5B5-55sgqk64.js → es-BVPGJUWA-9gk2g9yb.js} +16 -7
- package/dist/{es-EYHYM5C4-RMLHZ2LF-s0fc3pd6.js → es-HTQSD352-YTAEDCE5-nhsbg581.js} +470 -47
- package/dist/{es-EYHYM5C4-3bajghda.js → es-HTQSD352-m9rr3f0g.js} +468 -45
- package/dist/{es-MX-AMZIGU27-5pembt6k.js → es-MX-3SP2SSV6-f20qspbr.js} +14 -5
- package/dist/{es-MX-QSQP2KWV-qvgkwvz2.js → es-MX-FOX525CG-87g500gr.js} +474 -51
- package/dist/{es-MX-QSQP2KWV-XR5DWKNF-kp7pk2s4.js → es-MX-FOX525CG-HLM27OEL-whr0t9v3.js} +476 -53
- package/dist/es-MX-OKNDG2NH-c1k1s1tg.js +32 -0
- package/dist/{es-MX-OLZNAYY5-30cmv1dx.js → es-MX-U6YL5KQX-ynwxdjr8.js} +16 -7
- package/dist/es-NQICVYSQ-aa9z3nhs.js +32 -0
- package/dist/{fr-FXFJQRD3-F5HV2VS7-pwdze89j.js → fr-54THJ4QH-IGABNGU6-fpzw2mba.js} +475 -52
- package/dist/{fr-FXFJQRD3-rfztd3e5.js → fr-54THJ4QH-d6ezjbhw.js} +473 -50
- package/dist/{fr-CCN6ZO5E-x2akzsjt.js → fr-EKTTDR7Z-bmpwp31r.js} +16 -7
- package/dist/{fr-LYFYWWCC-nn4reak0.js → fr-FSTBVVGK-t3y57xrb.js} +14 -5
- package/dist/fr-PFHIL7YZ-cxnshwa8.js +32 -0
- package/dist/index-6hp3p3eq.js +16489 -0
- package/dist/index-9f8q2ege.js +2058 -0
- package/dist/index-hsadteg4.js +634 -0
- package/dist/{index-w23k88b5.js → index-p50kx6jv.js} +202 -64
- package/dist/{index-nfn4t0c4.js → index-q59ephfh.js} +72 -13
- package/dist/index.js +22 -16
- package/dist/init.js +19 -13
- package/dist/{ja-IRXXIG6Q-b3att2bw.js → ja-FW33BJBW-htfk4d8t.js} +14 -5
- package/dist/{ja-G7NJYQ42-ve4gadd7.js → ja-MHUPLSWO-3qwy4jc0.js} +470 -47
- package/dist/{ja-G7NJYQ42-X76DVL7A-9p8b5115.js → ja-MHUPLSWO-CS3KE4Y3-mbtkzwd7.js} +472 -49
- package/dist/ja-P4OSE367-8ywxep9a.js +32 -0
- package/dist/{ja-O2NEV5D6-nt9rhd8c.js → ja-Y2YBTXNN-96cvy5av.js} +16 -7
- package/dist/js-yaml-cggj6w7q.js +3145 -0
- package/dist/{ko-M32WKZ3I-5td5jsw7.js → ko-PDO5AXNW-d653t4pc.js} +14 -5
- package/dist/ko-PYOS2KJP-5sbj5bp8.js +32 -0
- package/dist/{ko-7XWV2SEQ-chk3y7aj.js → ko-S33XAV26-cxf4dn2t.js} +16 -7
- package/dist/{ko-QDHECDTM-6WJAKMQI-0fpd4dqj.js → ko-XPJTXIKK-DNSW4KYQ-956vp61f.js} +469 -46
- package/dist/{ko-QDHECDTM-zmbqs9pr.js → ko-XPJTXIKK-w1hs4px7.js} +467 -44
- package/dist/{node-8d0q6ch7.js → node-f062h75p.js} +7610 -7319
- package/dist/node-strategy-8gzp67xs.js +350 -0
- package/dist/{packager-tool-hkrpcn6d.js → packager-tool-03knb0er.js} +341 -23
- package/dist/packager-tool-1cb0d5e0.js +237 -0
- package/dist/{packager-tool-25z1hdbm.js → packager-tool-1g6958de.js} +21 -8
- package/dist/{packager-tool-kgkv7f24.js → packager-tool-1gt6js73.js} +258 -1069
- package/dist/{packager-tool-973f0r2g.js → packager-tool-1yy9x4vk.js} +17 -5
- package/dist/{packager-tool-jqtspg41.js → packager-tool-3wf3tkrc.js} +11 -5
- package/dist/{packager-tool-1ps2qeqg.js → packager-tool-5arsyj36.js} +3 -2
- package/dist/packager-tool-6a7wdv5z.js +36187 -0
- package/dist/{packager-tool-wm273rrd.js → packager-tool-9x76z587.js} +238 -287
- package/dist/packager-tool-b0s5d4ek.js +10671 -0
- package/dist/{packager-tool-qz3cg5tg.js → packager-tool-cqrsre00.js} +340 -22
- package/dist/{packager-tool-9bnpe8n1.js → packager-tool-ef2aypt3.js} +21691 -16062
- package/dist/packager-tool-gbgfwx8f.js +2 -0
- package/dist/{packager-tool-3ahtr7dn.js → packager-tool-jeh5j2xy.js} +8768 -3862
- package/dist/packager-tool-jpcm3xas.js +12 -0
- package/dist/{packager-tool-231njxzf.js → packager-tool-neavt1k3.js} +1 -1
- package/dist/packager-tool-nkrmjr3a.js +915 -0
- package/dist/packager-tool-ny53xmsd.js +5377 -0
- package/dist/{packager-tool-fr5b9qs6.js → packager-tool-pvgqbm48.js} +3 -3
- package/dist/packager-tool-qa9gftnj.js +31 -0
- package/dist/{packager-tool-2q2qddqr.js → packager-tool-qfp49pq4.js} +994 -544
- package/dist/packager-tool-v2p6g3fd.js +41 -0
- package/dist/{packager-tool-95ht91a8.js → packager-tool-xa2xwzrq.js} +22347 -38047
- package/dist/packager-tool-y3dezh8k.js +21 -0
- package/dist/packager-tool.js +12 -10
- package/dist/{pt-VXJT4WUJ-nwkc9k2p.js → pt-4JEPEAST-40npwxyw.js} +471 -48
- package/dist/{pt-VXJT4WUJ-M3IR7CL5-1f2ph8gm.js → pt-4JEPEAST-JO5WN33S-ccdbdab2.js} +473 -50
- package/dist/{pt-BR-Z4J3LEEO-cf33d2zv.js → pt-BR-JO45SCNI-4kbfnzc4.js} +16 -7
- package/dist/{pt-BR-57EHXZKB-8g83gr5g.js → pt-BR-LQH3RSBB-kyb4jmcw.js} +14 -5
- package/dist/{pt-BR-SADBLGXA-WG4Q265J-w9tshygt.js → pt-BR-TV7NR3ID-PDSSHRHU-nddwzj29.js} +472 -49
- package/dist/{pt-BR-SADBLGXA-yd89fdy2.js → pt-BR-TV7NR3ID-vgd26pj1.js} +470 -47
- package/dist/pt-BR-Z3TUDJHM-n7ngej6s.js +32 -0
- package/dist/{pt-VNM2XWHA-62z625rh.js → pt-JLZYSSXX-7jth254x.js} +14 -5
- package/dist/pt-KSBWHAVQ-hd52bpsz.js +32 -0
- package/dist/{pt-CRSN3TCU-txxbbcxm.js → pt-W3NA4LIZ-f02gapvs.js} +16 -7
- package/dist/{ro-RISZ75LL-zwztp9j5.js → ro-E2EBPQGT-vn573vcr.js} +14 -5
- package/dist/{ro-7JHKFGCH-H3RYKSCL-4w49rx4m.js → ro-RKJ74FV3-QS3I6XKJ-kb31d85k.js} +475 -52
- package/dist/{ro-7JHKFGCH-hbtkeqdr.js → ro-RKJ74FV3-qn0ey39v.js} +473 -50
- package/dist/ro-VZUZTAMR-tccygznf.js +32 -0
- package/dist/{ro-WMQEVD7D-6mtq0e6b.js → ro-WLKX6HF5-fcbe2zz8.js} +16 -7
- package/dist/ru-GSCT4ARZ-3TVTUGWP-bbg6360z.js +15 -0
- package/dist/{serialization-3RH6P643-zxj2yyfh.js → serialization-GTFWODSH-ajd6b7n2.js} +14 -10
- package/dist/services/flow-migration-check.d.ts +15 -11
- package/dist/services/flow-validate-service.d.ts +119 -5
- package/dist/services/node-service.d.ts +46 -0
- package/dist/services/node-validators/ceql-query-validator.d.ts +36 -10
- package/dist/services/node-validators/expression-prefix-validator.d.ts +3 -2
- package/dist/services/node-validators/index.d.ts +2 -1
- package/dist/services/project-artifacts.d.ts +14 -1
- package/dist/tool.js +22 -16
- package/dist/{tr-UCMB7W3T-xmxp2naq.js → tr-3U2W2XCA-zg3zcmq3.js} +15 -6
- package/dist/tr-W4AVRSQ4-bt3qqqdy.js +32 -0
- package/dist/{tr-Q6IHBFK7-BEUWO5CI-29rgfwjy.js → tr-X7R6GQNB-VMEZAWRJ-vdbjqw23.js} +484 -61
- package/dist/{tr-Q6IHBFK7-zs9rsm1b.js → tr-X7R6GQNB-shwv16dz.js} +482 -59
- package/dist/{tr-AUPQF34V-y3dhtj0w.js → tr-ZUUSMHER-pfn5dq1r.js} +14 -5
- package/dist/utils/flow-io.d.ts +1 -1
- package/dist/validation.js +19 -13
- package/dist/zh-CN-6YRAN57T-j7jp34ws.js +32 -0
- package/dist/{zh-CN-3BPA3WIX-JDICNKGH-m87940q5.js → zh-CN-FEZ24J4A-LSEMG63K-db8kf6rm.js} +472 -49
- package/dist/{zh-CN-3BPA3WIX-c5ts2m5v.js → zh-CN-FEZ24J4A-q5b5x20w.js} +470 -47
- package/dist/{zh-CN-2QOHEFC5-ryjb2byk.js → zh-CN-IPZYQR3P-1h76csc4.js} +16 -7
- package/dist/{zh-CN-3INOX2E5-txhr8e18.js → zh-CN-YFKQ7HBX-w98q5zqf.js} +14 -5
- package/dist/{zh-TW-UI34YLZQ-j79rg6b7.js → zh-TW-CP5PCVEJ-wvbxf7c7.js} +14 -5
- package/dist/{zh-TW-QCJEQC5S-b1v637hd.js → zh-TW-GKSCT6NW-4n1yfre0.js} +464 -41
- package/dist/{zh-TW-QCJEQC5S-DQ3454QP-y8vvrebz.js → zh-TW-GKSCT6NW-JLMWTDAF-g2smq1gm.js} +466 -43
- package/dist/zh-TW-SO2245GN-m5kh88bg.js +32 -0
- package/dist/{zh-TW-Q5QSSTS6-6y7yjbbn.js → zh-TW-YPVSQVGT-wbybwpwt.js} +16 -7
- package/package.json +2 -2
- package/dist/de-CS2KUCZ6-j5a38g9p.js +0 -20
- package/dist/de-LVBY3VVG-gyt1s22e.js +0 -134
- package/dist/en-4UFXRW7N-p8f4r47q.js +0 -98
- package/dist/en-IMUXHKKC-3zcks7ks.js +0 -16
- package/dist/es-CI4AE5B5-yfv6qwgr.js +0 -134
- package/dist/es-MX-3MRZG6V4-9z56akxp.js +0 -20
- package/dist/es-MX-OLZNAYY5-6f3m32xs.js +0 -134
- package/dist/es-QBAGOKHO-b2azze22.js +0 -20
- package/dist/fr-CCN6ZO5E-srd8q9ne.js +0 -134
- package/dist/fr-HVOCQCNI-1zn75qzy.js +0 -20
- package/dist/ja-O2NEV5D6-pvhh5bag.js +0 -134
- package/dist/ja-VYAZOLWC-nbagzgre.js +0 -20
- package/dist/ko-7XWV2SEQ-9dz74aam.js +0 -134
- package/dist/ko-EZTVBPMZ-9qq2mrrz.js +0 -20
- package/dist/node-strategy-7bvg07kx.js +0 -63
- package/dist/packager-tool-060a9knt.js +0 -11
- package/dist/packager-tool-1q1bg65m.js +0 -5046
- package/dist/packager-tool-3yjtbs1y.js +0 -95
- package/dist/packager-tool-4f38v0ry.js +0 -1161
- package/dist/packager-tool-ahm4ymrp.js +0 -12
- package/dist/packager-tool-ek2dnj9h.js +0 -13
- package/dist/packager-tool-q94g73f7.js +0 -17392
- package/dist/pt-3TKAWGMJ-58y42w7x.js +0 -20
- package/dist/pt-BR-ASMQE3WA-9wb74cqx.js +0 -20
- package/dist/pt-BR-Z4J3LEEO-t28qfgyc.js +0 -134
- package/dist/pt-CRSN3TCU-s7hxhsxv.js +0 -134
- package/dist/ro-A65KBZGL-qnwqqezz.js +0 -20
- package/dist/ro-WMQEVD7D-h0kamt4a.js +0 -134
- package/dist/ru-GSCT4ARZ-YSDBAAM2-ha88ztsj.js +0 -15
- package/dist/ru-WBLQ5B2U-n1e7fn8t.js +0 -10
- package/dist/tr-UCMB7W3T-xv61hggk.js +0 -134
- package/dist/tr-Z7YHMEX6-daq3vjbh.js +0 -20
- package/dist/zh-CN-2QOHEFC5-meycvgab.js +0 -134
- package/dist/zh-CN-W7FK4GLU-vn3n8fcq.js +0 -20
- package/dist/zh-TW-PHOEUN3F-t56cjsgw.js +0 -20
- package/dist/zh-TW-Q5QSSTS6-65s6kte4.js +0 -134
|
@@ -1,56 +1,65 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ManifestClient,
|
|
3
|
-
OutputFormatter,
|
|
4
|
-
RESULTS,
|
|
5
3
|
buildErrorHandle,
|
|
6
|
-
catchError,
|
|
7
|
-
findNearestParentUipxFile,
|
|
8
4
|
getConnectorInfo,
|
|
9
|
-
getLoginStatusAsync,
|
|
10
5
|
getNode,
|
|
11
6
|
isConnectorNode,
|
|
12
7
|
isKnownSdkNodeType,
|
|
13
8
|
loadRegistry,
|
|
14
|
-
logger,
|
|
15
9
|
readFlowWorkflow,
|
|
16
|
-
readSolutionManifest,
|
|
17
10
|
validateIntSvcNode,
|
|
18
11
|
writeFlowWorkflow
|
|
19
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-xa2xwzrq.js";
|
|
13
|
+
import {
|
|
14
|
+
findNearestParentUipxFile,
|
|
15
|
+
getLoginStatusAsync,
|
|
16
|
+
readSolutionManifest
|
|
17
|
+
} from "./packager-tool-b0s5d4ek.js";
|
|
18
|
+
import {
|
|
19
|
+
OutputFormatter,
|
|
20
|
+
RESULTS,
|
|
21
|
+
catchError,
|
|
22
|
+
logger
|
|
23
|
+
} from "./packager-tool-ny53xmsd.js";
|
|
20
24
|
import {
|
|
21
25
|
getFileSystem
|
|
22
|
-
} from "./packager-tool-
|
|
26
|
+
} from "./packager-tool-1cb0d5e0.js";
|
|
23
27
|
import {
|
|
24
|
-
EntryPointType,
|
|
25
|
-
ProjectType,
|
|
26
28
|
addBinding,
|
|
27
29
|
addNode,
|
|
28
30
|
buildInlineAgentContract,
|
|
31
|
+
createBinding,
|
|
32
|
+
createFlowRefResolver,
|
|
33
|
+
generateNodeIdAndName,
|
|
34
|
+
getMigrationChain,
|
|
35
|
+
migrateWorkflowToFloor,
|
|
36
|
+
minimumSupportedVersion,
|
|
37
|
+
registerFlowMigrationsI18n,
|
|
38
|
+
resolveWorkflowRefs,
|
|
39
|
+
runtimeMigrations,
|
|
40
|
+
runtimeVersion
|
|
41
|
+
} from "./packager-tool-6a7wdv5z.js";
|
|
42
|
+
import {
|
|
43
|
+
EntryPointType,
|
|
44
|
+
ProjectType,
|
|
29
45
|
cliRules,
|
|
30
46
|
conditionExpressionRule,
|
|
31
|
-
createBinding,
|
|
32
|
-
currentVersion,
|
|
33
47
|
decodeLiteral,
|
|
34
48
|
generateBindingsJson,
|
|
35
49
|
generateEntryPointsJson,
|
|
36
|
-
generateNodeIdAndName,
|
|
37
50
|
generateOperateJson,
|
|
38
51
|
getBindingResources,
|
|
39
52
|
getEntryPoints,
|
|
40
53
|
getJsExpressionBody,
|
|
54
|
+
instance,
|
|
41
55
|
isBlockingSeverity,
|
|
42
56
|
isExpressionValue,
|
|
57
|
+
isStartEventNode,
|
|
43
58
|
mergeBindingResources,
|
|
44
|
-
migrateWorkflow,
|
|
45
|
-
migrations,
|
|
46
59
|
parseWorkflowJson,
|
|
47
|
-
registerFlowMigrationsI18n,
|
|
48
60
|
registerFlowSchemaI18n,
|
|
49
61
|
runRules
|
|
50
|
-
} from "./packager-tool-
|
|
51
|
-
import {
|
|
52
|
-
instance
|
|
53
|
-
} from "./packager-tool-9bnpe8n1.js";
|
|
62
|
+
} from "./packager-tool-ef2aypt3.js";
|
|
54
63
|
|
|
55
64
|
// src/services/connector-node-types.ts
|
|
56
65
|
function isConnectorTriggerType(nodeType) {
|
|
@@ -108,7 +117,7 @@ function validateCeqlFilterShape(nodeId, detail) {
|
|
|
108
117
|
issues.push({
|
|
109
118
|
path: `nodes[${nodeId}].inputs.detail.queryParameters["$where"]`,
|
|
110
119
|
severity: "error",
|
|
111
|
-
message: 'Connector node uses OData-style `"$where"` (with leading `$`) ' + "in queryParameters. CEQL uses bare `where` — rename the key " + 'from `"$where"` to `"where"`. The leading `$` is the OData ' + "system-query-option prefix and is not recognized by " + "uipath.connector.* nodes. See uipath-maestro-flow skill — " + "
|
|
120
|
+
message: 'Connector node uses OData-style `"$where"` (with leading `$`) ' + "in queryParameters. CEQL uses bare `where` — rename the key " + 'from `"$where"` to `"where"`. The leading `$` is the OData ' + "system-query-option prefix and is not recognized by " + "uipath.connector.* nodes. See uipath-maestro-flow skill — " + 'plugins/connector/impl.md, "Hand-authored CEQL strings" ' + "(MST-9265)."
|
|
112
121
|
});
|
|
113
122
|
}
|
|
114
123
|
const queryWhere = queryParameters?.where;
|
|
@@ -120,14 +129,14 @@ function validateCeqlFilterShape(nodeId, detail) {
|
|
|
120
129
|
issues.push({
|
|
121
130
|
path: `nodes[${nodeId}].inputs.detail.savedFilterTrees.where`,
|
|
122
131
|
severity: "error",
|
|
123
|
-
message: "Connector node has `queryParameters.where` set but no " + "matching `savedFilterTrees.where` AST — neither at " + "`inputs.detail.savedFilterTrees.where` nor as " + "`essentialConfiguration.savedFilterTrees.where` inside " + "`inputs.detail.configuration`. CEQL filters must be authored " + "as both the raw filter expression (`queryParameters.where`) " + "AND a parallel canonical AST (`filters[].id` / `.operator` / " + "`.value.value`). The Studio Web canvas needs the AST to " + "render the filter UI; the runtime needs the expression. " + "Re-run `uip maestro flow node configure --detail.filter` to " + "author both. See uipath-maestro-flow skill —
|
|
132
|
+
message: "Connector node has `queryParameters.where` set but no " + "matching `savedFilterTrees.where` AST — neither at " + "`inputs.detail.savedFilterTrees.where` nor as " + "`essentialConfiguration.savedFilterTrees.where` inside " + "`inputs.detail.configuration`. CEQL filters must be authored " + "as both the raw filter expression (`queryParameters.where`) " + "AND a parallel canonical AST (`filters[].id` / `.operator` / " + "`.value.value`). The Studio Web canvas needs the AST to " + "render the filter UI; the runtime needs the expression. " + "Re-run `uip maestro flow node configure --detail.filter` to " + "author both. See uipath-maestro-flow skill — " + 'plugins/connector/impl.md, "Hand-authored CEQL strings" ' + "(MST-9265)."
|
|
124
133
|
});
|
|
125
134
|
}
|
|
126
135
|
if (savedWhereAuthored && !queryWhereAuthored) {
|
|
127
136
|
issues.push({
|
|
128
137
|
path: `nodes[${nodeId}].inputs.detail.queryParameters.where`,
|
|
129
138
|
severity: "error",
|
|
130
|
-
message: "Connector node has `savedFilterTrees.where` AST but no " + "matching `queryParameters.where` expression. CEQL filters " + "must be authored on both keys in parallel — the runtime " + "evaluates `queryParameters.where`, not the AST. See " +
|
|
139
|
+
message: "Connector node has `savedFilterTrees.where` AST but no " + "matching `queryParameters.where` expression. CEQL filters " + "must be authored on both keys in parallel — the runtime " + "evaluates `queryParameters.where`, not the AST. See " + 'uipath-maestro-flow skill — plugins/connector/impl.md, "Hand-authored ' + 'CEQL strings" (MST-9265).'
|
|
131
140
|
});
|
|
132
141
|
}
|
|
133
142
|
return issues;
|
|
@@ -195,435 +204,77 @@ function shellSingleQuote(value) {
|
|
|
195
204
|
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
196
205
|
}
|
|
197
206
|
|
|
198
|
-
//
|
|
199
|
-
var
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
var
|
|
217
|
-
var
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
207
|
+
// ../../node_modules/acorn/dist/acorn.mjs
|
|
208
|
+
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
209
|
+
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
|
|
210
|
+
var nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
|
|
211
|
+
var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
|
|
212
|
+
var reservedWords = {
|
|
213
|
+
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
214
|
+
5: "class enum extends super const export import",
|
|
215
|
+
6: "enum",
|
|
216
|
+
strict: "implements interface let package private protected public static yield",
|
|
217
|
+
strictBind: "eval arguments"
|
|
218
|
+
};
|
|
219
|
+
var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
|
|
220
|
+
var keywords$1 = {
|
|
221
|
+
5: ecma5AndLessKeywords,
|
|
222
|
+
"5module": ecma5AndLessKeywords + " export import",
|
|
223
|
+
6: ecma5AndLessKeywords + " const class extends export import super"
|
|
224
|
+
};
|
|
225
|
+
var keywordRelationalOperator = /^in(stanceof)?$/;
|
|
226
|
+
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
227
|
+
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
228
|
+
function isInAstralSet(code, set) {
|
|
229
|
+
var pos = 65536;
|
|
230
|
+
for (var i = 0;i < set.length; i += 2) {
|
|
231
|
+
pos += set[i];
|
|
232
|
+
if (pos > code) {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
pos += set[i + 1];
|
|
236
|
+
if (pos >= code) {
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
229
239
|
}
|
|
230
|
-
|
|
231
|
-
if (!template)
|
|
232
|
-
return;
|
|
233
|
-
return {
|
|
234
|
-
body: template[1],
|
|
235
|
-
wrap: (body) => `=js:\`${body}\``
|
|
236
|
-
};
|
|
240
|
+
return false;
|
|
237
241
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
return [];
|
|
242
|
-
const fieldNames = [];
|
|
243
|
-
const fixedBody = ceql.body.replace(CEQL_QUOTED_FIELD_RE, (match, fieldName) => {
|
|
244
|
-
fieldNames.push(fieldName);
|
|
245
|
-
return match.replace(`'${fieldName}'`, () => fieldName);
|
|
246
|
-
});
|
|
247
|
-
if (fieldNames.length === 0)
|
|
248
|
-
return [];
|
|
249
|
-
let fixedValue = ceql.wrap(fixedBody);
|
|
250
|
-
if (!fixedValue.trim().startsWith("=js:") && fixedValue.includes("${")) {
|
|
251
|
-
fixedValue = `=js:\`${fixedValue}\``;
|
|
242
|
+
function isIdentifierStart(code, astral) {
|
|
243
|
+
if (code < 65) {
|
|
244
|
+
return code === 36;
|
|
252
245
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
function ceqlQuotedFieldMessage(issue) {
|
|
256
|
-
return `Quoted token '${issue.fieldName}' where CEQL expects a bare field name — ` + "Integration Service rejects this with [102003]. " + `Write "${issue.fixedValue}" instead. ` + "See uipath-maestro-flow skill — ceql-filters reference.";
|
|
257
|
-
}
|
|
258
|
-
function scanContainerForCeqlQuotedFields(obj, path, severity, issues) {
|
|
259
|
-
if (typeof obj === "string") {
|
|
260
|
-
for (const issue of findCeqlQuotedFieldNames(obj)) {
|
|
261
|
-
issues.push({
|
|
262
|
-
path,
|
|
263
|
-
severity,
|
|
264
|
-
message: ceqlQuotedFieldMessage(issue)
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
return;
|
|
246
|
+
if (code < 91) {
|
|
247
|
+
return true;
|
|
268
248
|
}
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
scanContainerForCeqlQuotedFields(obj[i], `${path}[${i}]`, severity, issues);
|
|
272
|
-
}
|
|
273
|
-
return;
|
|
249
|
+
if (code < 97) {
|
|
250
|
+
return code === 95;
|
|
274
251
|
}
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
scanContainerForCeqlQuotedFields(value, `${path}.${key}`, severity, issues);
|
|
278
|
-
}
|
|
252
|
+
if (code < 123) {
|
|
253
|
+
return true;
|
|
279
254
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
id: "ceql-query",
|
|
283
|
-
appliesTo: (node) => {
|
|
284
|
-
const t = node.type;
|
|
285
|
-
if (!t)
|
|
286
|
-
return false;
|
|
287
|
-
if (isEventDrivenConnectorType(t))
|
|
288
|
-
return false;
|
|
289
|
-
return t.startsWith("uipath.connector.");
|
|
290
|
-
},
|
|
291
|
-
validate: (node, context) => {
|
|
292
|
-
const rawDetail = node.inputs?.detail;
|
|
293
|
-
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
294
|
-
return [];
|
|
295
|
-
}
|
|
296
|
-
const queryParameters = rawDetail.queryParameters;
|
|
297
|
-
if (!queryParameters || typeof queryParameters !== "object" || Array.isArray(queryParameters)) {
|
|
298
|
-
return [];
|
|
299
|
-
}
|
|
300
|
-
const severity = context.strictBindings ? "error" : "warning";
|
|
301
|
-
const issues = [];
|
|
302
|
-
for (const [key, value] of Object.entries(queryParameters)) {
|
|
303
|
-
if (!CEQL_FILTER_PARAMETERS.has(key))
|
|
304
|
-
continue;
|
|
305
|
-
scanContainerForCeqlQuotedFields(value, `nodes[${node.id}].inputs.detail.queryParameters.${key}`, severity, issues);
|
|
306
|
-
}
|
|
307
|
-
return issues;
|
|
255
|
+
if (code <= 65535) {
|
|
256
|
+
return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
|
308
257
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
function findCrossNodeBindingReferences(value, nodeIds) {
|
|
314
|
-
if (nodeIds.size === 0)
|
|
315
|
-
return [];
|
|
316
|
-
const trimmed = value.trimStart();
|
|
317
|
-
if (!trimmed.startsWith("=js:"))
|
|
318
|
-
return [];
|
|
319
|
-
const body = trimmed.slice(4);
|
|
320
|
-
const referenced = new Set;
|
|
321
|
-
const fixedBody = body.replace(IDENTIFIER_ROOT_RE, (match, identifier) => {
|
|
322
|
-
if (!nodeIds.has(identifier))
|
|
323
|
-
return match;
|
|
324
|
-
referenced.add(identifier);
|
|
325
|
-
return `$vars.${match}`;
|
|
326
|
-
});
|
|
327
|
-
if (referenced.size === 0)
|
|
328
|
-
return [];
|
|
329
|
-
const fixedValue = `=js:${fixedBody}`;
|
|
330
|
-
return [...referenced].map((nodeId) => ({ nodeId, fixedValue }));
|
|
331
|
-
}
|
|
332
|
-
function crossNodeBindingMessage(originalValue, ref) {
|
|
333
|
-
return `Expression "${originalValue}" references node "${ref.nodeId}" without the "$vars." prefix — ` + `cross-node outputs resolve to undefined at runtime (the bare identifier reads as an ` + `undeclared local, not the runtime variable). Use "${ref.fixedValue}" instead. ` + "See uipath-maestro-flow skill — node-output-wiring.md (FPD-538).";
|
|
258
|
+
if (astral === false) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
return isInAstralSet(code, astralIdentifierStartCodes);
|
|
334
262
|
}
|
|
335
|
-
function
|
|
336
|
-
if (
|
|
337
|
-
|
|
338
|
-
issues.push({
|
|
339
|
-
path,
|
|
340
|
-
severity,
|
|
341
|
-
message: crossNodeBindingMessage(obj, ref)
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
return;
|
|
263
|
+
function isIdentifierChar(code, astral) {
|
|
264
|
+
if (code < 48) {
|
|
265
|
+
return code === 36;
|
|
345
266
|
}
|
|
346
|
-
if (
|
|
347
|
-
|
|
348
|
-
scanContainerForCrossNodeBindings(obj[i], `${path}[${i}]`, nodeIds, severity, issues);
|
|
349
|
-
}
|
|
350
|
-
return;
|
|
267
|
+
if (code < 58) {
|
|
268
|
+
return true;
|
|
351
269
|
}
|
|
352
|
-
if (
|
|
353
|
-
|
|
354
|
-
scanContainerForCrossNodeBindings(value, `${path}.${key}`, nodeIds, severity, issues);
|
|
355
|
-
}
|
|
270
|
+
if (code < 65) {
|
|
271
|
+
return false;
|
|
356
272
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
"bodyParameters",
|
|
360
|
-
"queryParameters",
|
|
361
|
-
"pathParameters"
|
|
362
|
-
];
|
|
363
|
-
function scanDetailForCrossNodeBindings(detail, nodeIds, severity = "warning") {
|
|
364
|
-
if (!detail || nodeIds.size === 0)
|
|
365
|
-
return [];
|
|
366
|
-
const issues = [];
|
|
367
|
-
for (const containerKey of PARAMETER_CONTAINER_KEYS) {
|
|
368
|
-
const container = detail[containerKey];
|
|
369
|
-
if (!container || typeof container !== "object" || Array.isArray(container)) {
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
scanContainerForCrossNodeBindings(container, `detail.${containerKey}`, nodeIds, severity, issues);
|
|
273
|
+
if (code < 91) {
|
|
274
|
+
return true;
|
|
373
275
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
var crossNodeBindingValidator = {
|
|
377
|
-
id: "cross-node-binding",
|
|
378
|
-
appliesTo: (node) => {
|
|
379
|
-
const t = node.type;
|
|
380
|
-
if (!t)
|
|
381
|
-
return false;
|
|
382
|
-
if (isEventDrivenConnectorType(t))
|
|
383
|
-
return false;
|
|
384
|
-
return t.startsWith("uipath.connector.") || t === "core.action.http" || t === "core.action.http.v2";
|
|
385
|
-
},
|
|
386
|
-
validate: (node, context) => {
|
|
387
|
-
const nodeIds = context.nodeIds ?? new Set;
|
|
388
|
-
if (nodeIds.size === 0)
|
|
389
|
-
return [];
|
|
390
|
-
const rawDetail = node.inputs?.detail;
|
|
391
|
-
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
392
|
-
return [];
|
|
393
|
-
}
|
|
394
|
-
const severity = context.strictBindings ? "error" : "warning";
|
|
395
|
-
const issues = scanDetailForCrossNodeBindings(rawDetail, nodeIds, severity);
|
|
396
|
-
return issues.map((issue) => ({
|
|
397
|
-
...issue,
|
|
398
|
-
path: `nodes[${node.id}].inputs.${issue.path}`
|
|
399
|
-
}));
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// src/services/node-validators/expression-prefix-validator.ts
|
|
404
|
-
var expressionPrefixValidator = {
|
|
405
|
-
id: "expression-prefix",
|
|
406
|
-
appliesTo: (node) => {
|
|
407
|
-
const t = node.type;
|
|
408
|
-
if (!t)
|
|
409
|
-
return false;
|
|
410
|
-
if (isEventDrivenConnectorType(t))
|
|
411
|
-
return false;
|
|
412
|
-
return t.startsWith("uipath.connector.") || t === "core.action.http" || t === "core.action.http.v2" || t === "core.action.script";
|
|
413
|
-
},
|
|
414
|
-
validate: (node) => {
|
|
415
|
-
const issues = [];
|
|
416
|
-
if (node.type === "core.action.script") {
|
|
417
|
-
scanScriptSource(node.id, node.inputs, issues);
|
|
418
|
-
return issues;
|
|
419
|
-
}
|
|
420
|
-
const rawDetail = node.inputs?.detail;
|
|
421
|
-
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
422
|
-
return [];
|
|
423
|
-
}
|
|
424
|
-
const detail = rawDetail;
|
|
425
|
-
for (const containerKey of [
|
|
426
|
-
"bodyParameters",
|
|
427
|
-
"queryParameters",
|
|
428
|
-
"pathParameters"
|
|
429
|
-
]) {
|
|
430
|
-
const container = detail[containerKey];
|
|
431
|
-
if (!container || typeof container !== "object" || Array.isArray(container)) {
|
|
432
|
-
continue;
|
|
433
|
-
}
|
|
434
|
-
scanForUnprefixedExpressions(container, `nodes[${node.id}].inputs.detail.${containerKey}`, issues);
|
|
435
|
-
}
|
|
436
|
-
return issues;
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
function scanScriptSource(nodeId, inputs, issues) {
|
|
440
|
-
if (!inputs)
|
|
441
|
-
return;
|
|
442
|
-
const source = inputs.source;
|
|
443
|
-
if (typeof source !== "string")
|
|
444
|
-
return;
|
|
445
|
-
const trimmed = source.trimStart();
|
|
446
|
-
if (!trimmed.startsWith("=js:"))
|
|
447
|
-
return;
|
|
448
|
-
issues.push({
|
|
449
|
-
path: `nodes[${nodeId}].inputs.source`,
|
|
450
|
-
severity: "error",
|
|
451
|
-
message: 'Script node `inputs.source` begins with `"=js:"` — that is the ' + "property-level expression-mode marker for connector / HTTP / " + "End-output / subflow-input fields, not JavaScript syntax. The " + "Script node's `source` field is the function body; runtime treats " + 'this value as literal source code, so e.g. `"=js:vars.X.Y"` ' + "compiles into a string-reversed gibberish output. Replace with a " + 'JavaScript expression that returns the value, e.g. `"return ' + '$vars.X.Y"` or a multi-statement function body. See ' + "uipath-maestro-flow skill — script-node reference (MST-9265)."
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
var BARE_DOLLAR_REF_RE = /^\$(vars|metadata|self)\b/;
|
|
455
|
-
var INVENTED_NODES_REF_RE = /^nodes\.[A-Za-z_$][\w$]*\.output\b/;
|
|
456
|
-
function scanForUnprefixedExpressions(obj, path, issues) {
|
|
457
|
-
if (typeof obj === "string") {
|
|
458
|
-
const trimmed = obj.trimStart();
|
|
459
|
-
if (trimmed.startsWith("="))
|
|
460
|
-
return;
|
|
461
|
-
if (BARE_DOLLAR_REF_RE.test(trimmed)) {
|
|
462
|
-
issues.push({
|
|
463
|
-
path,
|
|
464
|
-
severity: "error",
|
|
465
|
-
message: `Value "${obj}" references a runtime variable but is missing the "=js:" prefix. Use "=js:${obj}" so the runtime evaluates it; without the prefix, the value ships as a literal string and the activity input is bound to "${obj.replace(/^\$vars\b/, "vars").replace(/^\$metadata\b/, "metadata").replace(/^\$self\b/, "self")}". See uipath-maestro-flow skill — node-output-wiring.md (MST-9107).`
|
|
466
|
-
});
|
|
467
|
-
return;
|
|
468
|
-
}
|
|
469
|
-
if (INVENTED_NODES_REF_RE.test(trimmed)) {
|
|
470
|
-
const fixed = trimmed.replace(/^nodes\./, "=js:$vars.");
|
|
471
|
-
issues.push({
|
|
472
|
-
path,
|
|
473
|
-
severity: "error",
|
|
474
|
-
message: `Value "${obj}" looks like an invented "nodes.<id>.output" reference. There is no such syntax — variable references use "$vars". Write "${fixed}" instead. See uipath-maestro-flow skill — node-output-wiring.md (MST-9107).`
|
|
475
|
-
});
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
if (Array.isArray(obj)) {
|
|
481
|
-
for (let i = 0;i < obj.length; i++) {
|
|
482
|
-
scanForUnprefixedExpressions(obj[i], `${path}[${i}]`, issues);
|
|
483
|
-
}
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
if (obj && typeof obj === "object") {
|
|
487
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
488
|
-
scanForUnprefixedExpressions(value, `${path}.${key}`, issues);
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// src/services/node-validators/ixp-node-validator.ts
|
|
494
|
-
var FORBIDDEN_INPUT_FIELDS = [
|
|
495
|
-
"digitizationMode",
|
|
496
|
-
"documentTaxonomy",
|
|
497
|
-
"attachmentId",
|
|
498
|
-
"fileName",
|
|
499
|
-
"mimeType"
|
|
500
|
-
];
|
|
501
|
-
var FILE_REF_PATTERN = /^=js:\$vars\.[A-Za-z_$]/;
|
|
502
|
-
var ixpNodeValidator = {
|
|
503
|
-
id: "ixp-node",
|
|
504
|
-
appliesTo: (node) => typeof node.type === "string" && node.type.startsWith("uipath.ixp."),
|
|
505
|
-
validate: (node, _context) => {
|
|
506
|
-
const issues = [];
|
|
507
|
-
const inputs = node.inputs ?? {};
|
|
508
|
-
const outputs = node.outputs ?? {};
|
|
509
|
-
const base = `nodes[${node.id}]`;
|
|
510
|
-
const model = inputs.model;
|
|
511
|
-
const isNonEmptyString2 = (v) => typeof v === "string" && v.length > 0;
|
|
512
|
-
if (typeof model !== "object" || model === null || Array.isArray(model) || !isNonEmptyString2(model.modelName) || !isNonEmptyString2(model.folderKey)) {
|
|
513
|
-
issues.push({
|
|
514
|
-
path: `${base}.inputs.model`,
|
|
515
|
-
severity: "error",
|
|
516
|
-
message: "inputs.model must be an object with non-empty string " + "`modelName` and `folderKey`. Studio Web's property " + "panel destructures these and crashes when either is " + "missing or not a string."
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
const fileRef = inputs.fileRef;
|
|
520
|
-
if (typeof fileRef !== "string" || !FILE_REF_PATTERN.test(fileRef)) {
|
|
521
|
-
issues.push({
|
|
522
|
-
path: `${base}.inputs.fileRef`,
|
|
523
|
-
severity: "error",
|
|
524
|
-
message: "inputs.fileRef must be a `=js:$vars.…` expression. " + "The canonical form for an upstream node output is " + "`=js:$vars.<upstream>.output.<field>`. Without the " + "`=js:` prefix the BPMN serializer treats the value " + "as a literal string at runtime."
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
for (const port of ["output", "error"]) {
|
|
528
|
-
if (!(port in outputs)) {
|
|
529
|
-
issues.push({
|
|
530
|
-
path: `${base}.outputs.${port}`,
|
|
531
|
-
severity: "error",
|
|
532
|
-
message: `outputs.${port} must be present on the instance. ` + `Without it, downstream $vars.${node.id}.${port} ` + "references will not resolve at runtime."
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
const topLevelModel = node.model;
|
|
537
|
-
if (topLevelModel != null) {
|
|
538
|
-
issues.push({
|
|
539
|
-
path: `${base}.model`,
|
|
540
|
-
severity: "error",
|
|
541
|
-
message: "Top-level `model` block is forbidden on IxP node " + "instances. The manifest's slim model " + "({ type, serviceType }) lives only in `definitions[]`."
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
const legacy = FORBIDDEN_INPUT_FIELDS.filter((k) => (k in inputs));
|
|
545
|
-
if (legacy.length > 0) {
|
|
546
|
-
issues.push({
|
|
547
|
-
path: `${base}.inputs`,
|
|
548
|
-
severity: "error",
|
|
549
|
-
message: "Forbidden legacy fields in inputs: " + `${legacy.join(", ")}. These keys were removed from ` + "the current standalone IxP schema and are not " + "returned by `registry get`."
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
return issues;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
// ../../node_modules/acorn/dist/acorn.mjs
|
|
557
|
-
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
558
|
-
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
|
|
559
|
-
var nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
|
|
560
|
-
var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
|
|
561
|
-
var reservedWords = {
|
|
562
|
-
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
563
|
-
5: "class enum extends super const export import",
|
|
564
|
-
6: "enum",
|
|
565
|
-
strict: "implements interface let package private protected public static yield",
|
|
566
|
-
strictBind: "eval arguments"
|
|
567
|
-
};
|
|
568
|
-
var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
|
|
569
|
-
var keywords$1 = {
|
|
570
|
-
5: ecma5AndLessKeywords,
|
|
571
|
-
"5module": ecma5AndLessKeywords + " export import",
|
|
572
|
-
6: ecma5AndLessKeywords + " const class extends export import super"
|
|
573
|
-
};
|
|
574
|
-
var keywordRelationalOperator = /^in(stanceof)?$/;
|
|
575
|
-
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
576
|
-
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
577
|
-
function isInAstralSet(code, set) {
|
|
578
|
-
var pos = 65536;
|
|
579
|
-
for (var i = 0;i < set.length; i += 2) {
|
|
580
|
-
pos += set[i];
|
|
581
|
-
if (pos > code) {
|
|
582
|
-
return false;
|
|
583
|
-
}
|
|
584
|
-
pos += set[i + 1];
|
|
585
|
-
if (pos >= code) {
|
|
586
|
-
return true;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
return false;
|
|
590
|
-
}
|
|
591
|
-
function isIdentifierStart(code, astral) {
|
|
592
|
-
if (code < 65) {
|
|
593
|
-
return code === 36;
|
|
594
|
-
}
|
|
595
|
-
if (code < 91) {
|
|
596
|
-
return true;
|
|
597
|
-
}
|
|
598
|
-
if (code < 97) {
|
|
599
|
-
return code === 95;
|
|
600
|
-
}
|
|
601
|
-
if (code < 123) {
|
|
602
|
-
return true;
|
|
603
|
-
}
|
|
604
|
-
if (code <= 65535) {
|
|
605
|
-
return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
|
|
606
|
-
}
|
|
607
|
-
if (astral === false) {
|
|
608
|
-
return false;
|
|
609
|
-
}
|
|
610
|
-
return isInAstralSet(code, astralIdentifierStartCodes);
|
|
611
|
-
}
|
|
612
|
-
function isIdentifierChar(code, astral) {
|
|
613
|
-
if (code < 48) {
|
|
614
|
-
return code === 36;
|
|
615
|
-
}
|
|
616
|
-
if (code < 58) {
|
|
617
|
-
return true;
|
|
618
|
-
}
|
|
619
|
-
if (code < 65) {
|
|
620
|
-
return false;
|
|
621
|
-
}
|
|
622
|
-
if (code < 91) {
|
|
623
|
-
return true;
|
|
624
|
-
}
|
|
625
|
-
if (code < 97) {
|
|
626
|
-
return code === 95;
|
|
276
|
+
if (code < 97) {
|
|
277
|
+
return code === 95;
|
|
627
278
|
}
|
|
628
279
|
if (code < 123) {
|
|
629
280
|
return true;
|
|
@@ -5832,77 +5483,588 @@ pp.readEscapedChar = function(inTemplate) {
|
|
|
5832
5483
|
}
|
|
5833
5484
|
return String.fromCharCode(ch);
|
|
5834
5485
|
}
|
|
5835
|
-
};
|
|
5836
|
-
pp.readHexChar = function(len) {
|
|
5837
|
-
var codePos = this.pos;
|
|
5838
|
-
var n = this.readInt(16, len);
|
|
5839
|
-
if (n === null) {
|
|
5840
|
-
this.invalidStringToken(codePos, "Bad character escape sequence");
|
|
5486
|
+
};
|
|
5487
|
+
pp.readHexChar = function(len) {
|
|
5488
|
+
var codePos = this.pos;
|
|
5489
|
+
var n = this.readInt(16, len);
|
|
5490
|
+
if (n === null) {
|
|
5491
|
+
this.invalidStringToken(codePos, "Bad character escape sequence");
|
|
5492
|
+
}
|
|
5493
|
+
return n;
|
|
5494
|
+
};
|
|
5495
|
+
pp.readWord1 = function() {
|
|
5496
|
+
this.containsEsc = false;
|
|
5497
|
+
var word = "", first = true, chunkStart = this.pos;
|
|
5498
|
+
var astral = this.options.ecmaVersion >= 6;
|
|
5499
|
+
while (this.pos < this.input.length) {
|
|
5500
|
+
var ch = this.fullCharCodeAtPos();
|
|
5501
|
+
if (isIdentifierChar(ch, astral)) {
|
|
5502
|
+
this.pos += ch <= 65535 ? 1 : 2;
|
|
5503
|
+
} else if (ch === 92) {
|
|
5504
|
+
this.containsEsc = true;
|
|
5505
|
+
word += this.input.slice(chunkStart, this.pos);
|
|
5506
|
+
var escStart = this.pos;
|
|
5507
|
+
if (this.input.charCodeAt(++this.pos) !== 117) {
|
|
5508
|
+
this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX");
|
|
5509
|
+
}
|
|
5510
|
+
++this.pos;
|
|
5511
|
+
var esc = this.readCodePoint();
|
|
5512
|
+
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) {
|
|
5513
|
+
this.invalidStringToken(escStart, "Invalid Unicode escape");
|
|
5514
|
+
}
|
|
5515
|
+
word += codePointToString(esc);
|
|
5516
|
+
chunkStart = this.pos;
|
|
5517
|
+
} else {
|
|
5518
|
+
break;
|
|
5519
|
+
}
|
|
5520
|
+
first = false;
|
|
5521
|
+
}
|
|
5522
|
+
return word + this.input.slice(chunkStart, this.pos);
|
|
5523
|
+
};
|
|
5524
|
+
pp.readWord = function() {
|
|
5525
|
+
var word = this.readWord1();
|
|
5526
|
+
var type = types$1.name;
|
|
5527
|
+
if (this.keywords.test(word)) {
|
|
5528
|
+
type = keywords[word];
|
|
5529
|
+
}
|
|
5530
|
+
return this.finishToken(type, word);
|
|
5531
|
+
};
|
|
5532
|
+
var version = "8.17.0";
|
|
5533
|
+
Parser.acorn = {
|
|
5534
|
+
Parser,
|
|
5535
|
+
version,
|
|
5536
|
+
defaultOptions,
|
|
5537
|
+
Position,
|
|
5538
|
+
SourceLocation,
|
|
5539
|
+
getLineInfo,
|
|
5540
|
+
Node,
|
|
5541
|
+
TokenType,
|
|
5542
|
+
tokTypes: types$1,
|
|
5543
|
+
keywordTypes: keywords,
|
|
5544
|
+
TokContext,
|
|
5545
|
+
tokContexts: types,
|
|
5546
|
+
isIdentifierChar,
|
|
5547
|
+
isIdentifierStart,
|
|
5548
|
+
Token,
|
|
5549
|
+
isNewLine,
|
|
5550
|
+
lineBreak,
|
|
5551
|
+
lineBreakG,
|
|
5552
|
+
nonASCIIwhitespace
|
|
5553
|
+
};
|
|
5554
|
+
function parse3(input, options) {
|
|
5555
|
+
return Parser.parse(input, options);
|
|
5556
|
+
}
|
|
5557
|
+
|
|
5558
|
+
// src/services/node-validators/ceql-query-validator.ts
|
|
5559
|
+
var CEQL_SYMBOL_OPERATORS = ["=", "!=", "<", "<=", ">", ">="];
|
|
5560
|
+
var CEQL_WORD_OPERATORS = [
|
|
5561
|
+
"In",
|
|
5562
|
+
"Not In",
|
|
5563
|
+
"Like",
|
|
5564
|
+
"Not Like",
|
|
5565
|
+
"Contains",
|
|
5566
|
+
"Not Contains",
|
|
5567
|
+
"Starts With",
|
|
5568
|
+
"Not Starts With",
|
|
5569
|
+
"Ends With",
|
|
5570
|
+
"Not Ends With",
|
|
5571
|
+
"Is Null",
|
|
5572
|
+
"Is Not Null"
|
|
5573
|
+
];
|
|
5574
|
+
var CEQL_OPERATOR_ALIASES = {
|
|
5575
|
+
eq: "=",
|
|
5576
|
+
ne: "!=",
|
|
5577
|
+
gt: ">",
|
|
5578
|
+
ge: ">=",
|
|
5579
|
+
lt: "<",
|
|
5580
|
+
le: "<="
|
|
5581
|
+
};
|
|
5582
|
+
var byLengthDescending = (a, b) => b.length - a.length;
|
|
5583
|
+
var escapeRegexToken = (token) => token.replace(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
5584
|
+
var toWordOperatorPattern = (token) => token.split(/\s+/).map(escapeRegexToken).join(String.raw`\s+`);
|
|
5585
|
+
var CEQL_SYMBOL_OPERATOR_ALTERNATION = [...CEQL_SYMBOL_OPERATORS].sort(byLengthDescending).map(escapeRegexToken).join("|");
|
|
5586
|
+
var CEQL_WORD_OPERATOR_ALTERNATION = [...CEQL_WORD_OPERATORS].sort(byLengthDescending).map(toWordOperatorPattern).join("|");
|
|
5587
|
+
var CEQL_OPERATOR = String.raw`(?:${CEQL_SYMBOL_OPERATOR_ALTERNATION}|(?:${CEQL_WORD_OPERATOR_ALTERNATION})\b)`;
|
|
5588
|
+
var CEQL_OPERATOR_ALIAS_ALTERNATION = Object.keys(CEQL_OPERATOR_ALIASES).map(escapeRegexToken).join("|");
|
|
5589
|
+
var CEQL_FIELD_OPERATOR = String.raw`(?:${CEQL_OPERATOR}|(?:${CEQL_OPERATOR_ALIAS_ALTERNATION})\b)`;
|
|
5590
|
+
var CEQL_FILTER_PARAMETERS = new Set(["where", "queryExpression"]);
|
|
5591
|
+
var CEQL_REFERENCE = 'See uipath-maestro-flow skill — plugins/connector/impl.md, "Hand-authored CEQL strings".';
|
|
5592
|
+
var HOLE = "\x00";
|
|
5593
|
+
var JS_PREFIX = "=js:";
|
|
5594
|
+
function collectFragments(root, fragments) {
|
|
5595
|
+
const pending = [root];
|
|
5596
|
+
while (pending.length > 0) {
|
|
5597
|
+
const item = pending.pop();
|
|
5598
|
+
if (!("type" in item)) {
|
|
5599
|
+
fragments.push(item);
|
|
5600
|
+
continue;
|
|
5601
|
+
}
|
|
5602
|
+
switch (item.type) {
|
|
5603
|
+
case "Literal":
|
|
5604
|
+
fragments.push(typeof item.value === "string" ? { kind: "text", text: item.value } : { kind: "hole" });
|
|
5605
|
+
continue;
|
|
5606
|
+
case "BinaryExpression":
|
|
5607
|
+
if (item.operator !== "+") {
|
|
5608
|
+
fragments.push({ kind: "hole" });
|
|
5609
|
+
continue;
|
|
5610
|
+
}
|
|
5611
|
+
pending.push(item.right, item.left);
|
|
5612
|
+
continue;
|
|
5613
|
+
case "TemplateLiteral":
|
|
5614
|
+
for (let i2 = item.quasis.length - 1;i2 >= 0; i2--) {
|
|
5615
|
+
if (i2 < item.expressions.length)
|
|
5616
|
+
pending.push({ kind: "hole" });
|
|
5617
|
+
pending.push({
|
|
5618
|
+
kind: "text",
|
|
5619
|
+
text: item.quasis[i2].value.cooked ?? ""
|
|
5620
|
+
});
|
|
5621
|
+
}
|
|
5622
|
+
continue;
|
|
5623
|
+
default:
|
|
5624
|
+
fragments.push({ kind: "hole" });
|
|
5625
|
+
}
|
|
5626
|
+
}
|
|
5627
|
+
}
|
|
5628
|
+
function isStringConcatShape(node) {
|
|
5629
|
+
if (node.type === "TemplateLiteral")
|
|
5630
|
+
return true;
|
|
5631
|
+
if (node.type === "Literal")
|
|
5632
|
+
return typeof node.value === "string";
|
|
5633
|
+
return node.type === "BinaryExpression" && node.operator === "+";
|
|
5634
|
+
}
|
|
5635
|
+
function lexCeqlFilterValue(value) {
|
|
5636
|
+
const trimmed = value.trim();
|
|
5637
|
+
if (!trimmed.startsWith(JS_PREFIX)) {
|
|
5638
|
+
if (trimmed.startsWith("="))
|
|
5639
|
+
return;
|
|
5640
|
+
return [{ kind: "text", text: value }];
|
|
5641
|
+
}
|
|
5642
|
+
let program;
|
|
5643
|
+
try {
|
|
5644
|
+
program = parse3(`(${trimmed.slice(JS_PREFIX.length)}
|
|
5645
|
+
)`, {
|
|
5646
|
+
ecmaVersion: 2020,
|
|
5647
|
+
sourceType: "script"
|
|
5648
|
+
});
|
|
5649
|
+
} catch {
|
|
5650
|
+
return;
|
|
5651
|
+
}
|
|
5652
|
+
const statement = program.body[0];
|
|
5653
|
+
if (statement?.type !== "ExpressionStatement")
|
|
5654
|
+
return;
|
|
5655
|
+
if (!isStringConcatShape(statement.expression))
|
|
5656
|
+
return;
|
|
5657
|
+
const fragments = [];
|
|
5658
|
+
collectFragments(statement.expression, fragments);
|
|
5659
|
+
return fragments;
|
|
5660
|
+
}
|
|
5661
|
+
function buildSkeleton(fragments) {
|
|
5662
|
+
let text = "";
|
|
5663
|
+
const holeAt = [];
|
|
5664
|
+
for (const fragment of fragments) {
|
|
5665
|
+
if (fragment.kind === "hole") {
|
|
5666
|
+
text += HOLE;
|
|
5667
|
+
holeAt.push(true);
|
|
5668
|
+
continue;
|
|
5669
|
+
}
|
|
5670
|
+
text += fragment.text;
|
|
5671
|
+
for (let i2 = 0;i2 < fragment.text.length; i2++)
|
|
5672
|
+
holeAt.push(false);
|
|
5673
|
+
}
|
|
5674
|
+
return { text, holeAt };
|
|
5675
|
+
}
|
|
5676
|
+
function singleQuoteOpenBefore(skeleton) {
|
|
5677
|
+
const openBefore = new Array(skeleton.length);
|
|
5678
|
+
let open = false;
|
|
5679
|
+
for (let i2 = 0;i2 < skeleton.length; i2++) {
|
|
5680
|
+
openBefore[i2] = open;
|
|
5681
|
+
if (skeleton[i2] === "'")
|
|
5682
|
+
open = !open;
|
|
5683
|
+
}
|
|
5684
|
+
return openBefore;
|
|
5685
|
+
}
|
|
5686
|
+
function renderSkeletonSlice(skeleton, start, length) {
|
|
5687
|
+
let rendered = "";
|
|
5688
|
+
for (let i2 = start;i2 < start + length; i2++) {
|
|
5689
|
+
rendered += skeleton.holeAt[i2] ? "<expression>" : skeleton.text[i2];
|
|
5690
|
+
}
|
|
5691
|
+
return rendered;
|
|
5692
|
+
}
|
|
5693
|
+
var CEQL_QUOTED_FIELD_RE = new RegExp(String.raw`(?:^|\bAND\b|\bOR\b|\()\s*'([^']*)'\s*(?=${CEQL_FIELD_OPERATOR})`, "gi");
|
|
5694
|
+
var CEQL_DOUBLE_QUOTED_VALUE_RE = new RegExp(String.raw`(${CEQL_OPERATOR})\s*"`, "gi");
|
|
5695
|
+
var CEQL_OPERATOR_ALIAS_RE = new RegExp(String.raw`[A-Za-z0-9_.)\]']\s+(${CEQL_OPERATOR_ALIAS_ALTERNATION})(?!\s*(?:${CEQL_OPERATOR}))(?=\s)`, "gi");
|
|
5696
|
+
function findQuotedFields(skeleton, openBefore) {
|
|
5697
|
+
const matches = [];
|
|
5698
|
+
for (const match of skeleton.matchAll(CEQL_QUOTED_FIELD_RE)) {
|
|
5699
|
+
const openIndex = match.index + match[0].indexOf("'");
|
|
5700
|
+
if (openBefore[openIndex])
|
|
5701
|
+
continue;
|
|
5702
|
+
matches.push({ name: match[1], openIndex });
|
|
5703
|
+
}
|
|
5704
|
+
return matches;
|
|
5705
|
+
}
|
|
5706
|
+
function unquoteFields(value, fields) {
|
|
5707
|
+
const quoteIndexes = fields.flatMap((field) => [
|
|
5708
|
+
field.openIndex,
|
|
5709
|
+
field.openIndex + field.name.length + 1
|
|
5710
|
+
]).sort((a, b) => b - a);
|
|
5711
|
+
let fixed = value;
|
|
5712
|
+
for (const index of quoteIndexes) {
|
|
5713
|
+
fixed = fixed.slice(0, index) + fixed.slice(index + 1);
|
|
5714
|
+
}
|
|
5715
|
+
if (!fixed.trim().startsWith(JS_PREFIX) && fixed.includes("${")) {
|
|
5716
|
+
const escaped = fixed.replace(/\\/g, "\\\\").replace(/`/g, "\\`");
|
|
5717
|
+
return `=js:\`${escaped}\``;
|
|
5718
|
+
}
|
|
5719
|
+
return fixed;
|
|
5720
|
+
}
|
|
5721
|
+
function quotedFieldMessage(token, fixedValue) {
|
|
5722
|
+
const fix = fixedValue ? `Write "${fixedValue}" instead.` : "Remove the quotes around the field name.";
|
|
5723
|
+
return `Quoted token '${token}' where CEQL expects a bare field name — ` + "Integration Service rejects this with [102003] Expected a field name " + `expression but got 'StringValue'. ${fix} ${CEQL_REFERENCE}`;
|
|
5724
|
+
}
|
|
5725
|
+
function doubleQuotedValueMessage(operator) {
|
|
5726
|
+
return `Double-quoted value after '${operator}' — CEQL quotes a value with ` + "single quotes. Integration Service rejects this with [102003] " + `"Unsupported value expression 'Column' on field ...". Write the ` + `value in single quotes. ${CEQL_REFERENCE}`;
|
|
5727
|
+
}
|
|
5728
|
+
function operatorAliasMessage(alias) {
|
|
5729
|
+
const symbol = CEQL_OPERATOR_ALIASES[alias.toLowerCase()];
|
|
5730
|
+
return `Operator '${alias}' is not CEQL — write '${symbol}'. Integration ` + "Service rejects this with [102003] Integration Services bad request. " + CEQL_REFERENCE;
|
|
5731
|
+
}
|
|
5732
|
+
function findCeqlFilterIssues(value) {
|
|
5733
|
+
const fragments = lexCeqlFilterValue(value);
|
|
5734
|
+
if (!fragments)
|
|
5735
|
+
return [];
|
|
5736
|
+
const skeleton = buildSkeleton(fragments);
|
|
5737
|
+
const openBefore = singleQuoteOpenBefore(skeleton.text);
|
|
5738
|
+
const issues = [];
|
|
5739
|
+
const quotedFields = findQuotedFields(skeleton.text, openBefore);
|
|
5740
|
+
if (quotedFields.length > 0) {
|
|
5741
|
+
const fixedValue = value.trim().startsWith(JS_PREFIX) ? undefined : unquoteFields(value, quotedFields);
|
|
5742
|
+
for (const field of quotedFields) {
|
|
5743
|
+
const token = renderSkeletonSlice(skeleton, field.openIndex + 1, field.name.length);
|
|
5744
|
+
issues.push({
|
|
5745
|
+
rule: "quoted-field",
|
|
5746
|
+
token,
|
|
5747
|
+
fixedValue,
|
|
5748
|
+
message: quotedFieldMessage(token, fixedValue)
|
|
5749
|
+
});
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
for (const match of skeleton.text.matchAll(CEQL_DOUBLE_QUOTED_VALUE_RE)) {
|
|
5753
|
+
const quoteIndex = match.index + match[0].length - 1;
|
|
5754
|
+
if (openBefore[quoteIndex])
|
|
5755
|
+
continue;
|
|
5756
|
+
const operator = match[1].replace(/\s+/g, " ");
|
|
5757
|
+
issues.push({
|
|
5758
|
+
rule: "double-quoted-value",
|
|
5759
|
+
token: operator,
|
|
5760
|
+
message: doubleQuotedValueMessage(operator)
|
|
5761
|
+
});
|
|
5762
|
+
}
|
|
5763
|
+
for (const match of skeleton.text.matchAll(CEQL_OPERATOR_ALIAS_RE)) {
|
|
5764
|
+
const aliasIndex = match.index + match[0].length - match[1].length;
|
|
5765
|
+
if (openBefore[aliasIndex])
|
|
5766
|
+
continue;
|
|
5767
|
+
issues.push({
|
|
5768
|
+
rule: "operator-alias",
|
|
5769
|
+
token: match[1],
|
|
5770
|
+
message: operatorAliasMessage(match[1])
|
|
5771
|
+
});
|
|
5772
|
+
}
|
|
5773
|
+
return issues;
|
|
5774
|
+
}
|
|
5775
|
+
function scanContainerForCeqlFilterIssues(obj, path, severity, issues) {
|
|
5776
|
+
if (typeof obj === "string") {
|
|
5777
|
+
for (const issue of findCeqlFilterIssues(obj)) {
|
|
5778
|
+
issues.push({ path, severity, message: issue.message });
|
|
5779
|
+
}
|
|
5780
|
+
return;
|
|
5781
|
+
}
|
|
5782
|
+
if (Array.isArray(obj)) {
|
|
5783
|
+
for (let i2 = 0;i2 < obj.length; i2++) {
|
|
5784
|
+
scanContainerForCeqlFilterIssues(obj[i2], `${path}[${i2}]`, severity, issues);
|
|
5785
|
+
}
|
|
5786
|
+
return;
|
|
5787
|
+
}
|
|
5788
|
+
if (obj && typeof obj === "object") {
|
|
5789
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
5790
|
+
scanContainerForCeqlFilterIssues(value, `${path}.${key}`, severity, issues);
|
|
5791
|
+
}
|
|
5792
|
+
}
|
|
5793
|
+
}
|
|
5794
|
+
var ceqlQueryValidator = {
|
|
5795
|
+
id: "ceql-query",
|
|
5796
|
+
appliesTo: (node) => {
|
|
5797
|
+
const t = node.type;
|
|
5798
|
+
if (!t)
|
|
5799
|
+
return false;
|
|
5800
|
+
if (isEventDrivenConnectorType(t))
|
|
5801
|
+
return false;
|
|
5802
|
+
return t.startsWith("uipath.connector.");
|
|
5803
|
+
},
|
|
5804
|
+
validate: (node, context) => {
|
|
5805
|
+
const rawDetail = node.inputs?.detail;
|
|
5806
|
+
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
5807
|
+
return [];
|
|
5808
|
+
}
|
|
5809
|
+
const queryParameters = rawDetail.queryParameters;
|
|
5810
|
+
if (!queryParameters || typeof queryParameters !== "object" || Array.isArray(queryParameters)) {
|
|
5811
|
+
return [];
|
|
5812
|
+
}
|
|
5813
|
+
const severity = context.strictBindings ? "error" : "warning";
|
|
5814
|
+
const issues = [];
|
|
5815
|
+
for (const [key, value] of Object.entries(queryParameters)) {
|
|
5816
|
+
if (!CEQL_FILTER_PARAMETERS.has(key))
|
|
5817
|
+
continue;
|
|
5818
|
+
scanContainerForCeqlFilterIssues(value, `nodes[${node.id}].inputs.detail.queryParameters.${key}`, severity, issues);
|
|
5819
|
+
}
|
|
5820
|
+
return issues;
|
|
5821
|
+
}
|
|
5822
|
+
};
|
|
5823
|
+
|
|
5824
|
+
// src/services/node-validators/cross-node-binding-validator.ts
|
|
5825
|
+
var IDENTIFIER_ROOT_RE = /(?<![.\w$])([A-Za-z_$][\w$]*)\.(?!\.)/g;
|
|
5826
|
+
function findCrossNodeBindingReferences(value, nodeIds) {
|
|
5827
|
+
if (nodeIds.size === 0)
|
|
5828
|
+
return [];
|
|
5829
|
+
const trimmed = value.trimStart();
|
|
5830
|
+
if (!trimmed.startsWith("=js:"))
|
|
5831
|
+
return [];
|
|
5832
|
+
const body = trimmed.slice(4);
|
|
5833
|
+
const referenced = new Set;
|
|
5834
|
+
const fixedBody = body.replace(IDENTIFIER_ROOT_RE, (match, identifier) => {
|
|
5835
|
+
if (!nodeIds.has(identifier))
|
|
5836
|
+
return match;
|
|
5837
|
+
referenced.add(identifier);
|
|
5838
|
+
return `$vars.${match}`;
|
|
5839
|
+
});
|
|
5840
|
+
if (referenced.size === 0)
|
|
5841
|
+
return [];
|
|
5842
|
+
const fixedValue = `=js:${fixedBody}`;
|
|
5843
|
+
return [...referenced].map((nodeId) => ({ nodeId, fixedValue }));
|
|
5844
|
+
}
|
|
5845
|
+
function crossNodeBindingMessage(originalValue, ref2) {
|
|
5846
|
+
return `Expression "${originalValue}" references node "${ref2.nodeId}" without the "$vars." prefix — ` + `cross-node outputs resolve to undefined at runtime (the bare identifier reads as an ` + `undeclared local, not the runtime variable). Use "${ref2.fixedValue}" instead. ` + "See uipath-maestro-flow skill — node-output-wiring.md (FPD-538).";
|
|
5847
|
+
}
|
|
5848
|
+
function scanContainerForCrossNodeBindings(obj, path, nodeIds, severity, issues) {
|
|
5849
|
+
if (typeof obj === "string") {
|
|
5850
|
+
for (const ref2 of findCrossNodeBindingReferences(obj, nodeIds)) {
|
|
5851
|
+
issues.push({
|
|
5852
|
+
path,
|
|
5853
|
+
severity,
|
|
5854
|
+
message: crossNodeBindingMessage(obj, ref2)
|
|
5855
|
+
});
|
|
5856
|
+
}
|
|
5857
|
+
return;
|
|
5858
|
+
}
|
|
5859
|
+
if (Array.isArray(obj)) {
|
|
5860
|
+
for (let i2 = 0;i2 < obj.length; i2++) {
|
|
5861
|
+
scanContainerForCrossNodeBindings(obj[i2], `${path}[${i2}]`, nodeIds, severity, issues);
|
|
5862
|
+
}
|
|
5863
|
+
return;
|
|
5864
|
+
}
|
|
5865
|
+
if (obj && typeof obj === "object") {
|
|
5866
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
5867
|
+
scanContainerForCrossNodeBindings(value, `${path}.${key}`, nodeIds, severity, issues);
|
|
5868
|
+
}
|
|
5869
|
+
}
|
|
5870
|
+
}
|
|
5871
|
+
var PARAMETER_CONTAINER_KEYS = [
|
|
5872
|
+
"bodyParameters",
|
|
5873
|
+
"queryParameters",
|
|
5874
|
+
"pathParameters"
|
|
5875
|
+
];
|
|
5876
|
+
function scanDetailForCrossNodeBindings(detail, nodeIds, severity = "warning") {
|
|
5877
|
+
if (!detail || nodeIds.size === 0)
|
|
5878
|
+
return [];
|
|
5879
|
+
const issues = [];
|
|
5880
|
+
for (const containerKey of PARAMETER_CONTAINER_KEYS) {
|
|
5881
|
+
const container = detail[containerKey];
|
|
5882
|
+
if (!container || typeof container !== "object" || Array.isArray(container)) {
|
|
5883
|
+
continue;
|
|
5884
|
+
}
|
|
5885
|
+
scanContainerForCrossNodeBindings(container, `detail.${containerKey}`, nodeIds, severity, issues);
|
|
5886
|
+
}
|
|
5887
|
+
return issues;
|
|
5888
|
+
}
|
|
5889
|
+
var crossNodeBindingValidator = {
|
|
5890
|
+
id: "cross-node-binding",
|
|
5891
|
+
appliesTo: (node) => {
|
|
5892
|
+
const t = node.type;
|
|
5893
|
+
if (!t)
|
|
5894
|
+
return false;
|
|
5895
|
+
if (isEventDrivenConnectorType(t))
|
|
5896
|
+
return false;
|
|
5897
|
+
return t.startsWith("uipath.connector.") || t === "core.action.http" || t === "core.action.http.v2";
|
|
5898
|
+
},
|
|
5899
|
+
validate: (node, context) => {
|
|
5900
|
+
const nodeIds = context.nodeIds ?? new Set;
|
|
5901
|
+
if (nodeIds.size === 0)
|
|
5902
|
+
return [];
|
|
5903
|
+
const rawDetail = node.inputs?.detail;
|
|
5904
|
+
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
5905
|
+
return [];
|
|
5906
|
+
}
|
|
5907
|
+
const severity = context.strictBindings ? "error" : "warning";
|
|
5908
|
+
const issues = scanDetailForCrossNodeBindings(rawDetail, nodeIds, severity);
|
|
5909
|
+
return issues.map((issue) => ({
|
|
5910
|
+
...issue,
|
|
5911
|
+
path: `nodes[${node.id}].inputs.${issue.path}`
|
|
5912
|
+
}));
|
|
5913
|
+
}
|
|
5914
|
+
};
|
|
5915
|
+
|
|
5916
|
+
// src/services/node-validators/expression-prefix-validator.ts
|
|
5917
|
+
var expressionPrefixValidator = {
|
|
5918
|
+
id: "expression-prefix",
|
|
5919
|
+
appliesTo: (node) => {
|
|
5920
|
+
const t = node.type;
|
|
5921
|
+
if (!t)
|
|
5922
|
+
return false;
|
|
5923
|
+
if (isEventDrivenConnectorType(t))
|
|
5924
|
+
return false;
|
|
5925
|
+
return t.startsWith("uipath.connector.") || t === "core.action.http" || t === "core.action.http.v2" || t === "core.action.script";
|
|
5926
|
+
},
|
|
5927
|
+
validate: (node) => {
|
|
5928
|
+
const issues = [];
|
|
5929
|
+
if (node.type === "core.action.script") {
|
|
5930
|
+
scanScriptSource(node.id, node.inputs, issues);
|
|
5931
|
+
return issues;
|
|
5932
|
+
}
|
|
5933
|
+
const rawDetail = node.inputs?.detail;
|
|
5934
|
+
if (!rawDetail || typeof rawDetail !== "object" || Array.isArray(rawDetail)) {
|
|
5935
|
+
return [];
|
|
5936
|
+
}
|
|
5937
|
+
const detail = rawDetail;
|
|
5938
|
+
for (const containerKey of [
|
|
5939
|
+
"bodyParameters",
|
|
5940
|
+
"queryParameters",
|
|
5941
|
+
"pathParameters"
|
|
5942
|
+
]) {
|
|
5943
|
+
const container = detail[containerKey];
|
|
5944
|
+
if (!container || typeof container !== "object" || Array.isArray(container)) {
|
|
5945
|
+
continue;
|
|
5946
|
+
}
|
|
5947
|
+
scanForUnprefixedExpressions(container, `nodes[${node.id}].inputs.detail.${containerKey}`, issues);
|
|
5948
|
+
}
|
|
5949
|
+
return issues;
|
|
5950
|
+
}
|
|
5951
|
+
};
|
|
5952
|
+
function scanScriptSource(nodeId, inputs, issues) {
|
|
5953
|
+
if (!inputs)
|
|
5954
|
+
return;
|
|
5955
|
+
const source = inputs.source;
|
|
5956
|
+
if (typeof source !== "string")
|
|
5957
|
+
return;
|
|
5958
|
+
const trimmed = source.trimStart();
|
|
5959
|
+
if (!trimmed.startsWith("=js:"))
|
|
5960
|
+
return;
|
|
5961
|
+
issues.push({
|
|
5962
|
+
path: `nodes[${nodeId}].inputs.source`,
|
|
5963
|
+
severity: "error",
|
|
5964
|
+
message: 'Script node `inputs.source` begins with `"=js:"` — that is the ' + "property-level expression-mode marker for connector / HTTP / " + "End-output / subflow-input fields, not JavaScript syntax. The " + "Script node's `source` field is the function body; runtime treats " + 'this value as literal source code, so e.g. `"=js:vars.X.Y"` ' + "compiles into a string-reversed gibberish output. Replace with a " + 'JavaScript expression that returns the value, e.g. `"return ' + '$vars.X.Y"` or a multi-statement function body. See ' + "uipath-maestro-flow skill — script-node reference (MST-9265)."
|
|
5965
|
+
});
|
|
5966
|
+
}
|
|
5967
|
+
var BARE_DOLLAR_REF_RE = /^\$(vars|metadata|self)\b/;
|
|
5968
|
+
var INVENTED_NODES_REF_RE = /^nodes\.[A-Za-z_$][\w$]*\.output\b/;
|
|
5969
|
+
function scanForUnprefixedExpressions(obj, path, issues) {
|
|
5970
|
+
if (typeof obj === "string") {
|
|
5971
|
+
const trimmed = obj.trimStart();
|
|
5972
|
+
if (trimmed.startsWith("="))
|
|
5973
|
+
return;
|
|
5974
|
+
if (BARE_DOLLAR_REF_RE.test(trimmed)) {
|
|
5975
|
+
issues.push({
|
|
5976
|
+
path,
|
|
5977
|
+
severity: "error",
|
|
5978
|
+
message: `Value "${obj}" references a runtime variable but is missing the "=js:" prefix. Use "=js:${obj}" so the runtime evaluates it; without the prefix, the value ships as a literal string and the activity input is bound to "${obj.replace(/^\$vars\b/, "vars").replace(/^\$metadata\b/, "metadata").replace(/^\$self\b/, "self")}". See uipath-maestro-flow skill — node-output-wiring.md (MST-9107).`
|
|
5979
|
+
});
|
|
5980
|
+
return;
|
|
5981
|
+
}
|
|
5982
|
+
if (INVENTED_NODES_REF_RE.test(trimmed)) {
|
|
5983
|
+
const fixed = trimmed.replace(/^nodes\./, "=js:$vars.");
|
|
5984
|
+
issues.push({
|
|
5985
|
+
path,
|
|
5986
|
+
severity: "error",
|
|
5987
|
+
message: `Value "${obj}" looks like an invented "nodes.<id>.output" reference. There is no such syntax — variable references use "$vars". Write "${fixed}" instead. See uipath-maestro-flow skill — node-output-wiring.md (MST-9107).`
|
|
5988
|
+
});
|
|
5989
|
+
return;
|
|
5990
|
+
}
|
|
5991
|
+
return;
|
|
5992
|
+
}
|
|
5993
|
+
if (Array.isArray(obj)) {
|
|
5994
|
+
for (let i2 = 0;i2 < obj.length; i2++) {
|
|
5995
|
+
scanForUnprefixedExpressions(obj[i2], `${path}[${i2}]`, issues);
|
|
5996
|
+
}
|
|
5997
|
+
return;
|
|
5998
|
+
}
|
|
5999
|
+
if (obj && typeof obj === "object") {
|
|
6000
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
6001
|
+
scanForUnprefixedExpressions(value, `${path}.${key}`, issues);
|
|
6002
|
+
}
|
|
5841
6003
|
}
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
6004
|
+
}
|
|
6005
|
+
|
|
6006
|
+
// src/services/node-validators/ixp-node-validator.ts
|
|
6007
|
+
var FORBIDDEN_INPUT_FIELDS = [
|
|
6008
|
+
"digitizationMode",
|
|
6009
|
+
"documentTaxonomy",
|
|
6010
|
+
"attachmentId",
|
|
6011
|
+
"fileName",
|
|
6012
|
+
"mimeType"
|
|
6013
|
+
];
|
|
6014
|
+
var FILE_REF_PATTERN = /^=js:\$vars\.[A-Za-z_$]/;
|
|
6015
|
+
var ixpNodeValidator = {
|
|
6016
|
+
id: "ixp-node",
|
|
6017
|
+
appliesTo: (node) => typeof node.type === "string" && node.type.startsWith("uipath.ixp."),
|
|
6018
|
+
validate: (node, _context) => {
|
|
6019
|
+
const issues = [];
|
|
6020
|
+
const inputs = node.inputs ?? {};
|
|
6021
|
+
const outputs = node.outputs ?? {};
|
|
6022
|
+
const base = `nodes[${node.id}]`;
|
|
6023
|
+
const model = inputs.model;
|
|
6024
|
+
const isNonEmptyString2 = (v) => typeof v === "string" && v.length > 0;
|
|
6025
|
+
if (typeof model !== "object" || model === null || Array.isArray(model) || !isNonEmptyString2(model.modelName) || !isNonEmptyString2(model.folderKey)) {
|
|
6026
|
+
issues.push({
|
|
6027
|
+
path: `${base}.inputs.model`,
|
|
6028
|
+
severity: "error",
|
|
6029
|
+
message: "inputs.model must be an object with non-empty string " + "`modelName` and `folderKey`. Studio Web's property " + "panel destructures these and crashes when either is " + "missing or not a string."
|
|
6030
|
+
});
|
|
6031
|
+
}
|
|
6032
|
+
const fileRef = inputs.fileRef;
|
|
6033
|
+
if (typeof fileRef !== "string" || !FILE_REF_PATTERN.test(fileRef)) {
|
|
6034
|
+
issues.push({
|
|
6035
|
+
path: `${base}.inputs.fileRef`,
|
|
6036
|
+
severity: "error",
|
|
6037
|
+
message: "inputs.fileRef must be a `=js:$vars.…` expression. " + "The canonical form for an upstream node output is " + "`=js:$vars.<upstream>.output.<field>`. Without the " + "`=js:` prefix the BPMN serializer treats the value " + "as a literal string at runtime."
|
|
6038
|
+
});
|
|
6039
|
+
}
|
|
6040
|
+
for (const port of ["output", "error"]) {
|
|
6041
|
+
if (!(port in outputs)) {
|
|
6042
|
+
issues.push({
|
|
6043
|
+
path: `${base}.outputs.${port}`,
|
|
6044
|
+
severity: "error",
|
|
6045
|
+
message: `outputs.${port} must be present on the instance. ` + `Without it, downstream $vars.${node.id}.${port} ` + "references will not resolve at runtime."
|
|
6046
|
+
});
|
|
5863
6047
|
}
|
|
5864
|
-
word += codePointToString(esc);
|
|
5865
|
-
chunkStart = this.pos;
|
|
5866
|
-
} else {
|
|
5867
|
-
break;
|
|
5868
6048
|
}
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
}
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
6049
|
+
const topLevelModel = node.model;
|
|
6050
|
+
if (topLevelModel != null) {
|
|
6051
|
+
issues.push({
|
|
6052
|
+
path: `${base}.model`,
|
|
6053
|
+
severity: "error",
|
|
6054
|
+
message: "Top-level `model` block is forbidden on IxP node " + "instances. The manifest's slim model " + "({ type, serviceType }) lives only in `definitions[]`."
|
|
6055
|
+
});
|
|
6056
|
+
}
|
|
6057
|
+
const legacy = FORBIDDEN_INPUT_FIELDS.filter((k) => (k in inputs));
|
|
6058
|
+
if (legacy.length > 0) {
|
|
6059
|
+
issues.push({
|
|
6060
|
+
path: `${base}.inputs`,
|
|
6061
|
+
severity: "error",
|
|
6062
|
+
message: "Forbidden legacy fields in inputs: " + `${legacy.join(", ")}. These keys were removed from ` + "the current standalone IxP schema and are not " + "returned by `registry get`."
|
|
6063
|
+
});
|
|
6064
|
+
}
|
|
6065
|
+
return issues;
|
|
5878
6066
|
}
|
|
5879
|
-
return this.finishToken(type, word);
|
|
5880
|
-
};
|
|
5881
|
-
var version = "8.17.0";
|
|
5882
|
-
Parser.acorn = {
|
|
5883
|
-
Parser,
|
|
5884
|
-
version,
|
|
5885
|
-
defaultOptions,
|
|
5886
|
-
Position,
|
|
5887
|
-
SourceLocation,
|
|
5888
|
-
getLineInfo,
|
|
5889
|
-
Node,
|
|
5890
|
-
TokenType,
|
|
5891
|
-
tokTypes: types$1,
|
|
5892
|
-
keywordTypes: keywords,
|
|
5893
|
-
TokContext,
|
|
5894
|
-
tokContexts: types,
|
|
5895
|
-
isIdentifierChar,
|
|
5896
|
-
isIdentifierStart,
|
|
5897
|
-
Token,
|
|
5898
|
-
isNewLine,
|
|
5899
|
-
lineBreak,
|
|
5900
|
-
lineBreakG,
|
|
5901
|
-
nonASCIIwhitespace
|
|
5902
6067
|
};
|
|
5903
|
-
function parse3(input, options) {
|
|
5904
|
-
return Parser.parse(input, options);
|
|
5905
|
-
}
|
|
5906
6068
|
|
|
5907
6069
|
// src/services/node-validators/js-expression-syntax-validator.ts
|
|
5908
6070
|
var jsExpressionSyntaxValidator = {
|
|
@@ -6426,13 +6588,13 @@ function formatMigrationFailureMessage(step, rawMessage, fieldPaths) {
|
|
|
6426
6588
|
return parts.join(" ");
|
|
6427
6589
|
}
|
|
6428
6590
|
function checkForwardMigration(rawWorkflow) {
|
|
6429
|
-
const { tracker, fieldPaths } = captureMigrationIssues();
|
|
6430
|
-
let result;
|
|
6431
6591
|
try {
|
|
6432
|
-
|
|
6592
|
+
getMigrationChain(runtimeMigrations, String(rawWorkflow.version ?? ""), runtimeVersion);
|
|
6433
6593
|
} catch {
|
|
6434
6594
|
return { ok: true };
|
|
6435
6595
|
}
|
|
6596
|
+
const { tracker, fieldPaths } = captureMigrationIssues();
|
|
6597
|
+
const result = migrateWorkflowToFloor(runtimeMigrations, rawWorkflow, runtimeVersion, minimumSupportedVersion, tracker);
|
|
6436
6598
|
if (!result.error)
|
|
6437
6599
|
return { ok: true };
|
|
6438
6600
|
const paths = fieldPaths();
|
|
@@ -6817,6 +6979,26 @@ function extractProcessGuid(nodeType) {
|
|
|
6817
6979
|
}
|
|
6818
6980
|
return match[1];
|
|
6819
6981
|
}
|
|
6982
|
+
function resolveProcessTarget(node, definitions) {
|
|
6983
|
+
if (!isProcessNode({ nodeType: node.type }))
|
|
6984
|
+
return;
|
|
6985
|
+
let subType = "Process";
|
|
6986
|
+
if (definitions) {
|
|
6987
|
+
const sameType = definitions.filter((d) => d.nodeType === node.type);
|
|
6988
|
+
const def = sameType.find((d) => node.typeVersion !== undefined && d.version === node.typeVersion) ?? sameType[0];
|
|
6989
|
+
const model = def?.model;
|
|
6990
|
+
const defBindings = model?.bindings;
|
|
6991
|
+
if (defBindings?.resourceSubType)
|
|
6992
|
+
subType = defBindings.resourceSubType;
|
|
6993
|
+
if (defBindings?.resourceKey) {
|
|
6994
|
+
return { key: defBindings.resourceKey, subType };
|
|
6995
|
+
}
|
|
6996
|
+
}
|
|
6997
|
+
return { key: extractProcessGuid(node.type), subType };
|
|
6998
|
+
}
|
|
6999
|
+
function resolveProcessTargetKey(node, definitions) {
|
|
7000
|
+
return resolveProcessTarget(node, definitions)?.key;
|
|
7001
|
+
}
|
|
6820
7002
|
function createProcessBindings(manifest) {
|
|
6821
7003
|
const processGuid = extractProcessGuid(manifest.nodeType);
|
|
6822
7004
|
const model = manifest.model;
|
|
@@ -6935,20 +7117,9 @@ function collectNodeBindingRefs(node) {
|
|
|
6935
7117
|
}
|
|
6936
7118
|
function collectNodeBindingResourceKeys(node, bindings, definitions) {
|
|
6937
7119
|
const keys = new Set;
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
const def = definitions.find((d) => d.nodeType === node.type);
|
|
6942
|
-
const model = def?.model;
|
|
6943
|
-
const defBindings = model?.bindings;
|
|
6944
|
-
if (defBindings?.resourceKey) {
|
|
6945
|
-
keys.add(defBindings.resourceKey);
|
|
6946
|
-
foundFromDef = true;
|
|
6947
|
-
}
|
|
6948
|
-
}
|
|
6949
|
-
if (!foundFromDef) {
|
|
6950
|
-
keys.add(extractProcessGuid(node.type));
|
|
6951
|
-
}
|
|
7120
|
+
const processKey = resolveProcessTargetKey(node, definitions);
|
|
7121
|
+
if (processKey) {
|
|
7122
|
+
keys.add(processKey);
|
|
6952
7123
|
}
|
|
6953
7124
|
const inputs = node.inputs;
|
|
6954
7125
|
if (typeof inputs?.detail?.connectionResourceId === "string") {
|
|
@@ -7196,6 +7367,37 @@ function extractPromptVariables(content) {
|
|
|
7196
7367
|
}
|
|
7197
7368
|
return [...vars];
|
|
7198
7369
|
}
|
|
7370
|
+
var VARS_NODE_OUTPUT_RE = /^=?\$vars\.([A-Za-z0-9_$]+)\.output\.([A-Za-z0-9_$]+)/;
|
|
7371
|
+
function getProducerOutputFields(node) {
|
|
7372
|
+
if (AGENT_NODE_TYPES.includes(node.type)) {
|
|
7373
|
+
const vars = node.inputs?.agentOutputVariables;
|
|
7374
|
+
if (!Array.isArray(vars) || vars.length === 0)
|
|
7375
|
+
return;
|
|
7376
|
+
const fields = new Set;
|
|
7377
|
+
for (const v of vars) {
|
|
7378
|
+
const id = v?.id;
|
|
7379
|
+
if (typeof id === "string")
|
|
7380
|
+
fields.add(id);
|
|
7381
|
+
}
|
|
7382
|
+
return fields.size > 0 ? fields : undefined;
|
|
7383
|
+
}
|
|
7384
|
+
const output = node.outputs?.output;
|
|
7385
|
+
const props = output?.properties;
|
|
7386
|
+
if (props && typeof props === "object") {
|
|
7387
|
+
return new Set(Object.keys(props));
|
|
7388
|
+
}
|
|
7389
|
+
return;
|
|
7390
|
+
}
|
|
7391
|
+
function decodeSchemaKeyNodeRef(key) {
|
|
7392
|
+
const segments = key.split("__");
|
|
7393
|
+
if (segments.length < 3)
|
|
7394
|
+
return;
|
|
7395
|
+
if (segments[0] === "metadata" || segments[1] !== "output")
|
|
7396
|
+
return;
|
|
7397
|
+
if (segments[0].length === 0)
|
|
7398
|
+
return;
|
|
7399
|
+
return { nodeId: segments[0], field: segments[2] || undefined };
|
|
7400
|
+
}
|
|
7199
7401
|
function collectAgentInputVarIds(raw) {
|
|
7200
7402
|
const ids = new Set;
|
|
7201
7403
|
if (!Array.isArray(raw))
|
|
@@ -7240,6 +7442,25 @@ function formatHydrationHint(diag, flowDir) {
|
|
|
7240
7442
|
}
|
|
7241
7443
|
return `inline-agent hydration ran but the validator still flagged \`${diag.sourceLocation}\`-resolved prompts as empty. This is unexpected — file an issue with the .flow and agent.json contents.`;
|
|
7242
7444
|
}
|
|
7445
|
+
function collectNodeExpressionStrings(nodes) {
|
|
7446
|
+
const expressions = [];
|
|
7447
|
+
const collect = (val) => {
|
|
7448
|
+
if (typeof val === "string") {
|
|
7449
|
+
expressions.push(val);
|
|
7450
|
+
} else if (Array.isArray(val)) {
|
|
7451
|
+
for (const v of val)
|
|
7452
|
+
collect(v);
|
|
7453
|
+
} else if (val && typeof val === "object") {
|
|
7454
|
+
for (const v of Object.values(val))
|
|
7455
|
+
collect(v);
|
|
7456
|
+
}
|
|
7457
|
+
};
|
|
7458
|
+
for (const n of nodes) {
|
|
7459
|
+
collect(n.inputs);
|
|
7460
|
+
collect(n.outputs);
|
|
7461
|
+
}
|
|
7462
|
+
return expressions;
|
|
7463
|
+
}
|
|
7243
7464
|
function extractSupportsErrorHandling(content) {
|
|
7244
7465
|
const map = new Map;
|
|
7245
7466
|
let raw;
|
|
@@ -7327,6 +7548,7 @@ function buildValidationContext(flow) {
|
|
|
7327
7548
|
display: def.display,
|
|
7328
7549
|
handleConfiguration: def.handleConfiguration,
|
|
7329
7550
|
inputDefinition: def.inputDefinition,
|
|
7551
|
+
outputDefinition: def.outputDefinition,
|
|
7330
7552
|
tags: def.tags
|
|
7331
7553
|
});
|
|
7332
7554
|
}
|
|
@@ -7512,15 +7734,18 @@ Validating: ${absolutePath}
|
|
|
7512
7734
|
const currentManifests = this.validateCurrentManifests ? await this.loadCurrentManifestMap() : new Map;
|
|
7513
7735
|
const flowDir = this.fs.path.dirname(absolutePath);
|
|
7514
7736
|
const hydrationDiagnoses = await this.resolveAgentPrompts(workflow.nodes, flowDir);
|
|
7515
|
-
issues.push(...this.validateForwardMigration(content));
|
|
7737
|
+
issues.push(...await this.validateForwardMigration(content, absolutePath));
|
|
7516
7738
|
issues.push(...this.validateGraph(workflow, "", rawDefErrorHandling, currentManifests));
|
|
7517
7739
|
issues.push(...this.validateGlobalVariableUniqueness(workflow, ""));
|
|
7518
7740
|
issues.push(...this.validateGlobalTriggerBindings(workflow, ""));
|
|
7741
|
+
issues.push(...this.validateUnboundInputGlobals(workflow, ""));
|
|
7519
7742
|
issues.push(...this.validateResourceBindings(workflow));
|
|
7520
7743
|
issues.push(...this.validateConnectionIdReuse(workflow));
|
|
7744
|
+
issues.push(...this.validateDuplicateProcessTargets(workflow));
|
|
7521
7745
|
issues.push(...await this.validateConnectorBindingShapes(workflow));
|
|
7522
7746
|
issues.push(...this.validateAgentInputBindings(workflow, hydrationDiagnoses, ""));
|
|
7523
7747
|
issues.push(...this.validateAgentPromptInputRefs(workflow, hydrationDiagnoses, ""));
|
|
7748
|
+
issues.push(...this.validateAgentInputScopeRefs(workflow, hydrationDiagnoses, ""));
|
|
7524
7749
|
issues.push(...await this.validateSolutionRegistrationAndLayout(absolutePath));
|
|
7525
7750
|
const subflows = workflow.subflows ?? {};
|
|
7526
7751
|
for (const [subflowId, entry] of Object.entries(subflows)) {
|
|
@@ -7538,8 +7763,10 @@ Validating: ${absolutePath}
|
|
|
7538
7763
|
issues.push(...this.validateGraph(subGraph, prefix, rawDefErrorHandling, currentManifests));
|
|
7539
7764
|
issues.push(...this.validateGlobalVariableUniqueness(subGraph, prefix));
|
|
7540
7765
|
issues.push(...this.validateGlobalTriggerBindings(subGraph, prefix));
|
|
7766
|
+
issues.push(...this.validateUnboundInputGlobals(subGraph, prefix));
|
|
7541
7767
|
issues.push(...this.validateAgentInputBindings(subGraph, hydrationDiagnoses, prefix));
|
|
7542
7768
|
issues.push(...this.validateAgentPromptInputRefs(subGraph, hydrationDiagnoses, prefix));
|
|
7769
|
+
issues.push(...this.validateAgentInputScopeRefs(subGraph, hydrationDiagnoses, prefix));
|
|
7543
7770
|
}
|
|
7544
7771
|
this.enrichInlineAgentPromptIssues(issues, hydrationDiagnoses, flowDir);
|
|
7545
7772
|
return {
|
|
@@ -7548,7 +7775,7 @@ Validating: ${absolutePath}
|
|
|
7548
7775
|
issues
|
|
7549
7776
|
};
|
|
7550
7777
|
}
|
|
7551
|
-
validateForwardMigration(content) {
|
|
7778
|
+
async validateForwardMigration(content, absolutePath) {
|
|
7552
7779
|
let raw;
|
|
7553
7780
|
try {
|
|
7554
7781
|
raw = JSON.parse(content);
|
|
@@ -7557,7 +7784,13 @@ Validating: ${absolutePath}
|
|
|
7557
7784
|
}
|
|
7558
7785
|
if (!raw || typeof raw !== "object")
|
|
7559
7786
|
return [];
|
|
7560
|
-
|
|
7787
|
+
let resolved;
|
|
7788
|
+
try {
|
|
7789
|
+
({ resolved } = await resolveWorkflowRefs(raw, createFlowRefResolver(this.fs), absolutePath));
|
|
7790
|
+
} catch {
|
|
7791
|
+
return [];
|
|
7792
|
+
}
|
|
7793
|
+
const check = checkForwardMigration(resolved);
|
|
7561
7794
|
if (check.ok)
|
|
7562
7795
|
return [];
|
|
7563
7796
|
return [
|
|
@@ -7764,6 +7997,131 @@ Validating: ${absolutePath}
|
|
|
7764
7997
|
}
|
|
7765
7998
|
return issues;
|
|
7766
7999
|
}
|
|
8000
|
+
validateAgentInputScopeRefs(graph, diagnoses, pathPrefix) {
|
|
8001
|
+
const agentNodes = graph.nodes.filter((n) => AGENT_NODE_TYPES.includes(n.type));
|
|
8002
|
+
if (agentNodes.length === 0)
|
|
8003
|
+
return [];
|
|
8004
|
+
const nodesById = new Map(graph.nodes.map((n) => [n.id, n]));
|
|
8005
|
+
const nodeIds = new Set(nodesById.keys());
|
|
8006
|
+
const globalIds = new Set((graph.variables?.globals ?? []).map((g) => g.id));
|
|
8007
|
+
const incoming = new Map;
|
|
8008
|
+
for (const edge of graph.edges) {
|
|
8009
|
+
const sources = incoming.get(edge.targetNodeId);
|
|
8010
|
+
if (sources)
|
|
8011
|
+
sources.push(edge.sourceNodeId);
|
|
8012
|
+
else
|
|
8013
|
+
incoming.set(edge.targetNodeId, [edge.sourceNodeId]);
|
|
8014
|
+
}
|
|
8015
|
+
const issues = [];
|
|
8016
|
+
for (const node of agentNodes) {
|
|
8017
|
+
const { byNode: refs, byField } = this.collectAgentVarRefs(node, diagnoses.get(node.id), globalIds);
|
|
8018
|
+
if (refs.size === 0)
|
|
8019
|
+
continue;
|
|
8020
|
+
const wired = incoming.has(node.id);
|
|
8021
|
+
const upstream = wired ? this.collectUpstreamNodeIds(incoming, node.id) : new Set;
|
|
8022
|
+
const missing = [];
|
|
8023
|
+
const notUpstream = [];
|
|
8024
|
+
for (const [refId, origin] of refs) {
|
|
8025
|
+
if (!nodeIds.has(refId))
|
|
8026
|
+
missing.push(origin);
|
|
8027
|
+
else if (wired && !upstream.has(refId))
|
|
8028
|
+
notUpstream.push(origin);
|
|
8029
|
+
}
|
|
8030
|
+
const label = node.display?.label ?? node.id;
|
|
8031
|
+
const path = `${pathPrefix}nodes[${node.id}].inputs.agentInputVariables`;
|
|
8032
|
+
const scope = pathPrefix ? "subflow" : "flow";
|
|
8033
|
+
if (missing.length > 0) {
|
|
8034
|
+
issues.push({
|
|
8035
|
+
path,
|
|
8036
|
+
message: `Agent "${label}" reads ${missing.join(", ")}, but no such node exists in this ${scope}. Studio Web rejects the flow on open with "that variable is not available in this scope", and at runtime the input resolves to nothing. Point the reference at an existing node id (then re-run \`uip agent refresh --inline-in-flow\` so agent.json and the node agree), or drop the input.`,
|
|
8037
|
+
severity: "error"
|
|
8038
|
+
});
|
|
8039
|
+
}
|
|
8040
|
+
if (notUpstream.length > 0) {
|
|
8041
|
+
issues.push({
|
|
8042
|
+
path,
|
|
8043
|
+
message: `Agent "${label}" reads ${notUpstream.join(", ")}, but no edge path leads from that node to "${node.id}", so it has not run when the agent does and its output is not written yet. Studio Web reports the same variable as not available in this scope. Wire the node upstream of the agent, or bind an input the agent can see.`,
|
|
8044
|
+
severity: "warning"
|
|
8045
|
+
});
|
|
8046
|
+
}
|
|
8047
|
+
const invalidFields = [];
|
|
8048
|
+
for (const ref2 of byField) {
|
|
8049
|
+
if (!nodeIds.has(ref2.nodeId))
|
|
8050
|
+
continue;
|
|
8051
|
+
const producer = nodesById.get(ref2.nodeId);
|
|
8052
|
+
if (!producer)
|
|
8053
|
+
continue;
|
|
8054
|
+
const outputFields = getProducerOutputFields(producer);
|
|
8055
|
+
if (!outputFields)
|
|
8056
|
+
continue;
|
|
8057
|
+
if (outputFields.has(ref2.field))
|
|
8058
|
+
continue;
|
|
8059
|
+
const available = [...outputFields].join(", ");
|
|
8060
|
+
invalidFields.push(`${ref2.origin} — node "${ref2.nodeId}" has no output named "${ref2.field}"` + (available ? ` (available: ${available})` : ""));
|
|
8061
|
+
}
|
|
8062
|
+
if (invalidFields.length > 0) {
|
|
8063
|
+
issues.push({
|
|
8064
|
+
path,
|
|
8065
|
+
message: `Agent "${label}" reads ${invalidFields.join("; ")}. Fix the binding to use an output the producer node declares, or add the missing output to the producer.`,
|
|
8066
|
+
severity: "error"
|
|
8067
|
+
});
|
|
8068
|
+
}
|
|
8069
|
+
}
|
|
8070
|
+
return issues;
|
|
8071
|
+
}
|
|
8072
|
+
collectAgentVarRefs(node, diag, globalIds) {
|
|
8073
|
+
const byNode = new Map;
|
|
8074
|
+
const fieldSeen = new Set;
|
|
8075
|
+
const byField = [];
|
|
8076
|
+
const add = (nodeId, field, origin) => {
|
|
8077
|
+
if (globalIds.has(nodeId))
|
|
8078
|
+
return;
|
|
8079
|
+
if (!byNode.has(nodeId))
|
|
8080
|
+
byNode.set(nodeId, origin);
|
|
8081
|
+
if (field) {
|
|
8082
|
+
const fk = `${nodeId}\x00${field}`;
|
|
8083
|
+
if (!fieldSeen.has(fk)) {
|
|
8084
|
+
fieldSeen.add(fk);
|
|
8085
|
+
byField.push({ nodeId, field, origin });
|
|
8086
|
+
}
|
|
8087
|
+
}
|
|
8088
|
+
};
|
|
8089
|
+
for (const key of diag?.declaredInputKeys ?? []) {
|
|
8090
|
+
const ref2 = decodeSchemaKeyNodeRef(key);
|
|
8091
|
+
if (ref2) {
|
|
8092
|
+
add(ref2.nodeId, ref2.field, `\`$vars.${key.split("__").join(".")}\` (agent.json input "${key}")`);
|
|
8093
|
+
}
|
|
8094
|
+
}
|
|
8095
|
+
const bound = node.inputs?.agentInputVariables;
|
|
8096
|
+
if (Array.isArray(bound)) {
|
|
8097
|
+
for (const entry of bound) {
|
|
8098
|
+
if (!entry || typeof entry !== "object")
|
|
8099
|
+
continue;
|
|
8100
|
+
const binding = entry.binding;
|
|
8101
|
+
if (typeof binding !== "string")
|
|
8102
|
+
continue;
|
|
8103
|
+
const match = VARS_NODE_OUTPUT_RE.exec(binding);
|
|
8104
|
+
if (!match)
|
|
8105
|
+
continue;
|
|
8106
|
+
add(match[1], match[2], `\`${binding.replace(/^=/, "")}\` (agentInputVariables binding)`);
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
return { byNode, byField };
|
|
8110
|
+
}
|
|
8111
|
+
collectUpstreamNodeIds(incoming, targetId) {
|
|
8112
|
+
const upstream = new Set;
|
|
8113
|
+
const queue = [targetId];
|
|
8114
|
+
while (queue.length > 0) {
|
|
8115
|
+
const current2 = queue.pop();
|
|
8116
|
+
for (const source of incoming.get(current2) ?? []) {
|
|
8117
|
+
if (upstream.has(source))
|
|
8118
|
+
continue;
|
|
8119
|
+
upstream.add(source);
|
|
8120
|
+
queue.push(source);
|
|
8121
|
+
}
|
|
8122
|
+
}
|
|
8123
|
+
return upstream;
|
|
8124
|
+
}
|
|
7767
8125
|
canonicalInputKey(rawVar) {
|
|
7768
8126
|
if (!rawVar.startsWith("input."))
|
|
7769
8127
|
return;
|
|
@@ -7926,22 +8284,7 @@ Validating: ${absolutePath}
|
|
|
7926
8284
|
const triggerNodeIds = new Set(nodes.filter((n) => typeof n.type === "string" && n.type.startsWith("core.trigger.")).map((n) => n.id));
|
|
7927
8285
|
if (triggerNodeIds.size === 0)
|
|
7928
8286
|
return issues;
|
|
7929
|
-
const expressions =
|
|
7930
|
-
const collect = (val) => {
|
|
7931
|
-
if (typeof val === "string") {
|
|
7932
|
-
expressions.push(val);
|
|
7933
|
-
} else if (Array.isArray(val)) {
|
|
7934
|
-
for (const v of val)
|
|
7935
|
-
collect(v);
|
|
7936
|
-
} else if (val && typeof val === "object") {
|
|
7937
|
-
for (const v of Object.values(val))
|
|
7938
|
-
collect(v);
|
|
7939
|
-
}
|
|
7940
|
-
};
|
|
7941
|
-
for (const n of nodes) {
|
|
7942
|
-
collect(n.inputs);
|
|
7943
|
-
collect(n.outputs);
|
|
7944
|
-
}
|
|
8287
|
+
const expressions = collectNodeExpressionStrings(nodes);
|
|
7945
8288
|
const refRe = /\$vars\.([A-Za-z0-9_$]+)\.output\.([A-Za-z0-9_$]+)/g;
|
|
7946
8289
|
const reported = new Set;
|
|
7947
8290
|
for (const expr of expressions) {
|
|
@@ -7969,6 +8312,65 @@ Validating: ${absolutePath}
|
|
|
7969
8312
|
}
|
|
7970
8313
|
return issues;
|
|
7971
8314
|
}
|
|
8315
|
+
validateUnboundInputGlobals(flow, pathPrefix) {
|
|
8316
|
+
const issues = [];
|
|
8317
|
+
const nodes = flow.nodes ?? [];
|
|
8318
|
+
const inGlobals = (flow.variables?.globals ?? []).filter((g) => g.id && g.direction === "in");
|
|
8319
|
+
if (inGlobals.length === 0)
|
|
8320
|
+
return issues;
|
|
8321
|
+
const triggerNodes = nodes.filter((n) => isStartEventNode({
|
|
8322
|
+
id: n.id,
|
|
8323
|
+
type: n.type,
|
|
8324
|
+
typeVersion: n.typeVersion ?? "1.0"
|
|
8325
|
+
}));
|
|
8326
|
+
if (triggerNodes.length === 0)
|
|
8327
|
+
return issues;
|
|
8328
|
+
const definitions = flow.definitions ?? [];
|
|
8329
|
+
const manifestInputIds = (node) => {
|
|
8330
|
+
const def = definitions.find((d) => d.nodeType === node.type && d.version === node.typeVersion) ?? definitions.find((d) => d.nodeType === node.type);
|
|
8331
|
+
const props = def?.outputDefinition?.output?.schema?.properties;
|
|
8332
|
+
return props && typeof props === "object" ? Object.keys(props) : [];
|
|
8333
|
+
};
|
|
8334
|
+
const manifestInputs = new Set;
|
|
8335
|
+
const globalsDrivenTriggers = [];
|
|
8336
|
+
for (const t of triggerNodes) {
|
|
8337
|
+
const ids = manifestInputIds(t);
|
|
8338
|
+
if (ids.length > 0) {
|
|
8339
|
+
for (const id of ids)
|
|
8340
|
+
manifestInputs.add(id);
|
|
8341
|
+
} else {
|
|
8342
|
+
globalsDrivenTriggers.push(t.id);
|
|
8343
|
+
}
|
|
8344
|
+
}
|
|
8345
|
+
if (globalsDrivenTriggers.length === 0)
|
|
8346
|
+
return issues;
|
|
8347
|
+
const triggerIds = new Set(triggerNodes.map((n) => n.id));
|
|
8348
|
+
const readViaTrigger = new Set;
|
|
8349
|
+
const refRe = /\$vars\.([A-Za-z0-9_$]+)\.output\.([A-Za-z0-9_$]+)/g;
|
|
8350
|
+
for (const expr of collectNodeExpressionStrings(nodes)) {
|
|
8351
|
+
for (const match of expr.matchAll(refRe)) {
|
|
8352
|
+
if (triggerIds.has(match[1]))
|
|
8353
|
+
readViaTrigger.add(match[2]);
|
|
8354
|
+
}
|
|
8355
|
+
}
|
|
8356
|
+
const soleTrigger = globalsDrivenTriggers.length === 1 ? globalsDrivenTriggers[0] : undefined;
|
|
8357
|
+
for (const g of inGlobals) {
|
|
8358
|
+
if (g.triggerNodeId && triggerIds.has(g.triggerNodeId))
|
|
8359
|
+
continue;
|
|
8360
|
+
if (readViaTrigger.has(g.id))
|
|
8361
|
+
continue;
|
|
8362
|
+
if (manifestInputs.has(g.id))
|
|
8363
|
+
continue;
|
|
8364
|
+
const detail = g.triggerNodeId ? `its "triggerNodeId" is "${g.triggerNodeId}", which is not a trigger node in this flow` : `it has no "triggerNodeId"`;
|
|
8365
|
+
const fix = soleTrigger ? `Set "triggerNodeId": "${soleTrigger}" on the "${g.id}" global.` : `Set "triggerNodeId" on the "${g.id}" global to the trigger that supplies it (${globalsDrivenTriggers.join(", ")}).`;
|
|
8366
|
+
issues.push({
|
|
8367
|
+
path: `${pathPrefix}variables.globals[${g.id}].triggerNodeId`,
|
|
8368
|
+
message: `Input variable "${g.id}" is omitted from the packed entry point's \`input.properties\` because ${detail}. A deployed process or trigger then has no way to pass "${g.id}" — while \`flow validate\`, \`flow format\`, and \`flow debug --inputs\` all stay green. ${fix}`,
|
|
8369
|
+
severity: "warning"
|
|
8370
|
+
});
|
|
8371
|
+
}
|
|
8372
|
+
return issues;
|
|
8373
|
+
}
|
|
7972
8374
|
validateResourceBindings(workflow) {
|
|
7973
8375
|
const issues = [];
|
|
7974
8376
|
const bindings = workflow.bindings ?? [];
|
|
@@ -7979,12 +8381,14 @@ Validating: ${absolutePath}
|
|
|
7979
8381
|
...workflow.nodes.map((n) => ({
|
|
7980
8382
|
id: n.id,
|
|
7981
8383
|
type: n.type,
|
|
8384
|
+
typeVersion: n.typeVersion,
|
|
7982
8385
|
inputs: n.inputs,
|
|
7983
8386
|
scope: ""
|
|
7984
8387
|
})),
|
|
7985
8388
|
...Object.entries(subflows).flatMap(([subflowId, sub]) => (sub.nodes ?? []).map((n) => ({
|
|
7986
8389
|
id: n.id,
|
|
7987
8390
|
type: n.type,
|
|
8391
|
+
typeVersion: n.typeVersion,
|
|
7988
8392
|
inputs: n.inputs,
|
|
7989
8393
|
scope: `subflows[${subflowId}].`
|
|
7990
8394
|
})))
|
|
@@ -8042,6 +8446,52 @@ Validating: ${absolutePath}
|
|
|
8042
8446
|
}
|
|
8043
8447
|
return issues;
|
|
8044
8448
|
}
|
|
8449
|
+
validateDuplicateProcessTargets(workflow) {
|
|
8450
|
+
const issues = [];
|
|
8451
|
+
const subflows = workflow.subflows ?? {};
|
|
8452
|
+
const definitions = workflow.definitions;
|
|
8453
|
+
const buckets = new Map;
|
|
8454
|
+
const recordNode = (node, scope) => {
|
|
8455
|
+
const target = resolveProcessTarget(node, definitions);
|
|
8456
|
+
if (!target)
|
|
8457
|
+
return;
|
|
8458
|
+
const bucketKey = `${target.subType}\x00${target.key}`;
|
|
8459
|
+
let list2 = buckets.get(bucketKey);
|
|
8460
|
+
if (!list2) {
|
|
8461
|
+
list2 = [];
|
|
8462
|
+
buckets.set(bucketKey, list2);
|
|
8463
|
+
}
|
|
8464
|
+
list2.push({
|
|
8465
|
+
nodeId: node.id,
|
|
8466
|
+
label: node.display?.label ?? "",
|
|
8467
|
+
scope,
|
|
8468
|
+
targetKey: target.key
|
|
8469
|
+
});
|
|
8470
|
+
};
|
|
8471
|
+
for (const node of workflow.nodes) {
|
|
8472
|
+
recordNode(node, "");
|
|
8473
|
+
}
|
|
8474
|
+
for (const [subflowId, sub] of Object.entries(subflows)) {
|
|
8475
|
+
for (const node of sub.nodes ?? []) {
|
|
8476
|
+
recordNode(node, `subflows[${subflowId}].`);
|
|
8477
|
+
}
|
|
8478
|
+
}
|
|
8479
|
+
for (const occurrences of buckets.values()) {
|
|
8480
|
+
if (occurrences.length < 2)
|
|
8481
|
+
continue;
|
|
8482
|
+
const distinctLabels = new Set(occurrences.map((o) => o.label));
|
|
8483
|
+
if (distinctLabels.size < 2)
|
|
8484
|
+
continue;
|
|
8485
|
+
const nodeList = occurrences.map((o) => `${o.scope}nodes[${o.nodeId}] ("${o.label}")`).join(", ");
|
|
8486
|
+
const first = occurrences[0];
|
|
8487
|
+
issues.push({
|
|
8488
|
+
path: `${first.scope}nodes[${first.nodeId}]`,
|
|
8489
|
+
severity: "warning",
|
|
8490
|
+
message: `Process target "${first.targetKey}" is invoked by ${occurrences.length} differently-named nodes (${nodeList}). Two differently-named nodes resolving to the same process/function usually means a node was duplicated without re-pointing its target — verify each node calls the intended process. If this reuse is intentional, ignore this warning.`
|
|
8491
|
+
});
|
|
8492
|
+
}
|
|
8493
|
+
return issues;
|
|
8494
|
+
}
|
|
8045
8495
|
async validateConnectorBindingShapes(workflow) {
|
|
8046
8496
|
const catalog = await this.loadConnectorCatalogCached();
|
|
8047
8497
|
return validateConnectorBindings(workflow, catalog, {
|
|
@@ -8350,4 +8800,4 @@ Validating: ${absolutePath}
|
|
|
8350
8800
|
|
|
8351
8801
|
export { ensureDirectory, FlowEvalFileStore, readInlineAgentSource, isInlineAgentNodeType, fileNodesToPackagingNodes, packageInlineAgents, stageInlineAgentPackageFiles, buildInlineAgentDescriptors, writePackagingArtifacts, writePackagingArtifactsDetailed, regenerateBindingsFile, NodeTypeNotFoundError, NodeTypeNotEnabledError, SourceRequiredError, listNodesInFlow, ensureProcessBindings, collectNodeBindingResourceKeys, addNodeToFlow, deleteNodeFromFlow, ERROR_SOURCE_PORT, enableErrorHandlingForErrorEdges, expandHandleIds, portMatchesTemplate, captureMigrationIssues, formatMigrationFailureMessage, isConnectorTriggerType, isConnectorWaitForEventType, isEventDrivenConnectorType, scanDetailForCrossNodeBindings, connectorNodeValidator, FlowValidateService };
|
|
8352
8802
|
|
|
8353
|
-
//# debugId=
|
|
8803
|
+
//# debugId=4018E76FF70902A364756E2164756E21
|