@uipath/case-tool 1.204.0 → 1.205.0-preview.258

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 (135) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +24 -11
  2. package/dist/{authoring-6ckkzfc9.js → authoring-kqh34zzm.js} +49 -30
  3. package/dist/{business-rule-export-kg5bk8aw.js → business-rule-export-ey588rv7.js} +2 -2
  4. package/dist/canvas-notes-86fxx1t8.js +19 -0
  5. package/dist/{case-api-rvamfn02.js → case-api-sme7esce.js} +6 -6
  6. package/dist/case-bindings-service-cht20gqt.js +430 -0
  7. package/dist/case-debug-solution-projects-h3w2nx0a.js +34 -0
  8. package/dist/{case-debug-studio-web-service-xxfesw4v.js → case-debug-studio-web-service-3mkrtaet.js} +16 -10
  9. package/dist/{case-described-io-service-14hdnqcc.js → case-described-io-service-dx1f4nxe.js} +37 -11
  10. package/dist/case-event-trigger-bindings-g9ftnm4x.js +16 -0
  11. package/dist/{case-format-service-yb48785t.js → case-format-service-6aew6tqc.js} +2 -2
  12. package/dist/{case-pack-service-9185h6ez.js → case-pack-service-pqq8wnfd.js} +6 -6
  13. package/dist/case-schema-version-h820ne16.js +20 -0
  14. package/dist/{case-shape-reader-mw58avr0.js → case-shape-reader-dsbraetf.js} +1 -1
  15. package/dist/{case-splice-service-tkmb7xjp.js → case-splice-service-s5gccctq.js} +53 -8
  16. package/dist/{case-validate-service-c84e2bhv.js → case-validate-service-rey6btew.js} +128 -42
  17. package/dist/{connector-enrichment-service-hfv0kwht.js → connector-enrichment-service-crqs2216.js} +23 -20
  18. package/dist/{connector-lookup-service-whgjceyj.js → connector-lookup-service-dwv8q5eh.js} +6 -6
  19. package/dist/connector-task-shape-mpazkf7s.js +14 -0
  20. package/dist/{connector-task-spec-k0cwavrm.js → connector-task-spec-trs4tcb3.js} +196 -40
  21. package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
  22. package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
  23. package/dist/{debug-service-ch3v6jmm.js → debug-service-7q98j726.js} +3 -3
  24. package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
  25. package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
  26. package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
  27. package/dist/{enrichment-service-3f1kygjs.js → enrichment-service-hv7ff88p.js} +56 -12
  28. package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
  29. package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
  30. package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
  31. package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
  32. package/dist/filter-engine-7ep90g7f.js +11 -0
  33. package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
  34. package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
  35. package/dist/index-332n0kxj.js +282 -0
  36. package/dist/{index-wmffgzmr.js → index-5dxh9z60.js} +21751 -11098
  37. package/dist/{index-aw2gqqat.js → index-a2fvrrth.js} +4 -4
  38. package/dist/{index-4yanx3rn.js → index-ekwtgx7y.js} +1089 -218
  39. package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
  40. package/dist/index-n9qvnx4x.js +29 -0
  41. package/dist/{index-hhsf00x8.js → index-ngs0a2he.js} +1 -1
  42. package/dist/{index-j2r3jb6c.js → index-xq6ajhgq.js} +2 -2
  43. package/dist/index.js +12 -12
  44. package/dist/init-entry-points-hhpv3e3f.js +98 -0
  45. package/dist/{input-reader-1tcqt27f.js → input-reader-c7wz8ra2.js} +3 -3
  46. package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
  47. package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
  48. package/dist/{known-types-0h9kqwyy.js → known-types-jvkdgmzz.js} +5 -4
  49. package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
  50. package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
  51. package/dist/localSolutionDiscovery-yyx234ak.js +13 -0
  52. package/dist/migration-diagnosis-ns5cw4e3.js +99 -0
  53. package/dist/{node-strategy-5pz40tee.js → node-strategy-v442hwgd.js} +1 -1
  54. package/dist/node-sync-service-1wkcyn1n.js +57 -0
  55. package/dist/out-target-wjgmna0r.js +111 -0
  56. package/dist/{packager-tool-85q4f3pq.js → packager-tool-1pcmxqny.js} +3 -3
  57. package/dist/{packager-tool-8a9yqfq7.js → packager-tool-1yfw674x.js} +4 -2
  58. package/dist/{packager-tool-pdhhzfr5.js → packager-tool-29x6vran.js} +296 -417
  59. package/dist/packager-tool-2sn7d8fd.js +41 -0
  60. package/dist/packager-tool-4p11fvf4.js +92 -0
  61. package/dist/{packager-tool-25hng8h4.js → packager-tool-4rtktkhv.js} +16211 -13084
  62. package/dist/{packager-tool-yfm83bzd.js → packager-tool-67vy1fz3.js} +4 -3
  63. package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
  64. package/dist/packager-tool-7hw344bt.js +107 -0
  65. package/dist/{packager-tool-3q3d1hk8.js → packager-tool-83v804p7.js} +56 -6
  66. package/dist/{packager-tool-00y70spr.js → packager-tool-87y6xw3a.js} +2 -1
  67. package/dist/packager-tool-93mdeqay.js +18 -0
  68. package/dist/{packager-tool-64rg5ekd.js → packager-tool-9e59z4d6.js} +75 -7
  69. package/dist/{packager-tool-vepqrsse.js → packager-tool-9kf3fqtr.js} +2 -2
  70. package/dist/packager-tool-9kvkzc05.js +74 -0
  71. package/dist/{packager-tool-s6619wtx.js → packager-tool-9sd483vs.js} +2 -2
  72. package/dist/{packager-tool-f78ntj5g.js → packager-tool-9y1w2wds.js} +51 -6
  73. package/dist/packager-tool-a17g0pj1.js +62 -0
  74. package/dist/{packager-tool-167qap9m.js → packager-tool-aagnvyba.js} +845 -38
  75. package/dist/{packager-tool-0p6dbsp0.js → packager-tool-c5q10254.js} +5 -5
  76. package/dist/{packager-tool-wj9d9mqe.js → packager-tool-e15kqpyh.js} +12 -13
  77. package/dist/{packager-tool-c31qx8kc.js → packager-tool-ezds6t5e.js} +2 -2
  78. package/dist/{packager-tool-d3zvghjd.js → packager-tool-f2z2dscy.js} +308 -120
  79. package/dist/{packager-tool-hvzjm2nk.js → packager-tool-f8vwy92w.js} +2093 -5805
  80. package/dist/{packager-tool-rgpdaxbx.js → packager-tool-gx2cer6a.js} +5385 -1098
  81. package/dist/{packager-tool-xdxr3ync.js → packager-tool-hdxtgckw.js} +11 -1
  82. package/dist/{packager-tool-mr149jsw.js → packager-tool-k5cpxdm4.js} +17 -7
  83. package/dist/packager-tool-k6jbedyc.js +69 -0
  84. package/dist/packager-tool-kdhey8gz.js +153 -0
  85. package/dist/{packager-tool-cenvh23g.js → packager-tool-kyrm4e5m.js} +718 -87
  86. package/dist/packager-tool-mqy97y5f.js +52 -0
  87. package/dist/{packager-tool-jfysbxdt.js → packager-tool-mzf4gmph.js} +4 -4
  88. package/dist/packager-tool-n7w9wx62.js +25 -0
  89. package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
  90. package/dist/packager-tool-r0x3qh59.js +307 -0
  91. package/dist/{packager-tool-w1b5pyj6.js → packager-tool-r6b5ktzb.js} +730 -14
  92. package/dist/{packager-tool-zbrda9sn.js → packager-tool-rk25wp3c.js} +1 -1
  93. package/dist/{packager-tool-xcd87qyx.js → packager-tool-v2kcgjbf.js} +2 -3
  94. package/dist/{case-bindings-service-d9vezn69.js → packager-tool-wekqkmgn.js} +20 -231
  95. package/dist/packager-tool-yct6zp4m.js +335 -0
  96. package/dist/{packager-tool-kpqr938m.js → packager-tool-ydyvtknp.js} +26 -3
  97. package/dist/{packager-tool-v99ygh9f.js → packager-tool-yn33pw57.js} +124 -58
  98. package/dist/{packager-tool-4rqd21wc.js → packager-tool-yn7r7zq2.js} +19 -5
  99. package/dist/{packager-tool-cmwets3m.js → packager-tool-zf8f9pmm.js} +1 -1
  100. package/dist/packager-tool.js +3 -3
  101. package/dist/{project-artifacts-rng5m6r2.js → project-artifacts-bgyyb0dm.js} +1 -1
  102. package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
  103. package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
  104. package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
  105. package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
  106. package/dist/{resolved-check-p99hysaw.js → resolved-check-aqw7568y.js} +1 -1
  107. package/dist/{resourcesSyncService-zwjyp1qx.js → resourcesSyncService-d302jnap.js} +32 -170
  108. package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
  109. package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
  110. package/dist/{sdd-convert-service-vf0ps358.js → sdd-convert-service-8jpew7vz.js} +686 -445
  111. package/dist/{sdd-lookup-dwzpvvwn.js → sdd-lookup-fe900sdb.js} +2 -2
  112. package/dist/{sdd-resolve-service-mjqad2nn.js → sdd-resolve-service-qdtmxw9b.js} +38 -13
  113. package/dist/sdd-resolve-siblings-6kfxc2t6.js +53 -0
  114. package/dist/{solution-auth-kddmbm0p.js → solution-auth-30yycqtv.js} +3 -3
  115. package/dist/solution-discovery-g6ksnrg1.js +38 -0
  116. package/dist/{strict-case-rules-tz37bspw.js → strict-case-rules-4tjcaznr.js} +3 -2
  117. package/dist/{strict-entry-points-v14d7y50.js → strict-entry-points-g2pd4mf4.js} +29 -1
  118. package/dist/{strict-sdd-audit-4aqdeh59.js → strict-sdd-audit-q7tb9yj7.js} +7 -5
  119. package/dist/task-type-declaration-7a8fqdvs.js +46 -0
  120. package/dist/tool.js +12 -12
  121. package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
  122. package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
  123. package/dist/{trigger-enrichment-service-g3vt051f.js → trigger-enrichment-service-sj0p2d1j.js} +23 -20
  124. package/dist/trigger-entry-point-id-yhqwnkx9.js +15 -0
  125. package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
  126. package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
  127. package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
  128. package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
  129. package/package.json +2 -2
  130. package/dist/migration-diagnosis-ag2sgd1e.js +0 -71
  131. package/dist/node-sync-service-2tfrgbjs.js +0 -36
  132. package/dist/out-target-jakehnd3.js +0 -70
  133. package/dist/packager-tool-57pzrd0g.js +0 -32
  134. package/dist/packager-tool-dthjwajc.js +0 -13
  135. package/dist/packager-tool-xy04yy0v.js +0 -32
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getAuthContext
3
- } from "./packager-tool-v99ygh9f.js";
3
+ } from "./packager-tool-yn33pw57.js";
4
4
 
