@kern0x1b/penstock-cli 26.10.4 → 26.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-account-C8EHysMH.js +1 -0
- package/dist/chunk-agentFailure-piRAFLGH.js +1 -0
- package/dist/chunk-agentLaunch-C5Uo40vv.js +1 -0
- package/dist/chunk-agentServe-4O0syoYQ.js +10 -0
- package/dist/chunk-analyze-Brxlb4U1.js +1 -0
- package/dist/chunk-analyze-CUxuBgNS.js +1 -0
- package/dist/chunk-apply-BAMwoXG9.js +1 -0
- package/dist/chunk-atomicWrite-C6J1gDtO.js +1 -0
- package/dist/chunk-baseline-DvS2S0am.js +1 -0
- package/dist/chunk-bot-I4kuhjyv.js +11 -0
- package/dist/chunk-cacheDirectory-7sa0970e.js +1 -0
- package/dist/chunk-codeFactSet-DOOlbIIj.js +1 -0
- package/dist/chunk-codeIndex-CzENd6hG.js +1 -0
- package/dist/chunk-codeLinks-D-gzUjYv.js +1 -0
- package/dist/chunk-codeLinks-DLxEBWPi.js +1 -0
- package/dist/chunk-command-BR4memGJ.js +1 -0
- package/dist/chunk-command-BctoT00W.js +5 -0
- package/dist/chunk-command-Jl1msVwF.js +1 -0
- package/dist/chunk-commands-CeRlfHY-.js +1 -0
- package/dist/chunk-compose-BV9Jg348.js +4 -0
- package/dist/chunk-connectors-CVfz5pSg.js +1 -0
- package/dist/chunk-connectors-eXPldvkc.js +2 -0
- package/dist/chunk-context-DPJmldqg.js +1 -0
- package/dist/chunk-convert-B1sgT9kl.js +1 -0
- package/dist/chunk-deploy-C4KJK-tw.js +1 -0
- package/dist/chunk-deploy-DOXu2-8q.js +2 -0
- package/dist/chunk-diagram-BaVwLa4h.js +1 -0
- package/dist/chunk-diagram-CCA1-fT5.js +1 -0
- package/dist/chunk-diagramDefects-7UG_Iwsr.js +1 -0
- package/dist/chunk-diagrams-6suPQBVQ.js +1 -0
- package/dist/chunk-diff-BC8gZX5w.js +1 -0
- package/dist/chunk-diff-D1m_eKvv.js +1 -0
- package/dist/chunk-diffModels-DYtf3au1.js +3 -0
- package/dist/chunk-dispatch-CW2CJI0C.js +6 -0
- package/dist/chunk-docs-CY6ICsip.js +1 -0
- package/dist/chunk-docs-CwY3Ce9M.js +30 -0
- package/dist/chunk-doctor-m0mnVdDE.js +1 -0
- package/dist/chunk-drawing-shRfnrs9.js +8 -0
- package/dist/chunk-editPreview-BgH1JVOD.js +1 -0
- package/dist/chunk-engine-CxgdJ2wO.js +1 -0
- package/dist/chunk-export-9AWsr5ai.js +1 -0
- package/dist/chunk-export-D5kPD4Or.js +20 -0
- package/dist/chunk-facts-DA3Y-k9a.js +1 -0
- package/dist/chunk-failure-BsimkHy_.js +1 -0
- package/dist/chunk-features-BfRg2kR5.js +1 -0
- package/dist/chunk-features-BwnwB6jL.js +1 -0
- package/dist/chunk-folders-13vx0i0n.js +1 -0
- package/dist/chunk-folders-C1Nes4Ap.js +1 -0
- package/dist/chunk-formChecks-acRgARZ3.js +1 -0
- package/dist/chunk-git-BOKyPQj7.js +3 -0
- package/dist/chunk-help-CFhmAhz8.js +85 -0
- package/dist/chunk-importCommand-5SJxu2k4.js +1 -0
- package/dist/chunk-init-AIh_7yE0.js +227 -0
- package/dist/chunk-license-B_To2110.js +1 -0
- package/dist/chunk-license-x3oHbKe2.js +1 -0
- package/dist/chunk-lint-C_fAcLIg.js +1 -0
- package/dist/chunk-load-BVJUBU5S.js +5 -0
- package/dist/chunk-main-D3S4Xr__.js +1 -0
- package/dist/chunk-mcp-ByMCWlXC.js +76 -0
- package/dist/chunk-mcpLaunch-C13ViiIP.js +592 -0
- package/dist/chunk-migrate-CLQ-hrae.js +1 -0
- package/dist/chunk-migrate-CVUR1K7f.js +1 -0
- package/dist/chunk-moddle-AjPH0QEc.js +1 -0
- package/dist/chunk-moddle-Dlk0NR-u.js +1 -0
- package/dist/chunk-own-CX-3lIbf.js +1 -0
- package/dist/chunk-penstockCli-CqiOKC75.js +1 -0
- package/dist/chunk-placeholderLayout-B18ekWmh.js +1 -0
- package/dist/chunk-plural-Bq_4vgOr.js +1 -0
- package/dist/chunk-pr-tC3-PSNM.js +1 -0
- package/dist/chunk-preferencesFile-F6bAlNrk.js +1 -0
- package/dist/chunk-project-qT-Fk_Rz.js +1 -0
- package/dist/chunk-report-CDz78nCI.js +1 -0
- package/dist/chunk-review-BqZSohXR.js +1 -0
- package/dist/chunk-rules-DJlL7K_Q.js +1 -0
- package/dist/chunk-security-5SU-bq3A.js +18 -0
- package/dist/chunk-share-YSewfw3F.js +239 -0
- package/dist/chunk-src-BLyg_6UX.js +879 -0
- package/dist/chunk-stages-C-nhLoBW.js +3 -0
- package/dist/chunk-status-DgeSOz3A.js +1 -0
- package/dist/chunk-systemError-2me5k57V.js +1 -0
- package/dist/chunk-systemError-B-1nL94i.js +1 -0
- package/dist/chunk-table-CJtiXv0e.js +1 -0
- package/dist/chunk-taskTest-4rIxp0rL.js +2 -0
- package/dist/chunk-taskTest-rng12v_b.js +1 -0
- package/dist/chunk-templates-Bxe3J0qy.js +1 -0
- package/dist/chunk-testCases-CwQ-Mi7L.js +1 -0
- package/dist/chunk-testCases-xculyxH_.js +4 -0
- package/dist/chunk-tests-C-kNQNpq.js +1 -0
- package/dist/chunk-tests-C3XJ9LMT.js +23 -0
- package/dist/chunk-translator-BFUJmSkR.js +21 -0
- package/dist/chunk-trust-u1vZ6Yk0.js +1 -0
- package/dist/chunk-trust-yKw_pXRj.js +1 -0
- package/dist/chunk-version-CdS8_QQd.js +1 -0
- package/dist/chunk-workerVariables-CCLcoR0U.js +1 -0
- package/dist/chunk-wrapper-AJWl6ru-.js +3 -0
- package/dist/chunk-wrapper-Bxz1Lgp5.js +1 -0
- package/dist/locales/de.json +9176 -0
- package/dist/locales/es.json +9176 -0
- package/dist/locales/fr.json +9176 -0
- package/dist/locales/ja.json +9023 -0
- package/dist/locales/ko.json +9023 -0
- package/dist/locales/pt-BR.json +9176 -0
- package/dist/locales/ru.json +9482 -0
- package/dist/locales/zh.json +9023 -0
- package/dist/penstock.js +1 -2363
- package/dist/web/assets/{AgentSettings-BvzT4Itb.js → AgentSettings-C3Er_rlW.js} +1 -1
- package/dist/web/assets/{AgentsDialog-BqY3wKcV.js → AgentsDialog-Bo7kikb6.js} +1 -1
- package/dist/web/assets/{BpmnCanvas-BTdM1l9l.js → BpmnCanvas-Dw5zgCN3.js} +3 -3
- package/dist/web/assets/{BpmnDocument-uifU3NGG.js → BpmnDocument-CuU0biX9.js} +4 -4
- package/dist/web/assets/{ConflictDialog-C4A9-Psr.js → ConflictDialog-GxZ-d8SK.js} +1 -1
- package/dist/web/assets/{DiffDocument-BMTSevd7.js → DiffDocument-Bh3hFmmi.js} +1 -1
- package/dist/web/assets/{DmnDocument-B8wWuhfX.js → DmnDocument-C8HpJAcE.js} +1 -1
- package/dist/web/assets/{FormDocument-bQ5VRsrh.js → FormDocument-CH-4KB3x.js} +1 -1
- package/dist/web/assets/{FormStepView-DbMCFSO1.js → FormStepView-DraPVoAN.js} +1 -1
- package/dist/web/assets/GraphAwareLayoutService-C8J8YHJI.js +21 -0
- package/dist/web/assets/NewFileDialog-j09JqpPj.js +47 -0
- package/dist/web/assets/{QuickOpen-mzlfRqvG.js → QuickOpen-CeBhsCzA.js} +1 -1
- package/dist/web/assets/{ScriptPane-C9q5wLfO.js → ScriptPane-DDikZDv6.js} +2 -2
- package/dist/web/assets/{ScriptRunDialog-Dm-_0H1Z.js → ScriptRunDialog-DdzJ0pvT.js} +1 -1
- package/dist/web/assets/{SettingsDialog-Bhwwtyg7.js → SettingsDialog-JUc5zUR9.js} +1 -1
- package/dist/web/assets/{ShortcutsDialog-BXP0h7Tp.js → ShortcutsDialog-DECqWPNE.js} +1 -1
- package/dist/web/assets/{SourceDocument-DgrNCprS.js → SourceDocument-X8ajUcxM.js} +1 -1
- package/dist/web/assets/{TextDocument-D8N0uaQa.js → TextDocument-0z7qojAh.js} +1 -1
- package/dist/web/assets/{UnreadableFileLayer-D2Rcxnt7.js → UnreadableFileLayer-D3G59F4u.js} +1 -1
- package/dist/web/assets/{UploadDialog-Dinga4TP.js → UploadDialog-CiahYkTc.js} +1 -1
- package/dist/web/assets/{apply-CzXxiRWK.js → apply-HqvoGwLE.js} +1 -1
- package/dist/web/assets/{bpmnTheme-db4tYvop.js → bpmnTheme-cOvp4qFc.js} +1 -1
- package/dist/web/assets/{bridgeInstance-BPwbITOf.js → bridgeInstance-DQk-c8L1.js} +1 -1
- package/dist/web/assets/{commands-BAnBjEk3.js → commands-nPznxvPp.js} +1 -1
- package/dist/web/assets/de-Dj813wjn.js +1 -0
- package/dist/web/assets/{dialog-KVjfqSrB.js → dialog-CtGB1LHI.js} +1 -1
- package/dist/web/assets/{diff-Cw0ENHJR.js → diff-NgYeO98t.js} +1 -1
- package/dist/web/assets/{documentBridge-D5SaBThP.js → documentBridge-QW0IZ9Bq.js} +2 -2
- package/dist/web/assets/{documents-Dkor36oS.js → documents-KeXEdK1U.js} +1 -1
- package/dist/web/assets/{duplicate-ud-StKuO.js → duplicate-DNPpPVse.js} +1 -1
- package/dist/web/assets/{engines-BQRXHtW8.js → engines-DU0BfbYM.js} +1 -1
- package/dist/web/assets/es-CyJDEw4H.js +1 -0
- package/dist/web/assets/{formChecks-DFrCuO4I.js → formChecks-sU20kKkU.js} +1 -1
- package/dist/web/assets/fr-B1lqrd3d.js +1 -0
- package/dist/web/assets/frontend-caI7mOAL.js +1 -0
- package/dist/web/assets/{httpHost-DX-P_FDg.js → httpHost-Dqit__mm.js} +1 -1
- package/dist/web/assets/{index.es-dFUgH_-g.js → index.es-BqVUpGyA.js} +1 -1
- package/dist/web/assets/{index.es-DR-czZl7.js → index.es-DqkfrvWI.js} +1 -1
- package/dist/web/assets/{intelligence-BkxcJMU_.js → intelligence-Ck_Q9upa.js} +1 -1
- package/dist/web/assets/ja-BUAM_DzQ.js +1 -0
- package/dist/web/assets/{jspdf.es.min-BMfOi0te.js → jspdf.es.min-CM3S4IDt.js} +3 -3
- package/dist/web/assets/ko-7l4EjTF9.js +1 -0
- package/dist/web/assets/{lib-C3uYnGWx.js → lib-DAKOOgix.js} +1 -1
- package/dist/web/assets/{platform-zEAtGnYc.js → platform-CkWAyNst.js} +1 -1
- package/dist/web/assets/{preferences-K6VRM9Ah.js → preferences-nBrFGN89.js} +1 -1
- package/dist/web/assets/pt-BR-CxxRL7kF.js +1 -0
- package/dist/web/assets/ru-C4gbkVXL.js +1 -0
- package/dist/web/assets/{run-fV7AmV4q.js → run-B3YvrVeP.js} +1 -1
- package/dist/web/assets/{samples-D-3Bquy_.js → samples-BVuIm-bu.js} +1 -1
- package/dist/web/assets/{testCaseRuns-C-0blM3d.js → testCaseRuns-DYKnccnc.js} +1 -1
- package/dist/web/assets/translator-B2N3PQBL.js +1 -0
- package/dist/web/assets/{ui-TBzvKaKQ.js → ui-3pEQJ50t.js} +1 -1
- package/dist/web/assets/{useTrace-BgpeAcQR.js → useTrace-BAXnn0Bt.js} +1 -1
- package/dist/web/assets/{web-qJCedJJw.js → web-B2zkonPE.js} +5 -5
- package/dist/web/assets/zh-DIYPlVjz.js +1 -0
- package/dist/web/index.html +19 -19
- package/package.json +1 -1
- package/dist/web/assets/GraphAwareLayoutService-CePcz6pL.js +0 -21
- package/dist/web/assets/NewFileDialog-DsoFURD9.js +0 -47
- package/dist/web/assets/de-Cd75cvcZ.js +0 -1
- package/dist/web/assets/es-D2PUEg_Z.js +0 -1
- package/dist/web/assets/fr-DkGYGarc.js +0 -1
- package/dist/web/assets/frontend-B05iyhCp.js +0 -1
- package/dist/web/assets/ja-De4NAvK-.js +0 -1
- package/dist/web/assets/ko-Ci27KQ5n.js +0 -1
- package/dist/web/assets/pt-BR-CNmIseZJ.js +0 -1
- package/dist/web/assets/ru-BtK7W4xW.js +0 -1
- package/dist/web/assets/translator-Dvvasoz-.js +0 -1
- package/dist/web/assets/zh-DxI_A5kC.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,t,n)=>({title:e,severity:`error`,why:t,fix:n}),t=(e,t,n)=>({title:e,severity:`warning`,why:t,fix:n}),n=(e,t,n)=>({title:e,severity:`off`,why:t,fix:n}),r={"DANGLING-CONNECTION":e(`Connection without both ends`,`A connection that starts or ends on nothing is drawn but connects nothing, so the picture and the process disagree.`,`Reconnect both ends of the connection to a shape, or delete it.`),"LOST-CONNECTION":e(`Connection in the file but not on the canvas`,`The file describes a connection that the editor did not draw, so it is invisible and cannot be selected.`,`Connect the two elements again on the canvas; the stray connection is dropped when the file is saved.`),CONTAINMENT:e(`Element outside the container it belongs to`,`An element that belongs to a pool, lane or sub-process but is drawn beyond its edge reads as belonging to something else.`,`Drag the element back inside its container, or enlarge the container.`),OVERLAP:e(`Shapes sit on top of each other`,`Shapes drawn over each other hide one another, and the one underneath cannot be selected.`,`Move one of the shapes, or lay the diagram out again.`),"EDGE-THROUGH-NODE":e(`Connection runs through a shape`,`A connection drawn through a shape it does not touch looks like it connects to that shape.`,`Move a bend of the connection, or the shape, so the line goes around.`),"EDGE-THROUGH-BOUNDARY":e(`Connection runs through a boundary event`,`A connection drawn through a boundary event it does not start or end at looks like it leaves the task through that event.`,`Move the boundary event along the border of its task, away from where the connection meets the task.`),CROSSING:t(`Connections cross`,`Every crossing is a place where the eye can follow the wrong line.`,`Move a shape so fewer connections have to cross, or lay the diagram out again.`),"DETACHED-EDGE":e(`Connection does not reach the shape it connects`,`A connection that stops short of its shape looks unfinished and does not move with the shape.`,`Drag the loose end of the connection onto the shape.`),"BOUNDARY-OFF-HOST":e(`Boundary event is off its host`,`A boundary event that is not on the border of the task it is attached to looks like a free-standing event.`,`Drag the boundary event back onto the border of its task.`),"LABEL-ADRIFT":t(`Label sits far from what it names`,`A label far from its element is read as the label of something nearer.`,`Drag the label next to its element.`),"DIAGONAL-EDGE":t(`Connection is not drawn at right angles`,`A BPMN diagram reads as horizontal and vertical lines; a slanted one stands out as a mistake.`,`Straighten the segment, or lay the diagram out again.`),"LABEL-OVERLAP":e(`Labels cover each other`,`Overlapping labels cannot be read.`,`Drag one of the labels aside.`),"MERGED-EDGE":t(`Connections run along the same line`,`Two connections drawn on top of each other read as one, so a reader loses one of them.`,`Move one of the connections a few pixels aside, or lay the diagram out again.`),"NOTE-ADRIFT":t(`Annotation sits far from what it describes`,`An annotation far from its element is hard to tie to it.`,`Drag the annotation next to the element it describes.`),"SEMANTIC-DRIFT":e(`The diagram means something different`,`Laying out must move things and change nothing else; an element with a different parent, source or target is a different process.`,`Undo the change and report it: no layout should ever do this.`),BACKTRACK:e(`Connection doubles back along itself`,`A line that overshoots and returns along itself reads as one line and hides its own bend.`,`Delete the extra bend of the connection.`),"EDGE-THROUGH-LABEL":t(`Connection crosses a label`,`A line through a label makes both harder to read.`,`Drag the label off the line.`),"EDGE-ALONG-SHAPE":t(`Connection runs along the border of a shape`,`A line lying on the edge of a shape it does not belong to looks like part of that shape.`,`Move the run of the connection a few pixels away from the shape.`),DETOUR:t(`Connection takes a long way round`,`A connection more than twice as long as the distance it covers makes the reader search for its end.`,`Move the shapes closer, or give the connection a shorter route.`),JOG:t(`Connection sidesteps for no reason`,`A small sidestep between two parallel runs, with nothing in the way, looks like a slip of the hand.`,`Delete the two bends of the sidestep.`)},i={DEADLOCK:e(`The process can get stuck`,`A token can reach a point where nothing can move it on, so the instance never ends and sits in the engine forever.`,`Follow the path shown in the finding and give the stuck join a way to continue, for example by joining only what was split.`),"NO-SYNCHRONIZATION":e(`A part of the process can run twice`,`Two paths that reach the same step without a joining gateway start it once for each, so the step runs twice.`,`Join the paths with a gateway of the matching kind before the step.`),"DEAD-ELEMENT":e(`An element can never run`,`No path from the start reaches the element, so whatever it does is dead weight in the diagram.`,`Connect it to a path that can reach it, or delete it.`),"NEVER-FINISHES":e(`The process may never finish`,`A loop with no way out keeps its instance alive until someone cancels it.`,`Give the loop an exit: a condition that ends it, or a flow that leaves it.`),"TOO-COMPLEX":t(`Only part of the process was analysed`,`The process has too many states to check them all, so what the check says is true only of the part it reached.`,`Split the process into sub-processes or call activities so each can be checked whole.`),"NO-WAY-OUT":e(`A decision has no way out for some values`,`When no condition of a gateway holds and there is no default flow, the instance stops there with an incident.`,`Add a default flow, or a condition for the values named in the finding.`),OVERLAP:e(`Two ways out of a decision can both hold`,`When two conditions of an exclusive gateway can both be true the engine takes whichever it checks first, and which one that is depends on the order in the file.`,`Make the conditions exclusive, or turn one of them into the default flow.`),"NO-DEFAULT":t(`A decision may have no way out`,`A gateway with conditions and no default flow stops the instance with an incident when none of them holds.`,`Mark one outgoing flow as the default.`),LOOKALIKE:t(`Two variables look like one`,`Two variable names that differ by a letter or its case are usually one name spelled twice, and one of them never holds the value the other does.`,`Use one spelling everywhere, or make the names differ clearly.`)},a={"RULE-OVERLAP":e(`Two rules match the same input`,`When the hit policy expects one match, two rules matching the same input make the decision fail or depend on their order.`,`Narrow one of the two rules so they no longer match the same input, or change the hit policy.`),"RULE-GAP":t(`No rule matches some input`,`An input no rule matches gives the decision no result, and the process that asked for it stops.`,`Add a rule for the input named in the finding, or a catch-all rule at the end.`),"TABLE-UNREAD":t(`A decision table could not be checked`,`A table with an expression the check cannot read is left out of it, so its problems are not found.`,`Simplify the expression in the cell named in the finding, or accept that this table is not checked.`)},o={"KEY-CLASH":e(`Two fields write the same variable`,`Tasklist and the form editor refuse to open a form in which two fields, or a field and a group, use the same key.`,`Give each field its own key.`),"NO-KEY":e(`A field writes no variable`,`A field with no key is shown to the user, but what they enter is not passed to the process.`,`Give the field a key, the name of the process variable it should fill.`),"REPEATED-OPTION":e(`An option list repeats a value`,`Two choices with the same value submit the same thing, though the user can tell them apart.`,`Give every option its own value.`),"NO-LABEL":t(`A field has no label`,`An input with no label leaves the user guessing what it is for.`,`Give the field a label.`)},s={"ad-hoc-sub-process":e(`Ad-hoc sub-process with a start or end event`,`An ad-hoc sub-process has no defined start or end: its activities run when someone chooses, so an event marking either is meaningless.`,`Delete the start and end events inside the ad-hoc sub-process.`),"conditional-event":n(`Conditional event without a condition`,`A conditional event with no condition can never fire.`,`Give the event a condition expression.`),"conditional-flows":e(`Conditional flow without a condition`,`A flow that leaves a task or event marked as conditional but has no condition either always or never fires; the engine cannot tell.`,`Give the flow a condition, or make it an ordinary flow.`),"end-event-required":e(`Process or sub-process without an end event`,`Without an end event the reader cannot see where the process ends, and some engines refuse to run it.`,`Add an end event at the end of every path.`),"event-based-gateway":e(`Event-based gateway used wrongly`,`An event-based gateway waits for the first of several events, so it needs at least two ways out and none of them may be conditional.`,`Give the gateway two or more outgoing flows to events, and remove their conditions.`),"event-sub-process-typed-start-event":e(`Event sub-process start without an event`,`An event sub-process starts when its event happens, so a blank start event says nothing about when.`,`Give the start event a type: message, timer, error, signal or another.`),"fake-join":t(`Several flows enter a task that does not join them`,`Only a gateway joins flows; several flows into a task start the task once for each token, which is rarely what the drawing suggests.`,`Join the flows with a gateway of the matching kind before the task.`),global:t(`Global element without a name, unused or not unique`,`A message, signal or error that is unnamed, never used or named twice cannot be told apart from another.`,`Name the element, use it, or delete it.`),"label-required":e(`Element without a label`,`An unlabelled task, event or gateway tells the reader nothing about what happens there.`,`Give the element a name.`),"link-event":e(`Link event without a name or without its counterpart`,`A link throw event jumps to the link catch event of the same name in the same scope, so both need that name.`,`Name the link events and make each throw match one catch.`),"no-bpmndi":e(`Element without a place in the diagram`,`An element that is in the process but not on the canvas cannot be seen, selected or fixed in the editor.`,`Add the element to the diagram, or delete it from the file.`),"no-complex-gateway":e(`Complex gateway`,`A complex gateway holds logic that is written nowhere a reader can see, and few engines support it.`,`Replace it with exclusive, inclusive or parallel gateways.`),"no-disconnected":e(`Element with no incoming or outgoing flow`,`An element nothing leads to or from is either forgotten or dead.`,`Connect the element to the flow, or delete it.`),"no-duplicate-sequence-flows":e(`Two identical flows between the same elements`,`Two flows from the same source to the same target either do the same twice or say nothing the first one did not.`,`Delete the duplicate flow.`),"no-gateway-join-fork":e(`Gateway that joins and forks`,`A gateway that joins flows and forks again in one shape is read as one of the two, and the other is missed.`,`Split it into one gateway that joins and one that forks.`),"no-implicit-end":e(`Path that ends without an end event`,`A path that just stops leaves the reader to guess whether it was meant to.`,`Add an end event after the last element of the path.`),"no-implicit-split":e(`Task that forks the flow without a gateway`,`Several flows out of a task start all of them at once, or none of them, depending on conditions nobody can see.`,`Add a gateway after the task and fork there.`),"no-implicit-start":e(`Path that starts without a start event`,`An element with no incoming flow starts on its own, which is easy to mistake for a forgotten connection.`,`Add a start event before the element, or connect it to the path it belongs to.`),"no-inclusive-gateway":t(`Inclusive gateway`,`An inclusive gateway can take any number of ways out, which is hard to read and easy to get wrong.`,`Use exclusive or parallel gateways, or keep it and check the conditions with care.`),"no-overlapping-elements":t(`Element overlaps another or leaves its parent`,`Elements drawn over each other hide one another.`,`Move the elements apart, or lay the diagram out again.`),"single-blank-start-event":e(`More than one blank start event`,`Two blank start events mean two ways to start the same process with no way to tell them apart.`,`Keep one blank start event; give the others a type, or split the process.`),"single-event-definition":e(`Event with several event definitions`,`An event with several definitions is a multiple event, which few engines support and few readers expect.`,`Keep one event definition, or use one event for each.`),"standard-size":n(`Element not in its standard size`,`Elements of the standard size make a diagram look even.`,`Resize the element to the standard size of its type.`),"start-event-required":e(`Process or sub-process without a start event`,`Without a start event there is no way to start the process.`,`Add a start event.`),"sub-process-blank-start-event":e(`Sub-process start event with a type`,`A sub-process starts when the flow reaches it, so its start event has no event to wait for.`,`Make the start event blank.`),"superfluous-gateway":t(`Gateway with one way in and one way out`,`A gateway with one flow in and one out does nothing but sit in the way.`,`Delete the gateway and connect its neighbours.`),"superfluous-label":t(`Label on a flow that needs none`,`Only the flows out of a decision, the conditional flows and the default flow say something with a label; on any other it repeats the picture.`,`Delete the label.`),"superfluous-termination":t(`Terminate end event that terminates nothing`,`A terminate end event outside a parallel path ends the same as an ordinary end event, and suggests something more.`,`Use an ordinary end event.`)},c={"ad-hoc-sub-process":e(`Ad-hoc sub-process without an activity`,`An ad-hoc sub-process with nothing in it has nothing for the engine to run, so the instance can never complete it.`,`Add at least one activity to the ad-hoc sub-process, or delete it.`),"agent-fromai-contract":e(`fromAi() key that is not a plain name under toolCall`,`The agent fills a tool parameter through fromAi(toolCall.name); a key written any other way is not found, so the parameter stays empty.`,`Write the key as toolCall.name: a single name, with dots, and no quotes, brackets or arithmetic.`),"agent-tool-documentation":t(`Tool of an AI agent without documentation`,`The agent picks its tools by their documentation, so a tool with none is hard to choose and easy to misuse.`,`Describe what the tool does in its documentation.`),"agent-tool-output-key":t(`Tool of an AI agent that returns nothing to it`,`The agent only sees what a tool puts in toolCallResult; without it, or with another spelling or a second writer, the answer is lost.`,`Map the result to toolCallResult, spelled exactly like that, once.`),"before-all-execution-listener":e(`beforeAll listener outside a multi-instance element`,`A beforeAll execution listener runs before the instances of a multi-instance element are created, so on any other element it has nothing to run before.`,`Move the listener to a multi-instance element, or give it another event type.`),"element-type":e(`Element the engine version cannot run`,`Each version of Camunda supports a fixed set of elements, and one it does not know is skipped or refused when the process is deployed.`,`Replace the element with one the version supports, or raise the platform version of the diagram.`),"cancel-execution-listener":e(`cancel listener on an element that cannot be cancelled`,`A cancel execution listener runs when an element is terminated, which only some elements can be, so on the others it never fires.`,`Use the listener on an element that supports it, or give it another event type.`),"called-element":e(`Call activity without a process to call`,`A call activity that names no process id, or a wrong kind of expression, fails when the instance reaches it.`,`Set the called process id, a static one or a FEEL expression.`),"collapsed-subprocess":e(`Collapsed sub-process`,`This version of Camunda 8 cannot run a sub-process drawn collapsed on its own diagram, because it has no plane to read it from.`,`Expand the sub-process, or raise the platform version of the diagram.`),"connector-properties":t(`Connector with a property this version does not have`,`A property of a connector that the engine version does not support yet is ignored, so the connector behaves differently than configured.`,`Remove the property, or raise the platform version of the diagram.`),"duplicate-execution-listener-headers":e(`Two headers of a listener with the same key`,`A listener that reads a header by its key gets one of the two values, and which one is not defined.`,`Give each header of the listener its own key.`),"duplicate-execution-listeners":e(`Two execution listeners that are the same`,`Two listeners with the same event type and job type run the same job twice.`,`Delete the duplicate listener.`),"duplicate-task-headers":e(`Two task headers with the same key`,`A worker that reads a header by its key gets one of the two values, and which one is not defined.`,`Give each task header its own key.`),"error-reference":e(`Error event without an error or an error code`,`An error event that refers to no error, or to one with no code, catches or throws nothing the engine can match.`,`Choose an error for the event and give the error a code.`),"escalation-boundary-event-attached-to-ref":e(`Escalation boundary event on the wrong element`,`Escalations are raised inside a sub-process or a call activity, so a boundary event on any other element never catches one.`,`Attach the escalation boundary event to a sub-process or call activity.`),"escalation-reference":e(`Escalation event without an escalation or a code`,`An escalation event that refers to no escalation, or to one without a code, catches or throws nothing the engine can match.`,`Choose an escalation for the event and give it an escalation code.`),"event-based-gateway-target":e(`Receive task after an event-based gateway`,`The engine does not accept a receive task as the target of an event-based gateway, so the process is refused when it is deployed.`,`Use a message intermediate catch event instead of the receive task.`),"executable-process":e(`No executable process`,`Camunda 8 only deploys processes marked executable, so a file in which none is has nothing to run.`,`Mark the process, or one of the pools, as executable.`),"execution-listener":e(`Execution listener without an event type or a job type`,`A listener needs to know when it runs and which worker handles it; without either the engine refuses it.`,`Set the event type and the job type of the listener.`),"feel-compatibility":e(`FEEL function the engine version does not have`,`A built-in function newer than the engine fails the expression at runtime with an incident.`,`Use a function the version has, or raise the platform version of the diagram.`),feel:e(`FEEL expression that is not valid`,`An expression the engine cannot parse fails as soon as the process reaches it, and stops the instance with an incident.`,`Correct the expression named in the finding; the editor of the field shows where it goes wrong.`),"history-time-to-live":t(`Process without a history time to live`,`Without a time to live the engine keeps the history of every finished instance for ever unless it is set for the whole engine, and the database grows.`,`Set the history time to live of the process, for example P30D, or set it once for the engine.`),implementation:e(`Task or event that has nothing to run`,`A service task, business rule task, script task, send task or message event that names no job type, decision, script or message does nothing when reached.`,`Set what the element runs: a job type, a called decision, a script or a message name.`),"inclusive-gateway":e(`Inclusive gateway with more than one way in`,`Camunda 8 before 8.6 can take an inclusive gateway only as a fork, so one that also joins is refused.`,`Use one gateway to fork and another to join, or raise the platform version of the diagram.`),"link-event":e(`Link events that do not match`,`A link throw event jumps to the catch event with the same name in the same scope, so a name used twice or by no catch event leads nowhere.`,`Give every link catch event a unique name and let each throw event use one of them.`),"loop-characteristics":e(`Multi-instance without what it needs`,`A multi-instance element with no input collection, or with an output collection but no output element, has nothing to iterate over or to gather.`,`Set the input collection, and the output element when there is an output collection.`),"io-mapping":e(`Input or output mapping that is incomplete`,`A mapping needs both the source and the target it maps to; one without either is refused by the engine.`,`Fill in the source and the target of every input and output mapping.`),"message-reference":e(`Message event without a message or its name`,`A message event that refers to no message, or to one without a name, can never be correlated with anything.`,`Choose a message for the event and give the message a name.`),"no-binding-type":e(`Binding type that this version does not have`,`A called process, decision or form bound to anything but the latest version needs Camunda 8.6 or newer; on an older one the binding is ignored.`,`Bind to the latest version, or raise the platform version of the diagram.`),"no-business-id":e(`Business id that this version does not have`,`A business id on a call activity needs Camunda 8.10 or newer; on an older version it is ignored.`,`Remove the business id, or raise the platform version of the diagram.`),"no-before-all-execution-listener":e(`beforeAll listener that this version does not have`,`The beforeAll event type of an execution listener needs Camunda 8.10 or newer.`,`Use another event type, or raise the platform version of the diagram.`),"no-candidate-users":e(`Candidate users that this version does not have`,`Candidate users on a user task need Camunda 8.2 or newer; on an older version they are ignored.`,`Remove the candidate users, or raise the platform version of the diagram.`),"no-cancel-execution-listener":e(`cancel listener that this version does not have`,`The cancel event type of an execution listener needs Camunda 8.10 or newer.`,`Use another event type, or raise the platform version of the diagram.`),"no-execution-listener-headers":e(`Listener headers that this version does not have`,`Task headers on an execution listener are not supported by this version of Camunda 8 and are ignored.`,`Remove the headers, or raise the platform version of the diagram.`),"no-execution-listeners":e(`Execution listeners that this version does not have`,`Execution listeners need Camunda 8.6 or newer; on an older version they are ignored.`,`Remove the listeners, or raise the platform version of the diagram.`),"no-expression":e(`Expression this version does not support`,`A FEEL expression in a property the engine version reads only as a fixed value is taken as text, not evaluated.`,`Write a static value, or raise the platform version of the diagram.`),"no-interrupting-event-subprocess":e(`Interrupting event sub-process in an ad-hoc sub-process`,`An event sub-process inside an ad-hoc sub-process cannot interrupt it, so an interrupting start event is refused.`,`Make the start event of the event sub-process non-interrupting.`),"no-job-priority-definition":e(`Job priority that this version does not have`,`A job priority needs Camunda 8.10 or newer; on an older version it is ignored.`,`Remove the job priority, or raise the platform version of the diagram.`),"no-loop":e(`Loop that never waits`,`A cycle made only of tasks and gateways that run at once never waits for anything, so the instance spins in it and never stops.`,`Put an element that waits into the loop, such as a user task or a timer, or give it a gateway condition that leaves it.`),"no-multiple-none-start-events":e(`More than one blank start event`,`Camunda 8 accepts only one blank start event in a process, so a second one makes the deployment fail.`,`Keep one blank start event and give the others an event type, or split the process.`),"no-priority-definition":e(`Priority that this version does not have`,`A priority on a user task needs Camunda 8.6 or newer; on an older version it is ignored.`,`Remove the priority, or raise the platform version of the diagram.`),"no-propagate-all-parent-variables":e(`Propagate all parent variables that this version does not have`,`Turning off the propagation of the parent variables of a call activity needs Camunda 8.2 or newer.`,`Keep propagation on, or raise the platform version of the diagram.`),"no-signal-event-sub-process":e(`Signal event sub-process that this version does not have`,`A signal start event in an event sub-process needs a newer version of Camunda 8 than the diagram declares.`,`Use another kind of start event, or raise the platform version of the diagram.`),"no-task-schedule":e(`Task schedule that this version does not have`,`A due date or follow-up date on a user task needs Camunda 8.2 or newer; on an older version it is ignored.`,`Remove the dates, or raise the platform version of the diagram.`),"no-task-listeners":e(`Task listeners that this version does not have`,`Task listeners on a user task need Camunda 8.8 or newer; on an older version they are ignored.`,`Remove the task listeners, or raise the platform version of the diagram.`),"no-template":e(`Element template that this version does not have`,`Element templates need Camunda 8.0 or newer; on an older version the properties they set are ignored.`,`Remove the template, or raise the platform version of the diagram.`),"no-version-tag":e(`Version tag that this version does not have`,`A version tag needs Camunda 8.6 or newer; on an older version it is ignored.`,`Remove the version tag, or raise the platform version of the diagram.`),"no-zeebe-properties":e(`Zeebe properties that this version does not have`,`Custom zeebe:properties need Camunda 8.1 or newer; on an older version they are dropped when the process is deployed.`,`Remove the properties, or raise the platform version of the diagram.`),"no-zeebe-user-task":e(`Camunda user task that this version does not have`,`A user task implemented by Camunda itself needs Camunda 8.5 or newer.`,`Use a job worker user task, or raise the platform version of the diagram.`),"priority-definition":e(`User task priority that is not valid`,`The priority of a user task has to be a whole number from 0 to 100, or an expression; anything else is refused.`,`Write the priority as a number from 0 to 100, or as an expression.`),"zeebe-user-task":t(`Job worker user task`,`A user task run by a job worker is the deprecated way; a Camunda user task is the supported one from this version on.`,`Switch the user task to the Camunda user task implementation.`),secrets:t(`Secret written in a form the engine no longer reads`,`A secret referenced as {{secrets.NAME}} or in the old connector syntax is deprecated and is dropped in a later version.`,`Write the secret as a FEEL expression, camunda.secrets.NAME.`),"sequence-flow-condition":e(`Condition on a flow that cannot have one`,`Only the flows that leave an exclusive or an inclusive gateway are conditional; on any other flow the condition is refused.`,`Delete the condition, or draw a gateway in front of the flow.`),"signal-reference":e(`Signal event without a signal or its name`,`A signal event that refers to no signal, or to one without a name, can never be raised or caught.`,`Choose a signal for the event and give the signal a name.`),"start-event-form":e(`Start event form that this version cannot show`,`Before Camunda 8.3 a start event has no form, and from 8.3 the form needs a form id or a linked form that exists.`,`Set the form id or the form key of the start event, or raise the platform version of the diagram.`),"start-event-form-embedded":t(`Embedded form on a start event`,`Embedded forms on a start event are deprecated in this version and stop working in a later one.`,`Move the form to a .form file and link it from the start event.`),subscription:e(`Message without a correlation key`,`A message that a process waits for needs a correlation key, or the engine cannot tell which instance it is meant for.`,`Set the correlation key of the message subscription, usually a FEEL expression.`),"task-listener":e(`Task listener without an event type or a job type`,`A task listener needs to know when it runs and which worker handles it; without either the engine refuses it.`,`Set the event type and the job type of the listener.`),"task-schedule":e(`Task schedule that is not a date`,`The due date and the follow-up date of a user task have to be an ISO 8601 date, or an expression that gives one.`,`Write the date in ISO 8601, or use an expression.`),timer:e(`Timer that is not valid`,`A timer with a date, duration or cycle the engine cannot read fails when the process is deployed or reached.`,`Write the timer as an ISO 8601 date, duration or cycle, or as an expression.`),"timer-past-date":t(`Start timer set in the past`,`A timer start event whose date, or whose cycle start, is already past fires right after deployment, and a cycle then runs from the deployment time.`,`Use a future date, or a cron expression to run on a fixed schedule.`),"unresolvable-secret-reference":e(`Secret used in a way the engine cannot resolve`,`A secret can only be read as an expression; written as a plain string, in a list or in a branch of an if it is never replaced.`,`Use =camunda.secrets.NAME directly as the value of the property.`),"user-task-definition":t(`User task without a form`,`A user task with no form opens in Tasklist with nothing for the person to read or fill in.`,`Link a form to the user task, or accept a task without one.`),"user-task-form":e(`User task form that is not filled in`,`A form on a user task needs the form id, or the linked form, in the form the chosen binding expects; without it the task opens with no form.`,`Set the form id, or the form key, the way its binding says.`),"variable-name":e(`Variable name that is not valid`,`A name that starts with a digit or holds a space or a dash cannot be used in a FEEL expression, so it can never be read again.`,`Use a name of letters, digits and underscores that does not start with a digit.`),"version-tag":e(`Version tag that is empty`,`A version tag that is set with no value, or a binding to a version tag with none, gives the engine nothing to look up.`,`Give the version tag a value, or choose another binding.`),"wait-for-completion":e(`Compensation that does not wait`,`A compensation throw event that does not wait for completion is not supported by Camunda 8, which always waits.`,`Turn on waiting for completion of the compensation event.`)},l={"missing-implementation":t(`Nothing in the code runs a step`,`A service task, send task or listener that names a job type, topic, class or bean nothing implements waits for a worker that does not exist.`,`Write the worker, delegate or bean, or correct the name in the diagram.`),"never-thrown":t(`Nothing in the code throws the error a step catches`,`An error boundary or error event catches a code that no BpmnError or error command in the project throws, so it never fires.`,`Throw the error code from the worker, or correct the code on the event.`),"variable-typo":t(`A variable is read, but only a similar one is set`,`A read of a name that is never written, when a name a letter away is, is almost always a typo, and the read gives nothing.`,`Use the spelling that is set.`),"worker-fetch":t(`A worker reads a variable it does not fetch`,`A Camunda 8 worker is given only the variables it asks for, so a name its code reads but its fetch list leaves out is null at runtime, and a name a fetch list holds under a different spelling is null as well.`,`Add the variable to the worker's fetchVariables, or use the name it fetches.`),"writer-unread":t(`A worker sets a variable no step after it reads`,`A variable the worker writes and nothing downstream reads is written for nothing; often the name is not the one the next step looks for.`,`Read it in a later step, or drop it from the worker.`),"lost-update":t(`Every parallel instance writes the same result collection`,`A parallel multi-instance step that sets an output collection without an output element has each instance write the same collection, so only the last one that finishes is left.`,`Set an output element, or collect the results in one instance after the join.`),"late-read":t(`A worker reads a variable no step before it sets`,`The worker is handed only the variables the process set before it, so a name it reads that nothing set before it is null at runtime.`,`Set the variable in an earlier step, or drop it from the worker.`),"near-name":t(`A job type, topic, bean, message or error code is one letter off the code`,`A name that does not match the one in the code leaves the step with nothing running it, and a name that differs only in case is the same trap with a quieter error.`,`Use the name the code has, or rename the worker to the one the diagram uses.`),"mapping-order":t(`A mapping line reads a value an earlier line was meant to set`,`The engine evaluates the source of every mapping line before it writes any target, so a later line that reads what an earlier one sets gets null - camunda#11789.`,`Move the value into the earlier line, or compute both from the same source.`),"implicit-job-type":t(`A job worker takes its job type from the method name`,`A @JobWorker without a type answers to its method name, so renaming the method changes the contract with the diagram without anything saying so.`,`Name the type in the annotation, so the method can be renamed freely.`),"no-worker":e(`No worker handles a job type`,`A Camunda 8 service task creates a job that waits for a worker with its job type; with none, the instance waits forever.`,`Write a worker for the job type, or correct the job type in the diagram.`),"no-topic-worker":e(`No external task worker subscribes to a topic`,`A Camunda 7 external task waits for a client that subscribes to its topic; with none, the instance waits forever.`,`Subscribe a worker to the topic, or correct the topic in the diagram.`),"class-missing":e(`A class named in the diagram is not in the project`,`A delegate or listener class the engine cannot load fails the instance at that step.`,`Add the class, or correct the class name in the diagram.`),"bean-missing":e(`No Spring bean has the name a diagram uses`,`A delegate expression naming a bean that does not exist fails the instance at that step.`,`Name the bean the diagram uses, or correct the expression.`),"unknown-process":e(`A call activity calls a process no diagram defines`,`A call to a process that is not deployed fails the instance at the call.`,`Add the called process to the project, or correct the id of the call.`),"unknown-decision":e(`A business rule task calls a decision no file defines`,`A call to a decision that is not deployed fails the instance at the task.`,`Add the decision to the project, or correct its id in the task.`),"unknown-form":e(`A user task shows a form no file defines`,`A user task that refers to a form that is not deployed opens with no form.`,`Add the .form file, or correct the form id in the task.`),"unknown-embedded-form":e(`A user task shows an embedded form the diagram does not contain`,`A user task that refers to an embedded form that is not in the diagram opens with no form.`,`Add the form to the diagram, or correct the reference.`),"unused-worker":t(`A worker for a job type no diagram uses`,`A worker that nothing calls is code to keep for nothing, and hides that a diagram lost its step.`,`Delete the worker, or add the step that uses its job type.`),"unused-subscription":t(`A subscription to a topic no diagram uses`,`A subscription nothing feeds is code to keep for nothing, and hides that a diagram lost its step.`,`Delete the subscription, or add the step that uses its topic.`),"variable-field":t(`A step reads a field the variable does not have`,`A field the type of a variable does not have is null at runtime, and a misspelt field name is the usual cause. Only a variable whose type is known from the code that sets it is checked, so a field of a type the project does not declare is never reported.`,`Use a field the type has, or correct the name; a field the code adds later is named in its class.`),"variable-unknown":t(`A step reads a variable nothing sets`,`A name no step of the diagram or the code sets, and that the process is not declared to start with under variables.inputs, is null unless something outside starts the process with it.`,`Set the variable in an earlier step, declare it under variables.inputs in penstock.yaml, or correct the name.`)},u={"foreign-extension":e(`Extension of another engine`,`Flowable and Activiti ignore the attributes and elements of the Camunda, Zeebe, Operaton and each other's namespaces, so what they set is silently lost at run time.`,`Replace it with the extension of the engine the diagram is written for, or remove it.`),"unknown-attribute":t(`Attribute the engine does not know`,`An attribute in the engine's own namespace that the engine does not read is usually a typo, and has no effect.`,`Correct the attribute name, or remove it.`),"attribute-not-allowed":t(`Attribute on the wrong kind of element`,`An engine attribute is read only on the elements it is defined for, so on any other element it has no effect.`,`Move the attribute to an element that takes it, or remove it.`),"unsupported-element":e(`Element the engine does not support`,`An element that Flowable or Activiti cannot execute fails the deployment or never runs.`,`Replace the element with one the engine supports.`),"service-task-implementation":e(`Service task with nothing to run`,`A service task without a class, an expression, a delegate expression or a type has nothing for the engine to call, so the deployment is refused.`,`Set one of class, expression, delegateExpression or type on the service task.`),"script-format":e(`Script task without a script format`,`The engine does not guess the language of a script, so a script task without scriptFormat cannot run.`,`Set the script format of the task, for example groovy or javascript.`),"feel-expression":e(`FEEL expression in a Flowable or Activiti diagram`,"Flowable and Activiti evaluate JUEL expressions in ${...}; an expression that starts with = is FEEL, which they do not read.","Write the expression in JUEL, as ${...}.")},d={"id-from-name":n(`Ids follow names`,`Ids that read as names make diffs, logs, test cases and worker code readable, and stay right when a step is renamed.`,"Set `conventions.ids.fromName: true` in `penstock.yaml`; `conventions.ids.pattern` shapes the id, `{Type}_{Name}` by default."),defaults:n(`Defaults for new elements`,`Attributes every service task or data input of a project needs, set once, are never forgotten on one of them.`,"Set them under `conventions.defaults` in `penstock.yaml`, keyed by BPMN type such as `bpmn:ServiceTask`.")};function f(e,t,n){return Object.entries(t).map(([t,r])=>({...r,id:`${e}/${n(t)}`,family:e,name:e===`bpmnlint`?`bpmnlint/${t}`:e===`compat`?`compat/${t}`:e===`engine`?`engine/${t}`:t}))}const p=e=>e.toLowerCase(),m=[...f(`bpmnlint`,s,e=>e),...f(`compat`,c,e=>e),...f(`engine`,u,e=>e),...f(`drawing`,r,p),...f(`flow`,i,p),...f(`table`,a,p),...f(`form`,o,p),...f(`code`,l,e=>e),...f(`convention`,d,e=>e)],h=`https://kern0x1b.github.io/penstock-release/`,g=`${h}rules`;function _(e){return e.replace(`/`,`-`)}function v(e){return`${g}/${_(e)}`}function y(e,t){let n=`${e}/${t.toLowerCase().replace(/^(?:bpmnlint|camunda-compat|compat|engine|penstock-engine)\//,``)}`;return m.find(e=>e.id===n)}export{m as a,v as i,g as n,y as r,h as t};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{r as e,t}from"./chunk-translator-BFUJmSkR.js";import{n}from"./chunk-status-DgeSOz3A.js";import{C as r,S as i,b as a,dn as o,fn as s,mn as c,n as l,x as u}from"./chunk-src-BLyg_6UX.js";import{a as d}from"./chunk-failure-BsimkHy_.js";import{r as f,t as p}from"./chunk-context-DPJmldqg.js";import{t as m}from"./chunk-plural-Bq_4vgOr.js";import{t as h}from"./chunk-formChecks-acRgARZ3.js";import{t as g}from"./chunk-analyze-CUxuBgNS.js";import{t as _}from"./chunk-drawing-shRfnrs9.js";import{r as v}from"./chunk-command-Jl1msVwF.js";import{n as y}from"./chunk-systemError-B-1nL94i.js";import b from"node:path";import{existsSync as x,mkdirSync as S,readFileSync as C,writeFileSync as w}from"node:fs";const T=Buffer.from(`iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGP4//8/AAX+Av4N70a4AAAAAElFTkSuQmCC`,`base64`),E=`Helvetica`,D=`Helvetica-Bold`,ee=/[^\u0000-\u00ff\u2013\u2014\u2018-\u201e\u2020-\u2022\u2026\u2030\u2039\u203a\u20ac\u2122]/gu,te=[`/System/Library/Fonts/Supplemental/Arial Unicode.ttf`,`/Library/Fonts/Arial Unicode.ttf`,`/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf`,`/usr/share/fonts/dejavu/DejaVuSans.ttf`,`/usr/share/fonts/TTF/DejaVuSans.ttf`,`/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf`,`C:\\Windows\\Fonts\\arial.ttf`];function O(e){let t=/<svg[^>]*>/.exec(e)?.[0]??``,n=/viewBox="[-\d.]+[ ,]+[-\d.]+[ ,]+([\d.]+)[ ,]+([\d.]+)"/.exec(t),r=Number(/\swidth="([\d.]+)"/.exec(t)?.[1]??n?.[1]),i=Number(/\sheight="([\d.]+)"/.exec(t)?.[1]??n?.[2]);return r>0&&i>0?{width:r,height:i}:null}function k(e,t,n){let r=Math.min(1,t/e.width,n/e.height);return{width:Math.max(1,Math.round(e.width*r)),height:Math.max(1,Math.round(e.height*r))}}function A(e){return[e.title,e.meta,e.documentation??``,e.checkTitle,...e.findings,...e.sections.flatMap(e=>[e.title,e.note??``,...e.head,...e.rows.flat()]),(e.svg??``).replace(/<[^>]*>/g,``)].join(`
|
|
2
|
+
`)}async function j(e){let{AlignmentType:t,BorderStyle:n,Document:r,HeadingLevel:i,ImageRun:a,PageOrientation:o,Packer:s,Paragraph:c,Table:l,TableCell:u,TableRow:d,TextRun:f,WidthType:p}=await import(`docx`),m={style:n.SINGLE,size:4,color:`D0D7DE`},h=(e,t)=>new u({borders:{top:m,bottom:m,left:m,right:m},shading:t?{fill:`F6F8FA`}:void 0,children:e.split(`
|
|
3
|
+
`).map(e=>new c({children:[new f({text:e,bold:t,size:18})]}))}),g=[new c({heading:i.TITLE,children:[new f(e.title)]}),new c({children:[new f({text:e.meta,color:`656D76`})]})];e.documentation&&g.push(new c({spacing:{before:120},children:[new f(e.documentation)]}));let _=e.svg?O(e.svg):null;if(e.svg&&_){let n=k(_,900,460);g.push(new c({alignment:t.CENTER,spacing:{before:200,after:200},children:[new a({type:`svg`,data:Buffer.from(e.svg.replace(/^[\s\S]*?(?=<svg)/,``)),transformation:n,fallback:{type:`png`,data:T},altText:{title:e.title,description:e.title,name:e.title}})]}))}g.push(new c({heading:i.HEADING_2,children:[new f(e.checkTitle)]}));for(let t of e.findings)g.push(new c({bullet:{level:0},children:[new f(t)]}));for(let t of e.sections)g.push(new c({heading:i.HEADING_2,spacing:{before:280},children:[new f(t.title)]})),t.note&&g.push(new c({children:[new f({text:t.note,color:`656D76`})]})),g.push(new l({width:{size:100,type:p.PERCENTAGE},rows:[new d({tableHeader:!0,children:t.head.map(e=>h(e,!0))}),...t.rows.map(e=>new d({cantSplit:!0,children:e.map(e=>h(e,!1))}))]}));let v=new r({title:e.title,styles:{default:{document:{run:{font:`Calibri`,size:21}}}},sections:[{properties:{page:{size:{orientation:o.LANDSCAPE}}},children:g}]});return s.toBuffer(v)}async function ne(e){let[{default:t},{default:n}]=await Promise.all([import(`pdfkit`),import(`svg-to-pdfkit`)]),r=new t({size:[842,595],margin:40,info:{Title:e.title},compress:!0}),i=[];r.on(`data`,e=>i.push(e));let a=new Promise(e=>r.on(`end`,e)),o=A(e),s=[...new Set(o.match(ee)??[])],c=E,l=D,u=s;if(s.length>0)for(let e of te.filter(e=>x(e))){r.registerFont(`Unicode`,e),r.font(`Unicode`);let t=r._font.font,n=s.filter(e=>!t.hasGlyphForCodePoint(e.codePointAt(0)));if((n.length<u.length||u===s)&&(c=l=`Unicode`,u=n,n.length===0))break}let d=e=>u.length===0?e:[...e].map(e=>u.includes(e)?`?`:e).join(``);r.font(l).fontSize(22).fillColor(`#1f2328`).text(d(e.title),{width:762}),r.font(c).fontSize(10).fillColor(`#656d76`).text(d(e.meta),{width:762}),e.documentation&&r.moveDown(.6).fontSize(11).fillColor(`#1f2328`).text(d(e.documentation),{width:762});let f=e.svg?O(e.svg):null;if(e.svg&&f){let t=k(f,762,475);r.y+t.height>555&&r.addPage();let i=r.y+12;n(r,e.svg.replace(/^[\s\S]*?(?=<svg)/,``),40+(762-t.width)/2,i,{width:t.width,height:t.height,preserveAspectRatio:`xMidYMid meet`,fontCallback:(e,t)=>c===`Unicode`?`Unicode`:t?D:E,assumePt:!1}),r.x=40,r.y=i+t.height+12}let p=e=>{r.y>475&&r.addPage(),r.moveDown(.8).font(l).fontSize(15).fillColor(`#1f2328`).text(d(e),40,r.y,{width:762}),r.moveDown(.3)};p(e.checkTitle),r.font(c).fontSize(10.5).fillColor(e.clean?`#1a7f37`:`#cf222e`);for(let t of e.findings)r.text(`${e.clean?``:`• `}${d(t)}`,40,r.y,{width:762});for(let t of e.sections)p(t.title),t.note&&r.font(c).fontSize(10).fillColor(`#656d76`).text(d(t.note),40,r.y,{width:762}).moveDown(.3),r.table({defaultStyle:{padding:4,border:[0,0,.5,0],borderColor:`#d0d7de`},rowStyles:e=>e===0?{border:[0,0,1,0],borderColor:`#8c959f`}:void 0,columnStyles:Array(t.head.length).fill(`*`),data:[t.head.map(e=>({text:d(e),font:{family:l,size:9},textColor:`#656d76`})),...t.rows.map(e=>e.map(e=>({text:d(e),font:{family:c,size:9},textColor:`#1f2328`})))]}),r.x=40;return r.end(),await a,{data:Buffer.concat(i),unsupported:u}}const M=/\.bpmn(\.xml|20\.xml)?$/i,N=/\.(bpmn(\.xml|20\.xml)?|dmn|form)$/i,re=/Task$|SubProcess$|^CallActivity$|^Transaction$/,ie=/Gateway$/,P=/Event$/,F=[`jobType`,`class`,`delegateExpression`,`expression`,`topic`,`calledElement`,`processId`],I=[`assignee`,`candidateGroups`,`candidateUsers`],L=[`formId`,`formKey`];function R(e){return e==null?``:typeof e==`object`?Object.entries(e).map(([e,t])=>`${e} = ${t}`).join(`, `):String(e)}function z(e,t){return t.map(t=>e.properties[t]===void 0?``:R(e.properties[t])).filter(Boolean).join(`, `)}function B(e,t){let n=/* @__PURE__ */ new Map,r=e=>(n.has(e)||n.set(e,{writtenBy:/* @__PURE__ */ new Set,readBy:/* @__PURE__ */ new Set}),n.get(e)),i=e=>[...e.matchAll(/[A-Za-z_][A-Za-z0-9_]*/g)].map(e=>e[0]),a=/* @__PURE__ */ new Set([`true`,`false`,`null`,`and`,`or`,`not`,`if`,`then`,`else`,`for`,`in`,`return`,`some`,`every`,`satisfies`,`instance`,`of`,`execution`,`task`]);for(let n of e){let e=n.properties.inputs,o=n.properties.outputs;if(e&&typeof e==`object`)for(let o of Object.values(e))for(let e of i(String(o)))a.has(e)||r(e).readBy.add(t(n.id));if(o&&typeof o==`object`)for(let e of Object.keys(o))r(e).writtenBy.add(t(n.id));let s=n.properties.resultVariable;typeof s==`string`&&r(s).writtenBy.add(t(n.id))}return[...n.entries()].map(([e,{writtenBy:t,readBy:n}])=>({name:e,writtenBy:[...t],readBy:[...n]})).sort((e,t)=>e.name.localeCompare(t.name))}function V(e){return e.replace(/[^A-Za-z0-9]+/g,`-`).replace(/^-|-$/g,``).toLowerCase()}async function H(t,n){let i=C(t,`utf8`),{engine:a,elements:o}=await v(t),s=new Map(o.map(e=>[e.id,e])),c=e=>{let t=s.get(e);return t?.name?.replace(/\s+/g,` `).trim()||(t?r(t.type):e)},l=o.filter(e=>re.test(e.type.replace(`bpmn:`,``))),u=o.filter(e=>ie.test(e.type)&&e.outgoing.length>1).map(e=>({gateway:e,ways:e.outgoing.map(e=>s.get(e)).filter(e=>!!e).map(e=>({flow:e,to:c(e.target??``)}))})),d=o.filter(e=>P.test(e.type)),f=(await _(i).catch(()=>null))?.svg??null,{problems:p}=await g(t),h=b.relative(n,t),y=o.find(e=>e.type===`bpmn:Participant`&&e.name);return{slug:V(h.replace(M,``)),title:y?.name?.replace(/\s+/g,` `).trim()||b.basename(t).replace(M,``),file:h,kind:`process`,engine:a,size:m(l.length,`app.cli.docs.count.step`),svg:f,sections:ae(l,u,d,B(l,c),c),problems:p.map(e=>`${e.title}: ${e.detail}`),clean:e(`app.cli.docs.everyPathEnds`),fine:e(`app.cli.docs.runsToItsEnd`),documentation:o.find(e=>e.type===`bpmn:Participant`&&e.properties.documentation)?.properties.documentation}}async function U(t,n){let{rootElement:r}=await o(C(t,`utf8`)),i=r.drgElement??[],s=i.filter(e=>e.$type===`dmn:Decision`).length,c=b.relative(n,t);return{slug:V(c),title:r.name?.trim()||b.basename(t).replace(N,``),file:c,kind:`decision`,engine:`DMN`,size:m(s,`app.cli.docs.count.decision`),svg:null,sections:a(i),problems:l(r).map(e=>`${e.title}: ${e.detail}`),clean:e(`app.cli.docs.noTwoRulesMatch`),fine:e(`app.cli.docs.everyInputHasOneRule`),documentation:void 0}}function W(t,n){let r=JSON.parse(C(t,`utf8`)),a=i(r.components??[],[]),o=b.relative(n,t);return{slug:V(o),title:r.id?.trim()||b.basename(t).replace(N,``),file:o,kind:`form`,engine:e(`app.sections.form`),size:m(a.length,`app.cli.docs.count.field`),svg:null,sections:[u(a)],problems:h(r).map(e=>`${e.title}: ${e.detail}`),clean:e(`app.form.everyFieldWritesItsOwn`),fine:e(`app.cli.docs.everyFieldHasItsOwn`),documentation:void 0}}async function G(e,t){return/\.dmn$/i.test(e)?U(e,t):/\.form$/i.test(e)?W(e,t):H(e,t)}function K(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function q(e,t){return t.length===0?``:`<table><thead><tr>${e.map(e=>`<th>${K(e)}</th>`).join(``)}</tr></thead><tbody>\n${t.map(e=>`<tr>${e.map(e=>`<td>${K(e)}</td>`).join(``)}</tr>`).join(`
|
|
4
|
+
`)}\n</tbody></table>`}function J(e){return e.replace(/\|/g,`\\|`).replace(/\n/g,` `)||` `}function Y(e,t){return t.length===0?``:[`| ${e.join(` | `)} |`,`| ${e.map(()=>`---`).join(` | `)} |`,...t.map(e=>`| ${e.map(J).join(` | `)} |`)].join(`
|
|
5
|
+
`)}function ae(t,n,i,a,o){return[{title:e(`app.runs.steps`),head:[e(`app.cli.docs.step`),e(`app.sections.kind`),e(`app.cli.docs.runs`),e(`app.cli.docs.who`),e(`app.cli.docs.form`),e(`app.sections.notes`)],rows:t.map(e=>[o(e.id),r(e.type),z(e,F),z(e,I),z(e,L),R(e.properties.documentation)])},{title:e(`app.toolWindow.section.decisions`),head:[e(`app.sections.decision`),e(`app.cli.docs.way`),e(`app.cli.docs.goesTo`),e(`app.cli.docs.when`)],rows:n.flatMap(({gateway:e,ways:t})=>t.map((t,n)=>[n===0?o(e.id):``,t.flow.name??``,t.to,R(t.flow.properties.condition)]))},{title:e(`app.cli.docs.events`),head:[e(`app.cli.docs.event`),e(`app.sections.kind`),e(`app.cli.docs.trigger`)],rows:i.map(e=>[o(e.id),r(e.type),R(e.properties.event)])},{title:e(`app.cli.docs.data`),head:[e(`app.cli.docs.variable`),e(`app.code.wording.setBy`),e(`app.code.wording.usedBy`)],rows:a.map(e=>[e.name,e.writtenBy.join(`, `),e.readBy.join(`, `)])}]}function oe(t){return t.kind===`decision`||t.kind===`form`?e(`app.cli.docs.check`):e(`app.diagramCheck.howItRuns`)}function se(e){return e.problems.length===0?[e.clean]:e.problems}function X(e){return{title:e.title,meta:`${e.file} · ${e.engine} · ${e.size}`,documentation:e.documentation,svg:e.svg,checkTitle:oe(e),findings:se(e),clean:e.problems.length===0,sections:e.sections.filter(e=>e.rows.length>0)}}function Z(e){return e.problems.length===0?e.fine:m(e.problems.length,`app.cli.docs.count.problem`)}const Q=`body{font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:0;color:#1f2328;background:#fff}
|
|
6
|
+
main{max-width:1100px;margin:0 auto;padding:32px 24px}h1{font-size:28px;margin:0 0 4px}h2{font-size:19px;margin:32px 0 8px}
|
|
7
|
+
.meta{color:#656d76;margin:0 0 16px}.picture{border:1px solid #d0d7de;border-radius:8px;padding:12px;overflow:auto;background:#fff}
|
|
8
|
+
.picture svg{max-width:100%;height:auto}table{border-collapse:collapse;width:100%;font-size:14px}th,td{border-bottom:1px solid #d0d7de;padding:6px 8px;text-align:left;vertical-align:top}
|
|
9
|
+
th{color:#656d76;font-weight:600}.ok{color:#1a7f37}.problem{color:#cf222e}a{color:#0969da;text-decoration:none}ul{padding-left:20px}
|
|
10
|
+
.card{display:block;border:1px solid #d0d7de;border-radius:8px;padding:12px 16px;margin:8px 0;color:inherit}.card:hover{border-color:#0969da}`;function ce(n){let r=X(n),i=r.clean?`<p class="ok">${K(r.findings[0])}</p>`:`<ul>${r.findings.map(e=>`<li class="problem">${K(e)}</li>`).join(``)}</ul>`,a=r.sections.map(e=>`<h2>${K(e.title)}</h2>\n${e.note?`<p class="meta">${K(e.note)}</p>\n`:``}${q(e.head,e.rows)}`).join(`
|
|
11
|
+
`);return`<!doctype html><html lang="${t()}"><head><meta charset="utf-8"><title>${K(r.title)}</title><style>${Q}</style></head>
|
|
12
|
+
<body><main><p><a href="index.html">${K(e(`app.cli.docs.allDiagrams`))}</a></p><h1>${K(r.title)}</h1>
|
|
13
|
+
<p class="meta">${K(n.file)} · ${K(n.engine)} · ${K(n.size)}</p>
|
|
14
|
+
${r.documentation?`<p>${K(r.documentation)}</p>`:``}
|
|
15
|
+
${r.svg?`<div class="picture">${r.svg.replace(/^[\s\S]*?(?=<svg)/,``)}</div>`:``}
|
|
16
|
+
<h2>${K(r.checkTitle)}</h2>${i}
|
|
17
|
+
${a}
|
|
18
|
+
</main></body></html>
|
|
19
|
+
`}function le(n,r){let i=n.map(e=>{let t=`<span class="${e.problems.length===0?`ok`:`problem`}">${K(Z(e))}</span>`;return`<a class="card" href="${e.slug}.html"><strong>${K(e.title)}</strong><br><span class="meta">${K(e.file)} · ${K(e.size)} · ${t}</span></a>`}).join(`
|
|
20
|
+
`);return`<!doctype html><html lang="${t()}"><head><meta charset="utf-8"><title>${K(e(`app.cli.docs.diagramsOf`,{project:r}))}</title><style>${Q}</style></head>
|
|
21
|
+
<body><main><h1>${K(r)}</h1><p class="meta">${m(n.length,`app.cli.docs.count.page`)}</p>
|
|
22
|
+
${i}
|
|
23
|
+
</main></body></html>
|
|
24
|
+
`}function $(e){let t=X(e),n=t.sections.map(e=>[`## ${e.title}`,...e.note?[e.note]:[],Y(e.head,e.rows)].join(`
|
|
25
|
+
|
|
26
|
+
`));return[`# ${t.title}`,``,`\`${e.file}\` · ${e.engine} · ${e.size}`,...t.documentation?[``,t.documentation]:[],...t.svg?[``,``]:[],``,`## ${t.checkTitle}`,``,...t.findings.map(e=>`- ${e}`),``,n.join(`
|
|
27
|
+
|
|
28
|
+
`),``].join(`
|
|
29
|
+
`)}function ue(t,n){return[`# ${n}`,``,Y([e(`app.export.diagram`),e(`app.migration.report.columnFile`),e(`app.cli.docs.size`),e(`app.cli.docs.check`)],t.map(e=>[`[${e.title}](${e.slug}.md)`,e.file,e.size,Z(e)])),``].join(`
|
|
30
|
+
`)}function de(t){let n=[[`process`,`app.cli.docs.count.process`],[`decision`,`app.cli.docs.count.decision`],[`form`,`app.cli.docs.count.form`]],r=e=>t.filter(t=>(/\.dmn$/i.test(t.file)?`decision`:/\.form$/i.test(t.file)?`form`:`process`)===e).length,i=n.map(([e,t])=>[r(e),t]).filter(([e])=>e>0).map(([e,t])=>m(e,t));return e(`app.cli.docs.writtenSummary`,{pages:m(t.length,`app.cli.docs.count.page`),because:i.length>0?` (${i.join(`, `)})`:``})}async function fe(t,r,i){if(![`html`,`md`,`docx`,`pdf`,`text`].includes(i))return{ok:!1,lines:[e(`app.cli.docs.format`)]};let a=i===`md`,o=p(t[0]).root,l=b.resolve(r??b.join(o,`penstock-docs`)),u=[],m=[];for(let e of t)try{u.push(await G(e,o))}catch(t){let r=d(t);m.push(`${n(`skip`).padEnd(5)} ${f(e)}: ${r??c(s(t instanceof Error?t:Error(String(t))))}`)}if(u.length===0)return{ok:!1,lines:m};S(l,{recursive:!0}),u.sort((e,t)=>e.title.localeCompare(t.title));let h=e=>V((e.file.split(/[\\/]/).pop()??e.slug).replace(N,``)),g=/* @__PURE__ */ new Map;u.forEach(e=>g.set(h(e),(g.get(h(e))??0)+1)),u.forEach(e=>{g.get(h(e))===1&&(e.slug=h(e))});let _=b.basename(o),v=i===`docx`||i===`pdf`,x=v?i:a?`md`:`html`;for(let t of u){let n=b.join(l,`${t.slug}.${x}`);try{if(i===`docx`)w(n,await j(X(t)));else if(i===`pdf`){let r=await ne(X(t));w(n,r.data),r.unsupported.length>0&&m.push(e(`app.cli.docs.pdfFont`,{file:f(n),characters:r.unsupported.slice(0,12).join(` `)}))}else a?(w(n,$(t)),t.svg&&w(b.join(l,`${t.slug}.svg`),t.svg)):w(n,ce(t))}catch(e){return m.push(y(e,n)),{ok:!1,lines:m}}m.push(e(`app.cli.wrote`,{file:f(n)}))}if(!v){let t=b.join(l,a?`README.md`:`index.html`);w(t,a?ue(u,_):le(u,_)),m.push(e(`app.cli.wrote`,{file:f(t)}))}return m.push(``,de(u)),{ok:u.length>0,lines:m}}export{fe as docsCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./chunk-license-x3oHbKe2.js";import{r as t}from"./chunk-translator-BFUJmSkR.js";import{t as n}from"./chunk-features-BfRg2kR5.js";import{t as r}from"./chunk-table-CJtiXv0e.js";import{Dt as i}from"./chunk-src-BLyg_6UX.js";import{c as a,p as o,u as s}from"./chunk-engine-CxgdJ2wO.js";import{o as c}from"./chunk-failure-BsimkHy_.js";import{a as l,d as u,g as d,m as f,s as p}from"./chunk-load-BVJUBU5S.js";import{a as m,i as h,t as g}from"./chunk-context-DPJmldqg.js";import{t as _}from"./chunk-own-CX-3lIbf.js";import{i as v}from"./chunk-deploy-DOXu2-8q.js";import y from"node:path";import{existsSync as b,readFileSync as x}from"node:fs";const S={"camunda-7":`engine`,operaton:`engine`,"cib-seven":`engine`,classic:`engine`,"camunda-8":`topology`};function C(e,t){let n=_(S,t);return n?`${e.replace(/\/+$/,``)}/${n}`:e}async function w(e,n){try{let e=await fetch(n,{method:`GET`,signal:AbortSignal.timeout(4e3)});return e.ok?t(`app.cli.doctor.reachable`,{status:e.status}):t(`app.cli.doctor.answered`,{status:e.status})}catch(e){return t(`app.cli.doctor.unreachable`,{reason:c(e)})}}const T=[`pom.xml`,`build.gradle`,`build.gradle.kts`];function E(e){for(let t of T){let n=y.join(e,t),r=b(n)?o(x(n,`utf8`)):null;if(r)return r}return null}const D=/(password|secret|api[-_]?key|^token)$/i;function O(e){return Array.isArray(e)?e.map(O):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,D.test(e)&&typeof t==`string`?`***`:O(t)]))}async function k(o,c=!1){let{root:_,files:x,values:S}=g(o);if(c)return{ok:!0,lines:[JSON.stringify(O(S),null,2)]};let T=[],D=!0;T.push({property:`node`,value:process.version}),T.push({property:`root`,value:_}),x.length===0?(D=!1,T.push({property:`config`,value:t(`app.cli.doctor.noConfig`)})):T.push({property:`config`,value:x.map(e=>y.relative(_,e)).join(`, `)});for(let{file:e,problems:t}of l(x))for(let n of t)T.push({property:y.relative(_,e),value:u(n)});let k=m(S.engine);k?T.push({property:`engine`,value:k}):(D=!1,T.push({property:`engine`,value:t(`app.cli.doctor.noEngine`)}));let A=E(_);A&&k&&A!==a(k)&&T.push({property:`build`,value:t(`app.cli.doctor.buildEngine`,{build:s(A),engine:s(k)})});let{merged:j}=p(o),M=f(j,process.env),N=d(j);T.push({property:`profiles`,value:N.length===0?t(`app.cli.doctor.noProfiles`):N.map(e=>e===M?`*${e}`:e).join(`, `)});let P=h(S.lint),F=m(P.configPath);if(F){let e=y.resolve(_,F);b(e)||(D=!1),T.push({property:`rules`,value:b(e)?e:t(`app.cli.doctor.missing`,{path:e})})}let I=Array.isArray(S.elementTemplates)?S.elementTemplates:[];for(let e of I){let n=y.resolve(_,e);b(n)||(D=!1),T.push({property:`templates`,value:b(n)?n:t(`app.cli.doctor.missing`,{path:n})})}if(S.variables!==void 0){let{mode:r}=i(S),a=r===`off`||n(await e());T.push({property:`variables`,value:a?r:t(`app.cli.doctor.variablesNeedPro`,{mode:r})})}let L=m(h(S.deployment).url);if(!L)T.push({property:`deployment`,value:t(`app.cli.doctor.noUrl`)});else{T.push({property:`deployment`,value:t(`app.cli.doctor.deployment`,{url:L,state:await w(L,C(L,k??``))})});let e=v(h(h(S.deployment).auth),process.env);e.problem&&(D=!1,T.push({property:`auth`,value:e.problem})),e.notes.forEach(e=>T.push({property:`auth`,value:e}))}let R=r(T,{columns:[{name:`property`,minWidth:12},{name:`value`,wrap:!0}],headers:!1});return{ok:D,refused:!1,lines:R}}export{k as doctorCommand};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{pn as t}from"./chunk-src-BLyg_6UX.js";import{createRequire as n}from"node:module";import r from"node:path";import{readFileSync as i}from"node:fs";const a=n(import.meta.url);var o=class extends Error{};const s=JSON.parse(i(r.join(import.meta.dirname,`arial-metrics.json`),`utf8`));var c=class e{a;b;c;d;e;f;constructor(e=1,t=0,n=0,r=1,i=0,a=0){this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}inverse(){let t=this.a*this.d-this.b*this.c;return new e(this.d/t,-this.b/t,-this.c/t,this.a/t,(this.c*this.f-this.d*this.e)/t,(this.b*this.e-this.a*this.f)/t)}translate(t,n){return this.multiply(new e(1,0,0,1,t,n))}scale(t){return this.multiply(new e(t,0,0,t,0,0))}rotate(t){let n=t*Math.PI/180;return this.multiply(new e(Math.cos(n),Math.sin(n),-Math.sin(n),Math.cos(n),0,0))}},l=class{matrix;type=1;constructor(e=new c){this.matrix=e}setMatrix(e){this.matrix=new c(e.a,e.b,e.c,e.d,e.e,e.f)}setTranslate(e,t){this.matrix=new c(1,0,0,1,e,t)}setScale(e,t){this.matrix=new c(e,0,0,t??e,0,0)}setRotate(e,t=0,n=0){this.matrix=new c().translate(t,n).rotate(e).translate(-t,-n)}};function u(e){let t=[],n=()=>{if(t.length===0){e.removeAttribute(`transform`);return}let n=t.reduce((e,t)=>e.multiply(t.matrix),new c);e.setAttribute(`transform`,`matrix(${n.a},${n.b},${n.c},${n.d},${n.e},${n.f})`)};return{get numberOfItems(){return t.length},getItem:e=>t[e],clear(){t.length=0,n()},initialize(e){return t.splice(0,t.length,e),n(),e},appendItem(e){return t.push(e),n(),e},consolidate(){if(t.length===0)return null;let e=new l(t.reduce((e,t)=>e.multiply(t.matrix),new c));return t.splice(0,t.length,e),n(),e},createSVGTransformFromMatrix:e=>new l(new c(e.a,e.b,e.c,e.d,e.e,e.f))}}function d(t){let n=(t??``).match(/[a-zA-Z]|-?\d*\.?\d+(?:e-?\d+)?/g)??[],r={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},i=[],a=`M`,s=0,c=0,l=0;for(;s<n.length;){/[a-zA-Z]/.test(n[s])&&(a=n[s++]);let t=a.toUpperCase();if(t===`Z`){i.length>0&&i.push({...i[0]}),s<n.length&&!/[a-zA-Z]/.test(n[s])&&(a=`M`);continue}if(!(t in r))throw new o(e(`app.cli.drawing.unknownPathCommand`,{command:a}));let u=n.slice(s,s+r[t]).map(Number);s+=r[t];let d=a!==t;t===`H`?c=d?c+u[0]:u[0]:t===`V`?l=d?l+u[0]:u[0]:(c=d?c+u[u.length-2]:u[u.length-2],l=d?l+u[u.length-1]:u[u.length-1]),i.push({x:c,y:l}),t===`M`&&(a=d?`l`:`L`)}return i}function f(e){let t=e.style;return parseFloat(e.getAttribute(`font-size`)??``)||parseFloat(t?.fontSize??``)||12}function p(e,t){let n=0;for(let t of e)n+=s.widths[String(t.codePointAt(0))]??s.fallback;return n*t/s.unitsPerEm}function m(e){return s.lineHeight[String(e)]??e*1.13}async function h(e){let{JSDOM:t,VirtualConsole:n}=await import(`jsdom`),r=[],o=new n;o.on(`error`,(...e)=>r.push(e.map(e=>e instanceof Error?e.message:String(e)).join(` `))),o.on(`jsdomError`,e=>r.push(e.message));let h=new t(`<!doctype html><html><body></body></html>`,{runScripts:`outside-only`,pretendToBeVisual:!0,virtualConsole:o}).window,g=h.SVGElement.prototype,_=/* @__PURE__ */ new WeakMap;Object.defineProperty(g,"transform",{get(){return _.has(this)||_.set(this,u(this)),{baseVal:_.get(this)}}}),g.getCTM=()=>new c,g.getScreenCTM=()=>new c,g.getBBox=function(){let e=this.tagName.toLowerCase();if(e!==`text`&&e!==`tspan`)return{x:0,y:0,width:0,height:0};let t=f(this);return{x:0,y:0,width:p(this.textContent??``,t),height:m(t)}},g.getComputedTextLength=function(){return p(this.textContent??``,f(this))},g.getTotalLength=function(){let e=d(this.getAttribute(`d`)),t=0;for(let n=1;n<e.length;n+=1)t+=Math.hypot(e[n].x-e[n-1].x,e[n].y-e[n-1].y);return t},g.getPointAtLength=function(e){let t=d(this.getAttribute(`d`)),n=e;for(let e=1;e<t.length;e+=1){let r=Math.hypot(t[e].x-t[e-1].x,t[e].y-t[e-1].y);if(n<=r&&r>0){let i=n/r;return{x:t[e-1].x+(t[e].x-t[e-1].x)*i,y:t[e-1].y+(t[e].y-t[e-1].y)*i}}n-=r}return t[t.length-1]??{x:0,y:0}};let v=h.SVGSVGElement.prototype;v.createSVGMatrix=()=>new c,v.createSVGTransform=()=>new l,v.createSVGTransformFromMatrix=e=>new l(new c(e.a,e.b,e.c,e.d,e.e,e.f));let y=h;return y.SVGMatrix=c,y.SVGTransform=l,y.structuredClone=structuredClone,h.HTMLCanvasElement.prototype.getContext=()=>{let e={font:`12px Arial`,letterSpacing:`0px`,measureText(t){let n=Number(/(\d+(?:\.\d+)?)px/.exec(e.font)?.[1]??12),r=Math.round(s.ascent*n/s.unitsPerEm),i=Math.round(s.descent*n/s.unitsPerEm);return{width:p(String(t),n),fontBoundingBoxAscent:r,fontBoundingBoxDescent:i,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i}}};return e},h.eval(i(a.resolve(`bpmn-js/dist/${e}`),`utf8`)),{window:h,errors:r}}const g=/* @__PURE__ */ new Map;function _(e){let t=e===`viewer`?`bpmn-viewer.production.min.js`:`bpmn-modeler.production.min.js`;return g.has(t)||g.set(t,h(t)),g.get(t)}function v(e){return e instanceof o||e instanceof Error&&/is not a function|is not defined|Cannot read properties of undefined|not implemented/i.test(e.message)}async function y(n,r={}){let{window:i,errors:a}=await _(`viewer`);a.length=0;let s=i.document.createElement(`div`);i.document.body.appendChild(s);let c=new i.BpmnJS({container:s});try{let{warnings:i}=await c.importXML(n),s=i.filter(e=>v(e.error)),l=()=>a.filter(e=>!e.startsWith(`failed to import`));if(s.length>0||l().length>0)throw new o(e(`app.cli.drawing.incomplete`,{reason:[...s.map(e=>e.error?.message??e.message),...l()][0]}));let u=c.get(`canvas`),d=c.get(`elementRegistry`);for(let[e,t]of Object.entries(r))d.get(e)&&u.addMarker(e,`penstock-${t}`);let f=1/0,p=1/0,m=-1/0,h=-1/0,g=(e,t)=>{f=Math.min(f,e),p=Math.min(p,t),m=Math.max(m,e),h=Math.max(h,t)};for(let e of d.getAll())e.waypoints?e.waypoints.forEach(e=>g(e.x,e.y)):e.parent&&e.width!==void 0&&e.height!==void 0&&(g(e.x,e.y),g(e.x+e.width,e.y+e.height));if(!Number.isFinite(f))throw new o(e(`app.cli.drawing.nothingToDraw`));let _=Math.floor(f-20),y=Math.floor(p-20),b=Math.ceil(m-f+40),x=Math.ceil(h-p+40),{svg:S}=await c.saveSVG();if(S=S.replace(/<svg([^>]*?) width="[^"]*" height="[^"]*" viewBox="[^"]*"/,`<svg$1 width="${b}" height="${x}" viewBox="${_} ${y} ${b} ${x}"`),Object.keys(r).length>0){let e=S.indexOf(`>`,S.indexOf(`<svg`));S=`${S.slice(0,e+1)}<style>
|
|
2
|
+
.penstock-added .djs-visual > :nth-child(1) { stroke: #12a150 !important; fill: #e8f7ef !important; }
|
|
3
|
+
.penstock-removed .djs-visual > :nth-child(1) { stroke: #d64545 !important; fill: #fbeaea !important; }
|
|
4
|
+
.penstock-changed .djs-visual > :nth-child(1) { stroke: #d98c00 !important; fill: #fdf3e2 !important; }
|
|
5
|
+
.penstock-added .djs-visual > path { stroke: #12a150 !important; }
|
|
6
|
+
.penstock-removed .djs-visual > path { stroke: #d64545 !important; }
|
|
7
|
+
.penstock-changed .djs-visual > path { stroke: #d98c00 !important; }
|
|
8
|
+
</style>${S.slice(e+1)}`}if(l().length>0)throw new o(e(`app.cli.drawing.incomplete`,{reason:l()[0]}));return{svg:S,skipped:Array.from(i,e=>t(String(e.message).replace(/^failed to import /,``)))}}finally{c.destroy(),s.remove()}}function b(e){let t=0,n=0,r=[],i=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);for(let a of e){let e=/<svg[^>]*?width="(\d+)"[^>]*?height="(\d+)"[^>]*?viewBox="([^"]+)"[^>]*>/.exec(a.svg);if(!e)continue;let[,o,s,c]=e,l=a.svg.slice(e.index+e[0].length,a.svg.lastIndexOf(`</svg>`));r.push(`<text x="0" y="${t+18}" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#22242a">${i(a.title)}</text>`),r.push(`<svg x="0" y="${t+28}" width="${o}" height="${s}" viewBox="${c}">${l}</svg>`),t+=28+Number(s)+36,n=Math.max(n,Number(o))}let a=Math.max(1,t-36);return`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${n}" height="${a}" viewBox="0 0 ${n} ${a}"><rect width="${n}" height="${a}" fill="#ffffff"/>${r.join(``)}</svg>\n`}export{_ as n,b as r,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{c as t,s as n}from"./chunk-engine-CxgdJ2wO.js";import{l as r,t as i}from"./chunk-apply-BAMwoXG9.js";import{a,i as o,t as s}from"./chunk-context-DPJmldqg.js";import{readFileSync as c,statSync as l}from"node:fs";const u=8388608;function d(e,r){return t(a(s(e).values.engine))??n(r)??`classic`}function f(e){return o(s(e).values.conventions)}async function p(t,n){let a;try{if(l(t).size>u)return{ok:!1,message:e(`app.agent.reason.fileTooLarge`,{limit:u/1048576})};a=c(t,`utf8`)}catch{return{ok:!1,message:e(`app.agent.reason.noSuchFile`)}}let o=d(t,a),s;try{s=r(n,o)}catch(e){return{ok:!1,message:e instanceof Error?e.message:String(e)}}let p=await i(a,{operations:s},{engine:o,conventions:f(t)});if(!p.ok||p.xml===void 0){let t=p.failedAt!==void 0&&p.failedAt>=0?p.steps[p.failedAt]:void 0;return{ok:!1,message:e(`app.cli.edit.operationFailed`,{number:(t?.index??0)+1,message:t?.error??e(`app.cli.edit.didNotReadBack`)})}}return{ok:!0,before:a,after:p.xml,applied:p.steps.map(e=>e.summary)}}export{d as n,p as r,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={classic:{key:`classic`,kind:`CLASSIC_BPMN`,label:`Classic BPMN`,family:`classic`,namespace:``,moddle:`plain`,javaPackage:``,testConfigFile:``},"camunda-7":{key:`camunda-7`,kind:`CAMUNDA_7`,label:`Camunda 7`,family:`camunda-7`,namespace:`camunda`,moddle:`camunda`,javaPackage:`org.camunda`,testConfigFile:`camunda.cfg.xml`},"camunda-8":{key:`camunda-8`,kind:`CAMUNDA_8`,label:`Camunda 8`,family:`camunda-8`,namespace:`zeebe`,moddle:`zeebe`,javaPackage:`io.camunda`,testConfigFile:``},operaton:{key:`operaton`,kind:`OPERATON`,label:`Operaton`,family:`camunda-7`,namespace:`operaton`,moddle:`operaton`,javaPackage:`org.operaton`,testConfigFile:`operaton.cfg.xml`},"cib-seven":{key:`cib-seven`,kind:`CIB_SEVEN`,label:`CIB seven`,family:`camunda-7`,namespace:`camunda`,moddle:`camunda`,javaPackage:`org.cibseven`,testConfigFile:`cibseven.cfg.xml`},flowable:{key:`flowable`,kind:`FLOWABLE`,label:`Flowable`,family:`flowable`,namespace:`flowable`,moddle:`flowable`,javaPackage:`org.flowable`,testConfigFile:``},activiti:{key:`activiti`,kind:`ACTIVITI`,label:`Activiti`,family:`activiti`,namespace:`activiti`,moddle:`activiti`,javaPackage:`org.activiti`,testConfigFile:``}},t=Object.keys(e),n=t.filter(t=>e[t].family===`camunda-7`),r={"camunda-7":{version:`7.24.0`,springBoot:`3.5.5`,bpmGroup:`org.camunda.bpm`,springBootGroup:`org.camunda.bpm.springboot`,starter:`camunda-bpm-spring-boot-starter`,rest:`camunda-bpm-spring-boot-starter-rest`,webapp:`camunda-bpm-spring-boot-starter-webapp`,externalTaskStarter:`camunda-bpm-spring-boot-starter-external-task-client`,client:`camunda-external-task-client`},operaton:{version:`2.1.5`,springBoot:`3.5.14`,bpmGroup:`org.operaton.bpm`,springBootGroup:`org.operaton.bpm.springboot`,starter:`operaton-bpm-spring-boot-starter`,rest:`operaton-bpm-spring-boot-starter-rest`,webapp:`operaton-bpm-spring-boot-starter-webapp`,externalTaskStarter:`operaton-bpm-spring-boot-starter-external-task-client`,client:`operaton-external-task-client`},"cib-seven":{version:`2.2.0`,springBoot:`3.5.14`,bpmGroup:`org.cibseven.bpm`,springBootGroup:`org.cibseven.bpm.springboot`,starter:`cibseven-bpm-spring-boot-starter`,rest:`cibseven-bpm-spring-boot-starter-rest`,webapp:`cibseven-bpm-spring-boot-starter-webapp`,externalTaskStarter:`cibseven-bpm-spring-boot-starter-external-task-client`,client:`cibseven-external-task-client`}},i={"cib-seven":{springBoot:`4.0.6`,starter:`cibseven-bpm-spring-boot-starter-4`,rest:`cibseven-bpm-spring-boot-starter-rest-4`,webapp:`cibseven-bpm-spring-boot-starter-webapp-4`,externalTaskStarter:`cibseven-bpm-spring-boot-starter-external-task-client-4`}};function a(e,t=`3`){if(t===`3`)return r[e];let n=i[e];return n?{...r[e],...n}:null}const o={"camunda-7":{bpmn:`http://camunda.org/schema/1.0/bpmn`,dmn:`http://camunda.org/schema/1.0/dmn`,platform:`Camunda Platform`,settings:`camunda`},operaton:{bpmn:`http://operaton.org/schema/1.0/bpmn`,dmn:`http://operaton.org/schema/1.0/dmn`,platform:`Operaton`,settings:`operaton`},"cib-seven":{bpmn:`http://camunda.org/schema/1.0/bpmn`,dmn:`http://camunda.org/schema/1.0/dmn`,platform:`Camunda Platform`,settings:`camunda`}},s={classic:`classic`,classic_bpmn:`classic`,"classic-bpmn":`classic`,"camunda-7":`camunda-7`,camunda_7:`camunda-7`,camunda7:`camunda-7`,"camunda 7":`camunda-7`,"camunda-8":`camunda-8`,camunda_8:`camunda-8`,camunda8:`camunda-8`,"camunda 8":`camunda-8`,operaton:`operaton`,"cib-seven":`cib-seven`,cib_seven:`cib-seven`,cibseven:`cib-seven`,"cib seven":`cib-seven`,flowable:`flowable`,flowable6:`flowable`,"flowable-6":`flowable`,flowable_6:`flowable`,"flowable 6":`flowable`,flowable7:`flowable`,"flowable-7":`flowable`,flowable_7:`flowable`,"flowable 7":`flowable`,activiti:`activiti`,activiti7:`activiti`,"activiti-7":`activiti`,activiti_7:`activiti`,"activiti 7":`activiti`};function c(e){let t=String(e??``).trim().toLowerCase();return Object.hasOwn(s,t)?s[t]:null}function l(t){let n=c(t);return n?e[n]:null}function u(e){return l(e)?.family===`camunda-7`}function d(e){return l(e)?.family===`camunda-8`}function f(e){let t=l(e)?.family;return t===`flowable`||t===`activiti`}function p(e,t){let n=l(t);return n?e.some(e=>{let t=c(e);return t!==null&&(t===n.key||t===n.family)}):!1}function m(e){return l(e)?.namespace??``}function h(e){return l(e)?.kind??`CAMUNDA_7`}function g(e){return l(e)?.label??String(e??``)}function _(t){return l(t)?.testConfigFile||e[`camunda-7`].testConfigFile}function v(t){return l(t)?.javaPackage||e[`camunda-7`].javaPackage}function y(e){return l(e)?.moddle??`plain`}const b=`http://flowable.org/bpmn`,x=`http://activiti.org/bpmn`,S=/executionPlatform"?\s*[=:]\s*"([^"]+)"/,C=/<(?:\w+:)?(?:task|\w+Task|\w+Event|\w+Gateway|subProcess|callActivity|decision|participant)\b/;function w(e){let t=S.exec(e)?.[1];if(t){if(/operaton/i.test(t))return`operaton`;if(/cib[\s_-]?seven/i.test(t))return`cib-seven`;if(/flowable/i.test(t))return`flowable`;if(/activiti/i.test(t))return`activiti`;if(/cloud/i.test(t)||t.includes(`8`))return`camunda-8`;if(/platform/i.test(t)||t.includes(`7`))return`camunda-7`}return e.includes(`zeebe:`)?`camunda-8`:e.includes(`flowable:`)||e.includes(`http://flowable.org/bpmn`)?`flowable`:e.includes(`activiti:`)||e.includes(`http://activiti.org/bpmn`)?`activiti`:e.includes(`operaton:`)?`operaton`:e.includes(`camunda:`)?`camunda-7`:e.includes(`"components"`)?`camunda-8`:C.test(e)?`classic`:null}function T(e){return Object.keys(r).find(t=>{let n=r[t];return e.includes(n.springBootGroup)||e.includes(n.client)})??null}export{v as _,b as a,l as b,c,p as d,m as f,f as g,d as h,t as i,h as l,u as m,n,r as o,T as p,o as r,w as s,x as t,g as u,a as v,_ as x,y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{n as exportCommand}from"./chunk-export-D5kPD4Or.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{s as t}from"./chunk-failure-BsimkHy_.js";import{r as n}from"./chunk-context-DPJmldqg.js";import{n as r}from"./chunk-project-qT-Fk_Rz.js";import{t as i}from"./chunk-drawing-shRfnrs9.js";import{n as a}from"./chunk-systemError-B-1nL94i.js";import{createRequire as o}from"node:module";import s from"node:path";import{mkdirSync as c,readFileSync as l,writeFileSync as u}from"node:fs";const d=o(import.meta.url);function f(){return[e(`app.cli.export.needsBrowser`),e(`app.cli.export.installBrowser`),` npm i -D puppeteer`]}async function p(){try{return await d("puppeteer").launch({headless:!0})}catch{return null}}async function m(e,t,n={}){return u(t,(await i(l(e,`utf8`),n)).svg),t}async function h(t,n,r){let i=await t.evaluate(`(async () => {
|
|
2
|
+
const svg = ${JSON.stringify(n)};
|
|
3
|
+
const image = new Image();
|
|
4
|
+
const loaded = new Promise((resolve, reject) => {
|
|
5
|
+
image.onload = resolve;
|
|
6
|
+
image.onerror = () => reject(new Error(${JSON.stringify(e(`app.output.couldNotBePainted`))}));
|
|
7
|
+
});
|
|
8
|
+
image.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svg);
|
|
9
|
+
await loaded;
|
|
10
|
+
|
|
11
|
+
const scale = ${r};
|
|
12
|
+
const canvas = document.createElement('canvas');
|
|
13
|
+
canvas.width = Math.max(1, Math.ceil(image.width * scale));
|
|
14
|
+
canvas.height = Math.max(1, Math.ceil(image.height * scale));
|
|
15
|
+
const context = canvas.getContext('2d');
|
|
16
|
+
context.fillStyle = '#ffffff';
|
|
17
|
+
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
18
|
+
context.drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
19
|
+
return canvas.toDataURL('image/png').split(',')[1];
|
|
20
|
+
})()`);return Buffer.from(i,`base64`)}async function g(o,d,m,g=p){let _=d===`text`?`svg`:d;if(![`svg`,`png`].includes(_))return{ok:!1,lines:[e(`app.cli.export.unknownFormat`,{format:_})]};let v=_===`png`?await g():null;if(_===`png`&&!v)return{ok:!1,lines:f()};let y=[],b=!0;try{let d=v?await v.newPage():null;for(let f of o){let o;try{o=await i(l(f,`utf8`))}catch(e){b=!1,y.push(t(n(f),e));continue}let p=m??s.dirname(f),g=s.join(p,`${r(f)}.${_}`),v=o.svg;try{d&&(v=await h(d,o.svg,2))}catch(e){b=!1,y.push(`${n(f)}: ${e instanceof Error?e.message:String(e)}`);continue}try{c(p,{recursive:!0}),u(g,v)}catch(e){b=!1,y.push(a(e,g));continue}y.push(e(`app.cli.wrote`,{file:n(g)}),...o.skipped.map(t=>e(`app.cli.export.notDrawn`,{element:t})))}}finally{await v?.close()}return{ok:b,refused:!1,lines:y}}export{g as n,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{n as t}from"./chunk-codeFactSet-DOOlbIIj.js";async function n(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));return Buffer.concat(e).toString(`utf8`)}function r(e){try{return JSON.parse(e)}catch{return}}function i(e){let t=r(e);if(typeof t!=`object`||!t||!Array.isArray(t.files))return null;let n=[];for(let e of t.files){if(typeof e!=`object`||!e)return null;let{path:t,text:r}=e;if(typeof t!=`string`||typeof r!=`string`)return null;n.push({path:t,text:r})}return n}async function a(n){let r=i(n);return r===null?{ok:!1,lines:[e(`app.cli.facts.badInput`)]}:{ok:!0,lines:[JSON.stringify(await t(r))]}}export{a as factsCommand,n as readStandardInput};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{fn as t,mn as n,rn as r}from"./chunk-src-BLyg_6UX.js";function i(e){if(!(e instanceof Error))return String(e);let t=e.cause,n=t?.message||t?.errors?.[0]?.message||t?.code;return n&&!e.message.includes(n)?`${e.message}: ${n}`:e.message}const a=/ENOENT|no such file or directory/i;function o(t){return e(`app.output.noSuchPath`,{target:t})}function s(e){let t=e?.code,n=e?.cause;return a.test(String(t??``))||a.test(String(n?.code??``))||a.test(e instanceof Error?e.message:``)}function c(e){return e?.code===`EISDIR`||/\bEISDIR\b/.test(e instanceof Error?e.message:``)}const l=/^E[A-Z0-9]+$/;function u(e){if(!(e instanceof Error))return null;let t=e.code;return typeof t!=`string`||!l.test(t)?null:e.message.replace(/^[A-Z0-9_]+:\s*/,``).replace(/,\s*\w+\s+'.*'$/s,``)}function d(i,a){if(s(a))return o(i);if(c(a))return e(`app.output.isAFolder`,{file:i});let l=u(a);if(l!==null)return`${i}: ${l}`;let d=t(a instanceof Error?a:Error(String(a)));return e(`app.output.notValid`,{file:i,what:r(i),reason:n(d)})}const f=[[/\.dmn$/i,`decision`],[/\.form$/i,`form`]];function p(t){if(/\.bpmn(\.xml|20\.xml)?$/i.test(t))return null;let n=f.find(([e])=>e.test(t)),r=e(n?`app.output.kind.${n[1]}`:`app.output.kind.notBpmn`);return e(`app.output.notABpmnDiagram`,{file:t,kind:r})}export{u as a,p as i,s as n,i as o,o as r,d as s,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,t as n,u as r}from"./chunk-license-x3oHbKe2.js";import{r as i}from"./chunk-translator-BFUJmSkR.js";function a(e){return i(`app.features.${e}.title`)}function o(e){return i(`app.features.${e}.gives`)}function s(){let e=n.educationUrl.trim();return e?i(`app.features.education`,{url:e}):null}function c(e){let t=(e.env??process.env).CI;return!!t&&t!==`false`}function l(e={}){return c(e)?`team`:`pro`}function u(e,n={}){return t[e.tier]>=t[l(n)]}function d(t,r,u={}){let d=l(u),f=c(u)?i(`app.features.inAPipeline`):``,p=o(r),m=[i(`app.features.partOf`,{title:a(r),where:f,tier:e[d],gives:p.charAt(0).toUpperCase()+p.slice(1)})];if(t.source===`environment`)return m.push(i(`app.features.theKeyHolds`,{have:e[t.tier],need:e[d]})),m;if(c(u))return m.push(i(`app.features.giveThePipelineAKey`,{tier:e[d]})),m;t.trialEndsAt&&t.tier===`free`&&m.push(i(`app.features.trialHasEnded`,{days:n.trialDays})),m.push(` penstock license buy${d===`team`?` team`:``} ${i(`app.features.buyIt`)}`),m.push(` penstock license login ${i(`app.features.alreadyBought`)}`);let h=s();return h&&m.push(` ${h}`),m}async function f(e,t={}){let n=await r(t);return u(n,t)?null:{ok:!1,lines:d(n,e,t)}}export{f as a,a as i,s as n,l as o,o as r,d as s,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as allows,s as upsell}from"./chunk-features-BfRg2kR5.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{t}from"./chunk-load-BVJUBU5S.js";import n from"node:path";import{homedir as r}from"node:os";import{accessSync as i,constants as a,existsSync as o,realpathSync as s}from"node:fs";const c=1e5;var l=class extends Error{constructor(){super(e(`app.output.folderTooLarge`))}};function u(e){try{return i(e,a.R_OK|a.X_OK),!0}catch{return!1}}function d(e){if(e!==void 0)try{return s(e)}catch{return}}function f(e){return t.some(t=>o(n.join(e,t)))||o(n.join(e,`.git`))}function p(e,t={}){let i=s(e),a=d(t.root)??n.parse(i).root,o=d(t.home??r());if((i===a||o!==void 0&&i===o)&&!f(i))throw new l;let c=t.limit??1e5,u=0;return()=>{if(u+=1,u>c)throw new l}}export{p as i,c as n,u as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as FolderTooLarge}from"./chunk-folders-13vx0i0n.js";
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import e from"node:path";import{tmpdir as t}from"node:os";import{mkdtempSync as n,rmSync as r,writeFileSync as i}from"node:fs";import{spawnSync as a}from"node:child_process";function o(e,t){let n=a(`git`,t,{cwd:e,encoding:`utf8`,maxBuffer:1073741824});return{ok:n.status===0,out:(n.stdout??``).trim()}}let s,c=0;function l(){s!==void 0&&(r(s,{recursive:!0,force:!0}),s=void 0,c=0,process.off(`exit`,l))}function u(){return s===void 0&&(s=n(e.join(t(),`penstock-scratch-`)),process.once(`exit`,l)),s}const d=/^[A-Za-z0-9][A-Za-z0-9._/~@-]*$/,f=/^[A-Za-z0-9][A-Za-z0-9._/-]*$/;function p(e){return e.length===0||e.length>200||!d.test(e)?!1:!e.includes(`..`)&&!e.includes(`//`)&&!e.includes(`@{`)&&!e.endsWith(`/`)&&!e.endsWith(`.`)&&!e.endsWith(`.lock`)}const m=[`*.bpmn`,`*.bpmn20.xml`],h=[...m,`*.dmn`,`*.form`];function g(e,t,n=!1){let r=n?h:m,i=o(e,[`diff`,`--name-status`,o(e,[`merge-base`,t,`HEAD`]).out||t,`--`,...r]),a=o(e,[`ls-files`,`--others`,`--exclude-standard`,`--`,...r]).out.split(`
|
|
2
|
+
`).filter(Boolean),s=[],c=[],l={};for(let e of i.out.split(`
|
|
3
|
+
`).filter(Boolean)){let[t,...n]=e.split(` `),r=n[n.length-1];t.startsWith(`A`)||t.startsWith(`C`)?a.push(r):t.startsWith(`D`)?c.push(r):(s.push(r),t.startsWith(`R`)&&(l[r]=n[0]))}return{added:a,changed:s,removed:c,previous:l}}function _(t,n,r){if(!p(n))return null;let a=o(t,[`show`,`${n}:${r}`]);if(!a.ok||!a.out)return null;c+=1;let s=e.join(u(),`${c}-${e.basename(r)}`);return i(s,`${a.out}\n`),s}function v(t,n){let r=g(t,n);return{changed:[...r.changed.map(i=>({relative:i,after:e.join(t,i),before:_(t,n,r.previous[i]??i)??void 0})),...r.added.map(n=>({relative:n,after:e.join(t,n)}))],removed:r.removed}}function y(e,t){if(!p(t))return null;let n=t.replace(/^origin\//,``),r=f.test(t)?[[`fetch`,`--no-tags`,`--quiet`,`origin`,`+refs/heads/${n}:refs/remotes/origin/${n}`],[`fetch`,`--quiet`,`origin`,`+refs/tags/${n}:refs/tags/${n}`]]:[];for(let r of[t,`origin/${n}`,n])if(o(e,[`rev-parse`,`--verify`,`--quiet`,`${r}^{commit}`]).ok)return r;for(let t of r)o(e,t);for(let r of[t,`origin/${n}`,n])if(o(e,[`rev-parse`,`--verify`,`--quiet`,`${r}^{commit}`]).ok)return r;return null}function b(e,t){if(!p(t))return!1;let n=o(e,[`rev-parse`,`HEAD`]),r=o(e,[`rev-parse`,`--verify`,`--quiet`,`${t}^{commit}`]);return n.ok&&r.ok&&n.out===r.out}function x(e,t){return!p(t)||!o(e,[`fetch`,`--quiet`,`origin`,t]).ok?!1:o(e,[`checkout`,`--quiet`,`--detach`,`FETCH_HEAD`]).ok}function S(e){return o(e,[`rev-parse`,`--is-inside-work-tree`]).ok}function C(t,n){let r=o(t,[`rev-parse`,`--git-path`,n]);return r.ok&&r.out?e.resolve(t,r.out):null}export{C as a,y as c,_ as i,l,x as n,b as o,v as r,S as s,g as t,p as u};
|
|
@@ -0,0 +1,85 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|