@kern0x1b/penstock-cli 26.10.5 → 26.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-account-C8EHysMH.js → chunk-account-CMvFjqGw.js} +1 -1
- package/dist/{chunk-agentFailure-piRAFLGH.js → chunk-agentFailure-BiU8hJ-k.js} +1 -1
- package/dist/{chunk-agentLaunch-C5Uo40vv.js → chunk-agentLaunch-CRWlfuXv.js} +1 -1
- package/dist/{chunk-agentServe-4O0syoYQ.js → chunk-agentServe-M3jzEiHj.js} +1 -1
- package/dist/{chunk-analyze-Brxlb4U1.js → chunk-analyze-CCZJQpbU.js} +1 -1
- package/dist/chunk-analyze-D_2dPr5n.js +1 -0
- package/dist/chunk-apply-Dmo_XdOA.js +1 -0
- package/dist/{chunk-bot-I4kuhjyv.js → chunk-bot-51CfGKVL.js} +3 -3
- package/dist/chunk-codeFactSet-BqEOkvBS.js +1 -0
- package/dist/{chunk-codeIndex-CzENd6hG.js → chunk-codeIndex-olvCG85q.js} +1 -1
- package/dist/{chunk-codeLinks-D-gzUjYv.js → chunk-codeLinks-DW721PAt.js} +1 -1
- package/dist/chunk-codeLinks-S_BEJVPa.js +1 -0
- package/dist/{chunk-command-BctoT00W.js → chunk-command-B-7DfFou.js} +1 -1
- package/dist/chunk-command-CyUljAAc.js +1 -0
- package/dist/{chunk-command-Jl1msVwF.js → chunk-command-D7WS1aRl.js} +1 -1
- package/dist/chunk-commands-CMEkVxle.js +1 -0
- package/dist/{chunk-compose-BV9Jg348.js → chunk-compose-DCAQQndd.js} +1 -1
- package/dist/{chunk-connectors-CVfz5pSg.js → chunk-connectors-DG6IqkGl.js} +1 -1
- package/dist/{chunk-connectors-eXPldvkc.js → chunk-connectors-UpMjbdpU.js} +1 -1
- package/dist/{chunk-context-DPJmldqg.js → chunk-context-B-5CZFAT.js} +1 -1
- package/dist/{chunk-convert-B1sgT9kl.js → chunk-convert-B7srqZpZ.js} +1 -1
- package/dist/chunk-deploy-CGLF2dB1.js +1 -0
- package/dist/{chunk-deploy-DOXu2-8q.js → chunk-deploy-Clj9f2y-.js} +1 -1
- package/dist/chunk-diagram-CIy-F5iz.js +1 -0
- package/dist/{chunk-diagram-BaVwLa4h.js → chunk-diagram-DYoeuAJx.js} +1 -1
- package/dist/{chunk-diagramDefects-7UG_Iwsr.js → chunk-diagramDefects-DlVCfZci.js} +1 -1
- package/dist/{chunk-diagrams-6suPQBVQ.js → chunk-diagrams-wnFsPOKv.js} +1 -1
- package/dist/{chunk-diff-D1m_eKvv.js → chunk-diff-BJ2sJwcs.js} +1 -1
- package/dist/chunk-diff-BelMuQhT.js +1 -0
- package/dist/chunk-dispatch-CescmVW-.js +6 -0
- package/dist/{chunk-docs-CwY3Ce9M.js → chunk-docs-DzOiA9zg.js} +4 -4
- package/dist/{chunk-doctor-m0mnVdDE.js → chunk-doctor-GDNwRCg3.js} +1 -1
- package/dist/{chunk-drawing-shRfnrs9.js → chunk-drawing-C2qewK8L.js} +1 -1
- package/dist/{chunk-editPreview-BgH1JVOD.js → chunk-editPreview-DGu4slO6.js} +1 -1
- package/dist/chunk-export-CDFdw7Eh.js +1 -0
- package/dist/{chunk-export-D5kPD4Or.js → chunk-export-DP1Hab-_.js} +1 -1
- package/dist/{chunk-facts-DA3Y-k9a.js → chunk-facts-CfA8qH5b.js} +1 -1
- package/dist/{chunk-failure-BsimkHy_.js → chunk-failure-BK7fu4Yo.js} +1 -1
- package/dist/{chunk-features-BfRg2kR5.js → chunk-features-CiC2Yoej.js} +1 -1
- package/dist/chunk-features-Dq1Gvqp3.js +1 -0
- package/dist/chunk-folders-BO8qUHUV.js +1 -0
- package/dist/{chunk-folders-13vx0i0n.js → chunk-folders-yTMgOqLo.js} +1 -1
- package/dist/chunk-formChecks-BOiD8Idv.js +1 -0
- package/dist/chunk-help-DKtpVSxI.js +85 -0
- package/dist/chunk-importCommand-_CnKIoNk.js +1 -0
- package/dist/{chunk-init-AIh_7yE0.js → chunk-init-3zEab7KI.js} +3 -3
- package/dist/chunk-license-Cvnp1Aee.js +1 -0
- package/dist/{chunk-license-x3oHbKe2.js → chunk-license-DU4P8P8A.js} +1 -1
- package/dist/{chunk-lint-C_fAcLIg.js → chunk-lint-Df2davEY.js} +1 -1
- package/dist/{chunk-load-BVJUBU5S.js → chunk-load-CRmIvn7e.js} +1 -1
- package/dist/chunk-main-BY7JEoe1.js +1 -0
- package/dist/chunk-mcp-DKX2xT8d.js +77 -0
- package/dist/{chunk-mcpLaunch-C13ViiIP.js → chunk-mcpLaunch-DpDE0hW-.js} +1 -1
- package/dist/chunk-migrate-BaNzQNyD.js +2 -0
- package/dist/chunk-migrate-DcxIkacG.js +1 -0
- package/dist/{chunk-penstockCli-CqiOKC75.js → chunk-penstockCli-B0_wWDGy.js} +1 -1
- package/dist/chunk-plural-Di3FH8HP.js +1 -0
- package/dist/{chunk-pr-tC3-PSNM.js → chunk-pr-DXs1coaS.js} +1 -1
- package/dist/{chunk-project-qT-Fk_Rz.js → chunk-project-BS-4dy5o.js} +1 -1
- package/dist/{chunk-report-CDz78nCI.js → chunk-report-CtkTRSGT.js} +1 -1
- package/dist/{chunk-review-BqZSohXR.js → chunk-review-WIpFGKkc.js} +1 -1
- package/dist/{chunk-rules-DJlL7K_Q.js → chunk-rules-CoJAmvwu.js} +1 -1
- package/dist/{chunk-security-5SU-bq3A.js → chunk-security-BKVRwb6V.js} +10 -10
- package/dist/{chunk-share-YSewfw3F.js → chunk-share-B3W30sbt.js} +3 -3
- package/dist/chunk-src-CxTpK8wk.js +890 -0
- package/dist/{chunk-stages-C-nhLoBW.js → chunk-stages-Gm5BZUp5.js} +1 -1
- package/dist/chunk-status-X9Ny-Nu8.js +1 -0
- package/dist/{chunk-systemError-B-1nL94i.js → chunk-systemError-F6bMRwXU.js} +1 -1
- package/dist/chunk-systemError-cGwrYkmo.js +1 -0
- package/dist/{chunk-table-CJtiXv0e.js → chunk-table-B2WTbpMl.js} +1 -1
- package/dist/chunk-taskTest-B3gfOti1.js +1 -0
- package/dist/{chunk-taskTest-4rIxp0rL.js → chunk-taskTest-D-WDCLD5.js} +2 -2
- package/dist/{chunk-templates-Bxe3J0qy.js → chunk-templates-BdsiNRJ3.js} +1 -1
- package/dist/chunk-testCases-ba8k3BJD.js +4 -0
- package/dist/chunk-testCases-gXzkCxF5.js +1 -0
- package/dist/chunk-tests-BLBZ1eh2.js +1 -0
- package/dist/chunk-tests-DxL0JMtB.js +23 -0
- package/dist/chunk-translator-BAjzyPKE.js +22 -0
- package/dist/{chunk-trust-u1vZ6Yk0.js → chunk-trust-Ci9pDa27.js} +1 -1
- package/dist/{chunk-trust-yKw_pXRj.js → chunk-trust-DlJIoKs8.js} +1 -1
- package/dist/{chunk-workerVariables-CCLcoR0U.js → chunk-workerVariables-BnLSud8o.js} +1 -1
- package/dist/{chunk-wrapper-AJWl6ru-.js → chunk-wrapper-DqqRt0FZ.js} +1 -1
- package/dist/chunk-wrapper-E_u1_-Db.js +1 -0
- package/dist/locales/de.json +103 -2
- package/dist/locales/es.json +103 -2
- package/dist/locales/fr.json +103 -2
- package/dist/locales/ja.json +103 -2
- package/dist/locales/ko.json +103 -2
- package/dist/locales/pt-BR.json +103 -2
- package/dist/locales/ru.json +103 -2
- package/dist/locales/zh.json +103 -2
- package/dist/penstock.js +1 -1
- package/dist/web/assets/{AgentSettings-C3Er_rlW.js → AgentSettings-4B4hSxBk.js} +1 -1
- package/dist/web/assets/{AgentsDialog-Bo7kikb6.js → AgentsDialog-C32ALLtE.js} +1 -1
- package/dist/web/assets/{BpmnCanvas-Dw5zgCN3.js → BpmnCanvas-CZOJiq6t.js} +1 -1
- package/dist/web/assets/{BpmnDocument-CuU0biX9.js → BpmnDocument-BNLfXWLG.js} +4 -4
- package/dist/web/assets/{ConflictDialog-GxZ-d8SK.js → ConflictDialog-mUJYs1zz.js} +1 -1
- package/dist/web/assets/{DiffDocument-Bh3hFmmi.js → DiffDocument-C7csJl3x.js} +1 -1
- package/dist/web/assets/{DmnDocument-C8HpJAcE.js → DmnDocument-B2dyX49k.js} +1 -1
- package/dist/web/assets/{FormDocument-CH-4KB3x.js → FormDocument-ChSqEPE5.js} +1 -1
- package/dist/web/assets/{FormStepView-DraPVoAN.js → FormStepView-j4C0Qovo.js} +1 -1
- package/dist/web/assets/{GraphAwareLayoutService-C8J8YHJI.js → GraphAwareLayoutService-DD2iXfXi.js} +1 -1
- package/dist/web/assets/{NewFileDialog-j09JqpPj.js → NewFileDialog-eeIqqmXc.js} +1 -1
- package/dist/web/assets/{QuickOpen-CeBhsCzA.js → QuickOpen-C0I0FRt2.js} +1 -1
- package/dist/web/assets/{ScriptPane-DDikZDv6.js → ScriptPane-BAvcgLWX.js} +2 -2
- package/dist/web/assets/{ScriptRunDialog-DdzJ0pvT.js → ScriptRunDialog-DLlMiJiK.js} +1 -1
- package/dist/web/assets/{SettingsDialog-JUc5zUR9.js → SettingsDialog-C3ts5aiN.js} +1 -1
- package/dist/web/assets/{ShortcutsDialog-DECqWPNE.js → ShortcutsDialog-DVV504pS.js} +1 -1
- package/dist/web/assets/{SourceDocument-X8ajUcxM.js → SourceDocument-DRgUPazk.js} +1 -1
- package/dist/web/assets/{TextDocument-0z7qojAh.js → TextDocument-Bm0sPjft.js} +1 -1
- package/dist/web/assets/{UnreadableFileLayer-D3G59F4u.js → UnreadableFileLayer-DbW33CnE.js} +1 -1
- package/dist/web/assets/{UploadDialog-CiahYkTc.js → UploadDialog-BSl3zFNn.js} +1 -1
- package/dist/web/assets/{apply-HqvoGwLE.js → apply-B3FkgxjU.js} +1 -1
- package/dist/web/assets/{bpmnTheme-cOvp4qFc.js → bpmnTheme-C3HdVV1D.js} +1 -1
- package/dist/web/assets/bridgeInstance-BZBhe5hF.js +851 -0
- package/dist/web/assets/{commands-nPznxvPp.js → commands-DHPxsavW.js} +1 -1
- package/dist/web/assets/de-BH_bnU4H.js +1 -0
- package/dist/web/assets/{dialog-CtGB1LHI.js → dialog-LcHsiQKJ.js} +1 -1
- package/dist/web/assets/{diff-NgYeO98t.js → diff-bpdDl0KE.js} +1 -1
- package/dist/web/assets/{documentBridge-QW0IZ9Bq.js → documentBridge-4fZNBdp4.js} +2 -2
- package/dist/web/assets/{documents-KeXEdK1U.js → documents-FOVGbYYF.js} +1 -1
- package/dist/web/assets/{duplicate-DNPpPVse.js → duplicate-CdCuOnUl.js} +1 -1
- package/dist/web/assets/{engines-DU0BfbYM.js → engines-C884tl-T.js} +1 -1
- package/dist/web/assets/es-D7v7zkxC.js +1 -0
- package/dist/web/assets/{formChecks-sU20kKkU.js → formChecks-Bvuzw2sb.js} +1 -1
- package/dist/web/assets/fr-CuzAJTai.js +1 -0
- package/dist/web/assets/frontend-Y1MvD_Uo.js +1 -0
- package/dist/web/assets/httpHost-CnF86WJB.js +1 -0
- package/dist/web/assets/{index.es-BqVUpGyA.js → index.es-0rLw__5_.js} +1 -1
- package/dist/web/assets/{index.es-DqkfrvWI.js → index.es-BP1Cc_0e.js} +1 -1
- package/dist/web/assets/{intelligence-Ck_Q9upa.js → intelligence-E2EBYhHr.js} +1 -1
- package/dist/web/assets/ja-BgElyPpa.js +1 -0
- package/dist/web/assets/{jspdf.es.min-CM3S4IDt.js → jspdf.es.min-BSRrqhq_.js} +3 -3
- package/dist/web/assets/ko-j1Oi9MKH.js +1 -0
- package/dist/web/assets/{lib-DAKOOgix.js → lib-De3fPoUi.js} +1 -1
- package/dist/web/assets/{platform-CkWAyNst.js → platform-CjEV0T5t.js} +1 -1
- package/dist/web/assets/{preferences-nBrFGN89.js → preferences-CmXdxfFo.js} +1 -1
- package/dist/web/assets/pt-BR-CRWG2th4.js +1 -0
- package/dist/web/assets/ru-KJyuYSUL.js +1 -0
- package/dist/web/assets/{run-B3YvrVeP.js → run-B9EUa035.js} +1 -1
- package/dist/web/assets/{samples-BVuIm-bu.js → samples-03zukOEM.js} +1 -1
- package/dist/web/assets/{testCaseRuns-DYKnccnc.js → testCaseRuns-BYhJPipg.js} +1 -1
- package/dist/web/assets/translator-OIpY8kTG.js +1 -0
- package/dist/web/assets/{ui-3pEQJ50t.js → ui-BLMlfdD3.js} +1 -1
- package/dist/web/assets/{useTrace-BAXnn0Bt.js → useTrace-Cr28sh4A.js} +1 -1
- package/dist/web/assets/{web-B2zkonPE.js → web-Q9VZNxQi.js} +5 -5
- package/dist/web/assets/zh-CukDLcVz.js +1 -0
- package/dist/web/index.html +19 -19
- package/package.json +1 -1
- package/dist/chunk-analyze-CUxuBgNS.js +0 -1
- package/dist/chunk-apply-BAMwoXG9.js +0 -1
- package/dist/chunk-baseline-DvS2S0am.js +0 -1
- package/dist/chunk-codeFactSet-DOOlbIIj.js +0 -1
- package/dist/chunk-codeLinks-DLxEBWPi.js +0 -1
- package/dist/chunk-command-BR4memGJ.js +0 -1
- package/dist/chunk-commands-CeRlfHY-.js +0 -1
- package/dist/chunk-deploy-C4KJK-tw.js +0 -1
- package/dist/chunk-diagram-CCA1-fT5.js +0 -1
- package/dist/chunk-diff-BC8gZX5w.js +0 -1
- package/dist/chunk-dispatch-CW2CJI0C.js +0 -6
- package/dist/chunk-export-9AWsr5ai.js +0 -1
- package/dist/chunk-features-BwnwB6jL.js +0 -1
- package/dist/chunk-folders-C1Nes4Ap.js +0 -1
- package/dist/chunk-formChecks-acRgARZ3.js +0 -1
- package/dist/chunk-help-CFhmAhz8.js +0 -85
- package/dist/chunk-importCommand-5SJxu2k4.js +0 -1
- package/dist/chunk-license-B_To2110.js +0 -1
- package/dist/chunk-main-D3S4Xr__.js +0 -1
- package/dist/chunk-mcp-ByMCWlXC.js +0 -76
- package/dist/chunk-migrate-CLQ-hrae.js +0 -1
- package/dist/chunk-migrate-CVUR1K7f.js +0 -1
- package/dist/chunk-plural-Bq_4vgOr.js +0 -1
- package/dist/chunk-src-BLyg_6UX.js +0 -879
- package/dist/chunk-status-DgeSOz3A.js +0 -1
- package/dist/chunk-systemError-2me5k57V.js +0 -1
- package/dist/chunk-taskTest-rng12v_b.js +0 -1
- package/dist/chunk-testCases-CwQ-Mi7L.js +0 -1
- package/dist/chunk-testCases-xculyxH_.js +0 -4
- package/dist/chunk-tests-C-kNQNpq.js +0 -1
- package/dist/chunk-tests-C3XJ9LMT.js +0 -23
- package/dist/chunk-translator-BFUJmSkR.js +0 -21
- package/dist/chunk-wrapper-Bxz1Lgp5.js +0 -1
- package/dist/web/assets/bridgeInstance-DQk-c8L1.js +0 -850
- package/dist/web/assets/de-Dj813wjn.js +0 -1
- package/dist/web/assets/es-CyJDEw4H.js +0 -1
- package/dist/web/assets/fr-B1lqrd3d.js +0 -1
- package/dist/web/assets/frontend-caI7mOAL.js +0 -1
- package/dist/web/assets/httpHost-Dqit__mm.js +0 -1
- package/dist/web/assets/ja-BUAM_DzQ.js +0 -1
- package/dist/web/assets/ko-7l4EjTF9.js +0 -1
- package/dist/web/assets/pt-BR-CxxRL7kF.js +0 -1
- package/dist/web/assets/ru-C4gbkVXL.js +0 -1
- package/dist/web/assets/translator-B2N3PQBL.js +0 -1
- package/dist/web/assets/zh-DIYPlVjz.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-translator-BFUJmSkR.js";function t(t){return e(`app.output.status.${t}`)}function n(e){return t(e)}export{t as n,n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as systemFailure}from"./chunk-systemError-B-1nL94i.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{n as taskTestCommand}from"./chunk-taskTest-4rIxp0rL.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{l as testCasesCommand}from"./chunk-testCases-xculyxH_.js";
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./chunk-atomicWrite-C6J1gDtO.js";import{f as t}from"./chunk-license-x3oHbKe2.js";import{r as n}from"./chunk-translator-BFUJmSkR.js";import{n as r}from"./chunk-status-DgeSOz3A.js";import{t as i}from"./chunk-table-CJtiXv0e.js";import{$ as a,B as o,F as s,H as c,I as l,Jt as u,Kt as d,L as f,R as p,V as m,W as h,Xt as g,Yt as _,et as ee,ot as v,qt as y}from"./chunk-src-BLyg_6UX.js";import{a as b}from"./chunk-moddle-Dlk0NR-u.js";import{c as x,u as S}from"./chunk-engine-CxgdJ2wO.js";import{a as C,r as w,t as T}from"./chunk-context-DPJmldqg.js";import{t as E}from"./chunk-plural-Bq_4vgOr.js";import{t as D}from"./chunk-diagrams-6suPQBVQ.js";import{a as O,d as te,i as ne,l as k,o as A,t as j}from"./chunk-tests-C3XJ9LMT.js";import{d as M,l as N,r as P}from"./chunk-deploy-DOXu2-8q.js";import F from"node:path";import{existsSync as I,mkdirSync as L,readFileSync as R,writeFileSync as z}from"node:fs";import{createInterface as re}from"node:readline/promises";async function ie(e){let t=re({input:process.stdin,output:process.stderr});try{let r=await t.question(n(`app.output.confirmInTerminal`,{url:e}));return/^y(es)?$/i.test(r.trim())}finally{t.close()}}const B=/\.(bpmn20\.xml|bpmn\.xml|bpmn)$/i,ae=/<(?:[\w-]+:)?process\b[^>]*\bid="([^"]+)"/g;function V(e){return F.resolve(g(F.resolve(e)))}function H(e){let t=F.resolve(e);for(;!I(t)&&F.dirname(t)!==t;)t=F.dirname(t);return t}function U(e){let t=F.resolve(e);return f(t,D(T(H(e)).root).map(e=>F.resolve(e)))}function W(e){let t=[],n=/* @__PURE__ */ new Set,r=e=>{n.has(e.cases)||(n.add(e.cases),t.push(e))};for(let t of e){if(/\.json$/i.test(t)){r({diagram:U(t),cases:F.resolve(t)});continue}let e=!B.test(t);for(let n of D(t)){let t=V(n);(!e||I(t))&&r({diagram:n,cases:t})}}return t}async function G(e){let t=T(e).root,n=[...D(t),...A(t)].map(e=>({path:F.resolve(e),read:async()=>R(e,`utf8`)}));return p({path:F.resolve(e),content:R(e,`utf8`)},n)}function K(e){let t=M(e);return t?{engine:v(N(t),P(t)),url:t.url,forTests:t.forTests}:null}function oe(e){return`${(e/1e3).toFixed(1)} s`}function q(t,r){return o({getItem:()=>I(t)?R(t,`utf8`):null,setItem:(r,i)=>{try{e(t,`${JSON.stringify(JSON.parse(i),null,2)}\n`)}catch(e){console.error(n(`app.output.couldNotRememberBuilds`,{file:t}),e)}}},t,r)}function J(e){return q(F.join(t(process.env),`test-builds.json`),e)}function Y(e){let t=e.keyOf??(e=>e.url??`default`),r=/* @__PURE__ */ new Set;return async i=>{let a=m({url:i.url,forTests:i.forTests});return a===`allowed`||r.has(t(i))?null:a===`refused`?c(i.url):e.ci?n(`app.output.pipelineCannotConfirm`,{url:i.url}):e.confirm?await e.confirm(i.url??``)?(r.add(t(i)),null):n(`app.output.notConfirmedForTests`):n(`app.output.notMarkedForTests`,{url:i.url})}}function X(e){return`confirm`in e?e.confirm:process.stdin.isTTY&&process.stderr.isTTY?ie:void 0}async function Z(e,t,i=K){let o=t.write??(e=>process.stdout.write(`${e}\n`)),c=t.teamcity||!!process.env.TEAMCITY_VERSION,d=W(e);if(d.length===0)return{ok:!1,lines:[n(`app.output.noTestCaseFiles`)]};let f=ee(/* @__PURE__ */ new Date),p=/* @__PURE__ */ new Map,m={passed:0,failed:0,skipped:0},h=/* @__PURE__ */ new Map,g=/* @__PURE__ */ new Map,_=new Map(d.map(e=>[e.cases,e.diagram])),v=e=>T(H(e)).root,y=e=>{let t=v(e),n=h.get(t)??[];return h.set(t,n),n},b=e=>{let t=p.get(e)??{name:e,results:[]};return p.set(e,t),t},x=e=>e.url??`default`,S=Y({ci:t.ci??!!process.env.CI,confirm:X(t),keyOf:x}),{stopped:C}=await s(d.map(e=>e.cases),{runId:f,read:async e=>I(e)?R(e,`utf8`):null,unreadable:e=>n(`app.output.noTestCaseFile`,{file:w(e)}),diagramFor:async e=>_.get(e)??null,targetOf:async e=>i(e),keyOf:x,refusal:S,resources:G,engine:e=>e.engine,builds:e=>{let n=g.get(x(e))??(t.builds??J)(x(e));return g.set(x(e),n),n},keep:async(e,t,n)=>{let r=F.join(v(n),`.penstock`,`runs`),i=F.join(r,f,`${t}.json`);return L(F.dirname(i),{recursive:!0}),z(F.join(r,`.gitignore`),`*
|
|
2
|
-
`),z(i,`${JSON.stringify(e,null,2)}\n`),i}},e=>{switch(c&&l(e).forEach(o),e.kind){case`suiteStarted`:b(e.suite),y(e.file);return;case`note`:c||o(e.text);return;case`refused`:m.failed+=1,b(e.suite).results.push({testCase:e.suite,outcome:`failed`,message:e.reason,durationMs:0}),y(e.file).push({file:w(e.file),testCase:e.suite,outcome:`failed`,message:e.reason}),c||(o(`${r(`fail`)} ${e.suite}`),o(` ${e.reason}`));return;case`run`:!c&&e.event.kind===`log`&&e.event.error&&o(` ${e.event.text}`);return;case`result`:{let{result:t,testCase:i}=e;if(m[t.outcome]+=1,b(e.suite).results.push({testCase:i.name,outcome:t.outcome,message:t.message,durationMs:e.durationMs}),y(e.file).push({file:w(e.file),testCase:i.name,outcome:t.outcome,...t.message?{message:t.message}:{},...e.kept?{trace:F.relative(v(e.file),e.kept)}:{}}),!c){let a={passed:r(`pass`),failed:r(`fail`),skipped:r(`skip`)}[t.outcome];o(`${a} ${e.suite} › ${i.name} (${oe(e.durationMs)})`),t.message&&t.outcome!==`passed`&&o(` ${t.message}`),t.outcome!==`passed`&&u(i)&&o(` ${n(`app.output.penstockBehaviourHints`)}`)}return}default:return}},{signal:t.signal,stepTimeoutMs:t.stepTimeoutMs,pollMs:t.pollMs,settleReads:t.settleReads});for(let[e,t]of h){let n=F.join(e,`.penstock`,`runs`);L(F.join(n,f),{recursive:!0}),z(F.join(n,`.gitignore`),`*
|
|
3
|
-
`),z(F.join(n,f,`run.json`),`${JSON.stringify({runId:f,at:(/* @__PURE__ */ new Date()).toISOString(),results:t},null,2)}\n`)}t.junitXml&&(L(F.dirname(F.resolve(t.junitXml)),{recursive:!0}),z(t.junitXml,a([...p.values()])));let D=E(d.length,`app.output.count.file`),O=n(`app.output.totals`,{passed:m.passed,failed:m.failed,skipped:m.skipped,files:D});return C?{ok:!1,lines:[``,n(`app.output.stopped`,{totals:O})]}:{ok:m.failed===0,refused:!1,lines:[``,O]}}function se(e){return e.flatMap(e=>/\.json$/i.test(e)?[U(e)].filter(e=>!!e):D(e))}async function Q(e){let t=[],a=!1;for(let i of se(e)){let e=await b(R(i,`utf8`));if(!e){a=!0,t.push({status:r(`fail`),file:w(i),cases:`0`,details:n(`app.output.unreadableBpmn`)});continue}let o=h(e),s=o.items.map(e=>e.testCase);if(s.length===0){t.push({status:r(`skip`),file:w(i),cases:`0`,details:o.unplannable[0]?.problem??n(`app.output.noExecutableProcessWithAWay`)});continue}let c=V(i),l=d(I(c)?R(c,`utf8`):null,s);if(`problem`in l){a=!0,t.push({status:r(`fail`),file:w(c),cases:`0`,details:l.problem});continue}L(F.dirname(c),{recursive:!0}),z(c,_(l.file));let u=s.filter(e=>l.added.includes(e.name)&&e.description?.startsWith(n(`app.output.toFillInPrefix`))).length,f=l.kept.length?n(`app.output.alreadyThereAndKept`,{count:l.kept.length}):``,p=o.unplannable.length?n(`app.output.couldNotBePlanned`,{ways:E(o.unplannable.length,`app.output.count.way`),problem:o.unplannable[0].problem}):``;t.push({status:r(`wrote`),file:w(c),cases:n(`app.output.newCount`,{count:l.added.length}),details:`${u?n(`app.output.toFillIn`,{count:u}):n(`app.output.ready`)}${f}${p}`})}if(t.length===0)return{ok:!1,lines:[n(`app.output.noBpmnFiles`)]};let o=i(t,{columns:[{name:`status`,header:n(`app.cli.header.status`),minWidth:6},{name:`file`,header:n(`app.cli.header.file`),minWidth:24},{name:`cases`,header:n(`app.cli.header.testCases`),minWidth:12},{name:`details`,header:n(`app.cli.header.details`)}]});return{ok:!a,refused:!1,lines:o}}function ce(e,t,n,r,i){let a=e.name===`kotlin`,o=[`io.camunda.process.test.api.CamundaProcessTest`,`io.camunda.process.test.api.TestDeployment`,`io.camunda.process.test.api.testCases.TestCase`,`io.camunda.process.test.api.testCases.TestCaseRunner`,`io.camunda.process.test.api.testCases.TestCaseSource`,`org.junit.jupiter.params.ParameterizedTest`].map(t=>`import ${t}${e.end}`),s=a?[`class ${n} {`,``,` private lateinit var testCaseRunner: TestCaseRunner`,``,` @ParameterizedTest`,` @TestCaseSource(fileNames = ${e.array(i.map(t=>e.str(t)))})`,` fun runs(testCase: TestCase, fileName: String) {`,` testCaseRunner.run(testCase)`,` }`,`}`]:[`class ${n} {`,``,` private TestCaseRunner testCaseRunner;`,``,` @ParameterizedTest`,` @TestCaseSource(fileNames = ${e.array(i.map(t=>e.str(t)))})`,` void runs(final TestCase testCase, final String fileName) {`,` testCaseRunner.run(testCase);`,` }`,`}`];return[`package ${t}${e.end}`,``,...o,``,`@CamundaProcessTest`,`@TestDeployment(resources = ${e.array(r.map(t=>e.str(t)))})`,...s,``].join(`
|
|
4
|
-
`)}async function $(e){let t=[],i=/* @__PURE__ */ new Set,a=0;for(let o of W(e)){if(!o.diagram)continue;let e=x(C(T(o.diagram).values.engine))??`camunda-8`;if(e!==`camunda-8`){t.push(`${r(`skip`).padEnd(5)} ${w(o.diagram)} ${n(`app.output.noJUnitBridge`,{engine:S(e)})}`);continue}let s=o.cases.split(F.sep).join(`/`),c=s.indexOf(`/src/test/resources/test-cases/`);if(c<0){t.push(`${r(`skip`).padEnd(5)} ${w(o.cases)} ${n(`app.output.casesFolder`)}`);continue}let l=te(o.diagram,{}),d=[...R(o.diagram,`utf8`).matchAll(ae)][0]?.[1]??F.basename(o.diagram).replace(B,``),f=`${k(d)}TestCasesTest`,p=F.join(l.out,...l.pkg.split(`.`),`${f}.${l.language.extension}`),m=(await G(o.diagram)).map(e=>O(e.path)),h=[s.slice(c+31)];L(F.dirname(p),{recursive:!0}),z(p,ce(l.language,l.pkg,f,m,h)),a+=1,i.add(l.module),t.push(n(`app.output.wroteTheBridge`,{file:w(p),files:h.join(`, `)}));let g=((I(o.cases)?y(R(o.cases,`utf8`)).file:null)?.testCases??[]).filter(u).map(e=>e.name);g.length&&t.push(n(`app.output.penstockOnlyCases`,{count:g.length,names:g.join(`, `)}))}for(let e of i){let r=ne(e),i=r?R(r,`utf8`):``,{present:a,needed:o}=j[`camunda-8`];a.test(i)||t.push(``,n(`app.output.classNeedsDependency`,{where:r?n(`app.output.inFile`,{file:w(r)}):``}),...o.map(e=>` ${e}`))}return a===0&&t.length===0?{ok:!1,lines:[n(`app.output.noTestCaseFilesFirst`)]}:{ok:a>0,refused:!1,lines:t}}async function le(e,t){return t.generate?Q(e):t.junit?$(e):Z(e,t)}export{J as a,Z as c,Q as i,le as l,K as n,Y as o,q as r,G as s,X as t,$ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{f as testsCommand}from"./chunk-tests-C3XJ9LMT.js";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-translator-BFUJmSkR.js";import{n as t}from"./chunk-status-DgeSOz3A.js";import{t as n}from"./chunk-table-CJtiXv0e.js";import{G as r,J as i,K as a,U as o,ln as s,pt as c,tt as l}from"./chunk-src-BLyg_6UX.js";import{n as u}from"./chunk-moddle-Dlk0NR-u.js";import{_ as d,c as f,g as p,m,o as h,u as g,x as _,y as v}from"./chunk-engine-CxgdJ2wO.js";import{s as ee}from"./chunk-failure-BsimkHy_.js";import{a as y,i as b,r as x,t as S}from"./chunk-context-DPJmldqg.js";import{i as C,r as w}from"./chunk-folders-13vx0i0n.js";import{t as T}from"./chunk-plural-Bq_4vgOr.js";import E from"node:path";import{existsSync as D,mkdirSync as O,readFileSync as k,readdirSync as A,writeFileSync as j}from"node:fs";function M(e){let t=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(e=>e[0].toUpperCase()+e.slice(1)).join(``);return/^[0-9]/.test(t)?`P${t}`:t||`Process`}function N(e,t){let n=e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\t/g,`\\t`).replace(/[\u0000-\u001f]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`);return`"${t?n.replace(/\$/g,`\\$`):n}"`}function P(e){return Number.isNaN(e)?`Double.NaN`:e===1/0?`Double.POSITIVE_INFINITY`:e===-1/0?`Double.NEGATIVE_INFINITY`:null}const F={name:`java`,extension:`java`,str:e=>N(e,!1),num:e=>P(e)??(Number.isInteger(e)?Math.abs(e)<=2147483647?String(e):Math.abs(e)<0x7ce66c50e2840000?`${e}L`:`${e}d`:`${e}d`),map:e=>e.length===0?`Map.of()`:`Map.ofEntries(${e.map(([e,t])=>`Map.entry(${e}, ${t})`).join(`, `)})`,let:(e,t,n)=>`${e} ${t} = ${n}`,end:`;`,delegate:`(JavaDelegate) execution -> {}`,array:e=>`{${e.join(`, `)}}`},I={name:`kotlin`,extension:`kt`,str:e=>N(e,!0),num:e=>P(e)??String(e),map:e=>`mapOf<String, Any>(${e.map(([e,t])=>`${e} to ${t}`).join(`, `)})`,let:(e,t,n)=>`val ${t} = ${n}`,end:``,delegate:`JavaDelegate { }`,array:e=>`[${e.join(`, `)}]`};function L(e,t){return typeof t==`string`?e.str(t):typeof t==`boolean`?String(t):typeof t==`number`?e.num(t):R(e,t)}function R(e,t){return e.map(Object.entries(t).map(([t,n])=>[e.str(t),L(e,n)]))}function z(e,t){let n=(t??``).replace(/^=/,``).trim().replace(/^"|"$/g,``),r=/^R\d*\/(P.+)$/.exec(n),i=r?r[1]:n;return/^P(?!$)(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$/.test(i)?`Duration.parse(${e.str(i)})`:`Duration.ofDays(365)`}function B(e){let t=E.resolve(e).split(E.sep).join(`/`),n=/\/src\/(?:main|test)\/resources\/(.+)$/.exec(t);return n?n[1]:E.basename(e)}function V(e,t){let n=C(e,t),r=[],i=e=>{for(let t of A(e,{withFileTypes:!0})){if(n(),c.has(t.name)||t.name.startsWith(`.`))continue;let a=E.join(e,t.name);t.isDirectory()?w(a)&&i(a):/\.(dmn|form)$/i.test(t.name)&&r.push(a)}};return i(e),r}function H(e){let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map;for(let r of V(e)){let e=k(r,`utf8`);/\.dmn$/i.test(r)?l(`decision`,e).forEach(e=>t.set(e,r)):l(`form`,e).forEach(e=>n.set(e,r))}return{decisions:t,forms:n}}function U(e,t,n){let r=t.correlationKey?.replace(/^=/,``).trim()??``;return/^[A-Za-z_]\w*$/.test(r)&&n[r]!==void 0?e.str(String(n[r])):/^"[^"]*"$/.test(r)?e.str(r.slice(1,-1)):e.str(`correlation-key`)}function W(e,t,n){return t.stepIds.flatMap(t=>{let r=n.get(t);return r?.host===e&&r.interrupting===!1?[[t,r]]:[]})}function te(e,t,n,i,s){let{values:c,unresolved:l}=a(t,s),u=R(e,r(c)),d=s.get(t.startId),f=new Map(t.decisions.filter(e=>e.boundaryId).map(e=>[e.decisionId,s.get(e.boundaryId)])),p=[],m=t=>p.push(` ${t.endsWith(`;`)?`${t.slice(0,-1)}${e.end}`:t}`);p.push(` @Test`,` @DisplayName(${e.str(o(t))})`,e.name===`kotlin`?` fun scenario${n+1}() {`:` void scenario${n+1}() {`),l.forEach(e=>m(`// TODO ${e}`)),t.stepIds.forEach(t=>{let n=s.get(t);n?.calledProcess&&m(`processTestContext.mockChildProcess(${e.str(n.calledProcess)});`)}),d?.event===`message`&&d.message?m(`client.newPublishMessageCommand().messageName(${e.str(d.message??``)}).withoutCorrelationKey().variables(${u}).send().join();`):m(`${e.let(`ProcessInstanceEvent`,`processInstance`,`client.newCreateInstanceCommand().bpmnProcessId(${e.str(i)}).latestVersion().variables(${u}).send().join()`)};`);let h=[],g=/* @__PURE__ */ new Set,_=(t,n)=>{g.add(t),n.event===`timer`&&m(`processTestContext.increaseTime(${z(e,n.timer)});`),n.event===`message`&&m(`client.newPublishMessageCommand().messageName(${e.str(n.message??``)}).correlationKey(${U(e,n,c)}).send().join();`),n.event===`signal`&&m(`client.newBroadcastSignalCommand().signalName(${e.str(n.signal??``)}).send().join();`),n.event===`error`&&m(`processTestContext.throwBpmnErrorFromJob(JobSelectors.byElementId(${e.str(n.host??``)}), ${e.str(n.errorCode??``)});`),[`timer`,`message`,`signal`,`error`].includes(n.event??``)||m(`// TODO trigger the ${n.event??`boundary`} event ${n.id}`),h.push(t)};for(let n of t.stepIds){let r=s.get(n);if(!r)continue;let i=f.get(n);if(r.host)g.has(n)||_(n,r);else if(!(i&&i.interrupting!==!1)){for(let[e,r]of W(n,t,s))_(e,r);r.type===`bpmn:UserTask`?m(r.zeebeUserTask?`processTestContext.completeUserTask(UserTaskSelectors.byElementId(${e.str(n)}));`:`processTestContext.completeJob(JobSelectors.byElementId(${e.str(n)}));`):r.job?m(`processTestContext.completeJob(JobSelectors.byElementId(${e.str(n)}));`):r.event===`message`?m(`client.newPublishMessageCommand().messageName(${e.str(r.message??``)}).correlationKey(${U(e,r,c)}).send().join();`):r.event===`timer`?m(`processTestContext.increaseTime(${z(e,r.timer)});`):r.event===`signal`&&r.type.includes(`Catch`)&&m(`client.newBroadcastSignalCommand().signalName(${e.str(r.signal??``)}).send().join();`),h.push(n)}}return h.push(...t.endIds),m(`assertThat(${d?.event===`message`&&d.message?`ProcessInstanceSelectors.byProcessId(${e.str(i)})`:`processInstance`})`),m(` .isCompleted()`),m(` .hasCompletedElements(${h.map(t=>`byId(${e.str(t)})`).join(`, `)});`),p.push(` }`),p}function ne(e,t,n,i,s){let{values:c,unresolved:l}=a(t,s),u=R(e,r(c)),d=s.get(t.startId),f=new Map(t.decisions.filter(e=>e.boundaryId).map(e=>[e.decisionId,s.get(e.boundaryId)])),p=[],m=t=>p.push(` ${t.endsWith(`;`)?`${t.slice(0,-1)}${e.end}`:t}`);p.push(` @Test`,` @DisplayName(${e.str(o(t))})`,e.name===`kotlin`?` fun scenario${n+1}() {`:` void scenario${n+1}() {`),l.forEach(e=>m(`// TODO ${e}`)),new Set(t.stepIds.map(e=>s.get(e)?.delegateBean).filter(e=>!!e)).forEach(t=>m(`Mocks.register(${e.str(t)}, ${e.delegate});`)),m(d?.event===`message`&&d.message?`${e.let(`ProcessInstance`,`processInstance`,`runtimeService().startProcessInstanceByMessage(${e.str(d.message??``)}, ${u})`)};`:`${e.let(`ProcessInstance`,`processInstance`,`runtimeService().startProcessInstanceByKey(${e.str(i)}, ${u})`)};`),d?.asyncAfter&&m(`execute(job(${e.str(d.id)}, processInstance));`);let h=[d?.id??t.startId],g=/* @__PURE__ */ new Set,_=(t,n)=>{g.add(t),n.event===`timer`?m(`execute(job(${e.str(t)}, processInstance));`):n.event===`message`?m(`runtimeService().createMessageCorrelation(${e.str(n.message??``)}).processInstanceId(processInstance.getId()).correlate();`):n.event===`signal`?m(`runtimeService().signalEventReceived(${e.str(n.signal??``)});`):n.event===`error`&&s.get(n.host??``)?.external!==void 0?(m(`${e.let(`String`,`errorTask`,``)}externalTaskService().fetchAndLock(1, "penstock").topic(${e.str(s.get(n.host??``)?.external??``)}, 60000L).execute().get(0).getId();`),m(`externalTaskService().handleBpmnError(errorTask, "penstock", ${e.str(n.errorCode??``)});`)):m(`// TODO trigger the ${n.event??`boundary`} event ${t}`),h.push(t)};for(let n of t.stepIds){let r=s.get(n);if(!r)continue;let i=f.get(n);if(r.host)g.has(n)||_(n,r);else if(i&&i.interrupting!==!1)r.asyncBefore&&m(`execute(job(${e.str(n)}, processInstance));`);else{r.asyncBefore&&m(`execute(job(${e.str(n)}, processInstance));`);for(let[e,r]of W(n,t,s))_(e,r);r.type===`bpmn:UserTask`?m(`complete(task(${e.str(n)}, processInstance));`):r.external===void 0?r.event===`message`?m(`runtimeService().createMessageCorrelation(${e.str(r.message??``)}).processInstanceId(processInstance.getId()).correlate();`):r.event===`timer`?m(`execute(job(${e.str(n)}, processInstance));`):r.event===`signal`&&r.type.includes(`Catch`)&&m(`runtimeService().signalEventReceived(${e.str(r.signal??``)});`):m(`complete(externalTask(${e.str(n)}, processInstance));`),r.asyncAfter&&m(`execute(job(${e.str(n)}, processInstance));`),h.push(n)}}return h.push(...t.endIds),m(`assertThat(processInstance).hasPassed(${h.map(t=>e.str(t)).join(`, `)}).isEnded();`),p.push(` }`),p}function re(e){return(e.rootElements??[]).filter(e=>e.$type===`bpmn:Process`&&e.isExecutable!==!1).map(e=>e.id??``)}function G(e,t){return t.map(t=>e.name===`kotlin`?`import ${t.replace(/^static /,``)}`:`import ${t};`)}function ie(e,t,n,r,i){let a=e.name===`kotlin`;return[a?`package ${t}`:`package ${t};`,``,...G(e,[`static io.camunda.process.test.api.CamundaAssert.assertThat`,`static io.camunda.process.test.api.assertions.ElementSelectors.byId`]),``,...G(e,[`io.camunda.client.CamundaClient`,...a?[]:[`io.camunda.client.api.response.ProcessInstanceEvent`],`io.camunda.process.test.api.CamundaProcessTest`,`io.camunda.process.test.api.CamundaProcessTestContext`,`io.camunda.process.test.api.TestDeployment`,`io.camunda.process.test.api.assertions.JobSelectors`,`io.camunda.process.test.api.assertions.ProcessInstanceSelectors`,`io.camunda.process.test.api.assertions.UserTaskSelectors`,`java.time.Duration`,...a?[]:[`java.util.Map`],`org.junit.jupiter.api.DisplayName`,`org.junit.jupiter.api.Test`]),``,`@CamundaProcessTest`,`@TestDeployment(resources = ${e.array(r.map(t=>e.str(t)))})`,`class ${n} {`,``,a?` private lateinit var client: CamundaClient`:` private CamundaClient client;`,a?` private lateinit var processTestContext: CamundaProcessTestContext`:` private CamundaProcessTestContext processTestContext;`,``,i.map(e=>e.join(`
|
|
2
|
-
`)).join(`
|
|
3
|
-
|
|
4
|
-
`),`}`,``].join(`
|
|
5
|
-
`)}function ae(e,t,n,r,i,a,o){let s=t.name===`kotlin`,c=d(e);return[s?`package ${n}`:`package ${n};`,``,...G(t,[`static ${c}.bpm.engine.test.assertions.bpmn.BpmnAwareTests.*`]),``,...G(t,[...s?[]:[`java.util.Map`],...o?[`${c}.bpm.engine.delegate.JavaDelegate`]:[],...s?[]:[`${c}.bpm.engine.runtime.ProcessInstance`],`${c}.bpm.engine.test.Deployment`,`${c}.bpm.engine.test.junit5.ProcessEngineExtension`,...o?[`${c}.bpm.engine.test.mock.Mocks`]:[],`org.junit.jupiter.api.DisplayName`,`org.junit.jupiter.api.Test`,`org.junit.jupiter.api.extension.ExtendWith`]),``,s?`@ExtendWith(ProcessEngineExtension::class)`:`@ExtendWith(ProcessEngineExtension.class)`,`@Deployment(resources = ${t.array(i.map(e=>t.str(e)))})`,`class ${r} {`,``,a.map(e=>e.join(`
|
|
6
|
-
`)).join(`
|
|
7
|
-
|
|
8
|
-
`),`}`,``].join(`
|
|
9
|
-
`)}const oe=e=>{let t=d(e);return`<?xml version="1.0" encoding="UTF-8"?>
|
|
10
|
-
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
11
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
12
|
-
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
13
|
-
<bean id="processEngineConfiguration" class="${t}.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
|
|
14
|
-
<property name="jdbcUrl" value="jdbc:h2:mem:penstock;DB_CLOSE_DELAY=1000" />
|
|
15
|
-
<property name="databaseSchemaUpdate" value="true" />
|
|
16
|
-
<property name="jobExecutorActivate" value="false" />
|
|
17
|
-
<property name="historyTimeToLive" value="P180D" />
|
|
18
|
-
<property name="expressionManager">
|
|
19
|
-
<bean class="${t}.bpm.engine.test.mock.MockExpressionManager" />
|
|
20
|
-
</property>
|
|
21
|
-
</bean>
|
|
22
|
-
</beans>
|
|
23
|
-
`},se=[`build.gradle.kts`,`build.gradle`,`pom.xml`];function K(e){let{bpmGroup:t,version:n,client:r}=h[e],i=r.replace(/-external-task-client$/,``);return[`${t}:${i}-bpm-junit5:${n}`,`${t}:${i}-bpm-assert:${n}`,`org.assertj:assertj-core:3.26.3`,`com.h2database:h2:2.3.232`]}const q={"camunda-8":{present:/camunda-process-test/,needed:[`io.camunda:camunda-process-test-java:8.9.21`]},"camunda-7":{present:/camunda-bpm-assert|camunda-bpm-spring-boot-starter-test/,needed:K(`camunda-7`)},operaton:{present:/operaton-bpm-assert|operaton-bpm-spring-boot-starter-test/,needed:K(`operaton`)},"cib-seven":{present:/cibseven-bpm-assert|cibseven-bpm-spring-boot-starter-test/,needed:K(`cib-seven`)},classic:{present:/.*/,needed:[]},flowable:{present:/.*/,needed:[]},activiti:{present:/.*/,needed:[]}};function J(e){return se.map(t=>E.join(e,t)).find(e=>D(e))}function Y(e,t){let n=E.dirname(E.resolve(e));for(;;){if(J(n))return n;let e=E.dirname(n);if(e===n)return t;n=e}}function ce(e){for(let t of[`test`,`main`]){if(D(E.join(e,`src`,t,`kotlin`)))return`kotlin`;if(D(E.join(e,`src`,t,`java`)))return`java`}let t=J(e);return t&&/org\.jetbrains\.kotlin|kotlin\(\s*"jvm"\s*\)/.test(k(t,`utf8`))?`kotlin`:`java`}function X(e,t=[]){if(!D(e)||t.length>=Z)return t;for(let n of A(e,{withFileTypes:!0})){if(n.name.startsWith(`.`))continue;let r=E.join(e,n.name);n.isDirectory()?w(r)&&X(r,t):/\.(java|kt)$/.test(n.name)&&t.length<Z&&t.push(r)}return t}const Z=2e3;function le(e){let t=[];for(let n of[`java`,`kotlin`].flatMap(t=>X(E.join(e,`src`,`main`,t)))){let e=k(n,`utf8`),r=/^\s*package\s+([\w.]+)/m.exec(e)?.[1];if(r){if(e.includes(`@SpringBootApplication`))return r;t.push(r)}}if(t.length===0)return;let n=t[0].split(`.`);for(let e of t){let t=e.split(`.`),r=0;for(;r<n.length&&t[r]===n[r];)r+=1;n=n.slice(0,r)}return n.length>0?n.join(`.`):void 0}function Q(e,t){let n=S(e),r=b(n.values.tests),i=Y(e,n.root),a=y(r.language)?.toLowerCase(),o=a===`kotlin`||a===`java`?a:ce(i),s=t.out?E.resolve(t.out):y(r.out)?E.resolve(n.root,y(r.out)):E.join(i,`src`,`test`,o),c=le(i),l=t.pkg??y(r.package)??(c?`${c}.process`:`processes`);return{module:i,language:o===`kotlin`?I:F,out:s,pkg:l}}async function $(n,r){let a=[],o=[],c=/* @__PURE__ */ new Map,l=/* @__PURE__ */ new Map,d=/* @__PURE__ */ new Map,h=/* @__PURE__ */ new Set;for(let b of n){let n=Q(b,r),C=c.get(n.module)??H(n.module);c.set(n.module,C);let w=n.language,D=f(y(S(b).values.engine))??`camunda-8`;if(p(D)){a.push(`${t(`skip`).padEnd(5)} ${x(b)} ${e(`app.output.noGeneratedTests`,{engine:g(D)})}`);continue}l.set(n.module,(l.get(n.module)??/* @__PURE__ */ new Set).add(D));let A,N;try{({rootElement:A,elementsById:N}=await u(v(D)).fromXML(k(b,`utf8`)))}catch(e){a.push(ee(x(b),e));continue}let P=new Map(Object.values(N).filter(e=>e.id).map(e=>[e.id,s(e)])),F=re(A),I=i(A).filter(e=>F.includes(e.process));for(let t of F){let r=I.filter(e=>e.process===t);if(r.length===0)continue;let i=/* @__PURE__ */ new Set([B(b)]);for(let e of P.values())e.decision&&C.decisions.has(e.decision)&&i.add(B(C.decisions.get(e.decision))),D===`camunda-8`&&e.form&&C.forms.has(e.form)&&i.add(B(C.forms.get(e.form)));let s=`${M(t)}Test`,c=e=>E.join(n.out,...n.pkg.split(`.`),`${e}.${w.extension}`),l=h.has(c(s))?`${M(E.basename(b).replace(/\.bpmn(20)?(\.xml)?$/i,``))}${s}`:s,u=c(l);h.add(u);let f=r.map((e,n)=>m(D)?ne(w,e,n,t,P):te(w,e,n,t,P)),p=m(D)&&f.some(e=>e.some(e=>e.includes(`Mocks.register`))),g=m(D)?ae(D,w,n.pkg,l,[...i],f,p):ie(w,n.pkg,l,[...i],f);O(E.dirname(u),{recursive:!0}),j(u,g);let v=f.reduce((e,t)=>e+t.filter(e=>e.includes(`// TODO`)).length,0);o.push({file:u,process:t,scenarios:r.length,unresolved:v}),a.push(e(`app.output.wroteScenarios`,{file:x(u),scenarios:T(r.length,`app.output.count.scenario`),toFillIn:v?e(`app.output.andToFillIn`,{count:v}):``})),m(D)&&d.set(E.join(E.dirname(n.out),`resources`,_(D)),D)}}for(let[t,n]of d)D(t)||(O(E.dirname(t),{recursive:!0}),j(t,oe(n)),a.push(e(`app.output.wroteTestEngine`,{file:x(t)})));for(let[t,n]of l){let r=J(t),i=r?k(r,`utf8`):``;for(let t of n){let{present:n,needed:o}=q[t];n.test(i)||a.push(``,e(`app.output.testsNeedDependencies`,{where:r?e(`app.output.inFile`,{file:x(r)}):``}),...o.map(e=>` ${e}`))}}return{written:o,lines:a}}async function ue(t,r){let{written:i,lines:a}=await $(t,r);if(i.length===0)return{ok:!1,lines:[...a,e(`app.output.noProcessWithAPath`)]};let o=i.map(t=>({file:x(t.file),process:t.process,scenarios:String(t.scenarios),status:t.unresolved?e(`app.output.toFillIn`,{count:t.unresolved}):e(`app.output.complete`)})),s=n(o,{columns:[{name:`file`,header:e(`app.cli.header.testClass`),minWidth:24},{name:`process`,header:e(`app.cli.header.process`),minWidth:16},{name:`scenarios`,header:e(`app.cli.header.scenarios`),align:`right`,minWidth:9},{name:`status`,header:e(`app.cli.header.status`),minWidth:14}]}),c=i.reduce((e,t)=>e+t.scenarios,0),l=a.filter(e=>!e.startsWith(`wrote `));return{ok:!0,lines:[...s,``,e(`app.output.testsSummary`,{tests:T(c,`app.output.count.test`),classes:T(i.length,`app.output.count.class`)}),...l]}}export{B as a,Y as c,Q as d,ue as f,J as i,M as l,F as n,V as o,I as r,$ as s,q as t,H as u};
|