5
5
  // ../solution-sdk/src/solution-auth.ts
6
6
  async function getSolutionAuthContext(options) {
@@ -7,7 +7,6 @@ import {
7
7
  } from "./packager-tool-nj4seavy.js";
8
8
 
9
9
  // src/utils/case-document.ts
10
- var CASE_PLAN_FILENAME = "caseplan.json";
11
10
  function buildMinimalCaseDocument(options) {
12
11
  return {
13
12
  id: prefixedId("case-", 10),
@@ -39,6 +38,6 @@ function buildMinimalCaseDocument(options) {
39
38
  };
40
39
  }
41
40
 
42
- export { CASE_PLAN_FILENAME, buildMinimalCaseDocument };
41
+ export { buildMinimalCaseDocument };
43
42
 
44
- //# debugId=5271E14EC19FCE1A64756E2164756E21
43
+ //# debugId=F5C6C653548DE78B64756E2164756E21
@@ -3,11 +3,10 @@ import {
3
3
  } from "./packager-tool-5qp9xza1.js";
4
4
  import {
5
5
  catchError
6
- } from "./packager-tool-3q3d1hk8.js";
6
+ } from "./packager-tool-83v804p7.js";
7
7
  import {
8
8
  getFileSystem
9
- } from "./packager-tool-xdxr3ync.js";
10
- import"./packager-tool-1yh8g550.js";
9
+ } from "./packager-tool-hdxtgckw.js";
11
10
 
