@kern0x1b/penstock-cli 26.10.5 → 26.10.6

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 (194) hide show
  1. package/dist/{chunk-account-C8EHysMH.js → chunk-account-CMvFjqGw.js} +1 -1
  2. package/dist/{chunk-agentFailure-piRAFLGH.js → chunk-agentFailure-BiU8hJ-k.js} +1 -1
  3. package/dist/{chunk-agentLaunch-C5Uo40vv.js → chunk-agentLaunch-CRWlfuXv.js} +1 -1
  4. package/dist/{chunk-agentServe-4O0syoYQ.js → chunk-agentServe-M3jzEiHj.js} +1 -1
  5. package/dist/{chunk-analyze-Brxlb4U1.js → chunk-analyze-CCZJQpbU.js} +1 -1
  6. package/dist/chunk-analyze-D_2dPr5n.js +1 -0
  7. package/dist/chunk-apply-Dmo_XdOA.js +1 -0
  8. package/dist/{chunk-bot-I4kuhjyv.js → chunk-bot-51CfGKVL.js} +3 -3
  9. package/dist/chunk-codeFactSet-BqEOkvBS.js +1 -0
  10. package/dist/{chunk-codeIndex-CzENd6hG.js → chunk-codeIndex-olvCG85q.js} +1 -1
  11. package/dist/{chunk-codeLinks-D-gzUjYv.js → chunk-codeLinks-DW721PAt.js} +1 -1
  12. package/dist/chunk-codeLinks-S_BEJVPa.js +1 -0
  13. package/dist/{chunk-command-BctoT00W.js → chunk-command-B-7DfFou.js} +1 -1
  14. package/dist/chunk-command-CyUljAAc.js +1 -0
  15. package/dist/{chunk-command-Jl1msVwF.js → chunk-command-D7WS1aRl.js} +1 -1
  16. package/dist/chunk-commands-CMEkVxle.js +1 -0
  17. package/dist/{chunk-compose-BV9Jg348.js → chunk-compose-DCAQQndd.js} +1 -1
  18. package/dist/{chunk-connectors-CVfz5pSg.js → chunk-connectors-DG6IqkGl.js} +1 -1
  19. package/dist/{chunk-connectors-eXPldvkc.js → chunk-connectors-UpMjbdpU.js} +1 -1
  20. package/dist/{chunk-context-DPJmldqg.js → chunk-context-B-5CZFAT.js} +1 -1
  21. package/dist/{chunk-convert-B1sgT9kl.js → chunk-convert-B7srqZpZ.js} +1 -1
  22. package/dist/chunk-deploy-CGLF2dB1.js +1 -0
  23. package/dist/{chunk-deploy-DOXu2-8q.js → chunk-deploy-Clj9f2y-.js} +1 -1
  24. package/dist/chunk-diagram-CIy-F5iz.js +1 -0
  25. package/dist/{chunk-diagram-BaVwLa4h.js → chunk-diagram-DYoeuAJx.js} +1 -1
  26. package/dist/{chunk-diagramDefects-7UG_Iwsr.js → chunk-diagramDefects-DlVCfZci.js} +1 -1
  27. package/dist/{chunk-diagrams-6suPQBVQ.js → chunk-diagrams-wnFsPOKv.js} +1 -1
  28. package/dist/{chunk-diff-D1m_eKvv.js → chunk-diff-BJ2sJwcs.js} +1 -1
  29. package/dist/chunk-diff-BelMuQhT.js +1 -0
  30. package/dist/chunk-dispatch-CescmVW-.js +6 -0
  31. package/dist/{chunk-docs-CwY3Ce9M.js → chunk-docs-DzOiA9zg.js} +4 -4
  32. package/dist/{chunk-doctor-m0mnVdDE.js → chunk-doctor-GDNwRCg3.js} +1 -1
  33. package/dist/{chunk-drawing-shRfnrs9.js → chunk-drawing-C2qewK8L.js} +1 -1
  34. package/dist/{chunk-editPreview-BgH1JVOD.js → chunk-editPreview-DGu4slO6.js} +1 -1
  35. package/dist/chunk-export-CDFdw7Eh.js +1 -0
  36. package/dist/{chunk-export-D5kPD4Or.js → chunk-export-DP1Hab-_.js} +1 -1
  37. package/dist/{chunk-facts-DA3Y-k9a.js → chunk-facts-CfA8qH5b.js} +1 -1
  38. package/dist/{chunk-failure-BsimkHy_.js → chunk-failure-BK7fu4Yo.js} +1 -1
  39. package/dist/{chunk-features-BfRg2kR5.js → chunk-features-CiC2Yoej.js} +1 -1
  40. package/dist/chunk-features-Dq1Gvqp3.js +1 -0
  41. package/dist/chunk-folders-BO8qUHUV.js +1 -0
  42. package/dist/{chunk-folders-13vx0i0n.js → chunk-folders-yTMgOqLo.js} +1 -1
  43. package/dist/chunk-formChecks-BOiD8Idv.js +1 -0
  44. package/dist/chunk-help-DKtpVSxI.js +85 -0
  45. package/dist/chunk-importCommand-_CnKIoNk.js +1 -0
  46. package/dist/{chunk-init-AIh_7yE0.js → chunk-init-3zEab7KI.js} +3 -3
  47. package/dist/chunk-license-Cvnp1Aee.js +1 -0
  48. package/dist/{chunk-license-x3oHbKe2.js → chunk-license-DU4P8P8A.js} +1 -1
  49. package/dist/{chunk-lint-C_fAcLIg.js → chunk-lint-Df2davEY.js} +1 -1
  50. package/dist/{chunk-load-BVJUBU5S.js → chunk-load-CRmIvn7e.js} +1 -1
  51. package/dist/chunk-main-BY7JEoe1.js +1 -0
  52. package/dist/chunk-mcp-DKX2xT8d.js +77 -0
  53. package/dist/{chunk-mcpLaunch-C13ViiIP.js → chunk-mcpLaunch-DpDE0hW-.js} +1 -1
  54. package/dist/chunk-migrate-BaNzQNyD.js +2 -0
  55. package/dist/chunk-migrate-DcxIkacG.js +1 -0
  56. package/dist/{chunk-penstockCli-CqiOKC75.js → chunk-penstockCli-B0_wWDGy.js} +1 -1
  57. package/dist/chunk-plural-Di3FH8HP.js +1 -0
  58. package/dist/{chunk-pr-tC3-PSNM.js → chunk-pr-DXs1coaS.js} +1 -1
  59. package/dist/{chunk-project-qT-Fk_Rz.js → chunk-project-BS-4dy5o.js} +1 -1
  60. package/dist/{chunk-report-CDz78nCI.js → chunk-report-CtkTRSGT.js} +1 -1
  61. package/dist/{chunk-review-BqZSohXR.js → chunk-review-WIpFGKkc.js} +1 -1
  62. package/dist/{chunk-rules-DJlL7K_Q.js → chunk-rules-CoJAmvwu.js} +1 -1
  63. package/dist/{chunk-security-5SU-bq3A.js → chunk-security-BKVRwb6V.js} +10 -10
  64. package/dist/{chunk-share-YSewfw3F.js → chunk-share-B3W30sbt.js} +3 -3
  65. package/dist/chunk-src-CxTpK8wk.js +890 -0
  66. package/dist/{chunk-stages-C-nhLoBW.js → chunk-stages-Gm5BZUp5.js} +1 -1
  67. package/dist/chunk-status-X9Ny-Nu8.js +1 -0
  68. package/dist/{chunk-systemError-B-1nL94i.js → chunk-systemError-F6bMRwXU.js} +1 -1
  69. package/dist/chunk-systemError-cGwrYkmo.js +1 -0
  70. package/dist/{chunk-table-CJtiXv0e.js → chunk-table-B2WTbpMl.js} +1 -1
  71. package/dist/chunk-taskTest-B3gfOti1.js +1 -0
  72. package/dist/{chunk-taskTest-4rIxp0rL.js → chunk-taskTest-D-WDCLD5.js} +2 -2
  73. package/dist/{chunk-templates-Bxe3J0qy.js → chunk-templates-BdsiNRJ3.js} +1 -1
  74. package/dist/chunk-testCases-ba8k3BJD.js +4 -0
  75. package/dist/chunk-testCases-gXzkCxF5.js +1 -0
  76. package/dist/chunk-tests-BLBZ1eh2.js +1 -0
  77. package/dist/chunk-tests-DxL0JMtB.js +23 -0
  78. package/dist/chunk-translator-BAjzyPKE.js +22 -0
  79. package/dist/{chunk-trust-u1vZ6Yk0.js → chunk-trust-Ci9pDa27.js} +1 -1
  80. package/dist/{chunk-trust-yKw_pXRj.js → chunk-trust-DlJIoKs8.js} +1 -1
  81. package/dist/{chunk-workerVariables-CCLcoR0U.js → chunk-workerVariables-BnLSud8o.js} +1 -1
  82. package/dist/{chunk-wrapper-AJWl6ru-.js → chunk-wrapper-DqqRt0FZ.js} +1 -1
  83. package/dist/chunk-wrapper-E_u1_-Db.js +1 -0
  84. package/dist/locales/de.json +103 -2
  85. package/dist/locales/es.json +103 -2
  86. package/dist/locales/fr.json +103 -2
  87. package/dist/locales/ja.json +103 -2
  88. package/dist/locales/ko.json +103 -2
  89. package/dist/locales/pt-BR.json +103 -2
  90. package/dist/locales/ru.json +103 -2
  91. package/dist/locales/zh.json +103 -2
  92. package/dist/penstock.js +1 -1
  93. package/dist/web/assets/{AgentSettings-C3Er_rlW.js → AgentSettings-4B4hSxBk.js} +1 -1
  94. package/dist/web/assets/{AgentsDialog-Bo7kikb6.js → AgentsDialog-C32ALLtE.js} +1 -1
  95. package/dist/web/assets/{BpmnCanvas-Dw5zgCN3.js → BpmnCanvas-CZOJiq6t.js} +1 -1
  96. package/dist/web/assets/{BpmnDocument-CuU0biX9.js → BpmnDocument-BNLfXWLG.js} +4 -4
  97. package/dist/web/assets/{ConflictDialog-GxZ-d8SK.js → ConflictDialog-mUJYs1zz.js} +1 -1
  98. package/dist/web/assets/{DiffDocument-Bh3hFmmi.js → DiffDocument-C7csJl3x.js} +1 -1
  99. package/dist/web/assets/{DmnDocument-C8HpJAcE.js → DmnDocument-B2dyX49k.js} +1 -1
  100. package/dist/web/assets/{FormDocument-CH-4KB3x.js → FormDocument-ChSqEPE5.js} +1 -1
  101. package/dist/web/assets/{FormStepView-DraPVoAN.js → FormStepView-j4C0Qovo.js} +1 -1
  102. package/dist/web/assets/{GraphAwareLayoutService-C8J8YHJI.js → GraphAwareLayoutService-DD2iXfXi.js} +1 -1
  103. package/dist/web/assets/{NewFileDialog-j09JqpPj.js → NewFileDialog-eeIqqmXc.js} +1 -1
  104. package/dist/web/assets/{QuickOpen-CeBhsCzA.js → QuickOpen-C0I0FRt2.js} +1 -1
  105. package/dist/web/assets/{ScriptPane-DDikZDv6.js → ScriptPane-BAvcgLWX.js} +2 -2
  106. package/dist/web/assets/{ScriptRunDialog-DdzJ0pvT.js → ScriptRunDialog-DLlMiJiK.js} +1 -1
  107. package/dist/web/assets/{SettingsDialog-JUc5zUR9.js → SettingsDialog-C3ts5aiN.js} +1 -1
  108. package/dist/web/assets/{ShortcutsDialog-DECqWPNE.js → ShortcutsDialog-DVV504pS.js} +1 -1
  109. package/dist/web/assets/{SourceDocument-X8ajUcxM.js → SourceDocument-DRgUPazk.js} +1 -1
  110. package/dist/web/assets/{TextDocument-0z7qojAh.js → TextDocument-Bm0sPjft.js} +1 -1
  111. package/dist/web/assets/{UnreadableFileLayer-D3G59F4u.js → UnreadableFileLayer-DbW33CnE.js} +1 -1
  112. package/dist/web/assets/{UploadDialog-CiahYkTc.js → UploadDialog-BSl3zFNn.js} +1 -1
  113. package/dist/web/assets/{apply-HqvoGwLE.js → apply-B3FkgxjU.js} +1 -1
  114. package/dist/web/assets/{bpmnTheme-cOvp4qFc.js → bpmnTheme-C3HdVV1D.js} +1 -1
  115. package/dist/web/assets/bridgeInstance-BZBhe5hF.js +851 -0
  116. package/dist/web/assets/{commands-nPznxvPp.js → commands-DHPxsavW.js} +1 -1
  117. package/dist/web/assets/de-BH_bnU4H.js +1 -0
  118. package/dist/web/assets/{dialog-CtGB1LHI.js → dialog-LcHsiQKJ.js} +1 -1
  119. package/dist/web/assets/{diff-NgYeO98t.js → diff-bpdDl0KE.js} +1 -1
  120. package/dist/web/assets/{documentBridge-QW0IZ9Bq.js → documentBridge-4fZNBdp4.js} +2 -2
  121. package/dist/web/assets/{documents-KeXEdK1U.js → documents-FOVGbYYF.js} +1 -1
  122. package/dist/web/assets/{duplicate-DNPpPVse.js → duplicate-CdCuOnUl.js} +1 -1
  123. package/dist/web/assets/{engines-DU0BfbYM.js → engines-C884tl-T.js} +1 -1
  124. package/dist/web/assets/es-D7v7zkxC.js +1 -0
  125. package/dist/web/assets/{formChecks-sU20kKkU.js → formChecks-Bvuzw2sb.js} +1 -1
  126. package/dist/web/assets/fr-CuzAJTai.js +1 -0
  127. package/dist/web/assets/frontend-Y1MvD_Uo.js +1 -0
  128. package/dist/web/assets/httpHost-CnF86WJB.js +1 -0
  129. package/dist/web/assets/{index.es-BqVUpGyA.js → index.es-0rLw__5_.js} +1 -1
  130. package/dist/web/assets/{index.es-DqkfrvWI.js → index.es-BP1Cc_0e.js} +1 -1
  131. package/dist/web/assets/{intelligence-Ck_Q9upa.js → intelligence-E2EBYhHr.js} +1 -1
  132. package/dist/web/assets/ja-BgElyPpa.js +1 -0
  133. package/dist/web/assets/{jspdf.es.min-CM3S4IDt.js → jspdf.es.min-BSRrqhq_.js} +3 -3
  134. package/dist/web/assets/ko-j1Oi9MKH.js +1 -0
  135. package/dist/web/assets/{lib-DAKOOgix.js → lib-De3fPoUi.js} +1 -1
  136. package/dist/web/assets/{platform-CkWAyNst.js → platform-CjEV0T5t.js} +1 -1
  137. package/dist/web/assets/{preferences-nBrFGN89.js → preferences-CmXdxfFo.js} +1 -1
  138. package/dist/web/assets/pt-BR-CRWG2th4.js +1 -0
  139. package/dist/web/assets/ru-KJyuYSUL.js +1 -0
  140. package/dist/web/assets/{run-B3YvrVeP.js → run-B9EUa035.js} +1 -1
  141. package/dist/web/assets/{samples-BVuIm-bu.js → samples-03zukOEM.js} +1 -1
  142. package/dist/web/assets/{testCaseRuns-DYKnccnc.js → testCaseRuns-BYhJPipg.js} +1 -1
  143. package/dist/web/assets/translator-OIpY8kTG.js +1 -0
  144. package/dist/web/assets/{ui-3pEQJ50t.js → ui-BLMlfdD3.js} +1 -1
  145. package/dist/web/assets/{useTrace-BAXnn0Bt.js → useTrace-Cr28sh4A.js} +1 -1
  146. package/dist/web/assets/{web-B2zkonPE.js → web-Q9VZNxQi.js} +5 -5
  147. package/dist/web/assets/zh-CukDLcVz.js +1 -0
  148. package/dist/web/index.html +19 -19
  149. package/package.json +1 -1
  150. package/dist/chunk-analyze-CUxuBgNS.js +0 -1
  151. package/dist/chunk-apply-BAMwoXG9.js +0 -1
  152. package/dist/chunk-baseline-DvS2S0am.js +0 -1
  153. package/dist/chunk-codeFactSet-DOOlbIIj.js +0 -1
  154. package/dist/chunk-codeLinks-DLxEBWPi.js +0 -1
  155. package/dist/chunk-command-BR4memGJ.js +0 -1
  156. package/dist/chunk-commands-CeRlfHY-.js +0 -1
  157. package/dist/chunk-deploy-C4KJK-tw.js +0 -1
  158. package/dist/chunk-diagram-CCA1-fT5.js +0 -1
  159. package/dist/chunk-diff-BC8gZX5w.js +0 -1
  160. package/dist/chunk-dispatch-CW2CJI0C.js +0 -6
  161. package/dist/chunk-export-9AWsr5ai.js +0 -1
  162. package/dist/chunk-features-BwnwB6jL.js +0 -1
  163. package/dist/chunk-folders-C1Nes4Ap.js +0 -1
  164. package/dist/chunk-formChecks-acRgARZ3.js +0 -1
  165. package/dist/chunk-help-CFhmAhz8.js +0 -85
  166. package/dist/chunk-importCommand-5SJxu2k4.js +0 -1
  167. package/dist/chunk-license-B_To2110.js +0 -1
  168. package/dist/chunk-main-D3S4Xr__.js +0 -1
  169. package/dist/chunk-mcp-ByMCWlXC.js +0 -76
  170. package/dist/chunk-migrate-CLQ-hrae.js +0 -1
  171. package/dist/chunk-migrate-CVUR1K7f.js +0 -1
  172. package/dist/chunk-plural-Bq_4vgOr.js +0 -1
  173. package/dist/chunk-src-BLyg_6UX.js +0 -879
  174. package/dist/chunk-status-DgeSOz3A.js +0 -1
  175. package/dist/chunk-systemError-2me5k57V.js +0 -1
  176. package/dist/chunk-taskTest-rng12v_b.js +0 -1
  177. package/dist/chunk-testCases-CwQ-Mi7L.js +0 -1
  178. package/dist/chunk-testCases-xculyxH_.js +0 -4
  179. package/dist/chunk-tests-C-kNQNpq.js +0 -1
  180. package/dist/chunk-tests-C3XJ9LMT.js +0 -23
  181. package/dist/chunk-translator-BFUJmSkR.js +0 -21
  182. package/dist/chunk-wrapper-Bxz1Lgp5.js +0 -1
  183. package/dist/web/assets/bridgeInstance-DQk-c8L1.js +0 -850
  184. package/dist/web/assets/de-Dj813wjn.js +0 -1
  185. package/dist/web/assets/es-CyJDEw4H.js +0 -1
  186. package/dist/web/assets/fr-B1lqrd3d.js +0 -1
  187. package/dist/web/assets/frontend-caI7mOAL.js +0 -1
  188. package/dist/web/assets/httpHost-Dqit__mm.js +0 -1
  189. package/dist/web/assets/ja-BUAM_DzQ.js +0 -1
  190. package/dist/web/assets/ko-7l4EjTF9.js +0 -1
  191. package/dist/web/assets/pt-BR-CxxRL7kF.js +0 -1
  192. package/dist/web/assets/ru-C4gbkVXL.js +0 -1
  193. package/dist/web/assets/translator-B2N3PQBL.js +0 -1
  194. package/dist/web/assets/zh-DIYPlVjz.js +0 -1
