@kern0x1b/penstock-cli 26.10.2 → 26.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/licensing.json +1 -1
  2. package/dist/penstock.js +456 -195
  3. package/dist/web/assets/{AgentSettings-Iy9ZaTGR.js → AgentSettings-BvzT4Itb.js} +1 -1
  4. package/dist/web/assets/{AgentsDialog-Dt09_TEw.js → AgentsDialog-BqY3wKcV.js} +1 -1
  5. package/dist/web/assets/BpmnCanvas-BTdM1l9l.js +1905 -0
  6. package/dist/web/assets/BpmnDocument-uifU3NGG.js +24 -0
  7. package/dist/web/assets/{ConflictDialog-CaBNoJST.js → ConflictDialog-C4A9-Psr.js} +1 -1
  8. package/dist/web/assets/{DiffDocument-BjLzoDLL.js → DiffDocument-BMTSevd7.js} +1 -1
  9. package/dist/web/assets/{DmnDocument-BSGTyR3r.js → DmnDocument-B8wWuhfX.js} +11 -11
  10. package/dist/web/assets/FormDocument-bQ5VRsrh.js +32 -0
  11. package/dist/web/assets/{FormStepView-BEDXMPef.js → FormStepView-DbMCFSO1.js} +1 -1
  12. package/dist/web/assets/{GraphAwareLayoutService-CZCVRb9X.js → GraphAwareLayoutService-CePcz6pL.js} +1 -1
  13. package/dist/web/assets/NewFileDialog-DsoFURD9.js +47 -0
  14. package/dist/web/assets/{QuickOpen-D3AkwBdF.js → QuickOpen-mzlfRqvG.js} +1 -1
  15. package/dist/web/assets/{ScriptPane-4TG-1RyI.js → ScriptPane-C9q5wLfO.js} +2 -2
  16. package/dist/web/assets/{ScriptRunDialog-C2n9cLcf.js → ScriptRunDialog-Dm-_0H1Z.js} +1 -1
  17. package/dist/web/assets/{SettingsDialog-BUft2ulJ.js → SettingsDialog-Bhwwtyg7.js} +1 -1
  18. package/dist/web/assets/{ShortcutsDialog-Naoea994.js → ShortcutsDialog-BXP0h7Tp.js} +1 -1
  19. package/dist/web/assets/{SourceDocument-PMA1dm6T.js → SourceDocument-DgrNCprS.js} +1 -1
  20. package/dist/web/assets/{TextDocument-D4fl42FV.js → TextDocument-D8N0uaQa.js} +1 -1
  21. package/dist/web/assets/UnreadableFileLayer-D2Rcxnt7.js +1 -0
  22. package/dist/web/assets/{UploadDialog-CEnwtJ3T.js → UploadDialog-Dinga4TP.js} +1 -1
  23. package/dist/web/assets/apply-CzXxiRWK.js +1 -0
  24. package/dist/web/assets/{bpmnTheme-iB2hl29R.js → bpmnTheme-db4tYvop.js} +1 -1
  25. package/dist/web/assets/bridgeInstance-BPwbITOf.js +850 -0
  26. package/dist/web/assets/{commands-BMjdyegc.js → commands-BAnBjEk3.js} +1 -1
  27. package/dist/web/assets/de-Cd75cvcZ.js +1 -0
  28. package/dist/web/assets/{dialog-wo7dFa5A.js → dialog-KVjfqSrB.js} +1 -1
  29. package/dist/web/assets/{diff-BmEImmS0.js → diff-Cw0ENHJR.js} +1 -1
  30. package/dist/web/assets/documentBridge-D5SaBThP.js +240 -0
  31. package/dist/web/assets/{documents-BwU2MdUd.js → documents-Dkor36oS.js} +1 -1
  32. package/dist/web/assets/{duplicate-rWDlHiZr.js → duplicate-ud-StKuO.js} +1 -1
  33. package/dist/web/assets/{engines-C3gTrVWJ.js → engines-BQRXHtW8.js} +1 -1
  34. package/dist/web/assets/es-D2PUEg_Z.js +1 -0
  35. package/dist/web/assets/{formChecks-DXIRZuhX.js → formChecks-DFrCuO4I.js} +1 -1
  36. package/dist/web/assets/fr-DkGYGarc.js +1 -0
  37. package/dist/web/assets/{frontend-By89859W.js → frontend-B05iyhCp.js} +1 -1
  38. package/dist/web/assets/{httpHost-_QDw41Ka.js → httpHost-DX-P_FDg.js} +1 -1
  39. package/dist/web/assets/{index.es-DHW5-gbr.js → index.es-DR-czZl7.js} +1 -1
  40. package/dist/web/assets/{index.es-CVOua_f9.js → index.es-dFUgH_-g.js} +1 -1
  41. package/dist/web/assets/{intelligence-BnJILPl7.js → intelligence-BkxcJMU_.js} +1 -1
  42. package/dist/web/assets/ja-De4NAvK-.js +1 -0
  43. package/dist/web/assets/{jspdf.es.min-Yw43YJzU.js → jspdf.es.min-BMfOi0te.js} +3 -3
  44. package/dist/web/assets/ko-Ci27KQ5n.js +1 -0
  45. package/dist/web/assets/{lib-D6xZQFAF.js → lib-C3uYnGWx.js} +1 -1
  46. package/dist/web/assets/{engine-BPUfS3r2.js → moddle-CGpeSs3G.js} +1 -1
  47. package/dist/web/assets/platform-zEAtGnYc.js +2 -0
  48. package/dist/web/assets/preferences-K6VRM9Ah.js +1 -0
  49. package/dist/web/assets/pt-BR-CNmIseZJ.js +1 -0
  50. package/dist/web/assets/ru-BtK7W4xW.js +1 -0
  51. package/dist/web/assets/{run-Dd_PjDF8.js → run-fV7AmV4q.js} +1 -1
  52. package/dist/web/assets/{samples-DfOV2cQu.js → samples-D-3Bquy_.js} +1 -1
  53. package/dist/web/assets/testCaseRuns-C-0blM3d.js +1 -0
  54. package/dist/web/assets/translator-Dvvasoz-.js +1 -0
  55. package/dist/web/assets/{ui-B2q39Bca.js → ui-TBzvKaKQ.js} +1 -1
  56. package/dist/web/assets/{useTrace-BbcYW5PF.js → useTrace-BgpeAcQR.js} +1 -1
  57. package/dist/web/assets/{web-D7xTiPek.js → web-qJCedJJw.js} +8 -8
  58. package/dist/web/assets/zh-DxI_A5kC.js +1 -0
  59. package/dist/web/index.html +20 -20
  60. package/package.json +4 -1
  61. package/dist/web/assets/BpmnCanvas-CCRBnGIV.js +0 -1905
  62. package/dist/web/assets/BpmnDocument-D2lXXcnN.js +0 -24
  63. package/dist/web/assets/FormDocument-BdCKvI-7.js +0 -32
  64. package/dist/web/assets/NewFileDialog-D9nTKDOT.js +0 -34
  65. package/dist/web/assets/UnreadableFileLayer-DuWtY1bx.js +0 -1
  66. package/dist/web/assets/apply-DwO6xN9h.js +0 -1
  67. package/dist/web/assets/bridgeInstance-CJkr34d9.js +0 -600
  68. package/dist/web/assets/de-BDwOyJ4E.js +0 -1
  69. package/dist/web/assets/documentBridge-uW6vNrY3.js +0 -240
  70. package/dist/web/assets/es-B4wrlqk9.js +0 -1
  71. package/dist/web/assets/fr-BqtYruiB.js +0 -1
  72. package/dist/web/assets/ja-B6eG6Wld.js +0 -1
  73. package/dist/web/assets/ko-Le3hTKqP.js +0 -1
  74. package/dist/web/assets/platform-PXoldsjF.js +0 -2
  75. package/dist/web/assets/preferences-C7SSy7Wf.js +0 -1
  76. package/dist/web/assets/pt-BR-aDlgSu84.js +0 -1
  77. package/dist/web/assets/ru-DJl9EFpu.js +0 -1
  78. package/dist/web/assets/testCaseRuns-6x2pl8U_.js +0 -1
  79. package/dist/web/assets/translator-CTBxdhz9.js +0 -1
  80. package/dist/web/assets/zh-CaEk-YOk.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-B8BYMn-z.js";import{i as t}from"./translator-CTBxdhz9.js";import{x as n}from"./frontend-By89859W.js";import{Ot as r,Rt as i,gn as a,jt as o,kt as s,pn as c,t as l}from"./bridgeInstance-CJkr34d9.js";import{u,y as d}from"./engine-BPUfS3r2.js";import{i as f}from"./engines-C3gTrVWJ.js";var p=new Set([`localhost`,`127.0.0.1`,`[::1]`,`::1`]);function hostOf(e){if(!e)return null;try{return new URL(e).hostname.toLowerCase()}catch{return null}}function mockPermission(e){if(e.forTests)return`allowed`;let t=hostOf(e.url);return t&&(p.has(t)||/^127(?:\.\d{1,3}){3}$/.test(t)||t.endsWith(`.localhost`))?`confirm`:`refused`}function refusalText(e){let n=hostOf(e)??t(`app.testCases.safety.thisEngine`);return t(`app.testCases.safety.refusal`,{where:n})}function noEngine(){return t(`app.scenarios.needsAnEngine`)}function missingTarget(e){return e?.url&&e.ready===!1?t(`app.scenarios.targetNeedsSignIn`,{url:e.url}):noEngine()}var m=new Set([`FetchError`,`ResponseError`,`RequiredError`]);function describeFailure(e){return typeof e==`string`?e:e instanceof TypeError?noEngine():e instanceof Error?m.has(e.name)||/Response returned an error code|The request failed/.test(e.message)?noEngine():e.message:String(e)}var h=e({buildsOn:()=>buildsOn,hostEngine:()=>hostEngine,keepTrace:()=>keepTrace,mayRunOn:()=>mayRunOn,mayRunTests:()=>mayRunTests,readScenarioFile:()=>readScenarioFile,readTestCases:()=>readTestCases,resourcesOf:()=>resourcesOf,runTargetOf:()=>runTargetOf,runTargetProblem:()=>runTargetProblem,targetKey:()=>targetKey});function targetKey(e){return`${e.profile??``}|${e.url??``}`}var g=`penstock.testRuns.confirmed`,_=`penstock.testRuns.builds`;function buildsOn(e){return o(localStorage,_,targetKey(e))}async function runTargetOf(e,t){try{let n=await l().getDeployTargets(e??void 0),r=t??n?.active??null,i=(n?.targets??[]).find(e=>(e?.profile??null)===r);return!i?.ready||!u(String(i.engine))?null:{profile:i.profile??null,url:i.url??null,engine:i.engine,forTests:i.deployment?.forTests===!0}}catch{return null}}async function runTargetProblem(e,t){try{let n=await l().getDeployTargets(e??void 0),r=t??n?.active??null;return missingTarget((n?.targets??[]).find(e=>(e?.profile??null)===r))}catch{return``}}function hostEngine(e,t){let n=l();return f(e.engine,r=>n.askEngine(e.profile,r,t??void 0,!0))}function confirmedTargets(){try{return new Set(JSON.parse(localStorage.getItem(g)??`[]`))}catch{return new Set}}async function mayRunOn(e,n){let r=mockPermission({url:e.url,forTests:e.forTests});if(r===`allowed`)return null;if(r===`refused`)return refusalText(e.url);let i=targetKey(e),a=confirmedTargets();if(a.has(i))return null;if(!await l().confirmWithUser({title:n?.title??t(`app.project.runScenariosOnThisEngine`),text:n?.text??t(`app.project.penstockWillDeployATest`,{url:e.url})+t(`app.project.theBuildAndItsInstances`),accept:n?.accept??t(`app.runs.run`),decline:t(`app.common.cancel`)}))return t(`app.project.notRunTheEngineWas`);a.add(i);try{localStorage.setItem(g,JSON.stringify([...a]))}catch{}return null}async function mayRunTests(){try{return await l().requestFeature(n.TEST_RUNS)}catch{return!1}}async function resourcesOf(e,t){try{let n=l(),i=await n.getProjectFiles(),a=(Array.isArray(i?.files)?i.files:[]).map(e=>({path:e.path,read:()=>n.readFile(e.path)}));return r({path:e,content:t},a)}catch{return[]}}async function byProcessId(e,t){let n;try{n=i(await d(e))}catch{return null}if(n.length===0)return null;try{let e=l(),r=[];for(let n of t){let t=await e.readFile(n).catch(()=>null);t!==null&&r.push({path:n,content:t})}let i=s(n,r),a=i?r.find(e=>e.path===i):void 0;return a?{file:a.path,parsed:c(a.content)}:null}catch{return null}}async function listedTestCases(){return((await l().getProjectFiles())?.testCases??[]).map(e=>e.path)}async function readScenarioFile(e){return(await listedTestCases()).some(t=>t.replace(/\\/g,`/`)===e.replace(/\\/g,`/`))?l().readFileIfPresent(e):null}async function readTestCases(e,t){try{if(e.endsWith(`.json`)){let t=await l().readFile(e).catch(()=>null);return{file:e,parsed:t===null?{file:null,problems:[]}:c(t)}}let n=a(e),r=await listedTestCases(),i=r.find(e=>e.replace(/\\/g,`/`)===n);if(i!==void 0){let e=await l().readFile(i).catch(()=>null);if(e!==null)return{file:i,parsed:c(e)}}if(t){let e=await byProcessId(t,r);if(e)return e}return{file:n,parsed:{file:null,problems:[]}}}catch{return{file:e,parsed:{file:null,problems:[]}}}}async function keepTrace(e,t){try{return await l().saveRunTrace(e.runId,t,`${JSON.stringify(e,null,2)}\n`)}catch(e){return console.error(e),null}}export{mayRunTests as a,resourcesOf as c,targetKey as d,h as f,mayRunOn as i,runTargetOf as l,hostEngine as n,readScenarioFile as o,describeFailure as p,keepTrace as r,readTestCases as s,buildsOn as t,runTargetProblem as u};