12
11
  // src/services/bindings-v2.ts
13
12
  var BINDINGS_V2_FILE_NAME = "bindings_v2.json";
@@ -36,6 +35,18 @@ var readBindingsV2Resources = (raw) => {
36
35
  return resources.filter((entry) => entry !== null && typeof entry === "object" && typeof entry.key === "string");
37
36
  };
38
37
  var identity = (entry) => `${entry.resource}:${entry.key}`;
38
+ var asSaved = (entry, found) => {
39
+ let saved = entry;
40
+ if (entry.resource === "Connection" && entry.value[FOLDER_KEY_PROPERTY] !== undefined && found.value?.[FOLDER_KEY_PROPERTY] === undefined) {
41
+ const { [FOLDER_KEY_PROPERTY]: _dropped, ...value } = entry.value;
42
+ saved = { ...saved, value };
43
+ }
44
+ if (saved.metadata?.ActivityName !== undefined && found.metadata?.ActivityName === undefined) {
45
+ const { ActivityName: _label, ...metadata } = saved.metadata;
46
+ saved = { ...saved, metadata };
47
+ }
48
+ return saved;
49
+ };
39
50
  var diffBindingsV2 = (expected, actual) => {
40
51
  const expectedByKey = new Map(expected.map((e) => [identity(e), e]));
41
52
  const actualByKey = new Map(actual.map((e) => [identity(e), e]));
@@ -45,7 +56,7 @@ var diffBindingsV2 = (expected, actual) => {
45
56
  const found = actualByKey.get(key);
46
57
  if (found === undefined) {
47
58
  missing.push(entry.key);
48
- } else if (JSON.stringify(found) !== JSON.stringify(entry)) {
59
+ } else if (JSON.stringify(found) !== JSON.stringify(asSaved(entry, found))) {
49
60
  changed.push(entry.key);
50
61
  }
51
62
  }
@@ -86,7 +97,9 @@ function entryPointIdsByNode(entryPoints) {
86
97
  const hash = filePath?.lastIndexOf("#") ?? -1;
87
98
  if (filePath === undefined || uniqueId === undefined || hash < 0)
88
99
  continue;
89
- ids.set(filePath.slice(hash + 1), uniqueId);
100
+ const node = filePath.slice(hash + 1);
101
+ if (!ids.has(node))
102
+ ids.set(node, uniqueId);
90
103
  }
91
104
  return ids;
92
105
  }
@@ -247,230 +260,6 @@ function deriveEventTriggerResources(nodes, bindings, entryPointIds) {
247
260
  });
248
261
  }
249
262
 
