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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +6 -1
  2. package/dist/THIRD-PARTY-NOTICES.md +48 -9
  3. package/dist/authoring-0hr88kff.js +623 -0
  4. package/dist/{case-api-v6cjyrfw.js → case-api-gdaj9469.js} +5 -5
  5. package/dist/case-bindings-service-c2mze9vj.js +476 -0
  6. package/dist/{case-debug-studio-web-service-shg84pn8.js → case-debug-studio-web-service-cc0vj7md.js} +11 -10
  7. package/dist/case-described-io-service-cpe5h2ks.js +132 -0
  8. package/dist/{case-format-service-q345a2fd.js → case-format-service-qwyjyt0y.js} +2 -2
  9. package/dist/{case-pack-service-29rza2q2.js → case-pack-service-47yrvmg0.js} +11 -11
  10. package/dist/case-shape-reader-mw58avr0.js +13 -0
  11. package/dist/case-splice-service-9zvw19ca.js +312 -0
  12. package/dist/{case-validate-service-2n2bqc1g.js → case-validate-service-vrvx19c1.js} +415 -1449
  13. package/dist/{connector-enrichment-service-h662r92z.js → connector-enrichment-service-rg87npf0.js} +20 -18
  14. package/dist/{connector-lookup-service-y7x6xsc6.js → connector-lookup-service-c49pvfwb.js} +7 -7
  15. package/dist/{connector-task-spec-qm6q8qma.js → connector-task-spec-t3tjeeqt.js} +86 -26
  16. package/dist/{debug-service-8x087xxt.js → debug-service-vf5mw0nr.js} +3 -3
  17. package/dist/{embedded-file-reader-0sjt4nkj.js → embedded-file-reader-v8c2yj2a.js} +2 -2
  18. package/dist/{enrichment-service-7vbxcwge.js → enrichment-service-78b0gqck.js} +8 -7
  19. package/dist/index-hhsf00x8.js +15 -0
  20. package/dist/{index-fz4ttsde.js → index-j2r3jb6c.js} +5 -3
  21. package/dist/{index-jxj2jz45.js → index-rgw7caht.js} +416 -87
  22. package/dist/{index-k4xz16db.js → index-wmffgzmr.js} +12522 -7316
  23. package/dist/{index-va9sm89y.js → index-ynnr55wk.js} +59 -27
  24. package/dist/index.js +15 -11
  25. package/dist/{input-reader-pnh948bq.js → input-reader-bb0ptk2v.js} +2 -2
  26. package/dist/migration-diagnosis-ag2sgd1e.js +71 -0
  27. package/dist/{node-strategy-gc4sg6a2.js → node-strategy-5pz40tee.js} +1 -1
  28. package/dist/{node-sync-service-mehbp4qq.js → node-sync-service-xw3tpfj5.js} +6 -6
  29. package/dist/out-target-1f4n9vqb.js +70 -0
  30. package/dist/{packager-tool-wefb1zw3.js → packager-tool-0p3td5zv.js} +8 -7
  31. package/dist/packager-tool-21qfsbxn.js +17 -0
  32. package/dist/{strict-sdd-audit-8e2fh9jg.js → packager-tool-4e56rmwe.js} +2771 -1746
  33. package/dist/{packager-tool-sfkyb4kz.js → packager-tool-4rqd21wc.js} +194 -2
  34. package/dist/packager-tool-57pzrd0g.js +32 -0
  35. package/dist/{packager-tool-kpcjnxd1.js → packager-tool-58kx79ta.js} +586 -113
  36. package/dist/{packager-tool-hrdan5ms.js → packager-tool-5qghkdd0.js} +2 -2
  37. package/dist/packager-tool-5qp9xza1.js +10 -0
  38. package/dist/packager-tool-8a9yqfq7.js +76 -0
  39. package/dist/{packager-tool-40vq60aa.js → packager-tool-8mpxsyje.js} +4 -4
  40. package/dist/{packager-tool-e3k5gzd3.js → packager-tool-a6wztj6y.js} +669 -100
  41. package/dist/{packager-tool-p0zh9hw6.js → packager-tool-ayevyw80.js} +5 -5
  42. package/dist/packager-tool-b250k6w4.js +75 -0
  43. package/dist/packager-tool-bfgdz1zh.js +73 -0
  44. package/dist/{packager-tool-p7jgrm5r.js → packager-tool-cmwets3m.js} +1 -1
  45. package/dist/{packager-tool-d4sjk46c.js → packager-tool-cv05dwac.js} +18 -21
  46. package/dist/packager-tool-d7jjng8a.js +21 -0
  47. package/dist/packager-tool-dthjwajc.js +13 -0
  48. package/dist/{packager-tool-zcsm7dsj.js → packager-tool-e760vtgg.js} +4 -4
  49. package/dist/packager-tool-f78ntj5g.js +228 -0
  50. package/dist/{packager-tool-2xfyykm0.js → packager-tool-ggbvxvey.js} +320 -200
  51. package/dist/{packager-tool-6karkrc8.js → packager-tool-jx0yq0b5.js} +6 -6
  52. package/dist/{packager-tool-cg2j4rma.js → packager-tool-kacqd7h7.js} +4 -4
  53. package/dist/packager-tool-mknccck5.js +24 -0
  54. package/dist/{packager-tool-sv0d6wb6.js → packager-tool-nj4seavy.js} +7 -3
  55. package/dist/{packager-tool-adcaxdhs.js → packager-tool-paepfv5d.js} +1 -1
  56. package/dist/{packager-tool-052kvydg.js → packager-tool-pm646ag4.js} +1 -1
  57. package/dist/{packager-tool-dd8bq6az.js → packager-tool-rgpdaxbx.js} +548 -108
  58. package/dist/{packager-tool-8q7vzh65.js → packager-tool-s3e2kepj.js} +455 -13
  59. package/dist/{packager-tool-r84ng21s.js → packager-tool-sag9gz55.js} +3 -1
  60. package/dist/{packager-tool-0mj06yen.js → packager-tool-sq931c23.js} +5 -22
  61. package/dist/{packager-tool-yrsrzz1a.js → packager-tool-v99ygh9f.js} +23 -8
  62. package/dist/packager-tool-wj9d9mqe.js +267 -0
  63. package/dist/{packager-tool-hz1mz8fs.js → packager-tool-wjaya2k2.js} +2 -2
  64. package/dist/packager-tool-xcd87qyx.js +44 -0
  65. package/dist/{packager-tool-0v3s8r01.js → packager-tool-xdxr3ync.js} +4 -2
  66. package/dist/{packager-tool-61hxhgeg.js → packager-tool-xkgq5fkf.js} +3 -3
  67. package/dist/packager-tool.js +6 -6
  68. package/dist/{project-artifacts-8snev67g.js → project-artifacts-wzrhketn.js} +1 -1
  69. package/dist/resolved-check-p99hysaw.js +50 -0
  70. package/dist/{resourcesSyncService-pmfwz9cd.js → resourcesSyncService-1ezvhcbc.js} +25 -18
  71. package/dist/rule-group-members-zje7n3kf.js +76 -0
  72. package/dist/sdd-convert-service-gp9733qv.js +1962 -0
  73. package/dist/{sdd-lookup-x08j9g9m.js → sdd-lookup-vpjej1kt.js} +2 -2
  74. package/dist/sdd-resolve-service-4hx64x3z.js +288 -0
  75. package/dist/strict-case-rules-ksy8q7pg.js +731 -0
  76. package/dist/strict-entry-points-v14d7y50.js +124 -0
  77. package/dist/strict-sdd-audit-k6hh0mbr.js +23 -0
  78. package/dist/task-selector-8bjn35dv.js +57 -0
  79. package/dist/tool.js +15 -11
  80. package/dist/{trigger-enrichment-service-xexg7qbk.js → trigger-enrichment-service-pjw5ysny.js} +41 -23
  81. package/package.json +2 -2
  82. package/dist/authoring-kngaggwm.js +0 -360
  83. package/dist/case-bindings-service-1wxfghzd.js +0 -240
  84. package/dist/packager-tool-83qnybab.js +0 -1564
  85. package/dist/strict-case-rules-x6t0vb40.js +0 -409