@@ -10,24 +10,24 @@
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
11
  <meta name="color-scheme" content="light dark">
12
12
  <title>Penstock</title>
13
- <script type="module" crossorigin src="./assets/web-B2zkonPE.js"></script>
13
+ <script type="module" crossorigin src="./assets/web-Q9VZNxQi.js"></script>
14
14
  <link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B8BYMn-z.js">
15
15
  <link rel="modulepreload" crossorigin href="./assets/vendor-NJP34MHU.js">
16
16
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-VRuDKI9K.js">
17
- <link rel="modulepreload" crossorigin href="./assets/translator-B2N3PQBL.js">
18
- <link rel="modulepreload" crossorigin href="./assets/frontend-caI7mOAL.js">
17
+ <link rel="modulepreload" crossorigin href="./assets/translator-OIpY8kTG.js">
18
+ <link rel="modulepreload" crossorigin href="./assets/frontend-Y1MvD_Uo.js">
19
19
  <link rel="modulepreload" crossorigin href="./assets/dist-CRJyslwo.js">
20
20
  <link rel="modulepreload" crossorigin href="./assets/dist-DgvQWhKm.js">
21
21
  <link rel="modulepreload" crossorigin href="./assets/moddle-CGpeSs3G.js">
22
22
  <link rel="modulepreload" crossorigin href="./assets/dist-BqwyxNP3.js">
23
- <link rel="modulepreload" crossorigin href="./assets/engines-DU0BfbYM.js">
24
- <link rel="modulepreload" crossorigin href="./assets/bridgeInstance-DQk-c8L1.js">
25
- <link rel="modulepreload" crossorigin href="./assets/dialog-CtGB1LHI.js">
26
- <link rel="modulepreload" crossorigin href="./assets/httpHost-Dqit__mm.js">
27
- <link rel="modulepreload" crossorigin href="./assets/platform-CkWAyNst.js">
23
+ <link rel="modulepreload" crossorigin href="./assets/engines-C884tl-T.js">
24
+ <link rel="modulepreload" crossorigin href="./assets/bridgeInstance-BZBhe5hF.js">
25
+ <link rel="modulepreload" crossorigin href="./assets/dialog-LcHsiQKJ.js">
26
+ <link rel="modulepreload" crossorigin href="./assets/httpHost-CnF86WJB.js">
27
+ <link rel="modulepreload" crossorigin href="./assets/platform-CjEV0T5t.js">
28
28
  <link rel="modulepreload" crossorigin href="./assets/dist-CHluRwHI.js">
29
29
  <link rel="modulepreload" crossorigin href="./assets/dist-TNwbKIWT.js">
30
- <link rel="modulepreload" crossorigin href="./assets/lib-DAKOOgix.js">
30
+ <link rel="modulepreload" crossorigin href="./assets/lib-De3fPoUi.js">
31
31
  <link rel="modulepreload" crossorigin href="./assets/dist--PmHUHDp.js">
32
32
  <link rel="modulepreload" crossorigin href="./assets/Viewer-CZiVl0t6.js">
33
33
  <link rel="modulepreload" crossorigin href="./assets/dist-CsBP6QjA.js">
@@ -36,26 +36,26 @@
36
36
  <link rel="modulepreload" crossorigin href="./assets/dist-DUkRqvKl.js">
37
37
  <link rel="modulepreload" crossorigin href="./assets/dist-BaEGn3tp.js">
38
38
  <link rel="modulepreload" crossorigin href="./assets/dist-CAxViutc.js">
39
- <link rel="modulepreload" crossorigin href="./assets/bpmnTheme-cOvp4qFc.js">
40
- <link rel="modulepreload" crossorigin href="./assets/ui-3pEQJ50t.js">
41
- <link rel="modulepreload" crossorigin href="./assets/preferences-nBrFGN89.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/bpmnTheme-C3HdVV1D.js">
40
+ <link rel="modulepreload" crossorigin href="./assets/ui-BLMlfdD3.js">
41
+ <link rel="modulepreload" crossorigin href="./assets/preferences-CmXdxfFo.js">
42
42
  <link rel="modulepreload" crossorigin href="./assets/typing-CXvbBSPr.js">
43
43
  <link rel="modulepreload" crossorigin href="./assets/dist-sl8LIbwu.js">
44
- <link rel="modulepreload" crossorigin href="./assets/duplicate-DNPpPVse.js">
44
+ <link rel="modulepreload" crossorigin href="./assets/duplicate-CdCuOnUl.js">
45
45
  <link rel="modulepreload" crossorigin href="./assets/stackblur-es-Djj-lnDR.js">
46
46
  <link rel="modulepreload" crossorigin href="./assets/array-move-Bc4mVEdq.js">
47
47
  <link rel="modulepreload" crossorigin href="./assets/dist-Km3QNqlU.js">
48
48
  <link rel="modulepreload" crossorigin href="./assets/groovy-DASguM_i.js">
49
49
  <link rel="modulepreload" crossorigin href="./assets/dist-CnDXCEJ_.js">
50
- <link rel="modulepreload" crossorigin href="./assets/apply-HqvoGwLE.js">
50
+ <link rel="modulepreload" crossorigin href="./assets/apply-B3FkgxjU.js">
51
51
  <link rel="modulepreload" crossorigin href="./assets/dockLayout-CxOMo-Nl.js">
52
- <link rel="modulepreload" crossorigin href="./assets/BpmnCanvas-Dw5zgCN3.js">
53
- <link rel="modulepreload" crossorigin href="./assets/testCaseRuns-DYKnccnc.js">
52
+ <link rel="modulepreload" crossorigin href="./assets/BpmnCanvas-CZOJiq6t.js">
53
+ <link rel="modulepreload" crossorigin href="./assets/testCaseRuns-BYhJPipg.js">
54
54
  <link rel="modulepreload" crossorigin href="./assets/shortcut-DONH578b.js">
55
- <link rel="modulepreload" crossorigin href="./assets/AgentSettings-C3Er_rlW.js">
55
+ <link rel="modulepreload" crossorigin href="./assets/AgentSettings-4B4hSxBk.js">
56
56
  <link rel="modulepreload" crossorigin href="./assets/files-Chpd_QD0.js">
57
- <link rel="modulepreload" crossorigin href="./assets/documents-KeXEdK1U.js">
58
- <link rel="modulepreload" crossorigin href="./assets/commands-nPznxvPp.js">
57
+ <link rel="modulepreload" crossorigin href="./assets/documents-FOVGbYYF.js">
58
+ <link rel="modulepreload" crossorigin href="./assets/commands-DHPxsavW.js">
59
59
  <link rel="stylesheet" crossorigin href="./assets/web-BTVzb1W6.css">
60
60
  </head>