250
- // src/services/case-bindings-service.ts
251
- var asBinding = (value) => {
252
- if (value === null || typeof value !== "object" || Array.isArray(value)) {
253
- return;
254
- }
255
- const record = value;
256
- return typeof record.id === "string" && typeof record.resource === "string" && typeof record.resourceKey === "string" && record.resourceKey !== "" && typeof record.propertyAttribute === "string" && (record.default === undefined || typeof record.default === "string") ? value : undefined;
257
- };
258
- var CONNECTION_RESOURCE = "Connection";
259
- var NAME_ATTRIBUTE = "name";
260
- var FOLDER_PATH_ATTRIBUTE = "folderPath";
261
- var SOLUTION_FOLDER_PREFIX = "solution_folder.";
262
- var SOLUTION_FOLDER_SENTINEL = "solution_folder";
263
- var BINDING_REFERENCE_PREFIX2 = "=bindings.";
264
- var CONNECTOR_KEY_ENTRY = "connectorKey";
265
- var CONNECTION_ENTRY = "connection";
266
- var readConnectorContext = (value) => {
267
- if (!Array.isArray(value))
268
- return;
269
- const byName = new Map;
270
- for (const entry of value) {
271
- if (entry === null || typeof entry !== "object" || Array.isArray(entry))
272
- return;
273
- const { name, value: entryValue } = entry;
274
- if (typeof name !== "string")
275
- return;
276
- if (typeof entryValue === "string")
277
- byName.set(name, entryValue);
278
- }
279
- return byName.has(CONNECTOR_KEY_ENTRY) ? byName : undefined;
280
- };
281
- var ownLabel = (node) => {
282
- const record = node;
283
- for (const candidate of [
284
- record.displayName,
285
- record.display?.label,
286
- record.label
287
- ]) {
288
- if (typeof candidate === "string" && candidate !== "")
289
- return candidate;
290
- }
291
- return;
292
- };
293
- var collectConnectorKeys = (document) => {
294
- const byBindingId = new Map;
295
- const visit = (node, label) => {
296
- if (Array.isArray(node)) {
297
- const context = readConnectorContext(node);
298
- const connection = context?.get(CONNECTION_ENTRY);
299
- const connectorKey = context?.get(CONNECTOR_KEY_ENTRY);
300
- const bindingId = connection?.startsWith(BINDING_REFERENCE_PREFIX2) ? connection.slice(BINDING_REFERENCE_PREFIX2.length) : undefined;
301
- if (connectorKey !== undefined && bindingId !== undefined && !byBindingId.has(bindingId)) {
302
- byBindingId.set(bindingId, {
303
- connectorKey,
304
- activityName: label
305
- });
306
- }
307
- for (const item of node)
308
- visit(item, label);
309
- return;
310
- }
311
- if (node === null || typeof node !== "object")
312
- return;
313
- const scoped = ownLabel(node) ?? label;
314
- for (const value of Object.values(node))
315
- visit(value, scoped);
316
- };
317
- visit(document, undefined);
318
- return byBindingId;
319
- };
320
- var attributeDefault = (group, attribute) => group.find((binding) => binding.propertyAttribute === attribute)?.default;
321
- var connectionEntry = (group, connectorKeys) => {
322
- const key = group[0].resourceKey;
323
- const value = {
324
- [CONNECTION_ID_PROPERTY]: {
325
- defaultValue: attributeDefault(group, CONNECTION_ID_PROPERTY) ?? key
326
- }
327
- };
328
- const folderKey = attributeDefault(group, FOLDER_KEY_PROPERTY);
329
- if (folderKey !== undefined) {
330
- value[FOLDER_KEY_PROPERTY] = { defaultValue: folderKey };
331
- }
332
- const use = group.map((binding) => connectorKeys.get(binding.id)).find((found) => found !== undefined);
333
- const displayLabel = (group.find((binding) => binding.propertyAttribute === CONNECTION_ID_PROPERTY) ?? group[0]).name;
334
- return {
335
- resource: CONNECTION_RESOURCE,
336
- key,
337
- id: `${CONNECTION_RESOURCE}${key}`,
338
- value,
339
- metadata: {
340
- ...use?.activityName !== undefined && {
341
- ActivityName: use.activityName
342
- },
343
- BindingsVersion: RESOURCE_BINDINGS_VERSION,
344
- ...typeof displayLabel === "string" && displayLabel !== "" && { DisplayLabel: displayLabel },
345
- UseConnectionService: "true",
346
- ...use !== undefined && { Connector: use.connectorKey }
347
- }
348
- };
349
- };
350
- var resourceEntry = (group) => {
351
- const key = group[0].resourceKey;
352
- const value = {};
353
- const name = attributeDefault(group, NAME_ATTRIBUTE);
354
- if (name !== undefined)
355
- value.name = { defaultValue: name };
356
- const folderPath = key.startsWith(SOLUTION_FOLDER_PREFIX) ? SOLUTION_FOLDER_SENTINEL : attributeDefault(group, FOLDER_PATH_ATTRIBUTE);
357
- if (folderPath !== undefined) {
358
- value.folderPath = { defaultValue: folderPath };
359
- }
360
- const subType = group.find((binding) => binding.resourceSubType !== undefined)?.resourceSubType;
361
- return {
362
- resource: group[0].resource,
363
- key,
364
- value,
365
- ...subType !== undefined && { metadata: { subType } }
366
- };
367
- };
368
- var deriveCaseBindingsV2 = (document, entryPointIds = new Map) => {
369
- const connectorKeys = collectConnectorKeys(document);
370
- const groups = new Map;
371
- const bindings = [];
372
- for (const entry of Array.isArray(document.bindings) ? document.bindings : []) {
373
- const binding = asBinding(entry);
374
- if (binding === undefined)
375
- continue;
376
- bindings.push(binding);
377
- const groupKey = `${binding.resource}:${binding.resourceKey}`;
378
- const group = groups.get(groupKey);
379
- if (group === undefined)
380
- groups.set(groupKey, [binding]);
381
- else
382
- group.push(binding);
383
- }
384
- return [
385
- ...[...groups.values()].map((group) => group[0].resource === CONNECTION_RESOURCE ? connectionEntry(group, connectorKeys) : resourceEntry(group)),
386
- ...deriveEventTriggerResources(document.nodes, bindings, entryPointIds)
387
- ];
388
- };
389
- var bindingsV2PathFor = (casePlanPath) => {
390
- const fs = getFileSystem();
391
- return fs.path.join(fs.path.dirname(fs.path.resolve(casePlanPath)), BINDINGS_V2_FILE_NAME);
392
- };
393
- var compareCaseBindingsV2 = async (casePlanPath, document) => {
394
- const fs = getFileSystem();
395
- const path = bindingsV2PathFor(casePlanPath);
396
- const entryPoints = await readEntryPointIds(casePlanPath);
397
- if ("error" in entryPoints) {
398
- return {
399
- status: "entry-points-unreadable",
400
- path: entryPoints.path,
401
- expectedCount: 0,
402
- reason: entryPoints.error
403
- };
404
- }
405
- const expected = deriveCaseBindingsV2(document, entryPoints.ids);
406
- const expectedCount = expected.length;
407
- if (!await fs.exists(path))
408
- return { status: "absent", path, expectedCount };
409
- const [readError, raw] = await catchError(fs.readFile(path, "utf-8"));
410
- if (readError || raw == null)
411
- return { status: "unreadable", path, expectedCount };
412
- const actual = readBindingsV2Resources(raw);
413
- if (actual === undefined)
414
- return { status: "unreadable", path, expectedCount };
415
- const difference = diffBindingsV2(expected, actual);
416
- return hasBindingsV2Difference(difference) ? { status: "differs", path, expectedCount, difference } : { status: "match", path, expectedCount };
417
- };
418
- var syncCaseBindings = async (casePlanPath) => {
419
- const fs = getFileSystem();
420
- const resolved = fs.path.resolve(casePlanPath);
421
- if (!await fs.exists(resolved)) {
422
- return {
423
- ok: false,
424
- message: `Case plan file not found: ${resolved}`,
425
- instructions: "Pass the path to an existing caseplan JSON file, for example 'uip maestro case bindings sync case.json'."
426
- };
427
- }
428
- const [readError, raw] = await catchError(fs.readFile(resolved, "utf-8"));
429
- if (readError || raw == null) {
430
- return {
431
- ok: false,
432
- message: `Failed to read case plan: ${readError?.message ?? "empty content"}`,
433
- instructions: `Verify read permissions on ${resolved}.`
434
- };
435
- }
436
- const [parseError, document] = catchError(() => JSON.parse(raw));
437
- if (parseError || document == null || typeof document !== "object" || Array.isArray(document)) {
438
- return {
439
- ok: false,
440
- message: `Case plan is not valid JSON: ${parseError?.message ?? "not a JSON object"}`,
441
- instructions: `Verify the contents of ${resolved}.`
442
- };
443
- }
444
- const entryPoints = await readEntryPointIds(resolved);
445
- if ("error" in entryPoints) {
446
- return {
447
- ok: false,
448
- message: entryPoints.error,
449
- instructions: `Fix or remove ${entryPoints.path}, then run \`uip maestro case bindings sync\` again.`
450
- };
451
- }
452
- const resources = deriveCaseBindingsV2(document, entryPoints.ids);
453
- const path = bindingsV2PathFor(resolved);
454
- const [writeError] = await catchError(fs.writeFile(path, serializeBindingsV2File(resources)));
455
- if (writeError) {
456
- return {
457
- ok: false,
458
- message: `Failed to write bindings file: ${writeError.message}`,
459
- instructions: `Verify write permissions on ${fs.path.dirname(path)}.`
460
- };
461
- }
462
- return {
463
- ok: true,
464
- path,
465
- resourceCount: resources.length,
466
- connectionCount: resources.filter((entry) => entry.resource === CONNECTION_RESOURCE).length
467
- };
468
- };
469
- export {
470
- bindingsV2PathFor,
471
- compareCaseBindingsV2,
472
- deriveCaseBindingsV2,
473
- syncCaseBindings
474
- };
263
+ export { BINDINGS_V2_FILE_NAME, CONNECTION_ID_PROPERTY, FOLDER_KEY_PROPERTY, RESOURCE_BINDINGS_VERSION, serializeBindingsV2File, readBindingsV2Resources, diffBindingsV2, hasBindingsV2Difference, entryPointIdsByNode, readEntryPointIds, deriveEventTriggerResources };
475
264
 