@@ -1,409 +0,0 @@
1
- import {
2
- ACTIVITY_TYPE_ID_PATH,
3
- BINDING_REFERENCE_PREFIX,
4
- NAME_BOUND_TASK_TYPES,
5
- RESOLVED_IDENTITY_KEYS,
6
- activityTypeIdMessage,
7
- contextEntry,
8
- missingContextKeys,
9
- readActivityTypeId
10
- } from "./packager-tool-d4sjk46c.js";
11
- import"./packager-tool-1yh8g550.js";
12
-
13
- // src/services/strict-case-rules.ts
14
- import { Script } from "node:vm";
15
- var FORMAL_ARG_ID = /^v[A-Za-z0-9]{8}$/;
16
- var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
17
- var asArray = (value) => Array.isArray(value) ? value : [];
18
- var nodeType = (node) => typeof node.type === "string" ? node.type : "";
19
- var isStage = (node) => nodeType(node).startsWith("case-management:Stage") || nodeType(node) === "case-management:Stage";
20
- var checkStagesHaveTasks = (nodes) => {
21
- const issues = [];
22
- for (const node of nodes) {
23
- if (!isStage(node))
24
- continue;
25
- const data = asRecord(node.data);
26
- const lanes = asArray(data?.tasks);
27
- const taskCount = lanes.reduce((total, lane) => total + asArray(lane).length, 0);
28
- if (taskCount > 0)
29
- continue;
30
- const id = typeof node.id === "string" ? node.id : "?";
31
- issues.push({
32
- code: "STRICT_STAGE_NO_TASKS",
33
- path: `nodes[${id}].data.tasks`,
34
- severity: "error",
35
- message: `Stage "${id}" declares no tasks. A stage with empty task ` + "lanes deploys and then has nothing to run, so the case " + "enters it and stops."
36
- });
37
- }
38
- return issues;
39
- };
40
- var jsSyntaxError = (source) => {
41
- try {
42
- new Script(source);
43
- return null;
44
- } catch (error) {
45
- return error instanceof SyntaxError ? error.message : null;
46
- }
47
- };
48
- var checkJsExpressionsParse = (value, path, issues) => {
49
- if (typeof value === "string") {
50
- if (!value.startsWith("=js:"))
51
- return;
52
- const source = value.slice(4);
53
- const failure = jsSyntaxError(source);
54
- if (failure === null)
55
- return;
56
- const escaped = source.replace(/\r\n|\r|\n/g, String.raw`\n`);
57
- const rawLineBreak = escaped !== source && jsSyntaxError(escaped) === null;
58
- issues.push({
59
- code: "STRICT_JS_EXPRESSION_INVALID",
60
- path,
61
- severity: "error",
62
- message: `This \`=js:\` expression does not parse: ${failure}. The ` + "runtime evaluates it as JavaScript, so the element faults on " + "its first evaluation." + (rawLineBreak ? " It carries a raw line break: write `\\\\n` in the JSON " + "so the JavaScript source carries `\\n`." : "") + ` Offending text: ${JSON.stringify(value.slice(0, 70))}`
63
- });
64
- return;
65
- }
66
- if (Array.isArray(value)) {
67
- value.forEach((entry, index) => {
68
- checkJsExpressionsParse(entry, `${path}[${index}]`, issues);
69
- });
70
- return;
71
- }
72
- const record = asRecord(value);
73
- if (!record)
74
- return;
75
- for (const [key, entry] of Object.entries(record)) {
76
- checkJsExpressionsParse(entry, `${path}.${key}`, issues);
77
- }
78
- };
79
- var checkVariableContract = (variables) => {
80
- const issues = [];
81
- for (const slot of ["inputs", "outputs", "inputOutputs"]) {
82
- asArray(variables?.[slot]).forEach((entry, index) => {
83
- const variable = asRecord(entry);
84
- if (!variable)
85
- return;
86
- const name = typeof variable.name === "string" ? variable.name : `#${index}`;
87
- const path = `variables.${slot}[${name}]`;
88
- const id = variable.id;
89
- if (slot !== "inputOutputs") {
90
- if (typeof id !== "string" || !FORMAL_ARG_ID.test(id)) {
91
- issues.push({
92
- code: "STRICT_FORMAL_ARG_ID",
93
- path: `${path}.id`,
94
- severity: "error",
95
- message: `Formal argument "${name}" has id ` + `"${String(id)}", which is not the generated ` + 'form "v" + 8 characters. An id copied from the ' + "name collides across renames and does not match " + "what the converter emits."
96
- });
97
- }
98
- }
99
- if (variable.default !== undefined && typeof variable.default !== "string") {
100
- issues.push({
101
- code: "STRICT_DEFAULT_NOT_STRING",
102
- path: `${path}.default`,
103
- severity: "error",
104
- message: `Default for "${name}" is a ` + `${Array.isArray(variable.default) ? "array" : typeof variable.default} ` + "and must be a JSON string. The converter drops " + "non-string defaults without saying so, so the value " + "silently disappears from entry-points.json."
105
- });
106
- }
107
- });
108
- }
109
- return issues;
110
- };
111
- var checkInputOutputCompanions = (variables, nodes) => {
112
- const issues = [];
113
- const companions = new Set(asArray(variables?.inputOutputs).map((entry) => asRecord(entry)?.name).filter((name) => typeof name === "string"));
114
- const unbound = (name) => !companions.has(name);
115
- asArray(variables?.inputs).forEach((entry) => {
116
- const variable = asRecord(entry);
117
- const name = variable?.name;
118
- if (typeof name !== "string" || !unbound(name))
119
- return;
120
- issues.push({
121
- code: "STRICT_INPUTOUTPUTS_COMPANION",
122
- path: `variables.inputs[${name}]`,
123
- severity: "error",
124
- message: `In-argument "${name}" has no entry of the same name in ` + "variables.inputOutputs[]. The companion is what carries the " + "binding, so without it the argument is declared and never " + "bound."
125
- });
126
- });
127
- for (const node of nodes) {
128
- const nodeId = typeof node.id === "string" ? node.id : "?";
129
- const data = asRecord(node.data);
130
- for (const lane of asArray(data?.tasks)) {
131
- for (const task of asArray(lane)) {
132
- const taskRecord = asRecord(task);
133
- if (!taskRecord)
134
- continue;
135
- const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
136
- for (const output of asArray(asRecord(taskRecord.data)?.outputs)) {
137
- const record = asRecord(output);
138
- if (record?.custom !== true)
139
- continue;
140
- const variableName = record.var;
141
- if (typeof variableName !== "string" || !unbound(variableName)) {
142
- continue;
143
- }
144
- const label = typeof record.name === "string" ? record.name : variableName;
145
- issues.push({
146
- code: "STRICT_INPUTOUTPUTS_COMPANION",
147
- path: `nodes[${nodeId}].data.tasks[${taskId}].data.outputs[${label}]`,
148
- severity: "error",
149
- message: `Custom output "${label}" writes to ` + `"${variableName}", which has no entry in ` + "variables.inputOutputs[]. Without the companion " + "the value has nowhere to land."
150
- });
151
- }
152
- }
153
- }
154
- }
155
- return issues;
156
- };
157
- var checkConnectorRuleContext = (nodes) => {
158
- const issues = [];
159
- const visitRule = (rule, path) => {
160
- if (rule.rule !== "wait-for-connector")
161
- return;
162
- const context = asRecord(rule.uipath)?.context;
163
- const missing = missingContextKeys(context, true);
164
- if (missing.length > 0) {
165
- issues.push({
166
- code: "STRICT_CONNECTOR_CONTEXT_INCOMPLETE",
167
- path: `${path}.uipath.context`,
168
- severity: "error",
169
- message: `Connector rule "${String(rule.id ?? "?")}" is missing ` + `context entries: ${missing.join(", ")}. A rule carrying ` + "the connection but not the activity metadata deploys and " + "then has no event to wait for."
170
- });
171
- }
172
- if (contextEntry(context, "metadata") === undefined)
173
- return;
174
- if (readActivityTypeId(context) === undefined) {
175
- issues.push({
176
- code: "STRICT_CONNECTOR_ACTIVITY_TYPE_ID",
177
- path: `${path}.uipath.context[metadata].${ACTIVITY_TYPE_ID_PATH}`,
178
- severity: "error",
179
- message: activityTypeIdMessage(`rule "${typeof rule.id === "string" ? rule.id : "?"}"`, context, "The connection id alone does not identify the event to " + "wait for.")
180
- });
181
- }
182
- };
183
- const visitConditions = (conditions, path) => {
184
- asArray(conditions).forEach((condition, conditionIndex) => {
185
- const record = asRecord(condition);
186
- if (!record)
187
- return;
188
- asArray(record.rules).forEach((group, groupIndex) => {
189
- asArray(group).forEach((rule, ruleIndex) => {
190
- const ruleRecord = asRecord(rule);
191
- if (!ruleRecord)
192
- return;
193
- visitRule(ruleRecord, `${path}[${conditionIndex}].rules[${groupIndex}][${ruleIndex}]`);
194
- });
195
- });
196
- });
197
- };
198
- for (const node of nodes) {
199
- const id = typeof node.id === "string" ? node.id : "?";
200
- const data = asRecord(node.data);
201
- visitConditions(data?.entryConditions, `nodes[${id}].data.entryConditions`);
202
- visitConditions(data?.exitConditions, `nodes[${id}].data.exitConditions`);
203
- for (const lane of asArray(data?.tasks)) {
204
- for (const task of asArray(lane)) {
205
- const taskRecord = asRecord(task);
206
- if (!taskRecord)
207
- continue;
208
- const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
209
- visitConditions(taskRecord.entryConditions, `nodes[${id}].data.tasks[${taskId}].entryConditions`);
210
- }
211
- }
212
- }
213
- return issues;
214
- };
215
- var RECIPIENT_PREFIXES = [
216
- "User:",
217
- "UserGroup:",
218
- "Role:",
219
- "Email:",
220
- "Expression:"
221
- ];
222
- var recipientIssues = (recipient, path) => {
223
- const value = recipient.Value;
224
- if (typeof value !== "string")
225
- return [];
226
- const prefix = RECIPIENT_PREFIXES.find((candidate) => value.startsWith(candidate));
227
- if (prefix !== undefined) {
228
- return [
229
- {
230
- code: "STRICT_RECIPIENT_PREFIX_LEFT",
231
- path: `${path}.Value`,
232
- severity: "error",
233
- message: `Recipient value "${value}" still carries the ` + `"${prefix}" marker. That marker picks the Type and is ` + "removed on the way in, so the assignment looks up a " + "name nobody has and the task ships assigned to no one."
234
- }
235
- ];
236
- }
237
- if (!value.startsWith("=vars.") || recipient.Type === 3)
238
- return [];
239
- return [
240
- {
241
- code: "STRICT_RECIPIENT_EXPRESSION_TYPE",
242
- path: `${path}.Type`,
243
- severity: "error",
244
- message: `Recipient value "${value}" is an expression but carries ` + `Type ${String(recipient.Type)}. Type 0 sends it to a user ` + "lookup, Type 1 to a group lookup and Type 2 to an email " + "lookup, all on the literal text. An expression recipient " + "is Type 3."
245
- }
246
- ];
247
- };
248
- var checkActionRecipientShape = (nodes) => nodes.flatMap((node) => {
249
- const nodeId = typeof node.id === "string" ? node.id : "?";
250
- const lanes = asArray(asRecord(node.data)?.tasks);
251
- return lanes.flatMap((lane) => asArray(lane).flatMap((task) => {
252
- const taskRecord = asRecord(task);
253
- const recipient = asRecord(asRecord(taskRecord?.data)?.recipient);
254
- if (!taskRecord || !recipient)
255
- return [];
256
- const taskId = typeof taskRecord.id === "string" ? taskRecord.id : "?";
257
- return recipientIssues(recipient, `nodes[${nodeId}].data.tasks[${taskId}].data.recipient`);
258
- }));
259
- });
260
- var RESOURCE_TASK_TYPES = new Set([
261
- "action",
262
- "agent",
263
- "api-workflow",
264
- "case-management",
265
- "execute-connector-activity",
266
- "process",
267
- "rpa",
268
- "wait-for-connector"
269
- ]);
270
- var collectBindingReferences = (value, path, found) => {
271
- if (typeof value === "string") {
272
- if (value.startsWith(BINDING_REFERENCE_PREFIX)) {
273
- const id = value.slice(BINDING_REFERENCE_PREFIX.length);
274
- if (id !== "" && !found.has(id))
275
- found.set(id, path);
276
- }
277
- return;
278
- }
279
- if (Array.isArray(value)) {
280
- value.forEach((entry, index) => {
281
- collectBindingReferences(entry, `${path}[${index}]`, found);
282
- });
283
- return;
284
- }
285
- const record = asRecord(value);
286
- if (record === undefined)
287
- return;
288
- for (const [key, entry] of Object.entries(record)) {
289
- collectBindingReferences(entry, `${path}.${key}`, found);
290
- }
291
- };
292
- var isBindingReference = (value) => typeof value === "string" && value.startsWith(BINDING_REFERENCE_PREFIX);
293
- var checkTaskBindings = (nodes) => {
294
- const issues = [];
295
- for (const node of nodes) {
296
- const stage = asRecord(node.data);
297
- const stageName = typeof stage?.label === "string" ? stage.label : "";
298
- for (const lane of asArray(stage?.tasks)) {
299
- for (const task of asArray(lane)) {
300
- const taskRecord = asRecord(task);
301
- const type = taskRecord?.type;
302
- const data = asRecord(taskRecord?.data);
303
- if (typeof type !== "string" || !NAME_BOUND_TASK_TYPES.has(type) || data === undefined) {
304
- continue;
305
- }
306
- const identity = RESOLVED_IDENTITY_KEYS.filter((key) => data[key] !== undefined);
307
- if (identity.length === 0)
308
- continue;
309
- const unbound = ["name", "folderPath"].filter((field) => !isBindingReference(data[field]));
310
- if (unbound.length === 0)
311
- continue;
312
- const taskName = typeof taskRecord?.displayName === "string" ? taskRecord.displayName : type;
313
- issues.push({
314
- code: "STRICT_BINDINGS_TASK_UNBOUND",
315
- path: `nodes[${stageName}].data.tasks[${taskName}].data`,
316
- severity: "error",
317
- message: `Task "${taskName}" (${type}) pins its resource with ` + `${identity.join(", ")}, but ${unbound.join(" and ")} ` + `${unbound.length === 1 ? `is not a ${BINDING_REFERENCE_PREFIX} reference` : `are not ${BINDING_REFERENCE_PREFIX} references`}. A resolved ` + "resource task binds both: `name` and `folderPath` " + "each point at a root bindings entry, and " + "bindings_v2.json is derived from those. A raw id " + "binds nothing, so the solution ships resolving this " + "task to nothing, and the id itself does not survive " + "a move to another tenant. Bind the pair and drop the " + "raw id."
318
- });
319
- }
320
- }
321
- }
322
- return issues;
323
- };
324
- var resourceTaskCount = (nodes) => {
325
- let count = 0;
326
- for (const node of nodes) {
327
- for (const lane of asArray(asRecord(node.data)?.tasks)) {
328
- for (const task of asArray(lane)) {
329
- const taskRecord = asRecord(task);
330
- const type = taskRecord?.type;
331
- if (typeof type === "string" && RESOURCE_TASK_TYPES.has(type) && Object.keys(asRecord(taskRecord?.data) ?? {}).length > 0) {
332
- count += 1;
333
- }
334
- }
335
- }
336
- }
337
- return count;
338
- };
339
- var checkResourceBindings = (parsed, nodes) => {
340
- const issues = [];
341
- const bindings = asArray(parsed.bindings).map((entry) => asRecord(entry)).filter((entry) => entry !== undefined);
342
- const bindingIds = new Set(bindings.map((entry) => entry.id).filter((id) => typeof id === "string"));
343
- const seenIds = new Set;
344
- const reportedIds = new Set;
345
- for (const entry of bindings) {
346
- const id = entry.id;
347
- if (typeof id !== "string" || id === "")
348
- continue;
349
- if (!seenIds.has(id)) {
350
- seenIds.add(id);
351
- continue;
352
- }
353
- if (reportedIds.has(id))
354
- continue;
355
- reportedIds.add(id);
356
- issues.push({
357
- code: "STRICT_BINDINGS_ID_DUPLICATE",
358
- path: `bindings[${id}]`,
359
- severity: "error",
360
- message: `Two or more bindings share the id "${id}". A ` + `${BINDING_REFERENCE_PREFIX}${id} reference resolves to ` + "whichever entry a consumer scans first, so the one that " + "wins depends on array order — and the losing entry still " + "reads as though it applies. Give each entry its own id."
361
- });
362
- }
363
- const references = new Map;
364
- collectBindingReferences(parsed.nodes, "nodes", references);
365
- collectBindingReferences(parsed.metadata, "metadata", references);
366
- for (const [id, path] of references) {
367
- if (bindingIds.has(id))
368
- continue;
369
- issues.push({
370
- code: "STRICT_BINDINGS_REFERENCE_UNRESOLVED",
371
- path,
372
- severity: "error",
373
- message: `"${BINDING_REFERENCE_PREFIX}${id}" points at no entry in the ` + "root bindings array, so nothing resolves it at run time. Add " + `a binding with id "${id}", or correct the reference.`
374
- });
375
- }
376
- const resourceTasks = resourceTaskCount(nodes);
377
- if (bindings.length > 0) {
378
- issues.push(...checkTaskBindings(nodes));
379
- } else if (resourceTasks > 0) {
380
- issues.push({
381
- code: "STRICT_BINDINGS_ABSENT",
382
- path: "bindings",
383
- severity: "warning",
384
- message: `The root bindings array is empty, but ${resourceTasks} task(s) ` + "name a platform resource (process, agent, rpa, action, " + "api-workflow, child case or connector). Every such task needs " + "a name/folderPath binding pair — or, for a connector, a " + "connection and folder key — and bindings_v2.json is derived " + "from that array, so an empty one publishes a solution that " + "resolves none of them."
385
- });
386
- }
387
- return issues;
388
- };
389
- var runStrictCaseRules = (parsed) => {
390
- const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
391
- const variables = asRecord(parsed.variables);
392
- const metadata = asRecord(parsed.metadata);
393
- const jsSyntaxIssues = [];
394
- checkJsExpressionsParse(parsed, "(root)", jsSyntaxIssues);
395
- return [
396
- ...checkStagesHaveTasks(nodes),
397
- ...jsSyntaxIssues,
398
- ...checkVariableContract(variables),
399
- ...checkInputOutputCompanions(variables, nodes),
400
- ...checkConnectorRuleContext(nodes),
401
- ...checkActionRecipientShape(nodes),
402
- ...checkResourceBindings(parsed, nodes)
403
- ];
404
- };
405
- export {
406
- runStrictCaseRules
407
- };
408
-
409
- //# debugId=C4B6D297A9F4627964756E2164756E21