61
61
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kern0x1b/penstock-cli",
3
- "version": "26.10.5",
3
+ "version": "26.10.6",
4
4
  "description": "Check, lint, lay out, draw and deploy BPMN diagrams with the configuration the project already has.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-translator-BFUJmSkR.js";import{J as t,Y as n,dn as r,n as i,q as a,un as o}from"./chunk-src-BLyg_6UX.js";import{n as s}from"./chunk-moddle-Dlk0NR-u.js";import{r as c}from"./chunk-docs-CY6ICsip.js";import{s as l}from"./chunk-failure-BsimkHy_.js";import{r as u}from"./chunk-context-DPJmldqg.js";import{t as d}from"./chunk-report-CDz78nCI.js";import{t as f}from"./chunk-plural-Bq_4vgOr.js";import{t as p}from"./chunk-formChecks-acRgARZ3.js";import{readFileSync as m}from"node:fs";function h(e,t){let r=e[t];return r?.name?.replace(/\s+/g,` `).trim()||(r?.$type?n(r.$type):t)}async function g(e){return await s(`plain`).fromXML(m(e,`utf8`))}async function _(e){return t((await g(e)).rootElement)}async function v(t,n){let r=[],i=[],a=0;for(let o of t){let t;try{t=await _(o)}catch(e){a+=1,i.push({file:u(o),scenarios:[]}),r.push(l(u(o),e));continue}i.push({file:u(o),scenarios:t}),n===`md`?(r.push(`## ${u(o)}`,``),t.forEach((t,n)=>{r.push(`### ${n+1}. ${t.start} → ${t.ends.join(`, `)||e(`app.output.end`)}`,``),t.decisions.forEach(t=>r.push(`- [ ] ${t.boundary?e(`app.output.boundaryFires`,{decision:t.decision,boundary:t.boundary}):e(`app.output.decisionWay`,{decision:t.decision,way:t.way})}${t.condition?` (\`${t.condition}\`)`:``}`)),r.push(e(`app.output.runsSteps`,{steps:t.steps.join(` → `)||e(`app.output.noSteps`)}),``)})):(r.push(`${u(o)} ${f(t.length,`app.output.count.scenario`)}`),t.forEach((t,n)=>{r.push(` ${String(n+1).padStart(2)}. ${[t.start,...t.steps,...t.ends].join(` → `)}`);for(let n of t.decisions){let t=n.boundary?e(`app.output.firesOn`,{boundary:n.boundary,decision:n.decision}):e(`app.output.decisionWay`,{decision:n.decision,way:n.way});r.push(` ${t}${n.condition?e(`app.output.when`,{condition:n.condition}):``}`)}}))}return n===`json`?{ok:a===0,lines:[JSON.stringify(i,null,2)]}:{ok:a===0,lines:r}}async function y(e){let{rootElement:t,elementsById:n}=await g(e);return{problems:a(t).problems,names:e=>h(n,e)}}async function b(e){let{rootElement:t}=await r(m(e,`utf8`));return i(t)}async function x(e){try{return await r(m(e,`utf8`)),null}catch(t){if(!(t instanceof o))throw t;return{file:e,rule:`dmn`,message:t.message,severity:`error`}}}function S(e){try{let t=m(e,`utf8`).slice(0,4096);return t.trimStart().startsWith(`{`)&&t.includes(`"components"`)}catch{return!1}}function C(e){return p(JSON.parse(m(e,`utf8`)))}async function w(t){let n=(e,n,r)=>{let i=c(e,n)?.severity===`warning`;return d(e,{file:t,rule:n,message:r,severity:i?`warning`:`error`})};if(/\.dmn$/i.test(t))return(await b(t)).map(e=>n(`table`,e.kind,e.detail));if(/\.form$/i.test(t))return C(t).map(e=>n(`form`,e.kind,e.detail));let{problems:r,names:i}=await y(t);return r.map(t=>n(`flow`,t.kind,t.trace.length>0?e(`app.rules.web.detailWithPath`,{detail:t.detail,path:t.trace.map(i).join(` → `)}):t.detail))}export{S as a,x as c,w as i,C as n,v as o,b as r,_ as s,y as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-translator-BFUJmSkR.js";import{Z as t}from"./chunk-src-BLyg_6UX.js";import{a as n,o as r,r as i}from"./chunk-moddle-Dlk0NR-u.js";import{f as a,g as o,m as s,y as c}from"./chunk-engine-CxgdJ2wO.js";function l(e){return typeof e==`string`?e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join(``):``}function u(e){return(e.$type??e.type??``).replace(/^[a-z0-9]+:/i,``)}function d(e){let t=e.replace(/[^A-Za-z0-9_.-]/g,`_`);return/^[A-Za-z_]/.test(t)?t:`_${t}`}function f(e,t,n){if(!n.fromName)return null;let r=l(t);return r?d((typeof n.pattern==`string`&&n.pattern?n.pattern:`{Type}_{Name}`).replace(`{Type}`,()=>u(e)).replace(`{Name}`,()=>r)):null}const p=1e6;function m(e,t){if(!t(e))return e;for(let n=2;n<p;n+=1){let r=`${e}_${n}`;if(!t(r))return r}return`${e}_${p}`}function h(e,t){let n=e?.defaults;if(typeof n!=`object`||!n||!Object.hasOwn(n,t))return{};let r=n[t];return typeof r==`object`&&r?r:{}}const g={task:{type:`bpmn:Task`},"user-task":{type:`bpmn:UserTask`},"service-task":{type:`bpmn:ServiceTask`},"script-task":{type:`bpmn:ScriptTask`},"send-task":{type:`bpmn:SendTask`},"receive-task":{type:`bpmn:ReceiveTask`},"business-rule-task":{type:`bpmn:BusinessRuleTask`},"manual-task":{type:`bpmn:ManualTask`},"call-activity":{type:`bpmn:CallActivity`},"sub-process":{type:`bpmn:SubProcess`},"end-event":{type:`bpmn:EndEvent`},"intermediate-catch-event":{type:`bpmn:IntermediateCatchEvent`},"intermediate-throw-event":{type:`bpmn:IntermediateThrowEvent`},"exclusive-gateway":{type:`bpmn:ExclusiveGateway`},"parallel-gateway":{type:`bpmn:ParallelGateway`},"inclusive-gateway":{type:`bpmn:InclusiveGateway`},"event-based-gateway":{type:`bpmn:EventBasedGateway`}},_={message:`bpmn:MessageEventDefinition`,timer:`bpmn:TimerEventDefinition`,signal:`bpmn:SignalEventDefinition`,error:`bpmn:ErrorEventDefinition`,escalation:`bpmn:EscalationEventDefinition`,conditional:`bpmn:ConditionalEventDefinition`,terminate:`bpmn:TerminateEventDefinition`},v=(e,t,n)=>({kind:t,description:`app.cli.edit.property.${e}`,on:n}),y=[`bpmn:Task`,`bpmn:UserTask`,`bpmn:ServiceTask`,`bpmn:ScriptTask`,`bpmn:SendTask`,`bpmn:ReceiveTask`,`bpmn:BusinessRuleTask`,`bpmn:ManualTask`,`bpmn:CallActivity`,`bpmn:SubProcess`],b=[`bpmn:ServiceTask`,`bpmn:SendTask`,`bpmn:BusinessRuleTask`,`bpmn:ScriptTask`],x={name:v(`name`,`string`),documentation:v(`documentation`,`string`)},S={...x,condition:v(`condition`,`string`,[`bpmn:SequenceFlow`]),class:v(`class`,`string`,b),delegateExpression:v(`delegateExpression`,`string`,b),expression:v(`expression`,`string`,b),resultVariable:v(`resultVariable`,`string`,b),topic:v(`topic`,`string`,b),asyncBefore:v(`asyncBefore`,`boolean`),asyncAfter:v(`asyncAfter`,`boolean`),assignee:v(`assignee`,`string`,[`bpmn:UserTask`]),candidateUsers:v(`candidateUsers`,`string`,[`bpmn:UserTask`]),candidateGroups:v(`candidateGroups`,`string`,[`bpmn:UserTask`]),formKey:v(`formKey`,`string`,[`bpmn:UserTask`,`bpmn:StartEvent`]),calledElement:v(`calledElement`,`string`,[`bpmn:CallActivity`]),decisionRef:v(`decisionRef`,`string`,[`bpmn:BusinessRuleTask`]),inputs:v(`inputs`,`mapping`,y),outputs:v(`outputs`,`mapping`,y)},C={...x,condition:v(`condition`,`string`,[`bpmn:SequenceFlow`]),class:v(`class`,`string`,[`bpmn:ServiceTask`,`bpmn:SendTask`,`bpmn:BusinessRuleTask`]),delegateExpression:v(`delegateExpression`,`string`,[`bpmn:ServiceTask`,`bpmn:SendTask`,`bpmn:BusinessRuleTask`]),expression:v(`expression`,`string`,[`bpmn:ServiceTask`,`bpmn:SendTask`,`bpmn:BusinessRuleTask`]),resultVariable:v(`resultVariable`,`string`,[`bpmn:ServiceTask`,`bpmn:ScriptTask`,`bpmn:BusinessRuleTask`]),async:v(`async`,`boolean`,[`bpmn:Task`,`bpmn:UserTask`,`bpmn:ServiceTask`,`bpmn:ScriptTask`,`bpmn:SendTask`,`bpmn:ReceiveTask`,`bpmn:BusinessRuleTask`,`bpmn:ManualTask`,`bpmn:CallActivity`,`bpmn:SubProcess`]),skipExpression:v(`skipExpression`,`string`,[`bpmn:Task`,`bpmn:UserTask`,`bpmn:ServiceTask`,`bpmn:ScriptTask`,`bpmn:SendTask`,`bpmn:ReceiveTask`,`bpmn:BusinessRuleTask`,`bpmn:ManualTask`]),assignee:v(`assignee`,`string`,[`bpmn:UserTask`]),candidateUsers:v(`candidateUsers`,`string`,[`bpmn:UserTask`]),candidateGroups:v(`candidateGroups`,`string`,[`bpmn:UserTask`]),formKey:v(`formKey`,`string`,[`bpmn:UserTask`,`bpmn:StartEvent`]),calledElement:v(`calledElement`,`string`,[`bpmn:CallActivity`])},w={classic:{...x,condition:v(`conditionSimple`,`string`,[`bpmn:SequenceFlow`])},"camunda-7":S,operaton:S,"cib-seven":S,flowable:C,activiti:C,"camunda-8":{...x,condition:v(`feelCondition`,`string`,[`bpmn:SequenceFlow`]),jobType:v(`jobType`,`string`,b),retries:v(`retries`,`integer`,b),assignee:v(`assignee`,`string`,[`bpmn:UserTask`]),candidateUsers:v(`candidateUsers`,`string`,[`bpmn:UserTask`]),candidateGroups:v(`candidateGroups`,`string`,[`bpmn:UserTask`]),formId:v(`formId`,`string`,[`bpmn:UserTask`]),processId:v(`processId`,`string`,[`bpmn:CallActivity`]),decisionId:v(`decisionId`,`string`,[`bpmn:BusinessRuleTask`]),inputs:v(`inputMappings`,`mapping`,y),outputs:v(`outputMappings`,`mapping`,y)}};var T=class extends Error{};function E(e,t){throw new T(`${e}: ${t}`)}function D(t,n,r){for(let i of Object.keys(t))n.includes(i)||E(r,e(`app.cli.edit.unknownField`,{key:i,allowed:n.join(`, `)}))}function O(t,n,r,i=!0){if(t!==void 0||i)return typeof t==`string`&&t.trim()||E(n,e(`app.cli.edit.mustBeAString`,{field:r})),t}function k(t,n,r){return typeof t==`number`&&Number.isFinite(t)||E(n,e(`app.cli.edit.mustBeANumber`,{field:r})),t}function A(t,n,r){(!t||typeof t!=`object`||Array.isArray(t))&&E(r,e(`app.cli.edit.propertiesMustBeAnObject`));let i=w[n],a={};for(let[o,s]of Object.entries(t)){let t=Object.hasOwn(i,o)?i[o]:void 0;t||E(r,e(`app.cli.edit.notAnEngineProperty`,{key:o,engine:n,allowed:Object.keys(i).join(`, `)})),t.kind===`string`&&typeof s!=`string`&&E(r,e(`app.cli.edit.mustBeAStringShort`,{key:o})),t.kind===`boolean`&&typeof s!=`boolean`&&E(r,e(`app.cli.edit.mustBeABoolean`,{key:o})),t.kind===`integer`&&(typeof s!=`number`||!Number.isInteger(s)||s<0)&&E(r,e(`app.cli.edit.mustBeAWholeNumber`,{key:o})),t.kind===`mapping`&&(!s||typeof s!=`object`||Array.isArray(s)||Object.values(s).some(e=>typeof e!=`string`))&&E(r,e(`app.cli.edit.mustMapNamesToStrings`,{key:o})),a[o]=s}return a}function j(e,t,n){let r=Object.hasOwn(w[e],t)?w[e][t]:void 0;return!!r&&(!r.on||r.on.includes(n))}function M(t,n){let r=Array.isArray(t)?t:[t];if(r.length===0)throw new T(e(`app.cli.edit.noOperations`));return r.map((t,r)=>{let i=e(`app.cli.edit.operationWhere`,{number:r+1});(!t||typeof t!=`object`||Array.isArray(t))&&E(i,e(`app.cli.edit.mustBeAnObject`));let a=t;switch(a.op){case`add`:return D(a,[`op`,`element`,`after`,`event`,`name`,`id`,`properties`],i),typeof a.element==`string`&&Object.hasOwn(g,a.element)||E(i,e(`app.cli.edit.elementMustBeOneOf`,{elements:Object.keys(g).join(`, `)})),a.event===void 0||typeof a.event==`string`&&Object.hasOwn(_,a.event)||E(i,e(`app.cli.edit.eventMustBeOneOf`,{events:Object.keys(_).join(`, `)})),a.event!==void 0&&!String(a.element).endsWith(`-event`)&&E(i,e(`app.cli.edit.eventOnlyForEvents`)),a.id!==void 0&&!/^[A-Za-z_][\w.-]*$/.test(String(a.id))&&E(i,e(`app.cli.edit.idMustBeValid`)),{op:`add`,element:a.element,after:O(a.after,i,`after`),event:a.event,name:O(a.name,i,`name`,!1),id:O(a.id,i,`id`,!1),properties:a.properties===void 0?void 0:A(a.properties,n,i)};case`connect`:return D(a,[`op`,`from`,`to`,`name`,`condition`],i),{op:`connect`,from:O(a.from,i,`from`),to:O(a.to,i,`to`),name:O(a.name,i,`name`,!1),condition:O(a.condition,i,`condition`,!1)};case`set`:return D(a,[`op`,`id`,`properties`],i),{op:`set`,id:O(a.id,i,`id`),properties:A(a.properties,n,i)};case`remove`:return D(a,[`op`,`id`],i),{op:`remove`,id:O(a.id,i,`id`)};case`move`:return D(a,[`op`,`id`,`dx`,`dy`],i),{op:`move`,id:O(a.id,i,`id`),dx:k(a.dx,i,`dx`),dy:k(a.dy,i,`dy`)};default:return E(i,e(`app.cli.edit.opMustBeOneOf`))}})}function N(n){let r=n?w[n]:{...w.classic,...w[`camunda-7`],...w[`camunda-8`]},i={type:`object`,additionalProperties:!1,properties:Object.fromEntries(Object.entries(r).map(([n,r])=>{let i=r.kind===`mapping`?{type:`object`,additionalProperties:{type:`string`}}:{type:r.kind},a=r.on?e(`app.cli.edit.schema.onlyOn`,{types:t(r.on.map(e=>e.replace(`bpmn:`,``)))}):``;return[n,{...i,description:`${e(r.description)}${a}`}]}))};return{$schema:`https://json-schema.org/draft/2020-12/schema`,title:n?e(`app.cli.edit.schema.titleFor`,{engine:n}):e(`app.cli.edit.schema.title`),type:`array`,minItems:1,items:{oneOf:[{type:`object`,additionalProperties:!1,required:[`op`,`element`,`after`],properties:{op:{const:`add`,description:e(`app.cli.edit.schema.add`)},element:{enum:Object.keys(g)},after:{type:`string`,description:e(`app.cli.edit.schema.after`)},event:{enum:Object.keys(_),description:e(`app.cli.edit.schema.event`)},name:{type:`string`},id:{type:`string`,description:e(`app.cli.edit.schema.newId`)},properties:i}},{type:`object`,additionalProperties:!1,required:[`op`,`from`,`to`],properties:{op:{const:`connect`,description:e(`app.cli.edit.schema.connect`)},from:{type:`string`},to:{type:`string`},name:{type:`string`},condition:{type:`string`}}},{type:`object`,additionalProperties:!1,required:[`op`,`id`,`properties`],properties:{op:{const:`set`,description:e(`app.cli.edit.schema.set`)},id:{type:`string`},properties:i}},{type:`object`,additionalProperties:!1,required:[`op`,`id`],properties:{op:{const:`remove`,description:e(`app.cli.edit.schema.remove`)},id:{type:`string`}}},{type:`object`,additionalProperties:!1,required:[`op`,`id`,`dx`,`dy`],properties:{op:{const:`move`,description:e(`app.cli.edit.schema.move`)},id:{type:`string`},dx:{type:`number`},dy:{type:`number`}}}]}}}const P={"bpmn:EndEvent":[`message`,`signal`,`error`,`escalation`,`terminate`],"bpmn:IntermediateThrowEvent":[`message`,`signal`,`escalation`],"bpmn:IntermediateCatchEvent":[`message`,`timer`,`signal`,`conditional`]},F=[`bpmn:ReceiveTask`,`bpmn:IntermediateCatchEvent`];function I(t,n){if(n&&(!(P[t]??[]).includes(n)||!Object.hasOwn(_,n)))throw new T(e(`app.patch.eventNotAllowed`,{type:u({type:t}),event:n}))}function L(t,n,r){if(t.id===n.id)throw new T(e(`app.patch.sameElement`,{id:t.id}));if(t.type===`bpmn:EndEvent`)throw new T(e(`app.cli.edit.afterEndEvent`,{id:t.id}));if(n.type===`bpmn:StartEvent`)throw new T(e(`app.patch.startEventTarget`,{id:n.id}));if(n.type===`bpmn:BoundaryEvent`)throw new T(e(`app.patch.boundaryTarget`,{id:n.id}));if(t.scope!==n.scope)throw new T(e(`app.patch.differentScopes`,{from:t.id,to:n.id}));if(t.type===`bpmn:EventBasedGateway`&&!F.includes(n.type))throw new T(e(`app.patch.eventBasedTarget`,{to:n.id}));if(r(t.id,n.id))throw new T(e(`app.patch.duplicateFlow`,{from:t.id,to:n.id}))}const ee=[0,1,-1,2,-2,3,-3,4,-4];function te(e){return e.endsWith(`Event`)?{width:36,height:36}:e.endsWith(`Gateway`)?{width:50,height:50}:e===`bpmn:SubProcess`?{width:350,height:200}:{width:100,height:80}}function ne(e,t,n=0){return e.x<t.x+t.width+n&&e.x+e.width+n>t.x&&e.y<t.y+t.height+n&&e.y+e.height+n>t.y}function R(e,t,n){if(!t||!/(Event|Gateway)$/.test(e))return;let r=Math.max(n.width,Math.min(t.length*7,120));return{x:Math.round(n.x+n.width/2-r/2),y:n.y+n.height+4,width:r,height:28}}function z(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function B(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function V(e,t,n,r,i=50,a){let{width:o,height:s}=te(t),c=e.y+e.height/2,l=[];for(let t=0;t<6;t+=1)for(let n of ee)l.push({x:Math.round(e.x+e.width+i+t*(o+i)),y:Math.round(c-s/2+n*(s+i*.6)),width:o,height:s});let u=e=>!n.some(t=>ne(e,t,12)),d=e=>{let n=R(t,a,e);return u(e)&&(!n||u(n))},f=e=>!r||z(r,e);return l.find(e=>f(e)&&d(e))??l.find(d)??l[0]}function H(e,t){let n=B(e),r=B(t);if(t.x>=e.x+e.width){let i={x:e.x+e.width,y:n.y},a={x:t.x,y:r.y};if(i.y===a.y)return[i,a];let o=Math.round((i.x+a.x)/2);return[i,{x:o,y:i.y},{x:o,y:a.y},a]}let i=Math.max(e.y+e.height,t.y+t.height)+25;return[{x:n.x,y:e.y+e.height},{x:n.x,y:i},{x:r.x,y:i},{x:r.x,y:t.y+t.height}]}const U=[`class`,`delegateExpression`,`expression`,`topic`],W=[`class`,`delegateExpression`,`expression`];function G(t,n,r,i){for(let t of Object.keys(i))if(!j(n,t,r.type))throw new T(e(`app.cli.edit.doesNotApply`,{key:t,type:u(r),id:r.id}));for(let[e,a]of Object.entries(i))K(t,n,r,e,a)}function K(e,t,n,r,i){let{modeling:a,moddle:c}=e;if(r===`name`)return a.updateProperties(n,{name:i});if(r===`documentation`)return a.updateProperties(n,{documentation:[c.create(`bpmn:Documentation`,{text:i})]});if(r===`condition`)return a.updateProperties(n,{conditionExpression:c.create(`bpmn:FormalExpression`,{body:i})});if(s(t))return q(e,t,n,r,i);if(o(t))return J(e,t,n,r,i);if(t===`camunda-8`)return Y(e,n,r,i)}function q(e,t,n,r,i){let{modeling:o,moddle:s}=e,c=a(t);if(U.includes(r)){let e=Object.fromEntries([`class`,`delegateExpression`,`expression`,`topic`,`type`].map(e=>[`${c}:${e}`,void 0])),t=r===`topic`?{[`${c}:type`]:`external`,[`${c}:topic`]:i}:{[`${c}:${r}`]:i};return o.updateProperties(n,{...e,...t})}if(r===`inputs`||r===`outputs`){let t=X(e,n,`${c}:InputOutput`),a=Object.entries(i).map(([e,t])=>s.create(r===`inputs`?`${c}:InputParameter`:`${c}:OutputParameter`,{name:e,value:t}));return o.updateModdleProperties(n,t,{[r===`inputs`?`inputParameters`:`outputParameters`]:a})}return o.updateProperties(n,{[`${c}:${r}`]:i})}function J(e,t,n,r,i){let o=a(t);if(W.includes(r)){let t=Object.fromEntries([`class`,`delegateExpression`,`expression`,`type`].map(e=>[`${o}:${e}`,void 0]));return e.modeling.updateProperties(n,{...t,[`${o}:${r}`]:i})}return r===`resultVariable`?e.modeling.updateProperties(n,{[`${o}:${n.type===`bpmn:ServiceTask`?`resultVariableName`:`resultVariable`}`]:i}):e.modeling.updateProperties(n,{[`${o}:${r}`]:i})}function Y(e,t,n,r){let{modeling:i,moddle:a}=e,o=(n,r)=>{i.updateModdleProperties(t,X(e,t,n),r)};switch(n){case`jobType`:return o(`zeebe:TaskDefinition`,{type:r});case`retries`:return o(`zeebe:TaskDefinition`,{retries:String(r)});case`assignee`:case`candidateUsers`:case`candidateGroups`:return o(`zeebe:AssignmentDefinition`,{[n]:r});case`formId`:return o(`zeebe:FormDefinition`,{formId:r});case`processId`:return o(`zeebe:CalledElement`,{processId:r});case`decisionId`:return o(`zeebe:CalledDecision`,{decisionId:r});case`inputs`:case`outputs`:{let e=Object.entries(r).map(([e,t])=>a.create(n===`inputs`?`zeebe:Input`:`zeebe:Output`,{target:e,source:t}));return o(`zeebe:IoMapping`,{[n===`inputs`?`inputParameters`:`outputParameters`]:e})}}}function X(e,t,n){let{modeling:r,moddle:i}=e,a=t.businessObject.extensionElements;a||(a=i.create(`bpmn:ExtensionElements`,{values:[]}),r.updateProperties(t,{extensionElements:a}));let o=(a.values??[]).find(e=>e.$type===n);if(o)return o;let s=i.create(n);return s.$parent=a,r.updateModdleProperties(t,a,{values:[...a.values??[],s]}),s}function Z(e,t){let n={},r=e.extensionElements?.values??[],i=e=>r.find(t=>t.$type===e),c=(e,t)=>{t!=null&&t!==``&&(n[e]=t)};c(`documentation`,e.documentation?.[0]?.text),c(`condition`,e.conditionExpression?.body);let l=e.eventDefinitions?.[0]?.$type;if(l&&c(`event`,Object.entries(_).find(([,e])=>e===l)?.[0]),s(t)){let n=a(t);for(let t of Object.keys(w[`camunda-7`])){if([`inputs`,`outputs`,`name`,`documentation`,`condition`].includes(t))continue;let r=e.get(`${n}:${t}`);(typeof r!=`boolean`||Object.prototype.hasOwnProperty.call(e,t))&&c(t,r)}let r=i(`${n}:InputOutput`),o=e=>e?.length?Object.fromEntries(e.map(e=>[e.name,String(e.value??``)])):void 0;c(`inputs`,o(r?.inputParameters)),c(`outputs`,o(r?.outputParameters))}if(o(t)){let n=a(t);for(let r of Object.keys(w[t])){if([`name`,`documentation`,`condition`,`resultVariable`].includes(r))continue;let t=e.get(`${n}:${r}`);(typeof t!=`boolean`||Object.prototype.hasOwnProperty.call(e,r))&&c(r,t)}c(`resultVariable`,e.get(`${n}:resultVariableName`)??e.get(`${n}:resultVariable`))}if(t===`camunda-8`){let e=i(`zeebe:TaskDefinition`);c(`jobType`,e?.type),c(`retries`,e?.retries===void 0?void 0:Number(e.retries));let t=i(`zeebe:AssignmentDefinition`);c(`assignee`,t?.assignee),c(`candidateUsers`,t?.candidateUsers),c(`candidateGroups`,t?.candidateGroups),c(`formId`,i(`zeebe:FormDefinition`)?.formId),c(`processId`,i(`zeebe:CalledElement`)?.processId),c(`decisionId`,i(`zeebe:CalledDecision`)?.decisionId);let n=i(`zeebe:IoMapping`),r=e=>e?.length?Object.fromEntries(e.map(e=>[e.target,String(e.source??``)])):void 0;c(`inputs`,r(n?.inputParameters)),c(`outputs`,r(n?.outputParameters))}return n}const Q=`bpmn:SequenceFlow`;function re(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t.toString(36).padStart(7,`0`).slice(-7)}function ie(e){return e.endsWith(`Gateway`)?`Gateway`:e.endsWith(`Event`)?`Event`:`Activity`}function ae(e){switch(e.op){case`add`:return[e.after];case`connect`:return[e.from,e.to];default:return[e.id]}}function oe(e){let t=/* @__PURE__ */ new Map;return e.map((e,n)=>{let r=/* @__PURE__ */ new Set;for(let n of ae(e)){let e=t.get(n);e!==void 0&&r.add(e)}return e.op===`add`&&e.id&&!t.has(e.id)&&t.set(e.id,n),[...r].sort((e,t)=>e-t)})}var $=class{nodes=/* @__PURE__ */ new Map;flows=/* @__PURE__ */ new Map;shapes=/* @__PURE__ */ new Map;edges=/* @__PURE__ */ new Map;pairs=/* @__PURE__ */ new Set;taken=/* @__PURE__ */ new Set;plane;moddle;properties;definitions;engine;conventions;gap;constructor(e,t,n,r=50){this.definitions=e,this.engine=t,this.conventions=n,this.gap=r,this.moddle=i(e),this.plane=e.diagrams?.[0]?.plane,this.properties={moddle:this.moddle,modeling:{updateProperties:(e,t)=>{for(let[n,r]of Object.entries(t))e.businessObject.set(n,r)},updateModdleProperties:(e,t,n)=>{for(let[e,r]of Object.entries(n))t.set(e,r)}}},this.index()}index(){let e=e=>{typeof e==`string`&&this.taken.add(e)},t=/* @__PURE__ */ new Set,n=[this.definitions];for(;n.length>0;){let r=n.pop();if(r&&typeof r==`object`&&!t.has(r)){if(t.add(r),Array.isArray(r))n.push(...r);else{e(r.id);for(let[e,t]of Object.entries(r))!e.startsWith(`$`)&&t&&typeof t==`object`&&n.push(t)}}}for(let e of this.definitions.rootElements??[])if(e.$type===`bpmn:Process`&&this.walk(e),e.$type===`bpmn:Collaboration`){this.nodes.set(e.id,{bo:e,kind:`root`});for(let t of e.participants??[])this.nodes.set(t.id,{bo:t,kind:`container`}),t.processRef&&this.walk(t.processRef)}for(let e of this.plane?.planeElement??[]){let t=e.bpmnElement?.id;t&&(e.$type===`bpmndi:BPMNShape`&&this.shapes.set(t,e),e.$type===`bpmndi:BPMNEdge`&&this.edges.set(t,e))}}walk(e){this.nodes.has(e.id)||this.nodes.set(e.id,{bo:e,kind:`root`});for(let t of e.laneSets?.flatMap(e=>this.lanesOf(e))??[])this.nodes.set(t.id,{bo:t,kind:`container`});for(let t of e.flowElements??[])t.$type===Q?(this.flows.set(t.id,t),this.pairs.add(`${t.sourceRef?.id}>${t.targetRef?.id}`)):t.$instanceOf(`bpmn:FlowNode`)&&(this.nodes.set(t.id,{bo:t,kind:`node`}),t.$instanceOf(`bpmn:SubProcess`)&&this.walk(t))}lanesOf(e){return(e.lanes??[]).flatMap(e=>[e,...e.childLaneSet?this.lanesOf(e.childLaneSet):[]])}has(e){return this.nodes.has(e)||this.flows.has(e)}node(t){let n=this.nodes.get(t);if(!n)throw new T(e(`app.cli.edit.noSuchElement`,{id:t}));return n}freshId(e,t){let n=e===Q?`Flow`:ie(e);for(let e=0;;e+=1){let r=`${n}_${re(e===0?t:`${t}#${e}`)}`;if(!this.taken.has(r))return r}}boundsOf(e){let t=this.shapes.get(e)?.bounds;return t?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0}pointsOf(e){let t=this.edges.get(e)?.waypoint;return t?t.map(e=>({x:e.x,y:e.y})):void 0}snapshot(e){let t=this.flows.get(e),n=t??this.nodes.get(e)?.bo,r=n?.$parent;return{id:e,type:n?.$type??``,...n?.name?{name:n.name}:{},...this.boundsOf(e)?{bounds:this.boundsOf(e)}:{},...t?{waypoints:this.pointsOf(e),source:t.sourceRef?.id,target:t.targetRef?.id}:{},...r?.id&&r.$type!==`bpmn:Definitions`?{parent:r.id}:{},...n?.attachedToRef?.id?{attachedTo:n.attachedToRef.id}:{}}}scopeOf(e){return e.attachedToRef?e.attachedToRef.$parent:e.$parent}shape(e,t){let n=this.moddle.create(`dc:Bounds`,t),r={id:this.uniqueDi(e.id),bpmnElement:e,bounds:n};e.$type===`bpmn:ExclusiveGateway`&&(r.isMarkerVisible=!0),e.$type===`bpmn:SubProcess`&&(r.isExpanded=!0);let i=this.moddle.create(`bpmndi:BPMNShape`,r);this.plane.get(`planeElement`).push(i),i.$parent=this.plane,this.shapes.set(e.id,i)}uniqueDi(e){let t=m(`${e}_di`,e=>this.taken.has(e));return this.taken.add(t),t}edge(e,t){let n=this.moddle.create(`bpmndi:BPMNEdge`,{id:this.uniqueDi(e.id),bpmnElement:e,waypoint:t.map(e=>this.moddle.create(`dc:Point`,e))});this.plane.get(`planeElement`).push(n),n.$parent=this.plane,this.edges.set(e.id,n)}reroute(e){let t=this.flows.get(e),n=this.edges.get(e),r=this.boundsOf(t?.sourceRef?.id),i=this.boundsOf(t?.targetRef?.id);n&&r&&i&&n.set(`waypoint`,H(r,i).map(e=>this.moddle.create(`dc:Point`,e)))}unplane(e){for(let t of[this.shapes,this.edges]){let n=t.get(e);if(!n)continue;let r=this.plane.get(`planeElement`),i=r.indexOf(n);i>=0&&r.splice(i,1),t.delete(e)}}occupiedAround(e,t){let n=[];for(let[r,i]of this.nodes){if(i.kind!==`node`||t.has(r))continue;let a=this.boundsOf(r);if(!a||i.bo.$instanceOf(`bpmn:SubProcess`)&&z(a,e))continue;n.push(a);let o=this.labelOf(r,a,i.bo);o&&n.push(o)}return n}labelOf(e,t,n){let r=this.shapes.get(e)?.label?.bounds;return r?{x:r.x,y:r.y,width:r.width,height:r.height}:R(n.$type,n.name,t)}withinOf(e){if(e.$instanceOf(`bpmn:SubProcess`))return this.boundsOf(e.id);for(let t of this.definitions.rootElements??[]){if(t.$type!==`bpmn:Collaboration`)continue;let n=(t.participants??[]).find(t=>t.processRef===e);if(n)return this.boundsOf(n.id)}}describe(){let e=[];for(let[t,n]of this.nodes){if(n.kind===`root`)continue;let r=this.scopeOf(n.bo)?.id;e.push({id:t,type:u(n.bo),...n.bo.name?{name:n.bo.name}:{},...r?{parent:r}:{},properties:Z(n.bo,this.engine)})}for(let[t,n]of this.flows)e.push({id:t,type:u(n),...n.name?{name:n.name}:{},source:n.sourceRef?.id,target:n.targetRef?.id,properties:Z(n,this.engine)});return e.sort((e,t)=>e.id<t.id?-1:+(e.id>t.id))}snapshotAll(){return{nodes:[...this.nodes].filter(([,e])=>e.kind===`node`).map(([e])=>this.snapshot(e)),flows:[...this.flows.keys()].map(e=>this.snapshot(e))}}flowTouching(e){return[...this.flows.values()].filter(t=>t.sourceRef?.id===e||t.targetRef?.id===e).map(e=>e.id)}create(t,n,r){if(this.flows.has(t.after))throw new T(e(`app.cli.edit.isAConnection`,{id:t.after}));let i=this.node(t.after);if(i.kind!==`node`)throw new T(e(`app.cli.edit.addAfterAnElementInside`,{id:t.after,type:u(i.bo)}));if(!this.plane)throw new T(e(`app.patch.noDrawing`));let a=g[t.element].type,o=this.scopeOf(i.bo);if(I(a,t.event),t.id&&this.taken.has(t.id))throw new T(e(`app.cli.edit.idTaken`,{id:t.id}));L({id:i.bo.id,type:i.bo.$type,scope:o},{id:t.id??``,type:a,scope:o},(e,t)=>this.pairs.has(`${e}>${t}`));let s=t.id;if(!s){let e=t.name&&this.conventions.ids?f({$type:a},t.name,this.conventions.ids):null;s=e?m(e,e=>this.taken.has(e)):this.freshId(a,`${n}:${a}:${t.name??``}:${t.after}`)}this.taken.add(s);let c=this.moddle.create(a,{id:s});if(c.$parent=o,t.event){let e=this.moddle.create(_[t.event]);e.$parent=c,c.get(`eventDefinitions`).push(e)}o.get(`flowElements`).push(c),this.nodes.set(s,{bo:c,kind:`node`});for(let e of[...this.nodes.values()].filter(e=>e.kind===`container`&&e.bo.$type===`bpmn:Lane`))(e.bo.flowNodeRef??[]).includes(i.bo)&&e.bo.get(`flowNodeRef`).push(c);let l=this.boundsOf(i.bo.id);if(!l)throw new T(e(`app.patch.noDrawing`));let d=V(l,a,this.occupiedAround(l,/* @__PURE__ */ new Set([s])),this.withinOf(o),this.gap,t.name);this.shape(c,d);let p=h(this.conventions,a);Object.keys(p).length>0&&this.properties.modeling.updateProperties({businessObject:c},p),t.name&&c.set(`name`,t.name),t.properties&&G(this.properties,this.engine,{id:s,type:a,businessObject:c},t.properties);let v=this.link(i.bo,c,`${n}:flow:${i.bo.id}>${s}`);r.added.push(this.snapshot(s)),r.addedFlows.push(this.snapshot(v.id)),r.touched.push(s,v.id),r.summary=e(`app.cli.edit.added`,{type:u(c),id:s,after:i.bo.id})}link(e,t,n){let r=this.freshId(Q,n);this.taken.add(r);let i=this.moddle.create(Q,{id:r,sourceRef:e,targetRef:t}),a=this.scopeOf(e);i.$parent=a,a.get(`flowElements`).push(i),e.get(`outgoing`).push(i),t.get(`incoming`).push(i),this.flows.set(r,i),this.pairs.add(`${e.id}>${t.id}`);let o=this.boundsOf(e.id),s=this.boundsOf(t.id);return o&&s&&this.plane&&this.edge(i,H(o,s)),i}connect(t,n,r){let i=this.node(t.from),a=this.node(t.to);if(i.kind!==`node`)throw new T(e(`app.patch.notAFlowNode`,{id:t.from,type:u(i.bo)}));if(a.kind!==`node`)throw new T(e(`app.patch.notAFlowNode`,{id:t.to,type:u(a.bo)}));L({id:i.bo.id,type:i.bo.$type,scope:this.scopeOf(i.bo)},{id:a.bo.id,type:a.bo.$type,scope:this.scopeOf(a.bo)},(e,t)=>this.pairs.has(`${e}>${t}`));let o=this.link(i.bo,a.bo,`${n}:flow:${t.from}>${t.to}`);t.name&&o.set(`name`,t.name),t.condition&&G(this.properties,this.engine,{id:o.id,type:Q,businessObject:o},{condition:t.condition}),r.addedFlows.push(this.snapshot(o.id)),r.touched.push(o.id),r.summary=e(`app.cli.edit.connect`,{from:t.from,to:t.to,id:o.id})}set(t,n){let r=this.flows.get(t.id)??this.node(t.id).bo;G(this.properties,this.engine,{id:r.id,type:r.$type,businessObject:r},t.properties),n.changed.push({id:r.id,keys:Object.keys(t.properties),bounds:this.boundsOf(r.id)}),n.touched.push(r.id),n.summary=e(`app.cli.edit.set`,{keys:Object.keys(t.properties).join(`, `),id:r.id})}remove(t,n){let r=this.flows.get(t.id);if(r){this.snapshotAndDrop([r.id],n),n.summary=e(`app.cli.edit.removed`,{id:t.id});return}let i=this.node(t.id);if(i.kind===`root`)throw new T(e(`app.cli.edit.isTheRoot`,{id:t.id}));if(i.kind===`container`)throw new T(e(`app.patch.cannotRemoveContainer`,{id:t.id,type:u(i.bo)}));let a=/* @__PURE__ */ new Set([t.id]),o=[i.bo];for(;o.length>0;){let e=o.pop();for(let t of this.nodes.values())t.bo.attachedToRef===e&&!a.has(t.bo.id)&&(a.add(t.bo.id),o.push(t.bo));if(e.$instanceOf(`bpmn:SubProcess`))for(let t of e.flowElements??[])t.$type!==Q&&this.nodes.has(t.id)&&!a.has(t.id)&&(a.add(t.id),o.push(t))}let s=/* @__PURE__ */ new Set;for(let e of a)for(let t of this.flowTouching(e))s.add(t);this.snapshotAndDrop([...s,...a],n),n.summary=e(`app.cli.edit.removed`,{id:t.id})}snapshotAndDrop(e,t){let n=[...new Set(e)];for(let e of n)t.removed.push(this.snapshot(e));for(let e of n){let t=this.flows.get(e);if(t){let n=(e,t)=>{let n=e?.indexOf(t)??-1;n>=0&&e.splice(n,1)};n(t.sourceRef?.outgoing,t),n(t.targetRef?.incoming,t),n(t.$parent?.flowElements,t),t.sourceRef?.default===t&&t.sourceRef.set(`default`,void 0),this.flows.delete(e),this.pairs.delete(`${t.sourceRef?.id}>${t.targetRef?.id}`),this.unplane(e);continue}let n=this.nodes.get(e);if(!n)continue;let r=n.bo.$parent?.flowElements,i=r?.indexOf(n.bo)??-1;i>=0&&r.splice(i,1);for(let e of this.nodes.values()){let t=e.bo.flowNodeRef,r=t?.indexOf(n.bo)??-1;r>=0&&t.splice(r,1)}this.nodes.delete(e),this.unplane(e)}t.touched.push(...n)}move(t,n){if(this.flows.has(t.id))throw new T(e(`app.patch.isAFlow`,{id:t.id}));let r=this.node(t.id);if(r.kind!==`node`)throw new T(e(`app.patch.notAFlowNode`,{id:t.id,type:u(r.bo)}));if(!this.shapes.has(t.id))throw new T(e(`app.patch.noDrawing`));let i=/* @__PURE__ */ new Set([t.id]);for(let e of this.nodes.values())e.bo.attachedToRef===r.bo&&i.add(e.bo.id);if(r.bo.$instanceOf(`bpmn:SubProcess`)){let e=t=>{for(let n of t.flowElements??[])n.$type!==Q&&(i.add(n.id),n.$instanceOf(`bpmn:SubProcess`)&&e(n))};e(r.bo)}for(let e of i){let r=this.shapes.get(e)?.bounds;if(!r)continue;let i=this.boundsOf(e);r.set(`x`,i.x+t.dx),r.set(`y`,i.y+t.dy),n.moved.push({id:e,from:i,to:this.boundsOf(e)}),n.touched.push(e)}for(let e of this.flows.values()){let n=i.has(e.sourceRef?.id),r=i.has(e.targetRef?.id);if(n||r){if(n&&r){let n=this.edges.get(e.id);for(let e of n?.waypoint??[])e.set(`x`,e.x+t.dx),e.set(`y`,e.y+t.dy)}else this.reroute(e.id)}}n.summary=e(`app.cli.edit.moved`,{id:t.id,dx:t.dx,dy:t.dy})}};function se(e,t){return{index:e,operation:t,summary:``,added:[],addedFlows:[],removed:[],changed:[],moved:[],touched:[]}}function ce(t,n){let r=oe(n),i=[];return n.forEach((n,a)=>{let o=se(a,n);i.push(o);let s=r[a].find(e=>i[e].error);if(s!==void 0)o.skipped=!0,o.error=e(`app.patch.dependsOnFailed`,{number:s+1});else try{switch(n.op){case`add`:t.create(n,a,o);break;case`connect`:t.connect(n,a,o);break;case`set`:t.set(n,o);break;case`remove`:t.remove(n,o);break;case`move`:t.move(n,o)}}catch(e){if(!(e instanceof T))throw e;o.error=e.message}}),i}async function le(e,t,i){if(t.operations.length===0)return{ok:!0,xml:e,steps:[]};let a=await n(e,c(i.engine));if(!a)return{ok:!1,steps:[],failedAt:-1};let o=ce(new $(a,i.engine,i.conventions??{},i.gap),t.operations),s=o.find(e=>e.error);return s?{ok:!1,steps:o,failedAt:s.index}:{ok:!0,xml:await r(a),steps:o}}export{g as a,N as c,f as d,u as f,T as i,M as l,Z as n,_ as o,m as p,G as r,w as s,le as t,h as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-atomicWrite-C6J1gDtO.js";import{r as t}from"./chunk-translator-BFUJmSkR.js";import{fn as n,mn as r}from"./chunk-src-BLyg_6UX.js";import i from"node:path";import{existsSync as a,readFileSync as o}from"node:fs";const s=`penstock-baseline.json`,c=`penstock-migration-baseline.json`;function l(e){return e.replace(/\\/g,`/`)}function u(e,t){return l(i.isAbsolute(t)?i.relative(e,t):t)}function d(e,t,n=!1){return`${n?l(t.file):u(e,t.file)}::${t.rule}::${t.message}`}function f(e,i){let a;try{a=JSON.parse(o(e,`utf8`))}catch(e){throw Error(t(`app.output.notValid`,{file:i,what:`JSON`,reason:r(n(e))}))}let s=a?.findings;if(!Array.isArray(s))throw Error(t(`app.output.notValid`,{file:i,what:`baseline`,reason:`it has no list of findings.`}));return s.filter(e=>typeof e?.file==`string`&&typeof e.rule==`string`&&typeof e.message==`string`)}function p(e,t,n=s){let r=i.join(e,n);if(!a(r))return{fresh:t,known:[],fixed:[]};let o=f(r,n),c=new Set(o.map(t=>d(e,t,!0))),l=new Set(t.map(t=>d(e,t)));return{fresh:t.filter(t=>!c.has(d(e,t))),known:t.filter(t=>c.has(d(e,t))),fixed:[...c].filter(e=>!l.has(e))}}function m(t,n,r=s){let a=i.join(t,r),o={generated:(/* @__PURE__ */ new Date()).toISOString(),findings:n.map(e=>({file:u(t,e.file),rule:e.rule,message:e.message})).sort((e,t)=>`${e.file}${e.rule}${e.message}`.localeCompare(`${t.file}${t.rule}${t.message}`))};return e(a,`${JSON.stringify(o,null,2)}\n`),a}export{p as n,m as r,c as t};
@@ -1 +0,0 @@
1
- import{_t as e,en as t,f as n,ft as r,gt as i,h as a,ht as o,m as s,p as c,r as l}from"./chunk-src-BLyg_6UX.js";import{i as u,t as d}from"./chunk-codeIndex-CzENd6hG.js";import f from"node:path";const p=/[\\/]/,m=/^[A-Za-z_][\w$]*(\.[A-Za-z_][\w$]*)*$/;function h(e,t){let n=e.split(p).map(e=>encodeURIComponent(e));return`${process.platform===`win32`?`file:///`:`file://`}${n.join(`/`)}#L${Math.max(1,t)}`}function g(e){let t=/#L(\d+)$/.exec(e)?.[1];return t?Number(t):null}function _(e){let[t]=e.split(`#`);return decodeURIComponent(t.replace(/^file:\/\//,``))}function v(e,t){return t&&m.test(t)?t:`${f.basename(e.file)}:${e.line}`}const y=/* @__PURE__ */ new Set([`JOB_TYPE`,`TOPIC`,`CLASS`,`BEAN`,`ERROR`]),b={CLASS:`CLASS`,BEAN:`CLASS`,JOB_TYPE:`METHOD`,TOPIC:`METHOD`};function x(e,t){let n=/* @__PURE__ */ new Set;return[...o(e,t),...i(e,t)].filter(e=>{let t=`${e.file}#${e.offset}`;return!n.has(t)&&(n.add(t),!0)})}function S(e,n){let r=/* @__PURE__ */ new Map;for(let i of n){let n=o(e,i);n.length>0&&r.set(t(i),n)}return r}function C(e,t,n){return x(e,t).flatMap(e=>{let i=n(e);return i?[{handle:i,label:v(e,t.kind===`CLASS`?t.value:void 0),icon:b[t.kind]??`FILE`,implements:t.kind===`VARIABLE`?e.writes===!0:y.has(t.kind),test:r(e.file)}]:[]})}function w(e,t){let n=new Map(e.map(e=>[e.path,a(e)])),r=/* @__PURE__ */ new Map;for(let e of t){let t=s(n.get(e.file)??[],e.file,e.offset);t&&r.set(`${t.path}#${t.offset}`,t)}return{workers:l(e),classes:[...r.values()],camunda7Imports:e.flatMap(e=>{let t=c(e);return t.length>0?[{path:e.path,names:t}]:[]})}}async function T(e,t,n=u()){return w(await n.factsOf(e),t)}async function E(t,n=u()){let r=await n.factsOf(t),i=w(r,[]);return{protocol:1,workers:i.workers,classes:i.classes,camunda7Imports:i.camunda7Imports,types:e(r,i.workers.flatMap(e=>(e.variables??[]).map(e=>e.type)))}}async function D(e,t){let r=await d(t.map(e=>({file:e.path,text:e.text})));return{index:r,facts:await T(t,[...S(r,await n(e)).values()].flat())}}export{h as a,C as i,E as n,g as o,D as r,_ as s,T as t};
@@ -1 +0,0 @@
1
- export{n as codeCommand}from"./chunk-codeLinks-D-gzUjYv.js";
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-editPreview-BgH1JVOD.js";import{a as t,i as n,n as r,o as i}from"./chunk-command-Jl1msVwF.js";export{r as applyOperations,e as engineOf,n as operationFromWords,t as schemaCommand,i as showCommand};
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-translator-BFUJmSkR.js";import{n as t,t as n}from"./chunk-status-DgeSOz3A.js";import{t as r}from"./chunk-table-CJtiXv0e.js";import{Ct as i,Dt as a,Et as o,St as s,X as c,Y as l,Z as u,an as d,fn as f,mn as p,rn as m,sn as h,wt as g,xt as _}from"./chunk-src-BLyg_6UX.js";import{a as v}from"./chunk-moddle-Dlk0NR-u.js";import{i as y,t as b}from"./chunk-workerVariables-CCLcoR0U.js";import{n as x,r as S}from"./chunk-docs-CY6ICsip.js";import{a as C,n as w,r as T,s as E}from"./chunk-failure-BsimkHy_.js";import{r as D,t as O}from"./chunk-context-DPJmldqg.js";import{n as k,r as A}from"./chunk-baseline-DvS2S0am.js";import{n as j,r as M,t as N}from"./chunk-report-CDz78nCI.js";import{t as P}from"./chunk-rules-DJlL7K_Q.js";import{t as F}from"./chunk-plural-Bq_4vgOr.js";import{t as I}from"./chunk-placeholderLayout-B18ekWmh.js";import{a as L,c as R,i as z}from"./chunk-codeLinks-D-gzUjYv.js";import B from"node:path";import{tmpdir as V}from"node:os";import{mkdtempSync as H,readFileSync as U,rmSync as W}from"node:fs";async function G(){return import(`./chunk-diagram-CCA1-fT5.js`)}const K=[`drawing`,`rules`,`flow`,`variables`];function q(e){if(e===void 0)return{sections:K};let t=e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0),n=[],r;for(let e of t)K.includes(e)?n.push(e):r===void 0&&(r=e);return{sections:n,unknown:r}}const J=/\.bpmn(\.xml|20\.xml)?$/i,Y=/\.form$/i;async function X(t){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=e=>{for(let t of e??[]){if(!t?.id)continue;let e=typeof t.name==`string`?t.name.trim():``;e&&n.set(t.id,e),r.set(t.id,l(String(t.$type??``))),t.sourceRef&&t.targetRef&&i.set(t.id,[t.sourceRef.id,t.targetRef.id]),a(t.flowElements)}};try{let e=await v(U(t,`utf8`));for(let t of e?.rootElements??[]){t.id&&n.set(t.id,typeof t.name==`string`&&t.name.trim()||``);for(let e of t.participants??[])e.id&&e.name&&n.set(e.id,String(e.name).trim()),a(e.processRef?.flowElements);a(t.flowElements)}}catch{return e=>e}let o=t=>n.get(t)||(r.get(t)?e(`app.rules.drawing.theElement`,{type:r.get(t)}):t);return t=>{let r=n.get(t);if(r)return r;let a=i.get(t);return a?e(`app.rules.drawing.theConnection`,{from:o(a[0]),to:o(a[1])}):o(t)}}async function ee(e){let t=U(e,`utf8`);if(!I(t)&&await v(t))return[];let{measureDiagram:n}=await G(),r=await n(e,{asAuthored:!0}),i=await X(e);return r.defects.map(t=>{let n=t.elements??[];return N(`drawing`,{file:e,rule:t.kind,message:t.detail,severity:S(`drawing`,t.kind)?.severity===`warning`?`warning`:`error`,title:c(`drawing`,t.kind),...n.length>0?{where:u(n.map(i)),elements:n}:{}})})}const Z={error:0,warning:1,note:2};function te(e){let t=e.elements??[],r=t.length>0?` (${t.join(`, `)})`:``,i=e.message.endsWith(r)&&r?e.message.slice(0,-r.length):e.message,a=e.title?`${e.title}${e.where?` - ${e.where}`:``}`:i;return[` ${n(e.severity).padEnd(7)} ${a}`,` ${` `.repeat(7)} ${e.ruleId??e.rule}${t.length>0?` ${t.join(`, `)}`:``}`]}function ne(t,n){let r=!1;try{r=U(t,`utf8`).trim()===``}catch{r=!1}let i=m(t),a=C(n);return{file:t,rule:`file-unreadable`,message:w(n)?T(t):a===null?r?e(`app.output.theFileIsEmpty`):e(`app.output.notValidFile`,{what:i,reason:p(f(n))}):`${t}: ${a}`,severity:`error`}}async function Q(e,n){let{ruleFindings:r}=await import(`./chunk-lint-C_fAcLIg.js`),{flowFindings:i,unreadableDmn:o}=await import(`./chunk-analyze-Brxlb4U1.js`),{allows:s,upsell:c}=await import(`./chunk-features-BwnwB6jL.js`),{currentLicense:l}=await import(`./chunk-license-B_To2110.js`),u=new Set(n.sections??K),d=await l(),f=n.flowAllowed??s(d),p=n.variablesAllowed??s(d),m=[],h=/* @__PURE__ */ new Map,g=[],_=[],v=0,y=!1;for(let n of e){let e=[];try{if(J.test(n)&&u.has(`drawing`)&&e.push(...await ee(n)),J.test(n)&&u.has(`rules`)&&e.push(...await r(n)),u.has(`flow`)){let t=/\.dmn$/i.test(n)?await o(n):null;t?e.push(t):f||Y.test(n)?e.push(...await i(n)):y=!0}if(J.test(n)&&u.has(`variables`)){let t=O(n).values,r=a(t);r.mode!==`off`&&p?e.push(...await ie(n,r,h)):r.mode!==`off`&&typeof t.variables?.check==`string`&&m.length===0&&await re(n,h)&&m.push(...c(d,`variable-checks`))}}catch(t){e.splice(0,e.length,ne(n,t))}let s=e.filter(e=>e.elements&&e.title),l=P(e.filter(e=>!(e.elements&&e.title)).map(e=>({...e,elements:e.elements??[]})),s.map(e=>({kind:e.rule,elements:e.elements??[]})));e.splice(0,e.length,...[...s,...l].sort((e,t)=>Z[e.severity]-Z[t.severity])),g.push(...e);let b=e.filter(e=>e.severity===`error`);if(e.length===0)_.push(`${t(`ok`).padEnd(5)} ${D(n)}`);else{b.length>0&&(v+=1),_.push(`${(b.length>0?t(`fail`):t(`note`)).padEnd(5)} ${D(n)}`);for(let t of e.slice(0,40))_.push(...te(t))}}let b=e.length>0?O(e[0]).root:process.cwd(),x=n.baseline?k(b,g):null;return{findings:g,reported:x?x.fresh:g,comparison:x,failed:v,flowSkipped:y,offer:m,lines:_,root:b}}function $(e,t){let n=O(e),r=t.get(n.root);if(r)return r;let i=[n.root,...L(n.root,z(n.values))].flatMap(e=>R(e)).map(e=>({path:e,text:U(e,`utf8`)}));return t.set(n.root,i),i}async function re(e,t){let n=U(e,`utf8`),r=await d(e,n);if(r.workers.length===0)return!1;let i=r.workers.map(e=>({kind:e.kind===`JAVA_CLASS`?`CLASS`:e.kind,value:e.value,elementId:e.elementId}));return(await b($(e,t),i)).fetches.length>0}async function ie(e,t,n){let r=U(e,`utf8`),a=await d(e,r);if(a.workers.length===0)return[];let l=await v(r),u=a.workers.map(e=>({kind:e.kind===`JAVA_CLASS`?`CLASS`:e.kind,value:e.value,elementId:e.elementId})),f=await b($(e,n),u),p=o({model:y(a,f),definitions:l,order:h(l),types:f.types??[],inputs:t.inputs,linked:new Set(f.fetches.map(e=>e.elementId)),mode:t.mode,entitled:!0});return[...p.fields.map(t=>N(`code`,{file:e,rule:`variable-field`,message:_(t),severity:`warning`,title:c(`code`,`variable-field`),where:s(t),elements:[t.elementId]})),...p.names.map(t=>N(`code`,{file:e,rule:`variable-unknown`,message:i(t.name),severity:`warning`,title:c(`code`,`variable-unknown`),where:g(),elements:[t.elementId]}))]}async function ae(t,n){let r=await Q(t,n),i=[...r.lines];if(r.offer.length>0&&n.format===`text`&&i.push(``,...r.offer),n.format===`text`&&r.findings.some(e=>e.docs)&&i.push(``,e(`app.output.everyRuleHasAPage`,{url:x})),r.flowSkipped&&n.format===`text`&&i.push(``,e(`app.output.flowAnalysisLeftOut`)),n.updateBaseline){let t=A(r.root,r.findings);return{ok:!0,lines:[e(`app.output.wroteFindings`,{file:D(t),findings:F(r.findings.length,`app.output.count.finding`)})]}}let a=r.comparison?r.reported.some(e=>e.severity===`error`):r.failed>0;if(n.format===`sarif`)return{ok:!a,refused:!1,lines:[M(r.reported,`check`)]};if(n.format===`github`)return{ok:!a,refused:!1,lines:j(r.reported)};if(n.format===`json`)return{ok:!a,refused:!1,lines:[JSON.stringify(r.reported,null,2)]};if(r.comparison){let t=[r.reported.length>0?e(`app.output.newFindings`,{count:r.reported.length}):e(`app.output.nothingNew`),e(`app.output.accepted`,{count:r.comparison.known.length}),r.comparison.fixed.length>0?e(`app.output.fixedSinceTheBaseline`,{count:r.comparison.fixed.length}):``].filter(Boolean);i.push(``,t.join(`, `)),r.comparison.fixed.length>0&&i.push(e(`app.output.runUpdateBaseline`))}return{ok:!a,refused:!1,lines:i}}async function oe(n,i){let{measureDiagram:a}=await G(),o=[],s=0,c=0,l=i?``:H(B.join(V(),`penstock-layout-`));try{for(let[r,u]of n.entries()){let n=i?u:B.join(l,`${r}.bpmn`),d,f;try{d=U(u,`utf8`),await a(u,{outPath:n}),f=U(n,`utf8`)}catch(e){c+=1,o.push({status:t(`fail`),file:D(u),details:E(D(u),e)});continue}f===d?o.push({status:t(`same`),file:D(u),details:e(`app.output.noChange`)}):(s+=1,o.push({status:t(i?`wrote`:`change`),file:D(u),details:e(i?`app.output.reflowedLayout`:`app.output.wouldReflowLayout`)}))}}finally{l&&W(l,{recursive:!0,force:!0})}let u=r(o,{columns:[{name:`status`,header:e(`app.cli.header.status`),minWidth:6},{name:`file`,header:e(`app.cli.header.file`),minWidth:24},{name:`details`,header:e(`app.cli.header.details`)}]});return!i&&s>0&&u.push(``,e(`app.output.layoutAlwaysReflows`)),{ok:c===0,refused:!1,lines:u}}export{q as a,oe as i,ae as n,Q as r,K as t};
@@ -1 +0,0 @@
1
- export{s as deployCommand}from"./chunk-deploy-DOXu2-8q.js";
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-diagramDefects-7UG_Iwsr.js";import{a as t,i as n,n as r,r as i,t as a}from"./chunk-diagram-BaVwLa4h.js";export{a as applyPlan,r as buildDiagram,e as defectTotal,i as loadDiagram,n as measureDiagram,t as measureRegion};
@@ -1 +0,0 @@
1
- export{t as diffCommand,n as formatCommand}from"./chunk-diff-D1m_eKvv.js";
@@ -1,6 +0,0 @@
1
- import{t as e}from"./chunk-cacheDirectory-7sa0970e.js";import{u as t}from"./chunk-license-x3oHbKe2.js";import{r as n}from"./chunk-translator-BFUJmSkR.js";import{a as r}from"./chunk-features-BfRg2kR5.js";import{n as i}from"./chunk-status-DgeSOz3A.js";import{n as a,r as o,t as s}from"./chunk-table-CJtiXv0e.js";import{r as c}from"./chunk-preferencesFile-F6bAlNrk.js";import{in as l}from"./chunk-src-BLyg_6UX.js";import{a as u,i as d,n as f,r as p,s as m,t as h}from"./chunk-failure-BsimkHy_.js";import{a as g,n as _,o as v,u as y}from"./chunk-load-BVJUBU5S.js";import{r as b,t as x}from"./chunk-context-DPJmldqg.js";import{n as S,r as C}from"./chunk-codeIndex-CzENd6hG.js";import{t as w}from"./chunk-diagrams-6suPQBVQ.js";import{a as T,i as E,n as D,t as O}from"./chunk-commands-CeRlfHY-.js";import{t as ee}from"./chunk-migrate-CVUR1K7f.js";import{i as k,r as A}from"./chunk-help-CFhmAhz8.js";import{t as j}from"./chunk-own-CX-3lIbf.js";import M from"node:path";import{existsSync as N,readFileSync as P,statSync as F,writeFileSync as I}from"node:fs";import{createInterface as L}from"node:readline/promises";function R(e){return e.length>0&&e.every(e=>l(e)===`form`)}function z(e,t,n,r,i,a=[],o=`generate`){switch(e){case`migrate`:return i===`convert`?`migration`:i===`report`?null:n===`sarif`||n===`github`?`ci-annotations`:t.has(`--baseline`)||t.has(`--update-baseline`)?`baseline`:null;case`layout`:return`auto-layout`;case`analyze`:return R(a)?null:`flow-analysis`;case`docs`:return`docs`;case`paths`:return`paths`;case`tests`:return`tests`;case`test`:return a[0]===`task`?`test-runs`:null;case`test-cases`:return t.has(`--generate`)?`test-case-generation`:`test-runs`;case`code`:case`facts`:return`code-links`;case`templates`:return o===`check`?null:`element-templates`;case`edit`:return t.has(`--schema`)?null:`edit`;case`diff`:return t.has(`--images`)?`changes-pictures`:null;case`report`:return`pr-report`;case`bot`:return`bot`;case`check`:return n===`sarif`||n===`github`?`ci-annotations`:r===`flow`?R(a)?null:`flow-analysis`:t.has(`--baseline`)||t.has(`--update-baseline`)?`baseline`:null;default:return null}}const B={check:[`process`,`decision`,`form`],docs:[`process`,`decision`,`form`],deploy:[`process`,`decision`,`form`]},V=[`generate`,`check`],H=[`check`,`paths`,`tests`,`code`,`docs`,`layout`,`deploy`,`fmt`,`convert`,`export`],U={check:[`text`,`json`,`sarif`,`github`],migrate:[`text`,`json`,`sarif`,`github`],doctor:[`text`,`json`],show:[`text`,`json`],code:[`text`,`json`],import:[`text`,`json`],paths:[`text`,`json`,`md`],export:[`svg`,`png`],docs:[`html`,`md`,`docx`,`pdf`]};function W(e,t){if(t instanceof _)throw t;return m(b(e),t)}const G={async show({words:e,format:t}){let r=e[0];if(!r)return{ok:!1,lines:[n(`app.cli.show.needsDiagram`)]};let i=d(r);if(i)return{ok:!1,lines:[i]};try{return await(await import(`./chunk-command-BR4memGJ.js`)).showCommand(r,t===`json`)}catch(e){return{ok:!1,lines:[W(r,e)]}}},async edit({words:e,flags:t,option:r,options:i}){let a=e[0];if(!a)return{ok:!1,lines:[n(`app.cli.edit.needsDiagram`)]};if(t.has(`--schema`))try{return(await import(`./chunk-command-BR4memGJ.js`)).schemaCommand(a)}catch(e){return{ok:!1,lines:[W(a,e)]}}let o=r(`ops`),s=r(`ops-file`),c;if(o!==void 0||s!==void 0)try{c=JSON.parse(o===void 0?P(s===`-`?0:s,`utf8`):o)}catch(e){let t=o===void 0?s===`-`?`--ops-file -`:b(s):`--ops`;return{ok:!1,lines:[f(e)?p(t):h(e)?n(`app.cli.edit.isAFolder`,{from:t}):n(`app.cli.edit.notJson`,{from:t,reason:e instanceof Error?e.message:String(e)}),n(`app.cli.nothingWritten`)]}}else try{c=(await import(`./chunk-command-BR4memGJ.js`)).operationFromWords((await import(`./chunk-command-BR4memGJ.js`)).engineOf(a,P(a,`utf8`)),{words:e.slice(1),option:r,options:i})}catch(e){if(e instanceof _)throw e;return{ok:!1,lines:[u(e)===null?e instanceof Error?e.message:String(e):m(b(a),e),n(`app.cli.nothingWritten`)]}}try{return await(await import(`./chunk-command-BR4memGJ.js`)).applyOperations(a,c,{dryRun:t.has(`--dry-run`),force:t.has(`--force`)})}catch(e){return{ok:!1,lines:[W(a,e),n(`app.cli.nothingWritten`)]}}},async trust({words:e,flags:t}){if(t.has(`--list`)){let e=(await import(`./chunk-trust-u1vZ6Yk0.js`)).trustedProjects(process.env);return e.length===0?{ok:!0,lines:[n(`app.cli.trust.noneTrusted`)]}:{ok:!0,lines:s(e,{columns:[{name:`path`,header:n(`app.cli.trust.headerProject`)},{name:`on`,header:n(`app.cli.trust.headerSince`)}]})}}let r=e[0]??process.cwd();if(!N(r))return{ok:!1,lines:[p(r)]};let a=v(r);if(t.has(`--forget`)){let e=(await import(`./chunk-trust-u1vZ6Yk0.js`)).canonicalProject(a);return(await import(`./chunk-trust-u1vZ6Yk0.js`)).forgetTrust(a,process.env)?{ok:!0,lines:[`${i(`removed`).padEnd(7)} ${e} - ${n(`app.cli.trust.mayNotRun`)}`]}:{ok:!0,lines:[`${i(`kept`).padEnd(7)} ${e} - ${n(`app.cli.trust.notTrustedBefore`)}`]}}let o=K(!0),c=await(await import(`./chunk-trust-u1vZ6Yk0.js`)).trustCommand(a,o,t.has(`--yes`)||o===void 0,process.env);return{ok:c.allowed,lines:c.lines}},async license({words:e}){let[t,...n]=e;return t===`buy`?(await import(`./chunk-account-C8EHysMH.js`)).upgradeCommand(n):t===`login`?(await import(`./chunk-account-C8EHysMH.js`)).loginCommand(n):t===`logout`?(await import(`./chunk-account-C8EHysMH.js`)).logoutCommand():(await import(`./chunk-account-C8EHysMH.js`)).licenseCommand(e)},async update({words:e,option:t}){return(await import(`./chunk-wrapper-Bxz1Lgp5.js`)).updateCommand(process.cwd(),{version:e[0],distribution:t(`distribution`)})},async connectors({words:e,flags:t}){return(await import(`./chunk-connectors-CVfz5pSg.js`)).connectorsCommand(e,t)},async agent({words:e,flags:t,option:r,passthrough:i}){let a=e.slice(0,e.length-i.length);return a[0]===`serve`?a.length===1?(await import(`./chunk-agentServe-4O0syoYQ.js`)).agentServeCommand(r(`project`),void 0,{detach:t.has(`--detach`)}):{ok:!1,lines:[n(`app.cli.agentLaunch.extraWords`,{agent:`serve`})],code:1}:a.length>1?{ok:!1,lines:[n(`app.cli.agentLaunch.extraWords`,{agent:a[0]})],code:1}:(await import(`./chunk-agentLaunch-C5Uo40vv.js`)).launchAgent({agent:a[0],project:r(`project`),passthrough:i,env:process.env,home:c(process.env),cwd:process.cwd()})},async web({words:e,flags:t,option:n}){return(await import(`./chunk-command-BctoT00W.js`)).webCommand(e[0],{port:n(`port`),host:n(`host`),open:!t.has(`--no-open`)})},async init({targets:e,flags:n,option:r}){let i=r(`example`),a=r(`engine`);if(a===void 0&&i===void 0&&process.stdin.isTTY&&process.stdout.isTTY){let t=L({input:process.stdin,output:process.stderr});try{a=await(await import(`./chunk-init-AIh_7yE0.js`)).chooseEngine(v(e[0]),e=>t.question(e))??void 0}finally{t.close()}}return(await import(`./chunk-init-AIh_7yE0.js`)).initCommand(e[0],r(`ci`),n.has(`--hooks`),(await t()).tier===`team`,i,a)},async doctor({targets:e,format:t}){return N(e[0])?(await import(`./chunk-doctor-m0mnVdDE.js`)).doctorCommand(e[0],t===`json`):{ok:!1,lines:[p(e[0])]}},async check({files:e,format:t,flags:n,sections:r}){return D(e,{format:t,baseline:n.has(`--baseline`),updateBaseline:n.has(`--update-baseline`),sections:r})},async paths({files:e,format:t}){return(await import(`./chunk-analyze-Brxlb4U1.js`)).pathsCommand(e,t)},async tests({files:e,option:t}){return(await import(`./chunk-tests-C-kNQNpq.js`)).testsCommand(e,{out:t(`out`),pkg:t(`package`)})},async"test-cases"({targets:e,flags:t,option:r}){let i=Number(r(`timeout`)),a=new AbortController,o=()=>{a.signal.aborted&&process.exit(130),process.stderr.write(`${n(`app.cli.stopping`)}\n`),a.abort()};process.on(`SIGINT`,o),process.on(`SIGTERM`,o);try{return await(await import(`./chunk-testCases-CwQ-Mi7L.js`)).testCasesCommand(e,{signal:a.signal,teamcity:t.has(`--teamcity`),junitXml:r(`junit-xml`),generate:t.has(`--generate`),junit:t.has(`--junit`),stepTimeoutMs:Number.isFinite(i)&&i>0?i*1e3:void 0})}finally{process.off(`SIGINT`,o),process.off(`SIGTERM`,o)}},async test({words:e,flags:t,option:r}){if(e[0]!==`task`)return{ok:!1,lines:[n(`app.cli.test.unknown`)]};let i=(e,t)=>{if(t!==void 0)try{let r=JSON.parse(e===`--variables-file`?P(t===`-`?0:t,`utf8`):t);return typeof r==`object`&&r&&!Array.isArray(r)?r:n(`app.output.taskTest.badVariables`,{flag:e,reason:n(`app.cli.test.notAnObject`)})}catch(t){return n(`app.output.taskTest.badVariables`,{flag:e,reason:t instanceof Error?t.message:String(t)})}},a=i(`--variables`,r(`variables`))??i(`--variables-file`,r(`variables-file`)),o=i(`--complete`,r(`complete`));for(let e of[a,o])if(typeof e==`string`)return{ok:!1,lines:[e]};let s=r(`error`);if([t.has(`--complete`),s!==void 0,t.has(`--hold`)].filter(Boolean).length>1)return{ok:!1,lines:[n(`app.output.taskTest.oneMode`)]};let c=t.has(`--hold`)?{kind:`hold`}:s===void 0?{kind:`complete`,variables:o}:{kind:`error`,errorCode:s},l=Number(r(`timeout`)),u=new AbortController,d=()=>{u.signal.aborted&&process.exit(130),process.stderr.write(`${n(`app.cli.stopping`)}\n`),u.abort()};process.on(`SIGINT`,d),process.on(`SIGTERM`,d);try{return await(await import(`./chunk-taskTest-rng12v_b.js`)).taskTestCommand(e[1],{element:r(`element`),variables:a,mode:c,process:r(`id`),signal:u.signal,stepTimeoutMs:Number.isFinite(l)&&l>0?l*1e3:void 0})}finally{process.off(`SIGINT`,d),process.off(`SIGTERM`,d)}},async migrate({action:e,targets:t,format:n,flags:r,option:i}){let a=t.filter(e=>!N(e));return a.length>0?{ok:!1,lines:a.map(e=>p(e))}:(await import(`./chunk-migrate-CLQ-hrae.js`)).migrateCommand(e??`analyze`,t,{format:n,failOn:i(`fail-on`)===`warning`?`warning`:`error`,baseline:r.has(`--baseline`),updateBaseline:r.has(`--update-baseline`),dryRun:r.has(`--dry-run`),verbose:r.has(`--verbose`),out:i(`out`),target:i(`target`)})},async code({targets:e,files:t,format:n}){return(await import(`./chunk-codeLinks-DLxEBWPi.js`)).codeCommand(x(e[0]).root,t,n)},async facts(){return(await import(`./chunk-facts-DA3Y-k9a.js`)).factsCommand(await(await import(`./chunk-facts-DA3Y-k9a.js`)).readStandardInput())},async templates({words:e,templateAction:t}){let n=e.find(e=>!V.includes(e));return(await import(`./chunk-templates-Bxe3J0qy.js`)).templatesCommand(n??process.cwd(),t)},async share({words:e,option:t}){return(await import(`./chunk-share-YSewfw3F.js`)).shareCommand(e[0],t(`out`))},async import({words:e,flags:t,format:n,option:r}){return(await import(`./chunk-importCommand-5SJxu2k4.js`)).importCommand(e[0],r(`out`),{force:t.has(`--force`),json:n===`json`})},async docs({files:e,format:t,option:n}){return(await import(`./chunk-docs-CwY3Ce9M.js`)).docsCommand(e,n(`out`),t===`text`?`html`:t)},async layout({files:e,flags:t}){let n=t.has(`--write`),r=n?e.flatMap(e=>{try{return[[e,P(e)]]}catch{return[]}}):[];try{return await E(e,n)}finally{for(let[e,t]of r)N(e)||I(e,t)}},async deploy({files:e,flags:t}){return(await import(`./chunk-deploy-C4KJK-tw.js`)).deployCommand(e,t.has(`--dry-run`),t.has(`--wait`))},async export({files:e,format:t,option:n}){return(await import(`./chunk-export-9AWsr5ai.js`)).exportCommand(e,t,n(`out`))},async report({targets:e,option:t}){return(await import(`./chunk-pr-tC3-PSNM.js`)).reportCommand(e[0],{base:t(`base`)??`origin/main`,out:t(`out`)??`penstock-report.md`,imagesDir:t(`images-dir`)??`.penstock/images`,imageBase:t(`image-base`),imagesLink:t(`images-link`)})},async bot({targets:e,option:t}){let r=t(`stage`);return r&&r!==`draw`&&r!==`post`?{ok:!1,lines:[n(`app.cli.bot.unknownStage`,{stage:r})]}:(await import(`./chunk-bot-I4kuhjyv.js`)).botCommand(e[0],r)},async fmt({files:e,flags:t}){return(await import(`./chunk-diff-BC8gZX5w.js`)).formatCommand(e,t.has(`--write`))},async convert({files:e,flags:t,option:n}){return(await import(`./chunk-convert-B1sgT9kl.js`)).convertCommand(e,n(`to`),t.has(`--write`))},async diff({words:e,flags:t,option:n}){return e.length===2&&e.every(e=>N(e)&&F(e).isFile())?(await import(`./chunk-diff-BC8gZX5w.js`)).diffCommand(e[0],e[1]):(await import(`./chunk-review-BqZSohXR.js`)).againstCommand(process.cwd(),e.slice(1).flatMap(e=>w(e,[`process`,`decision`,`form`])),{base:e[0]??`HEAD~1`,images:t.has(`--images`),outDir:n(`out`)??`.penstock/images`})}};function K(e){if(e&&process.stdin.isTTY===!0&&process.stderr.isTTY===!0)return async e=>{let t=L({input:process.stdin,output:process.stderr});try{return await t.question(e)}finally{t.close()}}}const q=/* @__PURE__ */ new Set([`mcp`,`web`,`agent`]);async function J(t,i){if(C({workers:q.has(t.command)?1:S,cacheDirectory:e(),remember:!1}),t.command===`mcp`){if(t.flags.has(`--config`))return process.stderr.write(`${n(`app.cli.mcpConfigHint`)}\n`),process.stdout.write(`${(await import(`./chunk-mcp-ByMCWlXC.js`)).mcpConfig()}\n`),0;let e=t.option(`project`);if(e!==void 0){let t=M.resolve(e);if(!N(t))return process.stderr.write(`${p(t)}\n`),1;if(!F(t).isDirectory())return process.stderr.write(`${n(`app.cli.web.notAFolder`,{folder:t})}\n`),1}return(await import(`./chunk-mcp-ByMCWlXC.js`)).mcpCommand(e??null)}let s=t.option(`profile`);s&&(process.env.PENSTOCK_PROFILE=s),k(i);let c=t.option(`format`)??`text`,l=t.words,u=t.command===`migrate`?ee.includes(l[0])?l[0]:`analyze`:void 0,d=t.command===`migrate`&&l[0]===u?l.slice(1):l,f=t.option(`only`),m=T(f),h=m.unknown??(f!==void 0&&m.sections.length===0?JSON.stringify(f.trim()):void 0);if(h!==void 0)return process.stderr.write(`${n(`app.cli.checkUnknownSection`,{section:h,sections:O.join(`, `)})}\n`),1;let g=j(U,t.command),_=t.option(`format`);if(g&&_!==void 0&&!g.includes(_))return process.stderr.write(`${n(`app.cli.badFormat`,{value:_,values:g.join(`, `)})}\n`),2;let v=t.option(`fail-on`);if(v!==void 0&&v!==`error`&&v!==`warning`)return process.stderr.write(`${n(`app.cli.badFailOn`,{value:v})}\n`),1;let y=t.option(`timeout`);if(y!==void 0&&!(Number.isFinite(Number(y))&&Number(y)>0))return process.stderr.write(`${n(`app.cli.badTimeout`)}\n`),1;let b=l.find(e=>V.includes(e)),x=t.flags.has(`--check`)?`check`:b??`generate`,E=z(t.command,t.flags,c,f,u,d,x),D=E?await r(E):null;if(D)return process.stderr.write(`${(a()?D.lines.map(o):D.lines).join(`
2
- `)}\n`),1;let P=d.length>0?d:[process.cwd()],I=H.includes(t.command);if(I){let e=P.filter(e=>!N(e));if(e.length>0)return process.stderr.write(`${e.map(e=>p(e)).join(`
3
- `)}\n`),1}let L=I?P.flatMap(e=>w(e,j(B,t.command))):[];if(I&&L.length===0)return process.stderr.write(`${n(`app.cli.noDiagrams`,{paths:P.join(`, `)})}\n`),1;t.command!==`doctor`&&te(P);let R={check:`Check`,layout:`Layout`,deploy:`Deploy`}[t.command],W=K(t.command===`trust`||R!==void 0),J=t.flags.has(`--trust-project`),Y=R?await(await import(`./chunk-stages-C-nhLoBW.js`)).runHook(P[0],`pre`,R,L,W,process.env,J):{ran:!1,ok:!0,lines:[]};if(!Y.ok)return process.stderr.write(`${[...Y.lines,n(`app.cli.preHookStopped`,{stage:R})].join(`
4
- `)}\n`),1;let X=j(G,t.command);if(!X)return process.stderr.write(`${n(`app.cli.unknownCommand`,{command:t.command})}\n\n${A()}`),1;let Z=await X({command:t.command,action:u,words:d,targets:P,files:L,format:c,sections:m.sections,templateAction:x,passthrough:(await import(`./chunk-agentLaunch-C5Uo40vv.js`)).passthroughOf(t.tokens),flags:t.flags,option:t.option,options:t.options}),Q=R&&Z.ok?await(await import(`./chunk-stages-C-nhLoBW.js`)).runHook(P[0],`post`,R,L,W,process.env,J):{ran:!1,ok:!0,lines:[]},$=[...Y.lines,...Z.lines],ne=![`json`,`sarif`,`github`].includes(c)&&a(),re=Z.refused??!Z.ok;return $.length>0&&(re?process.stderr:process.stdout).write(`${(ne?$.map(o):$).join(`
5
- `)}\n`),Q.ok||process.stderr.write(`${[...Q.lines,n(`app.cli.postHookStopped`,{stage:R})].join(`
6
- `)}\n`),Z.code??(Z.ok&&Q.ok?0:1)}function te(e){let t=/* @__PURE__ */ new Set;for(let n of e){let e;try{e=x(n)}catch{continue}for(let{file:n,problems:r}of g(e.files))if(!t.has(n)){t.add(n);for(let e of r)process.stderr.write(`${y(e,b(n))}\n`)}}}export{J as dispatch};
@@ -1 +0,0 @@
1
- export{n as exportCommand}from"./chunk-export-D5kPD4Or.js";
@@ -1 +0,0 @@
1
- export{t as allows,s as upsell}from"./chunk-features-BfRg2kR5.js";
@@ -1 +0,0 @@
1
- export{t as FolderTooLarge}from"./chunk-folders-13vx0i0n.js";
@@ -1 +0,0 @@
1
- import{r as e}from"./chunk-translator-BFUJmSkR.js";import{X as t,Z as n,y as r}from"./chunk-src-BLyg_6UX.js";const i=/* @__PURE__ */ new Set([`expression`]),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=e=>typeof e==`string`?e.trim():``,s=e=>Array.isArray(e.components)?e.components.filter(a):null,c=e=>t(`form`,e);function l(t){let n=o(t.label);if(n)return`"${n}"`;let r=o(t.key),i=o(t.id);return e(`app.rules.form.unnamedField`,{type:typeof t.type==`string`?t.type:`field`,key:r?` ${r}`:``,id:r||!i?``:` ${i}`})}function u(t){let u=a(t)?t:{},d=e=>typeof e.id==`string`?e.id:``,f=[],p=/* @__PURE__ */ new Map,m=/* @__PURE__ */ new Map,h=(t,n,a,u)=>{if(!(u>200))for(let g of t){let t=typeof g.type==`string`?g.type:``,_=s(g);if(_){let e=o(g.path),r=e?e.split(`.`):[],i=[...n,...r];r.length>0&&m.set(`${a}|${i.join(`.`)}`,g),h(_,t===`dynamiclist`?[]:i,t===`dynamiclist`?`${a}/${i.join(`.`)}`:a,u+1);continue}if(!r.has(t))continue;let v=o(g.key);if(!v){f.push({kind:`NO-KEY`,title:c(`NO-KEY`),detail:e(`app.rules.form.noKey`,{field:l(g)}),ids:d(g)?[d(g)]:[]});continue}let y=[...n,...v.split(`.`)].join(`.`),b=`${a}|${y}`;p.set(b,[...p.get(b)??[],{component:g}]),!i.has(t)&&!o(g.label)&&f.push({kind:`NO-LABEL`,title:c(`NO-LABEL`),detail:e(`app.rules.form.noLabel`,{type:t,variable:y}),ids:d(g)?[d(g)]:[]});let x=Array.isArray(g.values)?g.values.filter(e=>typeof e==`object`&&!!e):[],S=/* @__PURE__ */ new Map;x.forEach(e=>{let t=JSON.stringify(e.value)??`undefined`;S.set(t,(S.get(t)??0)+1)});let C=[...S.entries()].filter(([,e])=>e>1).map(([e])=>e);C.length>0&&f.push({kind:`REPEATED-OPTION`,title:c(`REPEATED-OPTION`),detail:e(`app.rules.form.repeatedOption`,{field:l(g),values:C.join(`, `)}),ids:d(g)?[d(g)]:[]})}};h(s(u)??[],[],``,0);for(let[t,r]of p){let i=t.split(`|`)[1];r.length>1&&f.push({kind:`KEY-CLASH`,title:c(`KEY-CLASH`),detail:e(`app.rules.form.keyClash`,{fields:n(r.map(({component:e})=>l(e))),all:r.length===2?`both`:`all`,variable:i}),ids:r.map(({component:e})=>d(e)).filter(Boolean)})}for(let[t,n]of m){let[r,i]=t.split(`|`),a=i.split(`.`);for(let t=1;t<=a.length;t+=1){let i=a.slice(0,t).join(`.`),o=p.get(`${r}|${i}`)?.[0];o&&f.push({kind:`KEY-CLASH`,title:c(`KEY-CLASH`),detail:e(`app.rules.form.keyClashGroup`,{field:l(o.component),variable:i,group:l(n)}),ids:[d(o.component),d(n)].filter(Boolean)})}}return f}export{u as t};
@@ -1,85 +0,0 @@
1
- import{a as e,n as t,o as n,r}from"./chunk-translator-BFUJmSkR.js";import{r as i,t as a}from"./chunk-preferencesFile-F6bAlNrk.js";import{t as o}from"./chunk-docs-CY6ICsip.js";import{parseArgs as s}from"node:util";function c(t,r,i=void 0){let{values:a}=s({args:t,strict:!1,options:{lang:{type:`string`,multiple:!0}}}),o=(a.lang??[]).find(e=>typeof e==`string`);return o&&!o.startsWith(`--`)?n(o):i?n(i):e(r)}function l(e){return new a(i(e)).read().locale??null}function u(e,n=process.env){let r=c(e,n,l(n));return t(r),r}function d(e,t=27){let[n,...i]=r(e).split(`
2
- `);return[n,...i.map(e=>`${` `.repeat(t)}${e}`)].join(`
3
- `)}function f(){return`penstock <command> [paths...]
4
-
5
- init ${d(`app.cli.usage.init`)}
6
- doctor ${d(`app.cli.usage.doctor`)}
7
- check ${d(`app.cli.usage.check`)}
8
- migrate [analyze|convert|report] ${d(`app.cli.usage.migrate`)}
9
- code ${d(`app.cli.usage.code`)}
10
- facts ${d(`app.cli.usage.facts`)}
11
- templates generate ${d(`app.cli.usage.templatesGenerate`)}
12
- scenarios list ${d(`app.cli.usage.scenariosList`)}
13
- scenarios run ${d(`app.cli.usage.scenariosRun`)}
14
- scenarios generate ${d(`app.cli.usage.scenariosGenerate`)}
15
- test task <file> ${d(`app.cli.usage.testTask`)}
16
- test-cases ${d(`app.cli.usage.testCases`)}
17
- junit ${d(`app.cli.usage.junit`)}
18
- layout ${d(`app.cli.usage.layout`)}
19
- fmt ${d(`app.cli.usage.fmt`)}
20
- convert --to operaton ${d(`app.cli.usage.convert`)}
21
- diff <before> <after> ${d(`app.cli.usage.diffTwoFiles`)}
22
- diff [<ref>] [paths] ${d(`app.cli.usage.diffWorkingTree`)}
23
- export ${d(`app.cli.usage.export`)}
24
- share <file> ${d(`app.cli.usage.share`)}
25
- import <file> ${d(`app.cli.usage.import`)}
26
- docs ${d(`app.cli.usage.docs`)}
27
- report ${d(`app.cli.usage.report`)}
28
- bot ${d(`app.cli.usage.bot`)}
29
- deploy ${d(`app.cli.usage.deploy`)}
30
- show <file> ${d(`app.cli.usage.show`)}
31
- edit <file> <change> ${d(`app.cli.usage.edit`)}
32
- license [status|key] ${d(`app.cli.usage.license`)}
33
- trust [path] ${d(`app.cli.usage.trust`,28)}
34
- license buy [pro|team] ${d(`app.cli.usage.licenseBuy`)}
35
- license login [email] ${d(`app.cli.usage.licenseLogin`)}
36
- license activate <key> ${d(`app.cli.usage.licenseActivate`)}
37
- license logout ${d(`app.cli.usage.licenseLogout`)}
38
- mcp ${d(`app.cli.usage.mcp`)}
39
- connectors [resolve <id> [version]] ${d(`app.cli.usage.connectors`)}
40
- update [version] ${d(`app.cli.usage.update`)}
41
- web [folder] ${d(`app.cli.usage.web`)}
42
- agent [name] [-- args] ${d(`app.cli.usage.agentLaunch`)}
43
- agent serve --project <dir> [--detach] ${d(`app.cli.usage.agentServe`,32)}
44
-
45
- ${r(`app.cli.usage.optionsHeading`)}
46
- --profile <name> ${d(`app.cli.usage.profile`)}
47
- --lang <tag> ${d(`app.cli.usage.lang`)}
48
- --refresh ${d(`app.cli.usage.refresh`)}
49
- --format <text|json|sarif|github|md> ${d(`app.cli.usage.format`)}
50
- --only <sections> ${d(`app.cli.usage.only`)}
51
- --baseline ${d(`app.cli.usage.baseline`)}
52
- --update-baseline ${d(`app.cli.usage.updateBaseline`)}
53
- --write ${d(`app.cli.usage.write`)}
54
- --force ${d(`app.cli.usage.force`)}
55
- --dry-run ${d(`app.cli.usage.dryRun`)}
56
- --wait ${d(`app.cli.usage.wait`)}
57
- --ci <github|gitea|gitlab|bitbucket|azure> ${d(`app.cli.usage.ci`)}
58
- --out <dir> ${d(`app.cli.usage.out`)}
59
- --base <ref> ${d(`app.cli.usage.base`)}
60
- --image-base <url> ${d(`app.cli.usage.imageBase`)}
61
- --images-link <url> ${d(`app.cli.usage.imagesLink`)}
62
- --images ${d(`app.cli.usage.images`)}
63
- --images-dir <dir> ${d(`app.cli.usage.imagesDir`)}
64
- --distribution <spec> ${d(`app.cli.usage.distribution`)}
65
- --stage <draw|post> ${d(`app.cli.usage.stage`)}
66
- --target <version> ${d(`app.cli.usage.target`)}
67
- --fail-on <error|warning> ${d(`app.cli.usage.failOn`)}
68
- --verbose ${d(`app.cli.usage.verbose`)}
69
- --hooks ${d(`app.cli.usage.hooks`)}
70
- --trust-project ${d(`app.cli.usage.trustProject`)}
71
- --teamcity ${d(`app.cli.usage.teamcity`)}
72
- --junit-xml <file> ${d(`app.cli.usage.junitXml`)}
73
- --timeout <seconds> ${d(`app.cli.usage.timeout`)}
74
- --port <port> ${d(`app.cli.usage.port`)}
75
- --host <address> ${d(`app.cli.usage.host`)}
76
- --no-open ${d(`app.cli.usage.noOpen`)}
77
-
78
- ${r(`app.cli.usage.pathsNote`)}
79
-
80
- ${r(`app.cli.usage.helpNote`)}
81
-
82
- ${r(`app.cli.usage.guideNote`,{url:o})}
83
- `}const p={flag:`--profile <name>`,text:`use this profile, as PENSTOCK_PROFILE would`,key:`option.profile`},m=`part of Penstock Pro, and Team in a pipeline`,h=`Free. With these it is `+m+`:`;function g(e){return{...e,options:e.every===!1?e.options:[...e.options,p]}}const _=[{flag:`--format <format>`,text:`text, json, sarif or github`},{flag:`--out <dir>`,text:`where the report, or the converted files, are written`},{flag:`--dry-run`,text:`say what would be written and write nothing`},{flag:`--target <version>`,text:`the Camunda 8 version to convert for, 8.8 by default`},{flag:`--fail-on <error|warning>`,text:`what makes the exit code 1: error, or warning`},{flag:`--baseline`,text:`fail only on findings the baseline does not already accept`},{flag:`--update-baseline`,text:`write the current findings as the baseline`},{flag:`--verbose`,text:`list and annotate what only carries over as it is`}],v=`2 the CLI itself failed, not the command; the message says what`,y=[`0 the run finished with no failing case`,`1 a case failed, or the engine could not be reached`,v,`130 Ctrl-C twice: the case is cancelled, its build removed, and the run stops`],b=[g({name:`init`,usage:`penstock init [folder] [--engine camunda-8|camunda-7|operaton|cib-seven|flowable|activiti|classic] [--ci github|gitea|gitlab|bitbucket|azure] [--hooks]`,summary:`Write a penstock.yaml for this project: the engine it runs on, the rules, the profiles and the deployment. Asked in a terminal when the folder is empty and nothing says otherwise.`,options:[{flag:`--engine <name>`,text:`camunda-8, camunda-7, operaton, cib-seven, flowable, activiti or classic`},{flag:`--example <name>`,text:`camunda-8 or camunda-7, to write a small runnable project into an empty folder`},{flag:`--ci <name>`,text:`github, gitea, gitlab, bitbucket or azure: write a pipeline for the tier this machine has`},{flag:`--hooks`,text:`install a pre-commit hook that formats and checks staged diagrams`}],example:`penstock init --engine camunda-8`,licence:`Free.`,exits:[`0 the file was written`,`1 the folder could not be written, or the file is already there`,v]}),g({name:`doctor`,usage:`penstock doctor [folder] [--format json]`,summary:`Check the setup: which configuration layers are in force, which profiles, rules, element templates and engine.`,options:[{flag:`--format <text|json>`,text:`json prints the configuration as it resolved, for a tool to read`}],example:`penstock doctor --format json`,licence:`Free.`,exits:[`0 the setup was read`,`1 something in it could not be read, and the answer says what`,v]}),g({name:`check`,usage:`penstock check [paths...] [--only drawing,rules,flow] [--format text|json|sarif|github] [--baseline] [--update-baseline]`,summary:`Everything wrong with the diagrams, in sections: the drawing itself, the bpmnlint rules and, on Pro, how the processes, decisions and forms actually run.`,options:[{flag:`--only <sections>`,text:`which parts to run: drawing, rules, flow`},{flag:`--format <format>`,text:`text, json, sarif or github; sarif and github are for a code review`},{flag:`--baseline`,text:`fail only on findings the baseline does not already accept`},{flag:`--update-baseline`,text:`write the current findings as the baseline`},{flag:`--trust-project`,text:`let this project's penstock.yaml run its hooks for this run, without writing anything down`}],example:`penstock check --only rules src/orders`,licence:`${h}\n --only flow flow analysis, the deadlocks and the branches that run twice\n --baseline a baseline of findings that are already accepted\n --format sarif|github the findings as annotations on the changed lines`,exits:[`0 nothing was found, or everything found is in the baseline`,`1 something was found that a person can act on`,v]}),g({name:`migrate analyze`,usage:`penstock migrate analyze [paths...] [--format text|json|sarif|github] [--baseline] [--update-baseline]`,summary:`Read the Camunda 7 diagrams and say what does not carry over to Camunda 8, and why.`,options:_,example:`penstock migrate analyze src/orders`,licence:`${h}\n --baseline a baseline of findings that are already accepted\n --format sarif|github the findings as annotations on the changed lines`,exits:[`0 nothing would be lost, or everything lost is in the baseline`,`1 something would be lost`,v]}),g({name:`migrate convert`,usage:`penstock migrate convert [paths...] [--target 8.5..8.9] [--out <dir>] [--dry-run]`,summary:`Write the Camunda 8 files into a camunda-8 folder next to the one given, with a penstock.yaml of their own. Nothing else in the project is touched.`,options:_,example:`penstock migrate convert --target 8.8 --dry-run src/orders`,licence:`The conversion is ${m}. Reading it with migrate analyze, and the report, are free.`,exits:[`0 the files were written, or --dry-run found nothing to write`,`1 something could not be converted, and the answer says which`,v]}),g({name:`migrate report`,usage:`penstock migrate report [paths...] [--out <dir>]`,summary:`Write the migration report to hand on: what each diagram became, and what did not come across.`,options:_,example:`penstock migrate report --out docs`,licence:`Free.`,exits:[`0 the report was written`,`1 it could not be written, and the answer says where it tried`,v]}),g({name:`code`,usage:`penstock code [paths...] [--format text|json]`,summary:`Check the diagrams against the code: job types, topics, classes and beans with nothing to run them, and workers no diagram uses.`,options:[{flag:`--format <text|json>`,text:`how the findings are reported`}],example:`penstock code src/orders`,licence:`Diagram and code checks are ${m}.`,exits:[`0 every worker and every reference lines up`,`1 something does not, and the answer names it`,v]}),g({name:`facts`,usage:`penstock facts < files.json`,summary:`Read a list of files on standard input, as {"files": [{"path": "...", "text": "..."}]}, and print the worker contracts they hold as JSON, for the editor to read the Python, Go, C# and Scala workers it cannot read itself.`,options:[],example:`penstock facts < files.json`,licence:`Code links are ${m}.`,exits:[`0 the contracts were printed`,`1 the input is not a list of files`,v]}),g({name:`templates generate`,usage:`penstock templates generate [folder]`,summary:`Write an element template for every job worker the project has, into .camunda/element-templates, so the Camunda palette fills itself in.`,options:[{flag:`--check`,text:`check instead of write: the same as templates check, and writes nothing`}],example:`penstock templates generate`,licence:`Writing element templates is ${m}.`,exits:[`0 every worker has a template`,`1 a worker could not be written, and the answer names it`,v]}),g({name:`templates check`,usage:`penstock templates check [folder]`,summary:`Check that every element template still says what its job worker asks for, and that every worker has one. Writes nothing.`,options:[{flag:`--check`,text:`what templates generate takes to do this instead of writing`}],example:`penstock templates check`,licence:`Free.`,exits:[`0 every template still matches its worker`,`1 a template has drifted, and the answer says how`,v]}),g({name:`scenarios list`,usage:`penstock scenarios list [paths...] [--format text|json|md]`,summary:`List every distinct way through each process, with the conditions it takes. This is a test plan.`,options:[{flag:`--format <text|json|md>`,text:`how the scenarios are listed; md is a page a person reads`}],example:`penstock scenarios list --format md`,licence:`Process scenarios are ${m}.`,exits:[`0 the scenarios were listed`,`1 a process could not be read, and the answer names it`,v]}),g({name:`scenarios run`,usage:`penstock scenarios run [paths...] [--timeout <seconds>] [--junit-xml <file>] [--junit] [--teamcity]`,summary:`Run the Camunda test-case files of the diagrams against the engine they name, step by step, with the mocks the file asks for.`,options:[{flag:`--timeout <seconds>`,text:`how long one step may take, 30 by default`},{flag:`--junit-xml <file>`,text:`where a JUnit XML report is written`},{flag:`--junit`,text:`write a Camunda Process Test class that runs them instead`},{flag:`--teamcity`,text:`report as TeamCity service messages, as the IDE reads them`}],example:`penstock scenarios run --junit-xml target/scenarios.xml`,licence:`Running a process against an engine is ${m}.`,exits:y}),g({name:`test task`,usage:`penstock test task <file.bpmn> --element <id> [--variables <json>] [--complete <json> | --error <code> | --hold] [--id <process>] [--timeout <seconds>]`,summary:`Run one element of a diagram on the engine the project names. The process is deployed as a test build, an instance is started with the variables, the path to the element is completed or mocked, and the element is completed, made to throw an error or left waiting. Its variables, incidents and state are printed, and the build is removed afterwards.`,options:[{flag:`--element <id>`,text:`the element to test`},{flag:`--variables <json>`,text:`variables the instance starts with, over the ones the path needs`},{flag:`--variables-file <file>`,text:`the same variables, read from a JSON file`},{flag:`--complete <json>`,text:`complete the element with these variables, which is the default with none`},{flag:`--error <code>`,text:`make the element throw this BPMN error instead of completing`},{flag:`--hold`,text:`leave the element waiting, to see what it received`},{flag:`--id <process>`,text:`which process, when the file holds more than one`},{flag:`--timeout <seconds>`,text:`how long one step may take, 30 by default`}],example:`penstock test task orders.bpmn --element Approve --variables '{"order": "A-1"}'`,licence:`Running a process against an engine is ${m}.`,exits:y}),g({name:`test-cases`,usage:`penstock test-cases [paths...] [--generate] [--junit] [--junit-xml <file>] [--timeout <seconds>] [--teamcity]`,summary:`The command behind scenarios run and scenarios generate: run the Camunda test-case files of the diagrams against the engine they name, step by step, with the mocks the file asks for. --generate writes those files from the ways through each process instead.`,options:[{flag:`--generate`,text:`write the test-case files from the ways through each process, instead of running them`},{flag:`--junit`,text:`write a Camunda Process Test class that runs them instead`},{flag:`--junit-xml <file>`,text:`where a JUnit XML report is written`},{flag:`--timeout <seconds>`,text:`how long one step may take, 30 by default`},{flag:`--teamcity`,text:`report as TeamCity service messages, as the IDE reads them`}],example:`penstock test-cases --junit-xml target/scenarios.xml`,licence:`Running a process against an engine, and writing its test-case files, is ${m}.`,exits:y}),g({name:`scenarios generate`,usage:`penstock scenarios generate [paths...]`,summary:`Write the Camunda test-case files from the ways through each process, which scenarios run then plays back against an engine.`,options:[{flag:`--timeout <seconds>`,text:`how long one step may take, 30 by default`},{flag:`--junit-xml <file>`,text:`where a JUnit XML report is written`},{flag:`--teamcity`,text:`report as TeamCity service messages, as the IDE reads them`}],example:`penstock scenarios generate src/orders`,licence:`Writing test-case files is ${m}.`,exits:y}),g({name:`junit`,usage:`penstock junit [paths...] [--out <dir>] [--package <name>]`,summary:`Write a JUnit test for every way through each process, with the variables that take it there, for Camunda Process Test or camunda-bpm-assert.`,options:[{flag:`--out <dir>`,text:`where the tests are written`},{flag:`--package <name>`,text:`the package the tests are written in`}],example:`penstock junit --out src/test/java --package com.acme.orders`,licence:`Process tests are ${m}.`,exits:[`0 the tests were written`,`1 a test could not be written, and the answer names the process`,v]}),g({name:`layout`,usage:`penstock layout [paths...] [--write]`,summary:`Lay the diagrams out as a readable left-to-right flow, whatever they were drawn like.`,options:[{flag:`--write`,text:`save what was laid out; without it the answer is the plan and the file is untouched`},{flag:`--trust-project`,text:`let this project's penstock.yaml run its hooks for this run, without writing anything down`}],example:`penstock layout --write src/orders`,licence:`Auto layout is ${m}.`,exits:[`0 the diagrams do not overlap and nothing runs through a shape`,`1 a diagram could not be laid out, and the answer says which`,v]}),g({name:`fmt`,usage:`penstock fmt [paths...] [--write]`,summary:`Rewrite the XML the way the editor saves it, so a diff of a diagram stays readable.`,options:[{flag:`--write`,text:`save the result; without it the answer is the diff and the file is untouched`}],example:`penstock fmt --write src/orders`,licence:`Free.`,exits:[`0 every file is already formatted, or was`,`1 a file could not be parsed, and the answer names it`,v]}),g({name:`convert`,usage:`penstock convert [paths...] --to operaton [--write]`,summary:`Move a Camunda 7 or CIB seven diagram to the Operaton namespace, so an Operaton project reads it. Without --write the answer is the list and the files are untouched.`,options:[{flag:`--to operaton`,text:`the engine the diagrams are converted to; operaton is the only one`},{flag:`--write`,text:`save the converted diagrams; without it nothing is written`}],example:`penstock convert --to operaton --write src/orders`,licence:`Free.`,exits:[`0 every diagram is in the Operaton namespace, or was made so`,`1 a file could not be read, and the answer names it`,v]}),g({name:`diff`,usage:`penstock diff <before> <after> | penstock diff [<ref>] [paths...] [--images]`,summary:`What changed between two versions of a process: two files, or what the working tree changed since a commit, a branch or a tag.`,options:[{flag:`--images`,text:`render before and after, with the changes coloured`},{flag:`--out <dir>`,text:`where the pictures are written`}],example:`penstock diff HEAD~1 --images`,licence:`Free. The pictures with --images are `+m+`.`,exits:[`0 nothing changed`,`1 something did, and the answer lists it`,v]}),g({name:`export`,usage:`penstock export [paths...] [--format svg|png] [--out <dir>]`,summary:`Render the diagrams as pictures, one file per diagram.`,options:[{flag:`--format <svg|png>`,text:`svg or png; the format the export is asked for`},{flag:`--out <dir>`,text:`where the pictures are written`}],example:`penstock export --format png --out docs/diagrams`,licence:`Free.`,exits:[`0 every diagram was written`,`1 a diagram could not be rendered, and the answer names it`,v]}),g({name:`share`,usage:`penstock share <file> [--out <file.html>]`,summary:`One HTML file to send: a read-only viewer with zoom, pan and the documentation of each element. It opens offline, with nothing else on the page.`,options:[{flag:`--out <file.html>`,text:`the file to write; -o is the same`}],example:`penstock share src/orders/order.bpmn -o order.html`,licence:`Free.`,exits:[`0 the file was written`,`1 it could not be written, and the answer says where it tried`,v]}),g({name:`import`,usage:`penstock import <file> [--out <file.bpmn>] [--force] [--format text|json]`,summary:`Turn a draw.io, Visio, Signavio or Bizagi diagram into BPMN 2.0, and list what could not be mapped.`,options:[{flag:`--out <file.bpmn>`,text:`the file to write; -o is the same`},{flag:`--force`,text:`replace a file that is already there`},{flag:`--format <text|json>`,text:`json reports what could not be mapped as a document a tool can read`}],example:`penstock import legacy.drawio -o order.bpmn`,licence:`Free.`,exits:[`0 the diagram was written`,`1 something could not be mapped, and the answer says what`,v]}),g({name:`docs`,usage:`penstock docs [paths...] [--format html|md|docx|pdf] [--out <dir>]`,summary:`Write documentation for every process, decision file and form: a page each, with the picture, the steps, the decisions, the events and the data.`,options:[{flag:`--format <html|md|docx|pdf>`,text:`html, md, docx or pdf`},{flag:`--out <dir>`,text:`where the pages are written`}],example:`penstock docs --format docx --out docs/processes`,licence:`Process documentation is ${m}.`,exits:[`0 the pages were written`,`1 a page could not be written, and the answer names it`,v]}),g({name:`report`,usage:`penstock report [folder] [--base <ref>] [--out <file.md>] [--images-dir <dir>]`,summary:`One markdown comment for a pull request: the check, the diff and a picture of every diagram that changed.`,options:[{flag:`--base <ref>`,text:`what the report compares against, origin/main by default`},{flag:`--out <file>`,text:`where the markdown is written`},{flag:`--images-dir <dir>`,text:`where the pictures are written`},{flag:`--image-base <url>`,text:`where the pictures will be served from, for a comment that shows them`},{flag:`--images-link <url>`,text:`where to find them instead, when they cannot be shown inline`}],example:`penstock report --base origin/main --out penstock-report.md`,licence:`Pull request reports are ${m}.`,exits:[`0 the report was written`,`1 it could not be written, and the answer says where it tried`,v]}),g({name:`bot`,usage:`penstock bot [folder] [--stage draw|post]`,summary:`Answer in a pull or merge request, from the CI run it is in. penstock init --ci sets the pipeline up.`,options:[{flag:`--stage <draw|post>`,text:`draw the pictures now and post later, when they are uploaded between`}],example:`penstock bot --stage draw`,licence:`The review bot is ${m}.`,exits:[`0 the answer was posted, or the pictures were drawn`,`1 it could not be, and the answer says why`,v]}),g({name:`deploy`,usage:`penstock deploy [paths...] [--dry-run] [--wait]`,summary:`Deploy the processes, decisions and forms to the engine the configuration names.`,options:[{flag:`--dry-run`,text:`say what would be sent, and send nothing`},{flag:`--wait`,text:`confirm with the engine that the definitions are live`},{flag:`--trust-project`,text:`let this project's penstock.yaml run its hooks for this run, without writing anything down`}],example:`penstock deploy --dry-run src/orders`,licence:`Free.`,exits:[`0 the engine took the deployment`,`1 it did not, and the answer says what it said`,v]}),g({name:`show`,usage:`penstock show <file> [--format text|json]`,summary:`List a diagram's elements, flows and properties, for a person or for a tool to read.`,options:[{flag:`--format <text|json>`,text:`json is the same document a tool reads`}],example:`penstock show src/orders/order.bpmn --format json`,licence:`Free.`,exits:[`0 the diagram was read`,`1 it is not a diagram, or not there, and the answer says which`,v]}),g({name:`edit`,usage:`penstock edit <file> <add|connect|set|remove> ... [--ops <json>] [--ops-file <file|->] [--schema]`,summary:`Add, connect, set or remove in a diagram the way the editor would, and refuse an edit that would break it.`,options:[{flag:`--ops <json>`,text:`the operations as JSON on one line`},{flag:`--ops-file <file>`,text:`the operations as JSON in a file, or - to read them from standard input`},{flag:`--schema`,text:`print the contract the operations follow, and change nothing`},{flag:`--after <id>`,text:`add after this element, the way the editor places a new one`},{flag:`--event <type>`,text:`the event type to add`},{flag:`--name <text>`,text:`the name of the element that is added, connected or set`},{flag:`--id <id>`,text:`the id of the element to set or remove`},{flag:`--condition <text>`,text:`the condition of a sequence flow that is connected`},{flag:`--set <name=value>`,text:`an attribute to set, more than once`},{flag:`--input <name>=<value>`,text:`an input mapping, more than once`},{flag:`--output <name>=<value>`,text:`an output mapping, more than once`},{flag:`--dry-run`,text:`say what would change and write nothing`},{flag:`--force`,text:`write even when the edit would break the diagram`}],example:`penstock edit src/orders/order.bpmn add service-task --after Task_check --name Ship`,licence:`Editing from the command line is ${m}. Reading the contract with --schema is free.`,exits:[`0 the diagram was changed, or --dry-run found nothing to change`,`1 the edit would break the diagram, or could not be read, and nothing was written`,v]}),g({name:`license status`,usage:`penstock license status`,summary:`Which licence this machine has, and why it is that one.`,options:[],example:`penstock license status`,licence:`Free.`,exits:[`0 the answer was read`,`1 the licence service could not be reached, and the machine stays as it was`,v]}),g({name:`license key`,usage:`penstock license key -`,summary:`The key for PENSTOCK_LICENSE in a pipeline, found again by the e-mail you bought with, because the machine no longer keeps it.`,options:[],example:`PENSTOCK_LICENSE=$(penstock license key -)`,licence:`Free.`,exits:[`0 the key was found`,`1 there is no Team key bought with that address, or there is no terminal to ask on`,v]}),g({name:`license buy`,usage:`penstock license buy [pro|team]`,summary:`Buy Penstock. The checkout opens in a browser and the licence reaches this machine by itself once you have paid.`,options:[],example:`penstock license buy pro`,licence:`Free.`,exits:[`0 the licence is on this machine`,`1 the payment did not go through, or nothing was charged`,v]}),g({name:`license login`,usage:`penstock license login [email]`,summary:`Sign in with the e-mail you bought Penstock with. There is no key to copy.`,options:[],example:`penstock license login you@example.com`,licence:`Free.`,exits:[`0 the licence is on this machine`,`1 there is no licence bought with that address`,v]}),g({name:`license activate`,usage:`penstock license activate <key>`,summary:`Use a key you already have.`,options:[],example:`penstock license activate PENSTOCK-PRO-...`,licence:`Free.`,exits:[`0 the licence is on this machine`,`1 the key was not accepted, and the answer says why`,v]}),g({name:`license logout`,usage:`penstock license logout`,summary:`Release this machine's licence so another machine can use it. The same as license deactivate.`,options:[],example:`penstock license logout`,licence:`Free.`,exits:[`0 the licence was released, or there was no seat to release`,`1 the licence service could not be reached`,v]}),g({name:`trust`,usage:`penstock trust [path] [--list] [--forget] [--yes]`,summary:`Let this project's penstock.yaml run shell commands here. A hook of check, layout or deploy asks for this first, and a project with no penstock.yaml is not trusted at all.`,options:[{flag:`--list`,text:`print what is trusted on this machine`},{flag:`--forget`,text:`take one project back`},{flag:`--yes`,text:`do not ask, which is what a pipeline wants`}],example:`penstock trust --list`,licence:`Free.`,exits:[`0 the project is trusted, forgotten, or the list was printed`,`1 there is no penstock.yaml there to trust, or the path is not there`,v]}),g({name:`mcp`,usage:`penstock mcp [--project <dir>] [--config]`,summary:`Serve BPMN diagrams to an AI agent over MCP. Reading a diagram and checking it are free; flow analysis, scenarios, code links and editing need a licence.`,options:[{flag:`--project <dir>`,text:`the project every tool works on, without the agent naming it; nothing outside it is read`},{flag:`--config`,text:`print the client entry to paste into the agent, and stop`}],every:!1,example:`penstock mcp --config`,licence:`list_diagrams, show_diagram and check_diagram are free. The others are ${m}.`,exits:[`0 the server stopped, or the client entry was printed`,`1 a tool was asked for something this machine does not have`,v]}),g({name:`connectors`,usage:`penstock connectors [--refresh]`,summary:`List Camunda's connector templates, or where they are cached on this machine. Downloaded from GitHub at most once a day.`,options:[{flag:`--refresh`,text:`check GitHub for a newer release now`}],example:`penstock connectors --refresh`,licence:`Free.`,exits:[`0 the list was printed`,`1 the release list could not be downloaded, and the answer says when it will try again`,v]}),g({name:`connectors resolve`,usage:`penstock connectors resolve <id> [version]`,summary:`Print one connector template, resolved to the version asked for or to the newest one in the cache.`,options:[{flag:`--refresh`,text:`check GitHub for a newer release first`}],example:`penstock connectors resolve http-json`,licence:`Free.`,exits:[`0 the template was printed`,`1 there is no template with that id, and the answer says what there is`,v]}),g({name:`update`,usage:`penstock update [version] [--distribution <spec>]`,summary:`Move the project's wrapper to a version, the latest by default.`,options:[{flag:`--distribution <spec>`,text:`where to get Penstock from: a tarball or a registry spec`}],example:`penstock update 26.9.0`,licence:`Free.`,exits:[`0 the wrapper was moved`,`1 it could not be, and the answer says which step refused`,v]}),g({name:`web`,usage:`penstock web [folder] [--port <port>] [--host <address>] [--no-open]`,summary:`Serve the editor in a browser, on this machine only. With a folder it opens that project; without one it starts on a welcome page where you choose the project in the browser. A key in the link keeps other pages and other users out, and nothing is sent anywhere.`,options:[{flag:`--port <port>`,text:`the port to listen on, 8765 by default; the next free one is used when it is busy`},{flag:`--host <address>`,text:`the address to listen on, 127.0.0.1 by default; any other makes the folder reachable from the network`},{flag:`--no-open`,text:`print the link and do not open a browser`}],example:`penstock web ./processes --port 9000`,licence:`Free. What needs Pro in an IDE needs it here too.`,exits:[`0 the server was stopped with Ctrl-C`,`1 the folder is not there, the port or address is not usable, or no port was free`,v]}),g({name:`agent`,usage:`penstock agent [claude|codex|gemini|opencode|<id>] [--project <dir>] [-- <arguments>]`,summary:`Start an AI agent's own command line in this terminal with the penstock MCP server already set up for this one run. Nothing is written to the agent's own configuration or to the project. What follows -- goes to the agent as it is. Without a name it lists the agents and which are installed. An agent you added in the settings is started with its own command and arguments.`,options:[{flag:`--project <dir>`,text:`the project the penstock tools work on, and the folder the agent starts in; the current project by default`}],example:`penstock agent claude -- -p "list the diagrams"`,licence:`Free. The tools the agent gets keep their own licence: see penstock mcp --help.`,exits:[`0 the agent ended normally, or the list was printed`,`1 the agent is not installed or not known, or could not be started; any other code is the agent's own`,v]}),g({name:`agent serve`,usage:`penstock agent serve --project <dir> [--detach]`,summary:`Serve the AI chat of one project to the IDEs and editors that show it: its chats, their history and the agent behind them, over HTTP on 127.0.0.1 and nothing else. Every window of the project shares this one server. It prints one line of JSON with the port and a key, wants the key as a Bearer token on every request, and leaves a few seconds after no window is attached to it and no turn is running.`,options:[{flag:`--project <dir>`,text:`the project folder the chats belong to`},{flag:`--detach`,text:`start the server in its own session, print its line once it answers, and return; an IDE starts it this way so that a signal to its terminal does not stop the server for every window`}],example:`penstock agent serve --project ./processes`,licence:`Free to start. Sending a message needs Pro on a developer machine, and Team in a pipeline.`,exits:[`0 stopped by a signal, or left a few seconds after no window was attached to it and no turn was running; a second server for a project that already has one waits until its standard input closes`,`1 no project was given, the folder is not there, or the server could not listen`,v]})],x=new Map(b.map(e=>[e.name,e]));function S(e){let t=null,n=0;for(let r=1;r<=e.length;r+=1){let i=x.get(e.slice(0,r).join(` `));i&&(t=i,n=r)}return n===e.length?t:null}const C=Math.max(...b.flatMap(e=>e.options.map(e=>e.flag.length)))+2,w=e=>e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()),T=e=>e.charAt(0).toUpperCase()+e.slice(1);function E(e){return e.split(` `).map((e,t)=>t===0?w(e):T(w(e))).join(``)}function D(e){return w(e.split(` `)[0].replace(/^--/,``))}function O(e){return r(`app.cli.help.${E(e.name)}.summary`)}function k(e,t){return r(t.key?`app.cli.help.${t.key}`:`app.cli.help.${E(e.name)}.options.${D(t.flag)}`)}function A(e){return r(`app.cli.help.${E(e.name)}.licence`)}function j(e,t){return r(`app.cli.help.${E(e.name)}.exits.${/^\d+/.exec(t)?.[0]??t}`)}function M(e){let t=[e.usage,``,O(e),``,r(`app.cli.help.options`)];for(let n of e.options)t.push(` ${n.flag.padEnd(C)}${k(e,n)}`);return e.options.length===0&&t.splice(-1),t.push(``,r(`app.cli.help.example`),` ${e.example}`,``,r(`app.cli.help.licence`),...A(e).split(`
84
- `).map(e=>e.startsWith(` `)?e:` ${e}`),``,r(`app.cli.help.exitCodes`),...e.exits.map(t=>` ${j(e,t)}`)),`${t.join(`
85
- `)}\n`}export{u as i,M as n,f as r,S as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./chunk-atomicWrite-C6J1gDtO.js";import{r as t}from"./chunk-translator-BFUJmSkR.js";import{A as n,D as r,O as i,k as a}from"./chunk-src-BLyg_6UX.js";import{s as o}from"./chunk-failure-BsimkHy_.js";import{r as s}from"./chunk-context-DPJmldqg.js";import c from"node:path";import{existsSync as l,mkdirSync as u,readFileSync as d,realpathSync as f}from"node:fs";function p(e,t){return t?c.resolve(t):c.join(c.dirname(e),a(c.basename(e)))}function m(e,t){return l(t)?f(e)===f(t):!1}async function h(a,f,h){let g=e=>({ok:!1,refused:!h.json,lines:h.json?[JSON.stringify({ok:!1,message:e[0]})]:e});if(!a)return g([t(`app.cli.import.needsFile`)]);if(!l(a))return g([t(`app.cli.import.missing`,{file:a})]);let _;try{_=new Uint8Array(d(a))}catch(e){return g([o(s(a),e),t(`app.cli.nothingWritten`)])}let v=n({name:c.basename(a),data:_});if(!v.ok)return g([v.message,...v.notes.map(e=>` - ${e.message}`),t(`app.cli.nothingWritten`)]);let y=p(a,f);if(m(a,y)||l(y)&&!h.force)return g([t(`app.cli.import.exists`,{file:s(y)})]);if(u(c.dirname(y),{recursive:!0}),e(y,v.bpmn),h.json){let e=i(v.report);return{ok:!0,lines:[JSON.stringify({ok:!0,file:y,format:v.report.format,summary:v.report.summary,notes:v.report.notes,groups:e},null,2)]}}let b=[`draw.io`,`Visio`].includes(v.report.format)?[``,t(`app.cli.import.routes`,{file:s(y)})]:[];return{ok:!0,lines:[t(`app.cli.wrote`,{file:s(y)}),``,...r(v.report),...b]}}export{h as importCommand};
@@ -1 +0,0 @@
1
- export{u as currentLicense}from"./chunk-license-x3oHbKe2.js";
@@ -1 +0,0 @@
1
- import{n as e}from"./chunk-version-CdS8_QQd.js";import{r as t}from"./chunk-translator-BFUJmSkR.js";import{l as n}from"./chunk-git-BOKyPQj7.js";import{i as r,n as i,r as a,t as o}from"./chunk-help-CFhmAhz8.js";import{t as s}from"./chunk-own-CX-3lIbf.js";import{parseArgs as c}from"node:util";const l=/* @__PURE__ */ `--profile.--lang.--format.--ci.--out.--base.--images-dir.--image-base.--images-link.--stage.--distribution.--ops.--ops-file.--after.--name.--id.--event.--set.--input.--output.--condition.--package.--only.--junit-xml.--timeout.--example.--engine.--target.--fail-on.--port.--host.--project.--element.--variables.--variables-file.--complete.--error`.split(`.`),u={lint:{to:[`check`,`--only`,`rules`],name:`penstock check --only rules`},analyze:{to:[`check`,`--only`,`flow`],name:`penstock check --only flow`},against:{to:[`diff`],name:`penstock diff <ref>`},config:{to:[`doctor`],name:`penstock doctor`},profiles:{to:[`doctor`],name:`penstock doctor`},upgrade:{to:[`license`,`buy`],name:`penstock license buy`},login:{to:[`license`,`login`],name:`penstock license login`},logout:{to:[`license`,`logout`],name:`penstock license logout`},wrapper:{to:[`update`],name:`penstock update`}},d={"--json":[`--format`,`json`],"--image":[`--images`]},f={list:[`paths`],run:[`test-cases`],generate:[`test-cases`,`--generate`]},p=Object.fromEntries(l.map(e=>[e.slice(2),{type:`string`,multiple:!0}]));p.out={type:`string`,multiple:!0,short:`o`};function m(e){let t=c({args:e,allowPositionals:!0,strict:!1,options:p,tokens:!0});return{values:t.values,positionals:[...t.positionals],tokens:[...t.tokens]}}function h(e){let t=m(e).tokens.find(e=>e.kind===`positional`);return!t||t.index===void 0?{at:-1,name:``,after:void 0}:{at:t.index,name:String(t.value),after:e[t.index+1]}}function g(e){let{at:n,name:r}=h(e),i=s(u,r);i&&process.stderr.write(`${t(`app.cli.renamed`,{old:r,now:i.name})}\n`);let a=n<0?e:e.slice(0,n),o=i?i.to:n<0?[]:[r],c=n<0?[]:e.slice(n+1);return[...a,...o,...c].flatMap(e=>{let n=s(d,e);return n?(process.stderr.write(`${t(`app.cli.flagRenamed`,{old:e,now:n.join(` `)})}\n`),n):[e]})}function _(e){let t=g(e),n=h(t),r=n.name===`scenarios`?s(f,n.after):void 0,i=r===void 0?n.name===`junit`?[...t.slice(0,n.at),`tests`,...t.slice(n.at+1)]:t:[...t.slice(0,n.at),...r,...t.slice(n.at+2)],a=m(i),o=e=>(a.values[e]??[]).filter(e=>typeof e==`string`),c=h(t);return{tokens:i,asksHelp:t.slice(0,t.includes(`--`)?t.indexOf(`--`):t.length).includes(`--help`),helpNames:c.at<0?[]:t.slice(c.at).filter(e=>e!==`--help`),command:a.positionals[0]??``,words:a.positionals.slice(1),flags:new Set(Object.keys(a.values).map(e=>`--${e}`)),unknownScenario:n.name===`scenarios`&&r===void 0,option:e=>o(e)[0],options:o}}async function v(n){r(n);let s=_(n);if(s.command===`version`||n[0]===`--version`)return process.stdout.write(`${e()??`development`}\n`),0;if(s.command===``||s.command===`help`)return process.stdout.write(a()),0;if(s.asksHelp){let e=o(s.helpNames);return process.stdout.write(e?i(e):a()),0}if(s.unknownScenario)return process.stderr.write(`${t(`app.cli.scenariosUsage`)}\n`),1;let{dispatch:c}=await import(`./chunk-dispatch-CW2CJI0C.js`);return c(s,n)}function y(e){return e.destroyed?Promise.resolve():new Promise(t=>e.write(``,()=>t()))}async function b(e){n(),await y(process.stdout),await y(process.stderr),process.exit(e)}for(let e of[process.stdout,process.stderr])e.on(`error`,e=>{throw(e.code===`EPIPE`||e.code===`ERR_STREAM_DESTROYED`)&&process.exit(141),e});v(process.argv.slice(2)).then(b).catch(async e=>{let{FolderTooLarge:t}=await import(`./chunk-folders-C1Nes4Ap.js`);if(e instanceof t){process.stderr.write(`${e.message}\n`),await b(1);return}let{systemFailure:n}=await import(`./chunk-systemError-2me5k57V.js`),r=n(e);r===null?(process.stderr.write(`${e instanceof Error?e.message:String(e)}\n`),await b(2)):(process.stderr.write(`${r}\n`),await b(1))});export{};