476
- //# debugId=DF4BCD662409114064756E2164756E21
265
+ //# debugId=27D60FC3500F9DFB64756E2164756E21
@@ -0,0 +1,335 @@
1
+ import {
2
+ extractIOFromEntryPoints,
3
+ getServiceType,
4
+ taskDefinitionsToNodeManifests,
5
+ withErrorHandles
6
+ } from "./packager-tool-4rtktkhv.js";
7
+ import {
8
+ catchError,
9
+ logger,
10
+ quoteForShell
11
+ } from "./packager-tool-83v804p7.js";
12
+ import {
13
+ getFileSystem
14
+ } from "./packager-tool-hdxtgckw.js";
15
+
16
+ // ../maestro-sdk/src/registry/agent-metadata-reader.ts
17
+ var agentProjectMetadataReader;
18
+ function setAgentProjectMetadataReader(reader) {
19
+ agentProjectMetadataReader = reader;
20
+ }
21
+ function getAgentProjectMetadataReader() {
22
+ return agentProjectMetadataReader;
23
+ }
24
+
25
+ // ../maestro-sdk/src/registry/solution-discovery.ts
26
+ function isRecord(value) {
27
+ return typeof value === "object" && value !== null && !Array.isArray(value);
28
+ }
29
+ var EMPTY_IO = {
30
+ inputs: {},
31
+ outputs: {}
32
+ };
33
+ function findEnclosingProjectId(solutionDir, projects, cwd) {
34
+ const fs = getFileSystem();
35
+ for (const p of projects) {
36
+ const projDir = fs.path.resolve(solutionDir, fs.path.dirname(p.ProjectRelativePath));
37
+ if (cwd === projDir)
38
+ return p.Id;
39
+ const rel = fs.path.relative(projDir, cwd);
40
+ if (rel !== "" && !rel.startsWith("..") && !fs.path.isAbsolute(rel)) {
41
+ return p.Id;
42
+ }
43
+ }
44
+ return;
45
+ }
46
+ function solutionSearchDirs() {
47
+ const fs = getFileSystem();
48
+ const cwd = fs.env.cwd();
49
+ return [cwd, fs.path.resolve(cwd, ".."), fs.path.resolve(cwd, "../..")];
50
+ }
51
+ async function readSolutionAt(dir) {
52
+ const fs = getFileSystem();
53
+ const [readErr, entries] = await catchError(fs.readdir(dir));
54
+ if (readErr)
55
+ return null;
56
+ const uipxName = entries.find((e) => e.endsWith(".uipx"));
57
+ if (!uipxName)
58
+ return null;
59
+ const uipxPath = fs.path.join(dir, uipxName);
60
+ const [fileErr, content] = await catchError(fs.readFile(uipxPath, "utf-8"));
61
+ if (fileErr || !content)
62
+ return null;
63
+ const [parseErr, parsed] = catchError(() => JSON.parse(content));
64
+ if (parseErr || !parsed.SolutionId)
65
+ return null;
66
+ return {
67
+ solutionId: parsed.SolutionId,
68
+ solutionDir: dir,
69
+ projects: parsed.Projects ?? []
70
+ };
71
+ }
72
+ async function findSolutionFromCwd() {
73
+ const cwd = getFileSystem().env.cwd();
74
+ for (const dir of solutionSearchDirs()) {
75
+ const solution = await readSolutionAt(dir);
76
+ if (solution === null)
77
+ continue;
78
+ return {
79
+ ...solution,
80
+ currentProjectId: findEnclosingProjectId(dir, solution.projects, cwd)
81
+ };
82
+ }
83
+ return null;
84
+ }
85
+ async function resolveProjectEntryPointIO(projectDir) {
86
+ const fs = getFileSystem();
87
+ const fromSource = await readEntryPointsFile(fs.path.join(projectDir, "entry-points.json"), fs.path.join(projectDir, "content", "entry-points.json"));
88
+ if (fromSource.io)
89
+ return { io: fromSource.io, contract: "known" };
90
+ const fromFlow = await readProjectIOFromFlowVariables(projectDir);
91
+ if (fromFlow.io)
92
+ return { io: fromFlow.io, contract: "known" };
93
+ const fromBuild = await readEntryPointsFile(fs.path.join(projectDir, ".local", "content", "entry-points.json"));
94
+ if (fromBuild.io)
95
+ return { io: fromBuild.io, contract: "known" };
96
+ const states = [fromSource.state, fromFlow.state, fromBuild.state];
97
+ const contract = states.includes("valid") ? "known" : states.includes("invalid") ? "unreadable" : "missing";
98
+ return { io: EMPTY_IO, contract };
99
+ }
100
+ async function readEntryPointsFile(...candidates) {
101
+ const fs = getFileSystem();
102
+ let state = "absent";
103
+ for (const filePath of candidates) {
104
+ const [err, content] = await catchError(fs.readFile(filePath, "utf-8"));
105
+ if (err || content === null)
106
+ continue;
107
+ const [parseErr, parsed] = catchError(() => JSON.parse(content));
108
+ const entryPoints = parsed?.entryPoints;
109
+ if (parseErr || !Array.isArray(entryPoints) || entryPoints.length > 0 && !isRecord(entryPoints[0])) {
110
+ if (state === "absent")
111
+ state = "invalid";
112
+ continue;
113
+ }
114
+ state = "valid";
115
+ if (entryPoints.length === 0)
116
+ continue;
117
+ return { io: extractIOFromEntryPoints({ entryPoints }), state };
118
+ }
119
+ return { state };
120
+ }
121
+ async function readProjectIOFromFlowVariables(projectDir) {
122
+ const fs = getFileSystem();
123
+ const [readErr, entries] = await catchError(fs.readdir(projectDir));
124
+ if (readErr || !Array.isArray(entries))
125
+ return { state: "absent" };
126
+ const flowFileName = entries.find((entry) => entry.endsWith(".flow"));
127
+ if (!flowFileName)
128
+ return { state: "absent" };
129
+ const flowPath = fs.path.join(projectDir, flowFileName);
130
+ const [readFileErr, content] = await catchError(fs.readFile(flowPath, "utf-8"));
131
+ if (readFileErr || !content)
132
+ return { state: "invalid" };
133
+ const [parseErr, parsed] = catchError(() => JSON.parse(content));
134
+ if (parseErr || !isRecord(parsed))
135
+ return { state: "invalid" };
136
+ const variables = parsed.variables;
137
+ if (variables !== undefined && !isRecord(variables))
138
+ return { state: "invalid" };
139
+ const globals = variables?.globals;
140
+ if (globals !== undefined && (!Array.isArray(globals) || !globals.every(isRecord)))
141
+ return { state: "invalid" };
142
+ if (!globals || globals.length === 0)
143
+ return { state: "valid" };
144
+ const inputProps = {};
145
+ const outputProps = {};
146
+ for (const variable of globals) {
147
+ if (!variable.id || !variable.direction)
148
+ continue;
149
+ const schema = {
150
+ type: variable.type ?? "string"
151
+ };
152
+ if (variable.description) {
153
+ schema.description = variable.description;
154
+ }
155
+ if (variable.direction === "in" || variable.direction === "inout") {
156
+ inputProps[variable.id] = schema;
157
+ }
158
+ if (variable.direction === "out" || variable.direction === "inout") {
159
+ outputProps[variable.id] = schema;
160
+ }
161
+ }
162
+ const hasInputs = Object.keys(inputProps).length > 0;
163
+ const hasOutputs = Object.keys(outputProps).length > 0;
164
+ if (!hasInputs && !hasOutputs)
165
+ return { state: "valid" };
166
+ const synthetic = {
167
+ entryPoints: [
168
+ {
169
+ filePath: flowFileName,
170
+ input: hasInputs ? { type: "object", properties: inputProps } : undefined,
171
+ output: hasOutputs ? { type: "object", properties: outputProps } : undefined
172
+ }
173
+ ]
174
+ };
175
+ return { io: extractIOFromEntryPoints(synthetic), state: "valid" };
176
+ }
177
+ async function readProjectName(projectDir) {
178
+ const fs = getFileSystem();
179
+ const uiprojPath = fs.path.join(projectDir, "project.uiproj");
180
+ const [err, content] = await catchError(fs.readFile(uiprojPath, "utf-8"));
181
+ if (!err && content) {
182
+ const [parseErr, parsed] = catchError(() => JSON.parse(content));
183
+ if (!parseErr && isRecord(parsed) && typeof parsed.Name === "string" && parsed.Name.length > 0) {
184
+ return parsed.Name;
185
+ }
186
+ }
187
+ return fs.path.basename(projectDir);
188
+ }
189
+ async function loadResourceKeyMap(solutionDir) {
190
+ const fs = getFileSystem();
191
+ const map = new Map;
192
+ const processDir = fs.path.join(solutionDir, "resources", "solution_folder", "process");
193
+ const [dirErr, typeDirs] = await catchError(fs.readdir(processDir));
194
+ if (dirErr)
195
+ return map;
196
+ for (const typeDir of typeDirs) {
197
+ const typePath = fs.path.join(processDir, typeDir);
198
+ const [filesErr, files] = await catchError(fs.readdir(typePath));
199
+ if (filesErr)
200
+ continue;
201
+ for (const file of files) {
202
+ if (!file.endsWith(".json"))
203
+ continue;
204
+ const filePath = fs.path.join(typePath, file);
205
+ const [readErr, content] = await catchError(fs.readFile(filePath, "utf-8"));
206
+ if (readErr || !content)
207
+ continue;
208
+ const [parseErr, parsed] = catchError(() => JSON.parse(content));
209
+ if (parseErr || !isRecord(parsed))
210
+ continue;
211
+ const resource = parsed.resource;
212
+ if (!isRecord(resource))
213
+ continue;
214
+ const projectKey = resource.projectKey;
215
+ const resourceKey = resource.key;
216
+ if (typeof projectKey === "string" && projectKey.length > 0 && typeof resourceKey === "string" && resourceKey.length > 0) {
217
+ map.set(projectKey.toLowerCase(), resourceKey);
218
+ }
219
+ }
220
+ }
221
+ return map;
222
+ }
223
+ function invokableSiblings(ctx) {
224
+ const fs = getFileSystem();
225
+ const currentId = ctx.currentProjectId?.toLowerCase();
226
+ return ctx.projects.flatMap((project) => {
227
+ const serviceType = getServiceType(project.Type);
228
+ if (!serviceType)
229
+ return [];
230
+ if (typeof project.Id !== "string")
231
+ return [];
232
+ if (project.Id.toLowerCase() === currentId)
233
+ return [];
234
+ const projectDir = fs.path.resolve(ctx.solutionDir, fs.path.dirname(project.ProjectRelativePath));
235
+ return [{ project, serviceType, projectDir }];
236
+ });
237
+ }
238
+ async function buildInSolutionNodes(ctx) {
239
+ const manifests = [];
240
+ const unknownContracts = [];
241
+ const resourceKeyMap = await loadResourceKeyMap(ctx.solutionDir);
242
+ for (const { project, serviceType, projectDir } of invokableSiblings(ctx)) {
243
+ const resourceKey = resourceKeyMap.get(project.Id.toLowerCase());
244
+ if (!resourceKey)
245
+ continue;
246
+ const reader = getAgentProjectMetadataReader();
247
+ const [name, { io, contract }, projectMetadata] = await Promise.all([
248
+ readProjectName(projectDir),
249
+ resolveProjectEntryPointIO(projectDir),
250
+ reader ? reader(projectDir, project.Type).catch((err) => {
251
+ logger.debug(`Agent metadata reader failed for ${projectDir}: ${String(err)}`);
252
+ return {};
253
+ }) : Promise.resolve({})
254
+ ]);
255
+ const task = {
256
+ name,
257
+ type: serviceType,
258
+ resourceKey,
259
+ inputs: io.inputs,
260
+ outputs: io.outputs,
261
+ metadata: {
262
+ ...projectMetadata,
263
+ description: `(In-solution) ${name}`,
264
+ key: resourceKey,
265
+ name,
266
+ tags: ["in-solution", "local"],
267
+ projectId: project.Id,
268
+ entryPointUniqueId: io.entryPointUniqueId,
269
+ inputProperties: io.inputProperties
270
+ }
271
+ };
272
+ const nodes = taskDefinitionsToNodeManifests({ [resourceKey]: task }, project.Type);
273
+ manifests.push(...nodes);
274
+ if (contract !== "known") {
275
+ unknownContracts.push({
276
+ name,
277
+ type: project.Type,
278
+ projectDir,
279
+ nodeTypes: nodes.map((n) => n.nodeType).filter((t) => typeof t === "string"),
280
+ contract
281
+ });
282
+ }
283
+ }
284
+ return { manifests: withErrorHandles(manifests), unknownContracts };
285
+ }
286
+ function unknownContractWarning(projects) {
287
+ if (projects.length === 0)
288
+ return;
289
+ const describe = (p) => `'${p.name}' (${p.type}, ${p.projectDir}): ${p.contract === "missing" ? "no entry-points.json yet" : "its entry-points.json or .flow file could not be read"}`;
290
+ const one = projects.length === 1;
291
+ const steps = [];
292
+ if (projects.some((p) => p.contract === "missing"))
293
+ steps.push("build the project so it writes entry-points.json");
294
+ if (projects.some((p) => p.contract === "unreadable"))
295
+ steps.push("fix the file that could not be read");
296
+ const next = steps.join(", and ");
297
+ return `No usable argument contract for ${projects.map(describe).join("; ")}. ` + `${one ? "Its node shows" : "Their nodes show"} no inputs or outputs; the arguments are unknown, not empty. ` + `${next[0].toUpperCase()}${next.slice(1)}, then run this command again.`;
298
+ }
299
+ async function findProjectsWithoutProcessResource(ctx) {
300
+ const resourceKeyMap = await loadResourceKeyMap(ctx.solutionDir);
301
+ return Promise.all(invokableSiblings(ctx).filter(({ project }) => !resourceKeyMap.has(project.Id.toLowerCase())).map(async ({ project, projectDir }) => ({
302
+ id: project.Id,
303
+ name: await readProjectName(projectDir),
304
+ type: project.Type
305
+ })));
306
+ }
307
+ function describeProjectsWithoutProcessResource(projects, solutionDir) {
308
+ if (projects.length === 0)
309
+ return {};
310
+ const names = projects.map((p) => `${p.name} (${p.type})`).join(", ");
311
+ return {
312
+ Warning: projects.length === 1 ? `Left out 1 project that has no process resource yet: ${names}.` : `Left out ${projects.length} projects that have no process resource yet: ${names}.`,
313
+ Instructions: `Create the missing process resources, then list the in-solution nodes again to get their node types. Run: ${resourcesRefreshCommand(solutionDir)}`
314
+ };
315
+ }
316
+ async function explainNodeTypeWithoutProcessResource(nodeType) {
317
+ const ctx = await findSolutionFromCwd();
318
+ if (!ctx)
319
+ return;
320
+ const lowerNodeType = nodeType.toLowerCase();
321
+ const project = (await findProjectsWithoutProcessResource(ctx)).find((p) => lowerNodeType.endsWith(`.${p.id.toLowerCase()}`));
322
+ if (!project)
323
+ return;
324
+ return {
325
+ message: `Project '${project.name}' has no process resource yet, so it has no node type.`,
326
+ instructions: `Create its process resource, then list the in-solution nodes to get its node type. Run: ${resourcesRefreshCommand(ctx.solutionDir)}`
327
+ };
328
+ }
329
+ function resourcesRefreshCommand(solutionDir) {
330
+ return `uip solution resources refresh --solution-folder ${quoteForShell(solutionDir)}`;
331
+ }
332
+
333
+ export { setAgentProjectMetadataReader, solutionSearchDirs, readSolutionAt, findSolutionFromCwd, resolveProjectEntryPointIO, loadResourceKeyMap, buildInSolutionNodes, unknownContractWarning, findProjectsWithoutProcessResource, describeProjectsWithoutProcessResource, explainNodeTypeWithoutProcessResource, resourcesRefreshCommand };
334
+
335
+ //# debugId=C0E01C7FA4AA2D1564756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  catchError
3
- } from "./packager-tool-3q3d1hk8.js";
3
+ } from "./packager-tool-83v804p7.js";
4
4
 
5
5
  // src/services/schema-utils.ts
6
6
  function getMutatedType(variable) {
@@ -303,6 +303,29 @@ function mapVariablesToInputOutput(variables, getTypeFromVar, isOutput, existing
303
303
  function mapEntryPointVariablesToInputOutput(entryPointVariables, isOutput, existingInputOutputs = []) {
304
304
  return mapVariablesToInputOutput(entryPointVariables, (v) => v.type, isOutput, existingInputOutputs, (v) => v);
305
305
  }
306
+ var RESULT_OUTPUT_NAME = "output";
307
+ var RESULT_OUTPUT_SOURCE = "=result";
308
+ var HTTP_REQUEST_OUTPUT_SOURCES = {
309
+ code: "=response.code",
310
+ headers: "=response.headers",
311
+ body: "=response.body",
312
+ error: "=Error"
313
+ };
314
+ var httpRequestOutputName = (field) => {
315
+ const name = field.trim().replace(/^response\./i, "").toLowerCase();
316
+ return name in HTTP_REQUEST_OUTPUT_SOURCES ? name : undefined;
317
+ };
318
+ var WHOLE_RESULT_TASK_TYPES = new Set(["business-rule"]);
319
+ var outputSourceFor = (taskType, field) => {
320
+ if (taskType === "http-request") {
321
+ const name = httpRequestOutputName(field);
322
+ const own = name === undefined ? undefined : HTTP_REQUEST_OUTPUT_SOURCES[name];
323
+ if (own !== undefined)
324
+ return own;
325
+ }
326
+ return taskType !== undefined && WHOLE_RESULT_TASK_TYPES.has(taskType) && field === RESULT_OUTPUT_NAME ? RESULT_OUTPUT_SOURCE : `=${field}`;
327
+ };
328
+ var BUSINESS_RULE_TASK_VERSION = "v3";
306
329
  function buildErrorOutput() {
307
330
  return {
308
331
  name: "Error",
@@ -351,6 +374,6 @@ function addVarIdsToInputsOutputs(params) {
351
374
  return { inputsWithVars, outputsWithVars };
352
375
  }
353
376
 
354
- export { transformSchemaToVariables, convertActionArgsToVariables, FILE_TYPE_JSON_SCHEMA, mapEntryPointVariablesToInputOutput, buildErrorOutput, addVarIdsToInputsOutputs };
377
+ export { transformSchemaToVariables, convertActionArgsToVariables, FILE_TYPE_JSON_SCHEMA, camelizeDisplayName, mapEntryPointVariablesToInputOutput, RESULT_OUTPUT_NAME, RESULT_OUTPUT_SOURCE, httpRequestOutputName, outputSourceFor, BUSINESS_RULE_TASK_VERSION, buildErrorOutput, addVarIdsToInputsOutputs };
355
378
 
356
- //# debugId=DBAEB71CB3648B7264756E2164756E21
379
+ //# debugId=7F1F2D07BCEF978264756E2164756E21